From 4ccb893e7b35e63060e717aa34dc51aecb73b9f2 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 25 Oct 2025 17:56:50 +0200 Subject: [PATCH 001/502] Bug 487055 - memcheck/tests/x86-linux/scalar fails running in Docker Also move to 3.27.0.GIT. Will this fix some of the failures in the nightly tests? --- NEWS | 36 +++++++++++++++++++++++++++++++ configure.ac | 6 +++--- memcheck/tests/x86-linux/scalar.c | 12 ++++++++++- 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index fdeebfaea..2ecf886a2 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,39 @@ +Release 3.27.0 (?? Apr 2025) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux, +PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, +MIPS64/Linux, RISCV64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, +X86/Android, X86/Solaris, AMD64/Solaris, AMD64/MacOSX 10.12, X86/FreeBSD, +AMD64/FreeBSD and ARM64/FreeBSD There is also preliminary support for +X86/macOS 10.13, AMD64/macOS 10.13 and nanoMIPS/Linux. + +* ==================== CORE CHANGES =================== + +* ================== PLATFORM CHANGES ================= + + +* ==================== TOOL CHANGES =================== + + +* ==================== FIXED BUGS ==================== + +The following bugs have been fixed or resolved. Note that "n-i-bz" +stands for "not in bugzilla" -- that is, a bug that was reported to us +but never got a bugzilla entry. We encourage you to file bugs in +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. + +487055 memcheck/tests/x86-linux/scalar fails running in Docker + +To see details of a given bug, visit + https://bugs.kde.org/show_bug.cgi?id=XXXXXX +where XXXXXX is the bug number as listed above. + +(3.27.0.RC1: ?? Apr 2025) + + Release 3.26.0 (24 Oct 2025) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/configure.ac b/configure.ac index e30e4c1a1..64b233989 100644 --- a/configure.ac +++ b/configure.ac @@ -16,10 +16,10 @@ AC_PREREQ(2.69) # Also set the (expected/last) release date here. # Do not forget to rerun ./autogen.sh m4_define([v_major_ver], [3]) -m4_define([v_minor_ver], [26]) +m4_define([v_minor_ver], [27]) m4_define([v_micro_ver], [0]) -m4_define([v_suffix_ver], []) -m4_define([v_rel_date], ["24 Oct 2025"]) +m4_define([v_suffix_ver], [GIT]) +m4_define([v_rel_date], ["?? Apr 2026"]) m4_define([v_version], m4_if(v_suffix_ver, [], [v_major_ver.v_minor_ver.v_micro_ver], diff --git a/memcheck/tests/x86-linux/scalar.c b/memcheck/tests/x86-linux/scalar.c index e6ff44fe0..8a04e4bc7 100644 --- a/memcheck/tests/x86-linux/scalar.c +++ b/memcheck/tests/x86-linux/scalar.c @@ -33,6 +33,11 @@ int main(void) long x0 = px[0]; long res; + int in_docker = 0; + if (access("/.dockerenv", F_OK) == 0) { + in_docker = 1; + } + // All __NR_xxx numbers are taken from x86 // __NR_restart_syscall 0 // XXX: not yet handled, perhaps should be... @@ -191,7 +196,12 @@ int main(void) // __NR_nice 34 GO(__NR_nice, "1s 0m"); - SY(__NR_nice, x0); SUCC; + SY(__NR_nice, x0); + if (in_docker) { + FAIL; + } else { + SUCC; + } // __NR_ftime 35 GO(__NR_ftime, "ni"); From f22e76d1bf99aa6e7ed63627ebcd3b89a10bb957 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 25 Oct 2025 20:50:22 +0000 Subject: [PATCH 002/502] Avoid linker warnings in various x86/amd64 testcases. Like so: /usr/bin/ld: int3-x86.o: warning: relocation in read-only section `.text' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE Link with -no-pie. --- cachegrind/tests/x86/Makefile.am | 3 +++ memcheck/tests/amd64-linux/Makefile.am | 3 +++ memcheck/tests/x86-linux/Makefile.am | 3 +++ memcheck/tests/x86/Makefile.am | 4 ++++ none/tests/x86/Makefile.am | 8 ++++++++ 5 files changed, 21 insertions(+) diff --git a/cachegrind/tests/x86/Makefile.am b/cachegrind/tests/x86/Makefile.am index 1d141efc4..7c8519703 100644 --- a/cachegrind/tests/x86/Makefile.am +++ b/cachegrind/tests/x86/Makefile.am @@ -15,3 +15,6 @@ AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) AM_CCASFLAGS += @FLAG_M32@ fpu_28_108_SOURCES = fpu-28-108.S + +# Avoid linker warnings +fpu_28_108_LDFLAGS = -no-pie diff --git a/memcheck/tests/amd64-linux/Makefile.am b/memcheck/tests/amd64-linux/Makefile.am index a3b5df5a6..51b30c362 100644 --- a/memcheck/tests/amd64-linux/Makefile.am +++ b/memcheck/tests/amd64-linux/Makefile.am @@ -34,3 +34,6 @@ defcfaexpr_SOURCES = defcfaexpr.S defcfaexpr_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@ reallocarray_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ scalar_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ + +# Avoid linker warnings +int3_amd64_LDFLAGS = -no-pie diff --git a/memcheck/tests/x86-linux/Makefile.am b/memcheck/tests/x86-linux/Makefile.am index 434b1c085..c40181912 100644 --- a/memcheck/tests/x86-linux/Makefile.am +++ b/memcheck/tests/x86-linux/Makefile.am @@ -42,3 +42,6 @@ scalar_openat2_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ endif scalar_supp_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ shm_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNINITIALIZED@ + +# Avoid linker warnings +int3_x86_LDFLAGS = -no-pie diff --git a/memcheck/tests/x86/Makefile.am b/memcheck/tests/x86/Makefile.am index 6d0d6a198..0aba6ce1b 100644 --- a/memcheck/tests/x86/Makefile.am +++ b/memcheck/tests/x86/Makefile.am @@ -78,3 +78,7 @@ pcmpgt_CXXFLAGS = $(AM_CXXFLAGS) $(FLAG_32ON64_GXX) else pcmpgt_CXXFLAGS = $(AM_CXXFLAGS) endif + +# Avoid linker warnings +fxsave_LDFLAGS = -no-pie +tronical_LDFLAGS = -no-pie diff --git a/none/tests/x86/Makefile.am b/none/tests/x86/Makefile.am index 0606bb17c..cb73cb3c7 100644 --- a/none/tests/x86/Makefile.am +++ b/none/tests/x86/Makefile.am @@ -186,5 +186,13 @@ insn_ssse3_LDADD = -lm x86locked_CFLAGS = $(AM_CFLAGS) -O yield_LDADD = -lpthread +# Avoid linker warnings +cmpxchg8b_LDFLAGS = -no-pie +fcmovnu_LDFLAGS = -no-pie +fxtract_LDFLAGS = -no-pie +incdec_alt_LDFLAGS = -no-pie +looper_LDFLAGS = -no-pie +sbbmisc_LDFLAGS = -no-pie + .def.c: $(PERL) $(srcdir)/gen_insn_test.pl < $< > $@ From b6cd12b0f8d6fa044aafe859dd5f3b134ea2e686 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 25 Oct 2025 23:04:37 +0200 Subject: [PATCH 003/502] Darwin: deprecated warning cleanup Mainly sem* and syscall(). --- configure.ac | 1 + drd/tests/Makefile.am | 7 +++++-- helgrind/tests/Makefile.am | 9 ++++++++- massif/tests/Makefile.am | 4 +++- memcheck/tests/Makefile.am | 9 +++++---- memcheck/tests/darwin/Makefile.am | 4 ++++ none/tests/Makefile.am | 1 + none/tests/darwin/Makefile.am | 2 ++ 8 files changed, 29 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 64b233989..9629e24ca 100644 --- a/configure.ac +++ b/configure.ac @@ -2593,6 +2593,7 @@ AC_GCC_WARNING_SUBST_NO([deprecated], [FLAG_W_NO_DEPRECATED]) # OK for 32 and 64 bit AC_GCC_WARNING_SUBST_NO([alloc-size-larger-than=18446744073709551615], [FLAG_W_NO_ALLOC_SIZE_LARGER_THAN]) AC_GCC_WARNING_SUBST_NO([alloc-size], [FLAG_W_NO_ALLOC_SIZE]) +AC_GCC_WARNING_SUBST_NO([deprecated-declarations], [FLAG_W_NO_DEPRECATED_DECLARATIONS]) AC_GCC_WARNING_SUBST([write-strings], [FLAG_W_WRITE_STRINGS]) AC_GCC_WARNING_SUBST([empty-body], [FLAG_W_EMPTY_BODY]) diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index bf5daf247..40985c539 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -576,10 +576,11 @@ pth_create_chain_CFLAGS += -D__EXTENSIONS__ pth_detached_CFLAGS += -D__EXTENSIONS__ endif +sem_as_mutex_CGLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ tsan_unittest_SOURCES = tsan_unittest.cpp tsan_unittest_CXXFLAGS = $(AM_CXXFLAGS) \ -DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"' \ - @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ + @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ @FLAG_W_NO_DEPRECATED_DECLARATIONS@ unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \ -DENABLE_DRD_CONSISTENCY_CHECKS \ @@ -626,6 +627,7 @@ if HAVE_PTHREAD_BARRIER matinv_LDADD = $(LDADD) -lm endif +pth_detached_sem_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ rwlock_test_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ if VGCONF_OS_IS_SOLARIS rwlock_test_CFLAGS += -D__EXTENSIONS__ @@ -662,10 +664,11 @@ if !VGCONF_OS_IS_SOLARIS std_thread2_LDFLAGS = -Wl,--no-as-needed endif +sem_as_mutex_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ sem_wait_SOURCES = sem_wait.cpp swapcontext_SOURCES = swapcontext.c -swapcontext_CFLAGS = $(AM_CFLAGS) -g +swapcontext_CFLAGS = $(AM_CFLAGS) -g @FLAG_W_NO_DEPRECATED_DECLARATIONS@ if VGCONF_OS_IS_SOLARIS swapcontext_CFLAGS += -D__EXTENSIONS__ endif diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index b8c5fd0e7..152d0aabe 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -272,11 +272,18 @@ else annotate_hbefore_CFLAGS = $(AM_CFLAGS) endif -tc09_bad_unlock_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ bug322621_SOURCES = bug322621.cpp +bug327548_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +bug484480_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ if HAVE_CXX17 check_PROGRAMS += bug392331 bug392331_SOURCES = bug392331.cpp bug392331_CXXFLAGS = $(AM_CXXFLAGS) -std=c++17 endif +tc09_bad_unlock_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ +tc17_sembar_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +tc18_semabuse_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +tc23_bogus_condwait_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +tc24_nonzero_sem_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ + diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index 5992039c4..515913e3c 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -111,5 +111,7 @@ insig_CFLAGS = $(AM_CFLAGS) -Wno-unused-result long_names_CFLAGS = $(AM_CFLAGS) -Wno-unused-result malloc_usable_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_MAYBE_UNINITIALIZED@ one_CFLAGS = $(AM_CFLAGS) -Wno-unused-result -thresholds_CFLAGS = $(AM_CFLAGS) -Wno-unused-result +pages_as_heap_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ realloc_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_FREE_NONHEAP_OBJECT@ +thresholds_CFLAGS = $(AM_CFLAGS) -Wno-unused-result + diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 920f262a6..91bd72914 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -691,17 +691,18 @@ leak_cpp_interior_SOURCES = leak_cpp_interior.cpp # we are actually testing for at runtime. accounting_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ badfree_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_FREE_NONHEAP_OBJECT@ +brk2_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ bug155125_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_RESULT@ @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ bug472219_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ calloc_overflow_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ malloc_usable_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_MAYBE_UNINITIALIZED@ @FLAG_W_NO_UNINITIALIZED@ -mallinfo_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations +mallinfo_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ if VGCONF_OS_IS_SOLARIS mallinfo_LDADD = -lmalloc endif -mallinfo2_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations +mallinfo2_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ malloc3_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ @FLAG_W_NO_ALLOC_SIZE@ -sbfragment_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations +sbfragment_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ if VGCONF_OS_IS_SOLARIS sbfragment_LDADD = -lmalloc endif @@ -741,7 +742,7 @@ endif demangle_SOURCES = demangle.cpp demangle_rust_SOURCES = demangle-rust.c demangle_rust_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_USE_AFTER_FREE@ -dw4_CFLAGS = $(AM_CFLAGS) -gdwarf-4 -fdebug-types-section +dw4_CFLAGS = $(AM_CFLAGS) -gdwarf-4 -fdebug-types-section @FLAG_W_NO_DEPRECATED_DECLARATIONS@ descr_belowsp_LDADD = -lpthread err_disable3_LDADD = -lpthread diff --git a/memcheck/tests/darwin/Makefile.am b/memcheck/tests/darwin/Makefile.am index 4be53a1b5..0810accdc 100644 --- a/memcheck/tests/darwin/Makefile.am +++ b/memcheck/tests/darwin/Makefile.am @@ -40,3 +40,7 @@ AM_CFLAGS += $(AM_FLAG_M3264_PRI) $(FLAG_MMMX) $(FLAG_MSSE) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) $(FLAG_MMMX) $(FLAG_MSSE) AM_CCASFLAGS += $(AM_FLAG_M3264_PRI) +pth_undocumented_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +mkfifo_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +scalar_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +scalar_nocancel_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index a95d66436..dabfcd850 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -462,6 +462,7 @@ resolv_CFLAGS = $(AM_CFLAGS) if VGCONF_OS_IS_SOLARIS resolv_CFLAGS += -U_REENTRANT endif +semlimit_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ semlimit_LDADD = -lpthread sha1_test_CFLAGS = $(AM_CFLAGS) if VGCONF_OS_IS_SOLARIS diff --git a/none/tests/darwin/Makefile.am b/none/tests/darwin/Makefile.am index f9dc367ce..d19fc4aef 100644 --- a/none/tests/darwin/Makefile.am +++ b/none/tests/darwin/Makefile.am @@ -23,3 +23,5 @@ check_PROGRAMS = \ AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) +access_extended_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +bug228343_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ From ce61b07f4bd0340ffd7b069316b1d475eec8e775 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 26 Oct 2025 09:33:32 +0100 Subject: [PATCH 004/502] regtest: fix typo in previous commmit that was supposed to fix deprecated declaration warnings I even managed to copy the line 3 more times without noticing. --- helgrind/tests/Makefile.am | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 152d0aabe..5b6c581ed 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -282,8 +282,7 @@ bug392331_CXXFLAGS = $(AM_CXXFLAGS) -std=c++17 endif tc09_bad_unlock_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ -tc17_sembar_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ -tc18_semabuse_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ -tc23_bogus_condwait_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ -tc24_nonzero_sem_CFLAGS = ${AM_CGLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ - +tc17_sembar_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +tc18_semabuse_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +tc23_bogus_condwait_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ +tc24_nonzero_sem_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ From 7a64c4c8693500ce07af6f98c0e9416de41e7c8b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 26 Oct 2025 09:47:20 +0100 Subject: [PATCH 005/502] regtest: use FLAG_NO_PIE Now sure that the compiler won't complain. --- cachegrind/tests/x86/Makefile.am | 2 +- memcheck/tests/amd64-linux/Makefile.am | 2 +- memcheck/tests/x86-linux/Makefile.am | 2 +- memcheck/tests/x86/Makefile.am | 4 ++-- none/tests/x86/Makefile.am | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cachegrind/tests/x86/Makefile.am b/cachegrind/tests/x86/Makefile.am index 7c8519703..d7f74e289 100644 --- a/cachegrind/tests/x86/Makefile.am +++ b/cachegrind/tests/x86/Makefile.am @@ -17,4 +17,4 @@ AM_CCASFLAGS += @FLAG_M32@ fpu_28_108_SOURCES = fpu-28-108.S # Avoid linker warnings -fpu_28_108_LDFLAGS = -no-pie +fpu_28_108_LDFLAGS = @FLAG_NO_PIE@ diff --git a/memcheck/tests/amd64-linux/Makefile.am b/memcheck/tests/amd64-linux/Makefile.am index 51b30c362..3426c677d 100644 --- a/memcheck/tests/amd64-linux/Makefile.am +++ b/memcheck/tests/amd64-linux/Makefile.am @@ -36,4 +36,4 @@ reallocarray_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ scalar_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ # Avoid linker warnings -int3_amd64_LDFLAGS = -no-pie +int3_amd64_LDFLAGS = @FLAG_NO_PIE@ diff --git a/memcheck/tests/x86-linux/Makefile.am b/memcheck/tests/x86-linux/Makefile.am index c40181912..1ce27054a 100644 --- a/memcheck/tests/x86-linux/Makefile.am +++ b/memcheck/tests/x86-linux/Makefile.am @@ -44,4 +44,4 @@ scalar_supp_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ shm_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNINITIALIZED@ # Avoid linker warnings -int3_x86_LDFLAGS = -no-pie +int3_x86_LDFLAGS = @FLAG_NO_PIE@ diff --git a/memcheck/tests/x86/Makefile.am b/memcheck/tests/x86/Makefile.am index 0aba6ce1b..53ae83f6c 100644 --- a/memcheck/tests/x86/Makefile.am +++ b/memcheck/tests/x86/Makefile.am @@ -80,5 +80,5 @@ pcmpgt_CXXFLAGS = $(AM_CXXFLAGS) endif # Avoid linker warnings -fxsave_LDFLAGS = -no-pie -tronical_LDFLAGS = -no-pie +fxsave_LDFLAGS = @FLAG_NO_PIE@ +tronical_LDFLAGS = @FLAG_NO_PIE@ diff --git a/none/tests/x86/Makefile.am b/none/tests/x86/Makefile.am index cb73cb3c7..18e707cba 100644 --- a/none/tests/x86/Makefile.am +++ b/none/tests/x86/Makefile.am @@ -187,12 +187,12 @@ x86locked_CFLAGS = $(AM_CFLAGS) -O yield_LDADD = -lpthread # Avoid linker warnings -cmpxchg8b_LDFLAGS = -no-pie -fcmovnu_LDFLAGS = -no-pie -fxtract_LDFLAGS = -no-pie -incdec_alt_LDFLAGS = -no-pie -looper_LDFLAGS = -no-pie -sbbmisc_LDFLAGS = -no-pie +cmpxchg8b_LDFLAGS = @FLAG_NO_PIE@ +fcmovnu_LDFLAGS = @FLAG_NO_PIE@ +fxtract_LDFLAGS = @FLAG_NO_PIE@ +incdec_alt_LDFLAGS = @FLAG_NO_PIE@ +looper_LDFLAGS = @FLAG_NO_PIE@ +sbbmisc_LDFLAGS = @FLAG_NO_PIE@ .def.c: $(PERL) $(srcdir)/gen_insn_test.pl < $< > $@ From 30a1e2e9b59223b32dc9755bf92a8a2e54348632 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 26 Oct 2025 15:23:23 +0100 Subject: [PATCH 006/502] configure.ac: fix build lzcnt test to work on both i386 and amd64 The BUILD_LZCNT_TESTS conditional is used in both none/tests/x86/Makefile.am and none/tests/amd64/Makefile.am to check whether to build the lzcnt32 and lzcnt64 test program. However the configure test uses %rax which is only available on amd64. Use %eax instead to make sure the configure test succeeds on both i386 and amd64. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9629e24ca..0092ad2ae 100644 --- a/configure.ac +++ b/configure.ac @@ -3343,7 +3343,7 @@ AC_MSG_CHECKING([if x86/amd64 assembler supports 'lzcnt']) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ do { - __asm__ __volatile__("lzcnt %%rax,%%rax" : : : "rax"); + __asm__ __volatile__("lzcnt %%eax,%%eax" : : : "eax"); } while (0) ]])], [ ac_have_as_lzcnt=yes From 7e1b044013ed3810ff4a197c675fa8e29babdfef Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 26 Oct 2025 18:44:18 +0100 Subject: [PATCH 007/502] regtest: correct a typo nothow instead of nothrow --- .../tests/sized_aligned_new_delete_misaligned1_supp.stderr.exp | 2 +- memcheck/tests/sized_aligned_new_delete_misaligned1_supp.supp | 2 +- memcheck/tests/sized_aligned_new_delete_misaligned2_supp.supp | 2 +- memcheck/tests/sized_aligned_new_delete_misaligned3_supp.supp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.stderr.exp b/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.stderr.exp index eae870ef6..d71c9b38a 100644 --- a/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.stderr.exp +++ b/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.stderr.exp @@ -4,7 +4,7 @@ used_suppression: 1 scalar delete sized aligned bad alignment sized_aligned used_suppression: 1 scalar delete sized aligned alignment mismatch sized_aligned_new_delete_misaligned1_supp.supp used_suppression: 1 array delete aligned nothrow bad alignment sized_aligned_new_delete_misaligned1_supp.supp used_suppression: 1 array new aligned nothrow bad alignment sized_aligned_new_delete_misaligned1_supp.supp -used_suppression: 2 scalar delete aligned nothow bad alignment sized_aligned_new_delete_misaligned1_supp.supp +used_suppression: 2 scalar delete aligned nothrow bad alignment sized_aligned_new_delete_misaligned1_supp.supp used_suppression: 2 scalar new aligned nothrow bad alignment sized_aligned_new_delete_misaligned1_supp.supp used_suppression: 1 array delete aligned alignment mismatch sized_aligned_new_delete_misaligned1_supp.supp used_suppression: 1 array delete aligned bad alignment sized_aligned_new_delete_misaligned1_supp.supp diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.supp b/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.supp index afcb76289..da95c413d 100644 --- a/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.supp +++ b/memcheck/tests/sized_aligned_new_delete_misaligned1_supp.supp @@ -41,7 +41,7 @@ } { - scalar delete aligned nothow bad alignment + scalar delete aligned nothrow bad alignment Memcheck:BadAlign fun:_ZdlPvSt11align_val_tRKSt9nothrow_t fun:main diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned2_supp.supp b/memcheck/tests/sized_aligned_new_delete_misaligned2_supp.supp index f1c01a9f5..511672e8f 100644 --- a/memcheck/tests/sized_aligned_new_delete_misaligned2_supp.supp +++ b/memcheck/tests/sized_aligned_new_delete_misaligned2_supp.supp @@ -48,7 +48,7 @@ } { - scalar delete nothow bad alignment + scalar delete nothrow bad alignment Memcheck:BadAlign fun:_ZdlPvSt11align_val_tRKSt9nothrow_t fun:main diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned3_supp.supp b/memcheck/tests/sized_aligned_new_delete_misaligned3_supp.supp index f1c01a9f5..511672e8f 100644 --- a/memcheck/tests/sized_aligned_new_delete_misaligned3_supp.supp +++ b/memcheck/tests/sized_aligned_new_delete_misaligned3_supp.supp @@ -48,7 +48,7 @@ } { - scalar delete nothow bad alignment + scalar delete nothrow bad alignment Memcheck:BadAlign fun:_ZdlPvSt11align_val_tRKSt9nothrow_t fun:main From f53d33c8db509010156db77aabfaf052d02765f6 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 26 Oct 2025 20:41:38 +0100 Subject: [PATCH 008/502] regtest: update none/tests/linux/bug506910.cpp to add errno value This test recently had a couple of failures. Don't know why, but know that errno wasn't the expected ELOOP. This change adds the value of errno. --- none/tests/linux/bug506910.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/none/tests/linux/bug506910.cpp b/none/tests/linux/bug506910.cpp index 2dbadf56a..fb0fac13a 100644 --- a/none/tests/linux/bug506910.cpp +++ b/none/tests/linux/bug506910.cpp @@ -8,6 +8,7 @@ #include #include #include +#include int main(int argc, char** argv) { @@ -24,7 +25,9 @@ int main(int argc, char** argv) { if (errno != ELOOP) { - throw std::runtime_error("errno should be ELOOP"); + std::stringstream ss; + ss << "errno should be ELOOP (value is " << errno << ')'; + throw std::runtime_error(ss.str()); } } @@ -37,7 +40,9 @@ int main(int argc, char** argv) { if (errno != ELOOP) { - throw std::runtime_error("errno should be ELOOP"); + std::stringstream ss; + ss << "errno should be ELOOP (value is " << errno << ')'; + throw std::runtime_error(ss.str()); } } #endif From dffded0f2ecf487e197766b24cf56f47785768dc Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 26 Oct 2025 21:45:32 +0000 Subject: [PATCH 009/502] s390x: Enable "convert to logical" BFP test This was disabled because I had thought that a negative operand value should result in a condition code of 1. Not so. Additionally the operand value must be 0 after rounding. --- none/tests/s390x/bfp-convert.c | 39 +- none/tests/s390x/bfp-convert.stdout.exp | 679 +++++++++++++++++++----- 2 files changed, 563 insertions(+), 155 deletions(-) diff --git a/none/tests/s390x/bfp-convert.c b/none/tests/s390x/bfp-convert.c index 1d0502e41..dbb5b53ad 100644 --- a/none/tests/s390x/bfp-convert.c +++ b/none/tests/s390x/bfp-convert.c @@ -179,9 +179,9 @@ m3_rtext(unsigned m3_round) { switch (m3_round) { case M3_BFP_ROUND_PER_FPC: return "[per fpc]"; - case M3_BFP_ROUND_NEAREST_AWAY: return "[-> near away]"; + case M3_BFP_ROUND_NEAREST_AWAY: return "[-> nearest with ties away from 0]"; case M3_BFP_ROUND_PREPARE_SHORT: return "[-> prepare-short]"; - case M3_BFP_ROUND_NEAREST_EVEN: return "[-> near away]"; + case M3_BFP_ROUND_NEAREST_EVEN: return "[-> nearest with ties to even]"; case M3_BFP_ROUND_ZERO: return "[-> zero]"; case M3_BFP_ROUND_POSINF: return "[-> +inf]"; case M3_BFP_ROUND_NEGINF: return "[-> -inf]"; @@ -191,7 +191,7 @@ m3_rtext(unsigned m3_round) /* Can be converted to 64-bit and 128-bit values without issues. */ static const float values[] = { - 0.0f, -1.0f, 2.0f, NAN, INFINITY + 0.0f, -0.25f, 2.0f, NAN, INFINITY }; static void @@ -230,7 +230,8 @@ convert_to_int_fpc_tests(unsigned mode) cgxbr(values[j], M3_BFP_ROUND_PER_FPC); } -#if 0 +/* Note: In order to get cc = 1 it is not sufficient for the operand value + to be < 0. Additionally, the operand value after rounding must be 0. */ static void convert_to_logical_fpc_tests(unsigned mode) { @@ -266,7 +267,6 @@ convert_to_logical_fpc_tests(unsigned mode) for (int j = 0; j < sizeof values / sizeof values[0]; ++j) clgxbr(values[j], M3_BFP_ROUND_PER_FPC); } -#endif int main(void) @@ -292,19 +292,16 @@ main(void) } printf("Rounding as 'per M3'\n"); - convert_to_int_m3_tests(1); // M3_BFP_ROUND_NEAREST_AWAY - convert_to_int_m3_tests(3); // M3_BFP_ROUND_PREPARE_SHORT - convert_to_int_m3_tests(4); // M3_BFP_ROUND_NEAREST_EVEN - convert_to_int_m3_tests(5); // M3_BFP_ROUND_ZERO - convert_to_int_m3_tests(6); // M3_BFP_ROUND_POSINF - convert_to_int_m3_tests(7); // M3_BFP_ROUND_NEGINF + convert_to_int_m3_tests(M3_BFP_ROUND_NEAREST_AWAY); + convert_to_int_m3_tests(M3_BFP_ROUND_PREPARE_SHORT); + convert_to_int_m3_tests(M3_BFP_ROUND_NEAREST_EVEN); + convert_to_int_m3_tests(M3_BFP_ROUND_ZERO); + convert_to_int_m3_tests(M3_BFP_ROUND_POSINF); + convert_to_int_m3_tests(M3_BFP_ROUND_NEGINF); //---------------------------------------------------------- // Convert to logical //---------------------------------------------------------- -#if 0 - /* Disabled until condition code weirdness has been cleared up. - Negative floating point number --> cc = 3. Seems wrong to me. */ putchar('\n'); printf("============ Convert to logical =============\n"); printf("Rounding as 'per FPC'\n"); @@ -314,12 +311,12 @@ main(void) } printf("Rounding as 'per M3'\n"); - convert_to_logical_m3_tests(1); // M3_BFP_ROUND_NEAREST_AWAY - convert_to_logical_m3_tests(3); // M3_BFP_ROUND_PREPARE_SHORT - convert_to_logical_m3_tests(4); // M3_BFP_ROUND_NEAREST_EVEN - convert_to_logical_m3_tests(5); // M3_BFP_ROUND_ZERO - convert_to_logical_m3_tests(6); // M3_BFP_ROUND_POSINF - convert_to_logical_m3_tests(7); // M3_BFP_ROUND_NEGINF -#endif + convert_to_logical_m3_tests(M3_BFP_ROUND_NEAREST_AWAY); + convert_to_logical_m3_tests(M3_BFP_ROUND_PREPARE_SHORT); + convert_to_logical_m3_tests(M3_BFP_ROUND_NEAREST_EVEN); + convert_to_logical_m3_tests(M3_BFP_ROUND_ZERO); + convert_to_logical_m3_tests(M3_BFP_ROUND_POSINF); + convert_to_logical_m3_tests(M3_BFP_ROUND_NEGINF); + return 0; } diff --git a/none/tests/s390x/bfp-convert.stdout.exp b/none/tests/s390x/bfp-convert.stdout.exp index c5a17ebd4..7c9d5a1e4 100644 --- a/none/tests/s390x/bfp-convert.stdout.exp +++ b/none/tests/s390x/bfp-convert.stdout.exp @@ -4,8 +4,8 @@ Rounding as 'per FPC' ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -15,8 +15,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -26,8 +26,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -37,8 +37,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -48,8 +48,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -59,8 +59,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -71,8 +71,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -82,8 +82,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -93,8 +93,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -104,8 +104,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -115,8 +115,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -126,8 +126,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -138,8 +138,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -149,8 +149,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -160,8 +160,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -171,8 +171,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -182,8 +182,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -193,8 +193,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -205,8 +205,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -216,8 +216,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -227,8 +227,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -238,8 +238,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -249,8 +249,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -260,8 +260,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -272,8 +272,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -283,8 +283,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -294,8 +294,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -305,8 +305,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -316,8 +316,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -327,8 +327,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -336,12 +336,12 @@ cgxbra nan cc = 3 cgxbr inf cc = 3 cgxbra inf cc = 3 Rounding as 'per M3' -...setting M3 rounding mode to [-> near away] +...setting M3 rounding mode to [-> nearest with ties away from 0] ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -351,8 +351,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -362,8 +362,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -373,8 +373,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -384,8 +384,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -395,8 +395,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -407,8 +407,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -418,8 +418,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -429,8 +429,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -440,8 +440,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -451,8 +451,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -462,20 +462,20 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 cgxbra nan cc = 3 cgxbr inf cc = 3 cgxbra inf cc = 3 -...setting M3 rounding mode to [-> near away] +...setting M3 rounding mode to [-> nearest with ties to even] ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -485,8 +485,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -496,8 +496,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -507,8 +507,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -518,8 +518,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -529,8 +529,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -541,8 +541,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -552,8 +552,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -563,8 +563,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -574,8 +574,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -585,8 +585,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -596,8 +596,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -608,8 +608,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -619,8 +619,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -630,8 +630,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -641,8 +641,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -652,8 +652,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -663,8 +663,8 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 @@ -675,8 +675,8 @@ cgxbra inf cc = 3 ......f32 -> i32 cfebr 0.000000 cc = 0 cfebra 0.000000 cc = 0 -cfebr -1.000000 cc = 1 -cfebra -1.000000 cc = 1 +cfebr -0.250000 cc = 1 +cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 cfebra 2.000000 cc = 2 cfebr nan cc = 3 @@ -686,8 +686,8 @@ cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 cgebra 0.000000 cc = 0 -cgebr -1.000000 cc = 1 -cgebra -1.000000 cc = 1 +cgebr -0.250000 cc = 1 +cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 cgebra 2.000000 cc = 2 cgebr nan cc = 3 @@ -697,8 +697,8 @@ cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 cfdbra 0.000000 cc = 0 -cfdbr -1.000000 cc = 1 -cfdbra -1.000000 cc = 1 +cfdbr -0.250000 cc = 1 +cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 @@ -708,8 +708,8 @@ cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 cgdbra 0.000000 cc = 0 -cgdbr -1.000000 cc = 1 -cgdbra -1.000000 cc = 1 +cgdbr -0.250000 cc = 1 +cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 @@ -719,8 +719,8 @@ cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 cfxbra 0.000000 cc = 0 -cfxbr -1.000000 cc = 1 -cfxbra -1.000000 cc = 1 +cfxbr -0.250000 cc = 1 +cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 @@ -730,11 +730,422 @@ cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 cgxbra 0.000000 cc = 0 -cgxbr -1.000000 cc = 1 -cgxbra -1.000000 cc = 1 +cgxbr -0.250000 cc = 1 +cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 cgxbra nan cc = 3 cgxbr inf cc = 3 cgxbra inf cc = 3 + +============ Convert to logical ============= +Rounding as 'per FPC' +...setting FPC rounding mode to [-> near] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting FPC rounding mode to [-> zero] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting FPC rounding mode to [-> +inf] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting FPC rounding mode to [-> -inf] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 3 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 3 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 3 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 3 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 3 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 3 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting FPC rounding mode to [-> prepare-short] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +Rounding as 'per M3' +...setting M3 rounding mode to [-> nearest with ties away from 0] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting M3 rounding mode to [-> prepare-short] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 3 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 3 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 3 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 3 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 3 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 3 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting M3 rounding mode to [-> nearest with ties to even] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting M3 rounding mode to [-> zero] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting M3 rounding mode to [-> +inf] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 1 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 1 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 1 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 1 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 1 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 1 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 +...setting M3 rounding mode to [-> -inf] +......f32 -> u32 +clfebr 0.000000 cc = 0 +clfebr -0.250000 cc = 3 +clfebr 2.000000 cc = 2 +clfebr nan cc = 3 +clfebr inf cc = 3 +......f32 -> u64 +clgebr 0.000000 cc = 0 +clgebr -0.250000 cc = 3 +clgebr 2.000000 cc = 2 +clgebr nan cc = 3 +clgebr inf cc = 3 +......f64 -> u32 +clfdbr 0.000000 cc = 0 +clfdbr -0.250000 cc = 3 +clfdbr 2.000000 cc = 2 +clfdbr nan cc = 3 +clfdbr inf cc = 3 +......f64 -> u64 +clgdbr 0.000000 cc = 0 +clgdbr -0.250000 cc = 3 +clgdbr 2.000000 cc = 2 +clgdbr nan cc = 3 +clgdbr inf cc = 3 +......f128 -> u32 +clfxbr 0.000000 cc = 0 +clfxbr -0.250000 cc = 3 +clfxbr 2.000000 cc = 2 +clfxbr nan cc = 3 +clfxbr inf cc = 3 +......f128 -> u64 +clgxbr 0.000000 cc = 0 +clgxbr -0.250000 cc = 3 +clgxbr 2.000000 cc = 2 +clgxbr nan cc = 3 +clgxbr inf cc = 3 From 9942278f3ad10fa1ba6ebd513ebca3ae95939e35 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 26 Oct 2025 22:08:48 +0000 Subject: [PATCH 010/502] Remove a FIXME. 538 to go. --- none/tests/s390x/bfp-compare.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/none/tests/s390x/bfp-compare.c b/none/tests/s390x/bfp-compare.c index 35d5018b6..04111594d 100644 --- a/none/tests/s390x/bfp-compare.c +++ b/none/tests/s390x/bfp-compare.c @@ -1,5 +1,3 @@ -// FIXME rename bfp-compare.c - #include #include #include From c862aa8c1ab56887eea779a9eec31ea40c7d992f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 27 Oct 2025 13:09:04 +0000 Subject: [PATCH 011/502] s390x: Testcase workaround GCC 14.2.0 does not recognize convert to fixed/logical opcodes: bfp-convert.c: Assembler messages: bfp-convert.c:205: Error: Unrecognized opcode: `cfebra' bfp-convert.c:210: Error: Unrecognized opcode: `cgebra' ... bfp-convert.c:314: Error: Unrecognized opcode: `clfebr' bfp-convert.c:314: Error: Unrecognized opcode: `clgebr' ... --- none/tests/s390x/bfp-convert.c | 77 +++--- none/tests/s390x/bfp-convert.stdout.exp | 330 ------------------------ 2 files changed, 41 insertions(+), 366 deletions(-) diff --git a/none/tests/s390x/bfp-convert.c b/none/tests/s390x/bfp-convert.c index dbb5b53ad..4d8de26b6 100644 --- a/none/tests/s390x/bfp-convert.c +++ b/none/tests/s390x/bfp-convert.c @@ -21,73 +21,80 @@ #include #include "rounding.h" -#define convert_to_int(opcode,src_type,dst_type,round,value,fmt) \ +// Convert to fixed +#define CFEBR "0xb398" +#define CFDBR "0xb399" +#define CFXBR "0xb39a" +#define CGEBR "0xb3a8" +#define CGDBR "0xb3a8" +#define CGXBR "0xb3aa" + +// Convert to logical +#define CLFEBR "0xb39c" +#define CLFDBR "0xb39d" +#define CLFXBR "0xb39e" +#define CLGEBR "0xb3ac" +#define CLGDBR "0xb3ad" +#define CLGXBR "0xb3ae" + +#define convert_to_int(mnm,opcode,src_type,dst_type,round,value,fmt) \ do { \ src_type src = value; \ dst_type dst; \ unsigned cc; \ \ - __asm__ volatile (opcode " %[dst]," #round ",%[src]\n\t" \ + __asm__ volatile(".insn rrf," opcode "0000," "%[r1],%[r2],%[m3],0\n\t" \ "ipm %[cc]\n\t" \ "srl %[cc],28\n\t" \ - : [dst]"=d"(dst), [cc]"=d"(cc) \ - : [src]"f"(src) \ + : [r1] "=d"(dst), [cc] "=d"(cc) \ + : [r2] "f"(src), [m3] "i"(round) \ : "cc"); \ \ - printf("%s "fmt"\tcc = %u\n", opcode, src, cc); \ - \ - __asm__ volatile (opcode "a %[dst]," #round ",%[src],0\n\t" \ - "ipm %[cc]\n\t" \ - "srl %[cc],28\n\t" \ - : [dst]"=d"(dst), [cc]"=d"(cc) \ - : [src]"f"(src) \ - : "cc"); \ - \ - printf("%sa "fmt"\tcc = %u\n", opcode, src, cc); \ + printf("%s "fmt"\tcc = %u\n", mnm, src, cc); \ } while (0) -#define convert_to_logical(opcode,src_type,dst_type,round,value,fmt) \ +#define convert_to_logical(mnm,opcode,src_type,dst_type,round,value,fmt) \ do { \ src_type src = value; \ dst_type dst; \ unsigned cc; \ \ - __asm__ volatile (opcode " %[dst]," #round ",%[src], 0\n\t" \ - "ipm %[cc]\n\t" \ - "srl %[cc],28\n\t" \ - : [dst]"=d"(dst), [cc]"=d"(cc) \ - : [src]"f"(src) \ - : "cc"); \ + __asm__ volatile(".insn rrf," opcode "0000," "%[r1],%[r2],%[m3],0\n\t" \ + "ipm %[cc]\n\t" \ + "srl %[cc],28\n\t" \ + : [r1] "=d"(dst), [cc] "=d"(cc) \ + : [r2] "f"(src), [m3] "i"(round) \ + : "cc"); \ \ - printf("%s "fmt"\tcc = %u\n", opcode, src, cc); \ + printf("%s "fmt"\tcc = %u\n", mnm, src, cc); \ } while (0) /* Convenience macros */ #define cfebr(value,round) \ - convert_to_int("cfebr",float,int32_t,round,value,"%f") + convert_to_int("cfebr",CFEBR,float,int32_t,round,value,"%f") #define cfdbr(value,round) \ - convert_to_int("cfdbr",double,int32_t,round,value,"%f") + convert_to_int("cfdbr",CFDBR,double,int32_t,round,value,"%f") #define cfxbr(value,round) \ - convert_to_int("cfxbr",long double,int32_t,round,value,"%Lf") + convert_to_int("cfxbr",CFXBR,long double,int32_t,round,value,"%Lf") #define cgebr(value,round) \ - convert_to_int("cgebr",float,int64_t,round,value,"%f") + convert_to_int("cgebr",CGEBR,float,int64_t,round,value,"%f") #define cgdbr(value,round) \ - convert_to_int("cgdbr",double,int64_t,round,value,"%f") + convert_to_int("cgdbr",CGDBR,double,int64_t,round,value,"%f") #define cgxbr(value,round) \ - convert_to_int("cgxbr",long double,int64_t,round,value,"%Lf") + convert_to_int("cgxbr",CGXBR,long double,int64_t,round,value,"%Lf") #define clfebr(value,round) \ - convert_to_logical("clfebr",float,uint32_t,round,value,"%f") + convert_to_logical("clfebr",CLFEBR,float,uint32_t,round,value,"%f") #define clfdbr(value,round) \ - convert_to_logical("clfdbr",double,uint32_t,round,value,"%f") + convert_to_logical("clfdbr",CLFDBR,double,uint32_t,round,value,"%f") #define clfxbr(value,round) \ - convert_to_logical("clfxbr",long double,uint32_t,round,value,"%Lf") + convert_to_logical("clfxbr",CLFXBR,long double,uint32_t,round,value,"%Lf") #define clgebr(value,round) \ - convert_to_logical("clgebr",float,uint64_t,round,value,"%f") + convert_to_logical("clgebr",CLGEBR,float,uint64_t,round,value,"%f") #define clgdbr(value,round) \ - convert_to_logical("clgdbr",double,uint64_t,round,value,"%f") + convert_to_logical("clgdbr",CLGDBR,double,uint64_t,round,value,"%f") #define clgxbr(value,round) \ - convert_to_logical("clgxbr",long double,uint64_t,round,value,"%Lf") + convert_to_logical("clgxbr",CLGXBR,long double,uint64_t,round,value,"%Lf") #define convert_to_int_m3_tests(mode) \ printf("...setting M3 rounding mode to %s\n", m3_rtext(mode)); \ @@ -230,8 +237,6 @@ convert_to_int_fpc_tests(unsigned mode) cgxbr(values[j], M3_BFP_ROUND_PER_FPC); } -/* Note: In order to get cc = 1 it is not sufficient for the operand value - to be < 0. Additionally, the operand value after rounding must be 0. */ static void convert_to_logical_fpc_tests(unsigned mode) { diff --git a/none/tests/s390x/bfp-convert.stdout.exp b/none/tests/s390x/bfp-convert.stdout.exp index 7c9d5a1e4..91f46e900 100644 --- a/none/tests/s390x/bfp-convert.stdout.exp +++ b/none/tests/s390x/bfp-convert.stdout.exp @@ -3,741 +3,411 @@ Rounding as 'per FPC' ...setting FPC rounding mode to [-> near] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting FPC rounding mode to [-> zero] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting FPC rounding mode to [-> +inf] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting FPC rounding mode to [-> -inf] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting FPC rounding mode to [-> prepare-short] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 Rounding as 'per M3' ...setting M3 rounding mode to [-> nearest with ties away from 0] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting M3 rounding mode to [-> prepare-short] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting M3 rounding mode to [-> nearest with ties to even] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting M3 rounding mode to [-> zero] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting M3 rounding mode to [-> +inf] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ...setting M3 rounding mode to [-> -inf] ......f32 -> i32 cfebr 0.000000 cc = 0 -cfebra 0.000000 cc = 0 cfebr -0.250000 cc = 1 -cfebra -0.250000 cc = 1 cfebr 2.000000 cc = 2 -cfebra 2.000000 cc = 2 cfebr nan cc = 3 -cfebra nan cc = 3 cfebr inf cc = 3 -cfebra inf cc = 3 ......f32 -> i64 cgebr 0.000000 cc = 0 -cgebra 0.000000 cc = 0 cgebr -0.250000 cc = 1 -cgebra -0.250000 cc = 1 cgebr 2.000000 cc = 2 -cgebra 2.000000 cc = 2 cgebr nan cc = 3 -cgebra nan cc = 3 cgebr inf cc = 3 -cgebra inf cc = 3 ......f64 -> i32 cfdbr 0.000000 cc = 0 -cfdbra 0.000000 cc = 0 cfdbr -0.250000 cc = 1 -cfdbra -0.250000 cc = 1 cfdbr 2.000000 cc = 2 -cfdbra 2.000000 cc = 2 cfdbr nan cc = 3 -cfdbra nan cc = 3 cfdbr inf cc = 3 -cfdbra inf cc = 3 ......f64 -> i64 cgdbr 0.000000 cc = 0 -cgdbra 0.000000 cc = 0 cgdbr -0.250000 cc = 1 -cgdbra -0.250000 cc = 1 cgdbr 2.000000 cc = 2 -cgdbra 2.000000 cc = 2 cgdbr nan cc = 3 -cgdbra nan cc = 3 cgdbr inf cc = 3 -cgdbra inf cc = 3 ......f128 -> i32 cfxbr 0.000000 cc = 0 -cfxbra 0.000000 cc = 0 cfxbr -0.250000 cc = 1 -cfxbra -0.250000 cc = 1 cfxbr 2.000000 cc = 2 -cfxbra 2.000000 cc = 2 cfxbr nan cc = 3 -cfxbra nan cc = 3 cfxbr inf cc = 3 -cfxbra inf cc = 3 ......f128 -> i64 cgxbr 0.000000 cc = 0 -cgxbra 0.000000 cc = 0 cgxbr -0.250000 cc = 1 -cgxbra -0.250000 cc = 1 cgxbr 2.000000 cc = 2 -cgxbra 2.000000 cc = 2 cgxbr nan cc = 3 -cgxbra nan cc = 3 cgxbr inf cc = 3 -cgxbra inf cc = 3 ============ Convert to logical ============= Rounding as 'per FPC' From 9d536fc5b4edb900675452f1554e7e02fd1f1cd0 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 08:06:28 +0100 Subject: [PATCH 012/502] warnings: one more -Wno-deprecated-declarations flag --- mpi/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpi/Makefile.am b/mpi/Makefile.am index e57e5aa85..054b37b75 100644 --- a/mpi/Makefile.am +++ b/mpi/Makefile.am @@ -58,14 +58,14 @@ if BUILD_MPIWRAP_PRI libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I$(top_builddir)/include libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \ - $(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI) -Wno-deprecated-declarations + $(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) endif if BUILD_MPIWRAP_SEC libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I$(top_builddir)/include libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \ - $(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC) -Wno-deprecated-declarations + $(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) endif From b605996b4feb81d700d3b9e7b03996481c8f56aa Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 11:20:22 +0100 Subject: [PATCH 013/502] Darwin: gettaddrinfo suppressions and wildcard memmove redir --- darwin17.supp | 165 +++++++++++++++++++++++++++++++++++++ shared/vg_replace_strmem.c | 4 +- 2 files changed, 167 insertions(+), 2 deletions(-) diff --git a/darwin17.supp b/darwin17.supp index 996688654..a8bd90ef8 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -826,6 +826,7 @@ fun:pthread_rwlock_init { OSX1013:helgrind:_pthread_join Helgrind:Race + ... fun:_pthread_join } @@ -847,6 +848,89 @@ fun:pthread_rwlock_init fun:_pthread_body } +# various getaddrinfo suppressions +{ + OSC1013:helgrind:getaddrinfo + Helgrind:Race + ... + fun:getaddrinfo +} + +{ + OSX1013:helgrind:_fwalk + Helgrind:Race + fun:_fwalk +} + +{ + OSX1013:helgrind:exit + Helgrind:Race + fun:exit +} + +{ + OSX1013:helgrind:freeaddrinfo + Helgrind:Race + fun:freeaddrinfo +} + +# some of these have deep callstacks, this might not work +# with low values of --num-callers +{ + OSC1013:helgrind:si_addrinfo + Helgrind:Race + ... + fun:si_addrinfo +} + +{ + OSC1013:helgrind:file_addrinfo + Helgrind:Race + ... + fun:file_addrinfo +} + +{ + OSX1013:helgrind:xpc_dictionary_apply + Helgrind:Race + ... + fun:xpc_dictionary_apply +} + +{ + OSX1013:helgrind:cache_fill + Helgrind:Race + fun:cache_fill +} + +{ + OSX1013:helgrind:pthead_once + Helgrind:Race + ... + fun:pthread_once +} + +{ + OSX1013:helgrind:objc_destructInstance + Helgrind:Race + ... + fun:objc_destructInstance +} + +{ + OSX1013:helgrind:xpc_create_from_plist + Helgrind:Race + ... + fun:xpc_create_from_plist +} + +{ + OSX1013:helgrind:dispatch_once_f + Helgrind:Race + ... + fun:dispatch_once_f +} + { OSX1013:nanosleep drd:ConflictingAccess @@ -940,23 +1024,42 @@ fun:pthread_rwlock_init drd:ConflictingAccess fun:_pthread_body } + +# various getaddrinfo suppressions { OSX1013:exit drd:ConflictingAccess ... fun:exit } + { OSX1013:freeaddrinfo drd:ConflictingAccess fun:freeaddrinfo } + { OSX1013:getaddrinfo drd:ConflictingAccess ... fun:getaddrinfo } + +{ + OSX1013:drd:si_etaddrinfo + drd:ConflictingAccess + ... + fun:si_addrinfo +} + +{ + OSX1013:helgrind:nw_path_copy_interface_with_generation_internal + Helgrind:Race + ... + fun:nw_path_copy_interface_with_generation_internal +} + { OSX1013:cache_fill drd:ConflictingAccess @@ -984,3 +1087,65 @@ fun:pthread_rwlock_init drd:ConflictingAccess fun:_nc_table_* } + +{ + OSX1013:drd:xpc_dictionary_apply + drd:ConflictingAccess + ... + fun:xpc_dictionary_apply +} + +{ + OSX1013:drd:getaddrinfo + drd:ConflictingAccess + ... + fun:getaddrinfo +} + +{ + OSX1013:drd:xpc_create_from_plist + drd:ConflictingAccess + ... + fun:xpc_create_from_plist +} + +{ + OSX1013:helgrind:nw_path_copy_interface_with_generation_internal + drd:ConflictingAccess + ... + fun:nw_path_copy_interface_with_generation_internal +} + +{ + OSX1013:drd:object_dispose + drd:ConflictingAccess + ... + fun:object_dispose +} + +{ + OSX1013:drd:dispatch_once_f + drd:ConflictingAccess + ... + fun:dispatch_once_f +} + +{ + OSX1013:drd:objc_destructInstance + drd:ConflictingAccess + ... + fun:objc_destructInstance +} + +{ + OSX1013:drd:pthread_rwlock_unlock + drd:ConflictingAccess + fun:pthread_rwlock_unlock +} + +{ + OSX1013:drd:xpc_pipe_routine + drd:ConflictingAccess + ... + fun:xpc_pipe_routine +} diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 2081c62b7..aaa409257 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -1431,8 +1431,8 @@ static inline void my_exit ( int x ) MEMMOVE(VG_Z_LIBC_SONAME, memmoveZDVARIANTZDsse3x) /* memmove$VARIANT$sse3x */ MEMMOVE(VG_Z_LIBC_SONAME, memmoveZDVARIANTZDsse42) /* memmove$VARIANT$sse42 */ # if DARWIN_VERS >= DARWIN_10_9 - /* _platform_memmove$VARIANT$Ivybridge */ - MEMMOVE(libsystemZuplatformZddylib, ZuplatformZumemmoveZDVARIANTZDIvybridge) + /* _platform_memmove$VARIANT$Ivybridge, Nehelem etc. */ + MEMMOVE(libsystemZuplatformZddylib, ZuplatformZumemmoveZDVARIANTZDZa) # endif #elif defined(VGO_solaris) From 4a30e2161236f381445984f7eb7acf022432152d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 14:25:04 +0100 Subject: [PATCH 014/502] Darwin regtest: simplify memcheck filter_supp The filter removes used suppression lines and duplicate lines. Old Darwin sed doesn't understand 'M{}', so use "cat -s" to remove duplicate blank lines instead. --- memcheck/tests/filter_supp.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/memcheck/tests/filter_supp.in b/memcheck/tests/filter_supp.in index 7a245ae22..247a88e31 100644 --- a/memcheck/tests/filter_supp.in +++ b/memcheck/tests/filter_supp.in @@ -5,6 +5,7 @@ SED=@SED@ ./filter_stderr "$@" | -$SED 'N;/^used_suppression/M{/^used_suppression/d;$!N;d};P;D' +$SED '/^used_suppression/d' | +cat -s exit 0 From 951a45bdb7d21923314d1a5228df82d398b71496 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 15:54:59 +0100 Subject: [PATCH 015/502] FreeBSD regtest: clobber R11 for memcheck/tests/leak_cpp_interior --- memcheck/tests/leak.h | 5 +++++ memcheck/tests/leak_cpp_interior.cpp | 2 ++ memcheck/tests/leak_cpp_interior.stderr.exp | 4 ++-- memcheck/tests/leak_cpp_interior.stderr.exp-64bit | 4 ++-- memcheck/tests/leak_cpp_interior.stderr.exp-arm | 4 ++-- memcheck/tests/leak_cpp_interior.stderr.exp-freebsd | 4 ++-- memcheck/tests/leak_cpp_interior.stderr.exp-freebsd-32bit | 4 ++-- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/memcheck/tests/leak.h b/memcheck/tests/leak.h index 6b4450327..6d3a5f440 100644 --- a/memcheck/tests/leak.h +++ b/memcheck/tests/leak.h @@ -148,6 +148,11 @@ do { \ __asm__ __volatile__ ("movl $0, %ecx\n\t"); \ } while (0) +#elif defined (__clang__) && defined(VGA_amd64) +#define CLEAR_CALLER_SAVED_REGS \ + do { \ + __asm__ __volatile__ ("movq $0, %r11\n\t"); \ + } while (0) #elif defined(__arm__) /* 32bit arm */ #define CLEAR_CALLER_SAVED_REGS \ diff --git a/memcheck/tests/leak_cpp_interior.cpp b/memcheck/tests/leak_cpp_interior.cpp index 56c53709d..abfd0d1c2 100644 --- a/memcheck/tests/leak_cpp_interior.cpp +++ b/memcheck/tests/leak_cpp_interior.cpp @@ -8,6 +8,7 @@ #include #include #include "../memcheck.h" +#include "leak.h" // Derived from test provided by Timur Iskhodzhanov (bug 280271) class MyClass @@ -132,6 +133,7 @@ void doit(void) int main() { doit(); + CLEAR_CALLER_SAVED_REGS; (void) VALGRIND_MONITOR_COMMAND("v.set log_output"); fprintf(stderr, "VALGRIND_DO_LEAK_CHECK\n"); diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp b/memcheck/tests/leak_cpp_interior.stderr.exp index ae3ae23b2..6b6c5dc8e 100644 --- a/memcheck/tests/leak_cpp_interior.stderr.exp +++ b/memcheck/tests/leak_cpp_interior.stderr.exp @@ -2,8 +2,8 @@ valgrind output will go to log VALGRIND_DO_LEAK_CHECK x bytes in 1 blocks are definitely lost in loss record ... of ... - by 0x........: doit() (leak_cpp_interior.cpp:119) - by 0x........: main (leak_cpp_interior.cpp:134) + by 0x........: doit() (leak_cpp_interior.cpp:120) + by 0x........: main (leak_cpp_interior.cpp:135) LEAK SUMMARY: definitely lost: x bytes in 1 blocks diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-64bit b/memcheck/tests/leak_cpp_interior.stderr.exp-64bit index 5c85d9917..02e5968ae 100644 --- a/memcheck/tests/leak_cpp_interior.stderr.exp-64bit +++ b/memcheck/tests/leak_cpp_interior.stderr.exp-64bit @@ -2,8 +2,8 @@ valgrind output will go to log VALGRIND_DO_LEAK_CHECK x bytes in 1 blocks are definitely lost in loss record ... of ... - by 0x........: doit() (leak_cpp_interior.cpp:119) - by 0x........: main (leak_cpp_interior.cpp:134) + by 0x........: doit() (leak_cpp_interior.cpp:120) + by 0x........: main (leak_cpp_interior.cpp:135) LEAK SUMMARY: definitely lost: x bytes in 1 blocks diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-arm b/memcheck/tests/leak_cpp_interior.stderr.exp-arm index 6f0a81f75..a236c7777 100644 --- a/memcheck/tests/leak_cpp_interior.stderr.exp-arm +++ b/memcheck/tests/leak_cpp_interior.stderr.exp-arm @@ -2,8 +2,8 @@ valgrind output will go to log VALGRIND_DO_LEAK_CHECK x bytes in 1 blocks are definitely lost in loss record ... of ... - by 0x........: doit() (leak_cpp_interior.cpp:119) - by 0x........: main (leak_cpp_interior.cpp:134) + by 0x........: doit() (leak_cpp_interior.cpp:120) + by 0x........: main (leak_cpp_interior.cpp:135) x bytes in 1 blocks are possibly lost in loss record ... of ... by 0x........: doit() (leak_cpp_interior.cpp:109) diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd b/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd index ac9e462b3..52ead5fa9 100644 --- a/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd +++ b/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd @@ -2,8 +2,8 @@ valgrind output will go to log VALGRIND_DO_LEAK_CHECK x bytes in 1 blocks are definitely lost in loss record ... of ... - by 0x........: doit() (leak_cpp_interior.cpp:119) - by 0x........: main (leak_cpp_interior.cpp:134) + by 0x........: doit() (leak_cpp_interior.cpp:120) + by 0x........: main (leak_cpp_interior.cpp:135) LEAK SUMMARY: definitely lost: x bytes in 1 blocks diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd-32bit b/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd-32bit index 4f1cc7a2d..a6a654769 100644 --- a/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd-32bit +++ b/memcheck/tests/leak_cpp_interior.stderr.exp-freebsd-32bit @@ -2,8 +2,8 @@ valgrind output will go to log VALGRIND_DO_LEAK_CHECK x bytes in 1 blocks are definitely lost in loss record ... of ... - by 0x........: doit() (leak_cpp_interior.cpp:119) - by 0x........: main (leak_cpp_interior.cpp:134) + by 0x........: doit() (leak_cpp_interior.cpp:120) + by 0x........: main (leak_cpp_interior.cpp:135) LEAK SUMMARY: definitely lost: x bytes in 1 blocks From fa73fe4bfe46375ef6bacc5ec9412f1150742618 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 16:08:28 +0100 Subject: [PATCH 016/502] FreeBSD comment: fix amd64 do_syscall_WRK arg comments I recently changed the amd64 syscall to lower the max number of args handled but didn't update the corresponding comment. --- coregrind/m_syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syscall.c b/coregrind/m_syscall.c index cb3c603f8..01766617a 100644 --- a/coregrind/m_syscall.c +++ b/coregrind/m_syscall.c @@ -768,8 +768,8 @@ extern UWord do_syscall_WRK ( UWord a5, /* %r9 */ UWord a6, /* 8(%rsp) */ UWord a7, /* 16(%rsp) */ - UInt *flags, /* 32(%rsp) */ - UWord *rv2 /* 40(%rsp) */ + UInt *flags, /* 24(%rsp) */ + UWord *rv2 /* 32(%rsp) */ ); asm( ".text\n" From 57b894baf7bce33046ff6fb1aa99f510f3c517a5 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 20:40:44 +0100 Subject: [PATCH 017/502] FreeBSD regtest: rationalise memcheck test-plo-no expecteds Now just one 32bit expected. --- memcheck/tests/Makefile.am | 1 - .../tests/test-plo-no.stderr.exp-le32-freebsd | 4 ++-- .../test-plo-no.stderr.exp-le32-freebsd-clang | 20 ------------------- 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 memcheck/tests/test-plo-no.stderr.exp-le32-freebsd-clang diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 91bd72914..f85b69ba0 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -425,7 +425,6 @@ EXTRA_DIST = \ test-plo-no.vgtest test-plo-no.stdout.exp \ test-plo-no.stderr.exp-le64 test-plo-no.stderr.exp-le32 \ test-plo-no.stderr.exp-le32-freebsd test-plo-no.stderr.exp-le64-freebsd \ - test-plo-no.stderr.exp-le32-freebsd-clang \ test-plo-yes.vgtest test-plo-yes.stdout.exp \ test-plo-yes.stderr.exp-le64 test-plo-yes.stderr.exp-le32 \ test-plo-no.stderr.exp-s390x-mvc \ diff --git a/memcheck/tests/test-plo-no.stderr.exp-le32-freebsd b/memcheck/tests/test-plo-no.stderr.exp-le32-freebsd index f80232491..c6782892e 100644 --- a/memcheck/tests/test-plo-no.stderr.exp-le32-freebsd +++ b/memcheck/tests/test-plo-no.stderr.exp-le32-freebsd @@ -1,13 +1,13 @@ Invalid read of size 4 ... Address 0x........ is 4 bytes inside a block of size 5 alloc'd - at 0x........: malloc (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid read of size 4 ... Address 0x........ is 4 bytes inside a block of size 5 alloc'd - at 0x........: malloc (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid read of size 4 diff --git a/memcheck/tests/test-plo-no.stderr.exp-le32-freebsd-clang b/memcheck/tests/test-plo-no.stderr.exp-le32-freebsd-clang deleted file mode 100644 index 9b09b5e6e..000000000 --- a/memcheck/tests/test-plo-no.stderr.exp-le32-freebsd-clang +++ /dev/null @@ -1,20 +0,0 @@ -Invalid read of size 4 - ... - Address 0x........ is 4 bytes inside a block of size 5 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) - ... - -Invalid read of size 4 - ... - Address 0x........ is 4 bytes inside a block of size 5 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) - ... - -Invalid read of size 4 - ... - Address 0x........ is 4 bytes inside a block of size 12 free'd - at 0x........: free (vg_replace_malloc.c:...) - ... - From 714fec1a92591bcd07454ebcb755c049f5c66a9f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 19:50:05 +0100 Subject: [PATCH 018/502] Bug 511329 - Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) part 1 This changeset includes the changes to ML_(do_syscall_for_client_WRK) for the 3 supported FreeBSD platforms. To come: Darwin x86/amd64 and removing the SETC flag from the guest state (and its OFFSET). --- coregrind/m_syswrap/syscall-amd64-freebsd.S | 21 +++++------------ coregrind/m_syswrap/syscall-arm64-freebsd.S | 21 ++++++----------- coregrind/m_syswrap/syscall-x86-freebsd.S | 17 ++++---------- coregrind/m_syswrap/syswrap-main.c | 26 ++++++++++++++++----- 4 files changed, 37 insertions(+), 48 deletions(-) diff --git a/coregrind/m_syswrap/syscall-amd64-freebsd.S b/coregrind/m_syswrap/syscall-amd64-freebsd.S index 0d25efdcc..22a012795 100644 --- a/coregrind/m_syswrap/syscall-amd64-freebsd.S +++ b/coregrind/m_syswrap/syscall-amd64-freebsd.S @@ -69,7 +69,8 @@ void* guest_state, // rsi const vki_sigset_t *sysmask, // rdx const vki_sigset_t *postmask, // rcx - Int sigsetSzB) // r8 + Int sigsetSzB, // r8 + UCHar *cflag) // r9 */ /* from vki_arch.h */ @@ -85,6 +86,7 @@ ML_(do_syscall_for_client_WRK): pushq %rdx // -24(%rbp) sysmask pushq %rcx // -32(%rbp) postmask pushq %r8 // -40(%rbp) sigsetSzB + pushq %r9 // -48(%rbp) cflag 1: /* Even though we can't take a signal until the sigprocmask completes, start the range early. @@ -132,23 +134,12 @@ ML_(do_syscall_for_client_WRK): 3: /* In the range [3, 4), the syscall result is in %rax, but hasn't been committed to RAX. */ - /* stack contents: 3 words for syscall above, plus our prologue */ - setc 0(%rsp) /* stash returned carry flag */ - movq -16(%rbp), %r11 /* r11 = VexGuestAMD64State * */ + movq -16(%rbp), %r11 /* r11 = VexGuestAMD64State * */ movq %rax, OFFSET_amd64_RAX(%r11) /* save back to RAX */ movq %rdx, OFFSET_amd64_RDX(%r11) /* save back to RDX */ - - /* save carry flag to VEX */ - xorq %rax, %rax - movb 0(%rsp), %al - movq %rax, %rdi /* arg1 = new flag */ - movq %r11, %rsi /* arg2 = vex state */ - addq $24, %rsp /* remove syscall parameters */ - movl $1, OFFSET_amd64_SETC(%r11) - call LibVEX_GuestAMD64_put_rflag_c - movq -16(%rbp), %r11 /* r11 = VexGuestAMD64State * */ - movl $0, OFFSET_amd64_SETC(%r11) + movq -48(%rbp), %rcx + setc 0(%rcx) /* save returned carry flag */ 4: /* Re-block signals. If eip is in [4,5), then the syscall is complete and we needn't worry about it. */ diff --git a/coregrind/m_syswrap/syscall-arm64-freebsd.S b/coregrind/m_syswrap/syscall-arm64-freebsd.S index fb7c68768..3e01dc557 100644 --- a/coregrind/m_syswrap/syscall-arm64-freebsd.S +++ b/coregrind/m_syswrap/syscall-arm64-freebsd.S @@ -67,7 +67,8 @@ void* guest_state, // x1 const vki_sigset_t *sysmask, // x2 const vki_sigset_t *postmask, // x3 - Int nsigwords) // x4 + Int nsigwords, // x4 + UChar *cflag, // x5 */ /* from vki-arm64-freebsd.h */ #define VKI_SIG_SETMASK 3 @@ -110,23 +111,15 @@ ML_(do_syscall_for_client_WRK): 2: svc 0x00000000 3: - /* stash returned carry flag */ - mov x4, 1 - csel x4, x4, xzr, cs ldr x5, [sp, #8] /* saved x1 == guest_state */ str x0, [x5, #OFFSET_arm64_X0] str x1, [x5, #OFFSET_arm64_X1] - - /* save carry flag to VEX */ - mov x0, x4 /* arg1 = new flag */ - ldr x1, [sp, #8] /* arg2 = vex state */ - mov x20, 1 - str x20, [x1, #OFFSET_arm64_SETC] - bl LibVEX_GuestARM64_put_nzcv_c - ldr x1, [sp, #8] /* arg2 = vex state */ - mov x20, 0 - str x20, [x1, #OFFSET_arm64_SETC] + /* stash returned carry flag */ + mov x4, 1 + csel x4, x4, xzr, cs + ldr x5, [sp, #40] /* saved x5 == cflag */ + strb w4, [x5] 4: mov x8, #__NR_sigprocmask diff --git a/coregrind/m_syswrap/syscall-x86-freebsd.S b/coregrind/m_syswrap/syscall-x86-freebsd.S index 9e69d85be..22fe6e6ad 100644 --- a/coregrind/m_syswrap/syscall-x86-freebsd.S +++ b/coregrind/m_syswrap/syscall-x86-freebsd.S @@ -69,7 +69,8 @@ void* guest_state, // ebp+12 const vki_sigset_t *sysmask, // ebp+16 const vki_sigset_t *postmask, // ebp+20 - Int sigsetSzB) // ebp+24 + Int sigsetSzB, // ebp+24 + UChar* cflag) // ebp+28 Note that sigsetSzB is totally ignored (and irrelevant). */ @@ -133,21 +134,11 @@ ML_(do_syscall_for_client_WRK): 3: /* In the range [3, 4), the syscall result is in %eax and %edx and C, but hasn't been committed to the thread state. */ - setc 0(%esp) /* stash returned carry flag */ movl 12(%ebp), %ecx movl %eax, OFFSET_x86_EAX(%ecx) /* save EAX to vex */ movl %edx, OFFSET_x86_EDX(%ecx) /* save EDX to vex */ - /* save carry flag to vex */ - subl $12, %esp - movl %ecx, 4(%esp) - movl $0, 0(%esp) - movb 12(%esp), %al - movb %al, 0(%esp) - movl $1, OFFSET_x86_SETC(%ecx) - call LibVEX_GuestX86_put_eflag_c - movl 12(%ebp), %ecx - movl $0, OFFSET_x86_SETC(%ecx) - addl $12, %esp + movl 28(%ebp), %ecx + setc 0(%ecx) /* save returned carry flag */ 4: /* Re-block signals. If eip is in [4,5), then the syscall is complete and we needn't worry about it. */ diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index c7dbd6b92..6f982998f 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -302,11 +302,12 @@ UWord ML_(do_syscall_for_client_WRK)( Word syscallno, Word sigsetSzB ); #elif defined(VGO_freebsd) extern -UWord ML_(do_syscall_for_client_WRK)( Word syscallno, - void* guest_state, - const vki_sigset_t *syscall_mask, - const vki_sigset_t *restore_mask, - Word sigsetSzB ); +UWord ML_(do_syscall_for_client_WRK)(Word syscallno, + void* guest_state, + const vki_sigset_t *syscall_mask, + const vki_sigset_t *restore_mask, + Word sigsetSzB, + UChar *cflag); #elif defined(VGO_darwin) extern UWord ML_(do_syscall_for_client_unix_WRK)( Word syscallno, @@ -357,6 +358,7 @@ void do_syscall_for_client ( Int syscallno, ); # elif defined(VGO_freebsd) Word real_syscallno; + UChar cflag; VG_(sigemptyset)(&saved); if (tst->arch.vex.guest_SC_CLASS == VG_FREEBSD_SYSCALL0) real_syscallno = __NR_syscall; @@ -366,8 +368,20 @@ void do_syscall_for_client ( Int syscallno, real_syscallno = syscallno; err = ML_(do_syscall_for_client_WRK)( real_syscallno, &tst->arch.vex, - syscall_mask, &saved, sizeof(vki_sigset_t) + syscall_mask, &saved, sizeof(vki_sigset_t), + &cflag ); + /* Save the carry flag. */ +# if defined(VGP_amd64_freebsd) + LibVEX_GuestAMD64_put_rflag_c(cflag, &tst->arch.vex); + +# elif defined(VGP_arm64_freebsd) + LibVEX_GuestARM64_put_nzcv_c(cflag, &tst->arch.vex); +# elif defined(VGP_x86_freebsd) + LibVEX_GuestX86_put_eflag_c(cflag, &tst->arch.vex); +# else +# error "Unknown platform" +# endif # elif defined(VGO_darwin) switch (VG_DARWIN_SYSNO_CLASS(syscallno)) { case VG_DARWIN_SYSCALL_CLASS_UNIX: From fcb0bd5045e4cd488e44573ccdf7876b7ada4e13 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 21:18:54 +0100 Subject: [PATCH 019/502] regtest: broadan none fdleak_cmsg_supp accept suppression --- none/tests/fdleak_cmsg_supp.supp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/fdleak_cmsg_supp.supp b/none/tests/fdleak_cmsg_supp.supp index cc0daca18..7312f6986 100644 --- a/none/tests/fdleak_cmsg_supp.supp +++ b/none/tests/fdleak_cmsg_supp.supp @@ -97,7 +97,7 @@ { sup10 CoreError:FdNotClosed - fun:__so_accept + fun:*_accept fun:accept fun:server fun:main From 83f5fbdc3f004a98ebede8577587a1a053d3da6a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 20:48:52 +0100 Subject: [PATCH 020/502] comment: add FreeBSD syscall registers to syswrap-main comments --- coregrind/m_syswrap/syswrap-main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 6f982998f..936124f46 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -74,6 +74,7 @@ FreeBSD: x86 eax +4 +8 +12 +16 +20 +24 +28 +32 edx:eax, eflags.c amd64 rax rdi rsi rdx rcx r8 r9 +8 +16 rdx:rax, rflags.c + arm64 x8 x0 x1 x2 x3 x4 x5 x6 x7 x0:x1, nzcv.c On s390x the svc instruction is used for system calls. The system call number is encoded in the instruction (8 bit immediate field). Since Linux From 82bc6a9cb10dc67c8d0c2a8dcdac92fc90ba3d31 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 21:30:35 +0100 Subject: [PATCH 021/502] Bug 511329 - Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) part 2 This changeset includes the changes to ML_(do_syscall_for_client_WRK) for the 2 supported Darwin platforms. To come: remove SETC from guest state and OFFSET. --- coregrind/m_syswrap/syscall-amd64-darwin.S | 19 ++++++------------- coregrind/m_syswrap/syscall-x86-darwin.S | 17 ++++------------- coregrind/m_syswrap/syswrap-main.c | 17 ++++++++++++++--- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/coregrind/m_syswrap/syscall-amd64-darwin.S b/coregrind/m_syswrap/syscall-amd64-darwin.S index 9abfd998f..456b4c84c 100644 --- a/coregrind/m_syswrap/syscall-amd64-darwin.S +++ b/coregrind/m_syswrap/syscall-amd64-darwin.S @@ -67,7 +67,8 @@ void* guest_state, // rsi const vki_sigset_t *sysmask, // rdx const vki_sigset_t *postmask, // rcx - Int sigsetSzB) // r8 + Int sigsetSzB, // r8 + UChar *cflag) // r9 Note that sigsetSzB is totally ignored (and irrelevant). */ @@ -90,6 +91,7 @@ pushq %rdx // -24(%rbp) sysmask pushq %rcx // -32(%rbp) postmask pushq %r8 // -40(%rbp) sigsetSzB + pushq %r9 // -48(%rbp) cflag // stack is now aligned L_$0_1: /* Even though we can't take a signal until the sigprocmask completes, @@ -140,25 +142,16 @@ L_$0_3: /* In the range [3, 4), the syscall result is in %rax, but hasn't been committed to RAX. */ /* stack contents: 3 words for syscall above, plus our prologue */ - setc 0(%rsp) /* stash returned carry flag */ movq -16(%rbp), %r11 /* r11 = VexGuestAMD64State * */ movq %rax, OFFSET_amd64_RAX(%r11) /* save back to RAX */ movq %rdx, OFFSET_amd64_RDX(%r11) /* save back to RDX */ .if $0 == UNIX - /* save carry flag to VEX */ - xor %rax, %rax - movb 0(%rsp), %al - movq %rax, %rdi /* arg1 = new flag */ - movq %r11, %rsi /* arg2 = vex state */ - addq $$24, %rsp /* remove syscall parameters */ - movl $$1, OFFSET_amd64_SETC(%r11) - call _LibVEX_GuestAMD64_put_rflag_c - movq -16(%rbp), %r11 - movl $$0, OFFSET_amd64_SETC(%r11) + movq -48(%rbp), %rcx + setc 0(%rcx) /* save returned carry flag */ .else - addq $$24, %rsp /* remove syscall parameters*/ + addq $$24, %rsp /* remove syscall parameters*/ .endif L_$0_4: /* Re-block signals. If eip is in [4,5), then the syscall diff --git a/coregrind/m_syswrap/syscall-x86-darwin.S b/coregrind/m_syswrap/syscall-x86-darwin.S index 393cc8eb7..4ac1ef23a 100644 --- a/coregrind/m_syswrap/syscall-x86-darwin.S +++ b/coregrind/m_syswrap/syscall-x86-darwin.S @@ -67,7 +67,8 @@ void* guest_state, // ebp+12 const vki_sigset_t *sysmask, // ebp+16 const vki_sigset_t *postmask, // ebp+20 - Int sigsetSzB) // ebp+24 + Int sigsetSzB, // ebp+24 + UChar *cflag) // ebp+28 Note that sigsetSzB is totally ignored (and irrelevant). */ @@ -145,22 +146,12 @@ L_$0_2: L_$0_3: /* In the range [3, 4), the syscall result is in %eax and %edx and C, but hasn't been committed to the thread state. */ - setc 0(%esp) /* stash returned carry flag */ movl 12(%ebp), %ecx movl %eax, OFFSET_x86_EAX(%ecx) /* save EAX to vex */ movl %edx, OFFSET_x86_EDX(%ecx) /* save EDX to vex */ .if $0 == UNIX - /* UNIX: save carry flag to vex */ - subl $$12, %esp - movl %ecx, 4(%esp) - movl $$0, 0(%esp) - movb 12(%esp), %al - movb %al, 0(%esp) - movl $$1, OFFSET_x86_SETC(%ecx) - call _LibVEX_GuestX86_put_eflag_c - movl 12(%ebp), %ecx - movl $$0, OFFSET_x86_SETC(%ecx) - addl $$12, %esp + movl 28(%ebp), %ecx + setc 0(%ecx) /* save returned carry flag */ .endif L_$0_4: /* Re-block signals. If eip is in [4,5), then the syscall is diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 936124f46..64fa3c325 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -315,7 +315,8 @@ UWord ML_(do_syscall_for_client_unix_WRK)( Word syscallno, void* guest_state, const vki_sigset_t *syscall_mask, const vki_sigset_t *restore_mask, - Word sigsetSzB ); /* unused */ + Word sigsetSzB, /* unused */ + UChar* cflag ); extern UWord ML_(do_syscall_for_client_mach_WRK)( Word syscallno, void* guest_state, @@ -375,7 +376,6 @@ void do_syscall_for_client ( Int syscallno, /* Save the carry flag. */ # if defined(VGP_amd64_freebsd) LibVEX_GuestAMD64_put_rflag_c(cflag, &tst->arch.vex); - # elif defined(VGP_arm64_freebsd) LibVEX_GuestARM64_put_nzcv_c(cflag, &tst->arch.vex); # elif defined(VGP_x86_freebsd) @@ -384,12 +384,23 @@ void do_syscall_for_client ( Int syscallno, # error "Unknown platform" # endif # elif defined(VGO_darwin) + UChar cflag; switch (VG_DARWIN_SYSNO_CLASS(syscallno)) { case VG_DARWIN_SYSCALL_CLASS_UNIX: err = ML_(do_syscall_for_client_unix_WRK)( VG_DARWIN_SYSNO_FOR_KERNEL(syscallno), &tst->arch.vex, - syscall_mask, &saved, 0/*unused:sigsetSzB*/ + syscall_mask, &saved, 0/*unused:sigsetSzB*/, &cflag ); + /* Save the carry flag. */ +# if defined(VGP_amd64_darwin) + LibVEX_GuestAMD64_put_rflag_c(cflag, &tst->arch.vex); +# elif defined(VGP_arm64_darwin) + LibVEX_GuestARM64_put_nzcv_c(cflag, &tst->arch.vex); +# elif defined(VGP_x86_darwin) + LibVEX_GuestX86_put_eflag_c(cflag, &tst->arch.vex); +# else +# error "Unknown platform" +# endif break; case VG_DARWIN_SYSCALL_CLASS_MACH: err = ML_(do_syscall_for_client_mach_WRK)( From 4fb1e502dbd2a492eb5c9b89151120b8f615840d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 29 Oct 2025 22:09:08 +0100 Subject: [PATCH 022/502] Bug 511329 - Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) part 3 Remove guest_SETC and GENOFFSET --- NEWS | 2 ++ VEX/auxprogs/genoffsets.c | 3 --- VEX/priv/guest_amd64_helpers.c | 2 -- VEX/priv/guest_x86_helpers.c | 2 -- VEX/pub/libvex_guest_amd64.h | 5 +---- VEX/pub/libvex_guest_arm64.h | 8 +------- VEX/pub/libvex_guest_x86.h | 3 +-- coregrind/m_syswrap/syswrap-main.c | 12 ------------ 8 files changed, 5 insertions(+), 32 deletions(-) diff --git a/NEWS b/NEWS index 2ecf886a2..526969ebf 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,8 @@ than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. 487055 memcheck/tests/x86-linux/scalar fails running in Docker +511329 Darwin and FreeBSD: Move setting of carry flag out of + ML_(do_syscall_for_client_WRK) To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/VEX/auxprogs/genoffsets.c b/VEX/auxprogs/genoffsets.c index 07ff09be7..914dbee74 100644 --- a/VEX/auxprogs/genoffsets.c +++ b/VEX/auxprogs/genoffsets.c @@ -98,7 +98,6 @@ void foo ( void ) GENOFFSET(X86,x86,FS); GENOFFSET(X86,x86,GS); GENOFFSET(X86,x86,SS); - GENOFFSET(X86,x86,SETC); // amd64 GENOFFSET(AMD64,amd64,RAX); @@ -118,7 +117,6 @@ void foo ( void ) GENOFFSET(AMD64,amd64,R14); GENOFFSET(AMD64,amd64,R15); GENOFFSET(AMD64,amd64,RIP); - GENOFFSET(AMD64,amd64,SETC); // ppc32 GENOFFSET(PPC32,ppc32,GPR0); @@ -174,7 +172,6 @@ void foo ( void ) GENOFFSET(ARM64,arm64,X8); GENOFFSET(ARM64,arm64,XSP); GENOFFSET(ARM64,arm64,PC); - GENOFFSET(ARM64,arm64,SETC); // s390x GENOFFSET(S390X,s390x,r2); diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c index ca33f7c81..b8fa52460 100644 --- a/VEX/priv/guest_amd64_helpers.c +++ b/VEX/priv/guest_amd64_helpers.c @@ -4820,8 +4820,6 @@ void LibVEX_GuestAMD64_initialise ( /*OUT*/VexGuestAMD64State* vex_state ) vex_state->guest_EMNOTE = EmNote_NONE; - vex_state->guest_SETC = 0; - /* These should not ever be either read or written, but we initialise them anyway. */ vex_state->guest_CMSTART = 0; diff --git a/VEX/priv/guest_x86_helpers.c b/VEX/priv/guest_x86_helpers.c index 90722d767..f744ff53e 100644 --- a/VEX/priv/guest_x86_helpers.c +++ b/VEX/priv/guest_x86_helpers.c @@ -2914,8 +2914,6 @@ void LibVEX_GuestX86_initialise ( /*OUT*/VexGuestX86State* vex_state ) vex_state->guest_SC_CLASS = 0; vex_state->guest_IP_AT_SYSCALL = 0; - vex_state->guest_SETC = 0; - vex_state->padding1 = 0; vex_state->padding2 = 0; } diff --git a/VEX/pub/libvex_guest_amd64.h b/VEX/pub/libvex_guest_amd64.h index e96b6b0f3..1e2ca5dc6 100644 --- a/VEX/pub/libvex_guest_amd64.h +++ b/VEX/pub/libvex_guest_amd64.h @@ -131,10 +131,7 @@ typedef /* Emulation notes */ UInt guest_EMNOTE; - /* Used by Darwin and FreeBSD when setting the carry flag from - * ML_(do_syscall_for_client_WRK). Needed to determine how - * to restart interrupted syscalls. */ - UInt guest_SETC; + UInt pad2; /* Translation-invalidation area description. Not used on amd64 (there is no invalidate-icache insn), but needed so as to diff --git a/VEX/pub/libvex_guest_arm64.h b/VEX/pub/libvex_guest_arm64.h index 30317dae6..35b417348 100644 --- a/VEX/pub/libvex_guest_arm64.h +++ b/VEX/pub/libvex_guest_arm64.h @@ -168,18 +168,12 @@ typedef /* Used for FreeBSD syscall dispatching. */ ULong guest_SC_CLASS; - /* Used for FreeBSD client syscall when putting the carry flag - value into VEX. */ - UInt guest_SETC; - UInt pad_end_0; /* Padding to make it have an 16-aligned size */ - /* UInt pad_end_1; */ - /* ULong pad_end_2; */ + ULong pad_end_1; } VexGuestARM64State; - /*---------------------------------------------------------------*/ /*--- Utility functions for ARM64 guest stuff. ---*/ /*---------------------------------------------------------------*/ diff --git a/VEX/pub/libvex_guest_x86.h b/VEX/pub/libvex_guest_x86.h index 80916a2ba..baf13f402 100644 --- a/VEX/pub/libvex_guest_x86.h +++ b/VEX/pub/libvex_guest_x86.h @@ -219,11 +219,10 @@ typedef been interrupted by a signal. */ UInt guest_IP_AT_SYSCALL; - UInt guest_SETC; - /* Padding to make it have an 16-aligned size */ UInt padding1; UInt padding2; + UInt padding3; } VexGuestX86State; diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 64fa3c325..49c264c40 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -3355,18 +3355,6 @@ VG_(fixup_guest_state_after_syscall_interrupted)( ThreadId tid, # error "Unknown OS" # endif -#if defined(VGO_freebsd) || defined(VGO_darwin) - if (outside_range) - { - if (th_regs->vex.guest_SETC) - { - outside_range = False; - in_complete_to_committed = True; - } - } -#endif - - /* Figure out what the state of the syscall was by examining the (real) IP at the time of the signal, and act accordingly. */ if (outside_range) { From 6a490eeb27c0fa3109ed81f24d8333aeacc37b4b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 30 Oct 2025 15:17:50 +0100 Subject: [PATCH 023/502] Darwin regtest: changes to filters and sed commands Darwin libc is quite incontinent, so use filter_xml_leak in a few places rather than filter_xml. Also old Darwin 17.7 sed doesn't understand "+1d" to delete the matched line and the next line. So use N to join, s to delete the newline and another match with d to delete the joined linbes. --- darwin17.supp | 2 +- memcheck/tests/client-msg-as-xml.vgtest | 2 +- memcheck/tests/filter_xml | 5 +++-- memcheck/tests/filter_xml_leak | 2 +- memcheck/tests/mismatches_xml.vgtest | 2 +- .../tests/sized_aligned_new_delete_misaligned1_xml.vgtest | 2 +- .../tests/sized_aligned_new_delete_misaligned2_xml.vgtest | 2 +- .../tests/sized_aligned_new_delete_misaligned3_xml.vgtest | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/darwin17.supp b/darwin17.supp index a8bd90ef8..503e7f2ee 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -136,7 +136,7 @@ { OSX1013:15-Leak Memcheck:Leak - match-leak-kinds: reachable + match-leak-kinds: definite,reachable fun:malloc fun:__smakebuf ... diff --git a/memcheck/tests/client-msg-as-xml.vgtest b/memcheck/tests/client-msg-as-xml.vgtest index b3e812170..58b282e93 100644 --- a/memcheck/tests/client-msg-as-xml.vgtest +++ b/memcheck/tests/client-msg-as-xml.vgtest @@ -1,3 +1,3 @@ prog: client-msg vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null -stderr_filter: filter_xml +stderr_filter: filter_xml_leak diff --git a/memcheck/tests/filter_xml b/memcheck/tests/filter_xml index 2c63cddbc..4070bc15a 100755 --- a/memcheck/tests/filter_xml +++ b/memcheck/tests/filter_xml @@ -35,8 +35,6 @@ perl -0 -p -e "s/.*<\/suppressed_contexts>/.... perl -p -0 -e 's/(Syscall param[^\n]*\n)([^\n]*(stack|frame|ip|obj|fn|dir|file|line)[^\n]*\n)+/$1/gs' | -sed "//,+1d" - # Collected wisdom re Perl magic incantation: # # From: Tom Hughes @@ -51,3 +49,6 @@ sed "//,+1d" # can do with the -0 switch. # # Hence -0 -p. + +sed "//{N;s/\n//;};//d" + diff --git a/memcheck/tests/filter_xml_leak b/memcheck/tests/filter_xml_leak index 31418f48d..93e9f0a7d 100755 --- a/memcheck/tests/filter_xml_leak +++ b/memcheck/tests/filter_xml_leak @@ -2,4 +2,4 @@ ./filter_xml "$@" | -sed -e '/...<\/leak_summary>/,+1d' +sed '/...<\/leak_summary>/{N;s/\n//;};/...<\/leak_summary>/d' diff --git a/memcheck/tests/mismatches_xml.vgtest b/memcheck/tests/mismatches_xml.vgtest index 96d12e4c4..4ba567521 100644 --- a/memcheck/tests/mismatches_xml.vgtest +++ b/memcheck/tests/mismatches_xml.vgtest @@ -1,3 +1,3 @@ prog: mismatches vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null -stderr_filter: filter_xml +stderr_filter: filter_xml_leak diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned1_xml.vgtest b/memcheck/tests/sized_aligned_new_delete_misaligned1_xml.vgtest index 7de2c93fb..b7501b6a0 100644 --- a/memcheck/tests/sized_aligned_new_delete_misaligned1_xml.vgtest +++ b/memcheck/tests/sized_aligned_new_delete_misaligned1_xml.vgtest @@ -1,4 +1,4 @@ prog: sized_aligned_new_delete_misaligned1 prereq: test -e ./sized_aligned_new_delete_misaligned1 vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null -stderr_filter: filter_xml +stderr_filter: filter_xml_leak diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned2_xml.vgtest b/memcheck/tests/sized_aligned_new_delete_misaligned2_xml.vgtest index 3669495bb..92756c613 100644 --- a/memcheck/tests/sized_aligned_new_delete_misaligned2_xml.vgtest +++ b/memcheck/tests/sized_aligned_new_delete_misaligned2_xml.vgtest @@ -1,4 +1,4 @@ prog: sized_aligned_new_delete_misaligned2 prereq: test -e ./sized_aligned_new_delete_misaligned2 vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null -stderr_filter: filter_xml +stderr_filter: filter_xml_leak diff --git a/memcheck/tests/sized_aligned_new_delete_misaligned3_xml.vgtest b/memcheck/tests/sized_aligned_new_delete_misaligned3_xml.vgtest index f3f660ece..821937eec 100644 --- a/memcheck/tests/sized_aligned_new_delete_misaligned3_xml.vgtest +++ b/memcheck/tests/sized_aligned_new_delete_misaligned3_xml.vgtest @@ -1,4 +1,4 @@ prog: sized_aligned_new_delete_misaligned3 prereq: test -e ./sized_aligned_new_delete_misaligned3 vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null -stderr_filter: filter_xml +stderr_filter: filter_xml_leak From 931b7ead241f676ba36453cdee8552a9851a40a9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 30 Oct 2025 21:00:59 +0100 Subject: [PATCH 024/502] Darwin regtest: filter malloc_zone_memalign --- memcheck/tests/Makefile.am | 3 ++- memcheck/tests/filter_malloc_zone | 4 ++++ memcheck/tests/posix_memalign.stderr.exp-darwin | 2 +- memcheck/tests/test-plo-no.vgtest | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 memcheck/tests/filter_malloc_zone diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index f85b69ba0..fd3f89cd2 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -95,7 +95,8 @@ dist_noinst_SCRIPTS = \ filter_stanza \ filter_stanza.awk \ filter_used_supp \ - filter_stanza_and_size_t + filter_stanza_and_size_t \ + filter_malloc_zone noinst_SCRIPTS = \ filter_dw4 \ diff --git a/memcheck/tests/filter_malloc_zone b/memcheck/tests/filter_malloc_zone new file mode 100755 index 000000000..793dfe531 --- /dev/null +++ b/memcheck/tests/filter_malloc_zone @@ -0,0 +1,4 @@ +#! /bin/sh + +./filter_stderr "$@" | +sed 's/malloc_zone_memalign/memalign/' diff --git a/memcheck/tests/posix_memalign.stderr.exp-darwin b/memcheck/tests/posix_memalign.stderr.exp-darwin index 26472d08b..f044fa1bf 100644 --- a/memcheck/tests/posix_memalign.stderr.exp-darwin +++ b/memcheck/tests/posix_memalign.stderr.exp-darwin @@ -1,4 +1,4 @@ -posix_memalign() invalid size value: 0 +Unsafe allocation with size of zero is implementation-defined at 0x........: malloc_zone_memalign (vg_replace_malloc.c:...) by 0x........: posix_memalign (in /...libc...) by 0x........: main (posix_memalign.c:32) diff --git a/memcheck/tests/test-plo-no.vgtest b/memcheck/tests/test-plo-no.vgtest index cbe322cbc..b09ebad95 100644 --- a/memcheck/tests/test-plo-no.vgtest +++ b/memcheck/tests/test-plo-no.vgtest @@ -1,2 +1,3 @@ prog: test-plo vgopts: -q --partial-loads-ok=no --keep-stacktraces=alloc-then-free +stderr_filter: filter_malloc_zone From 8aaa1412415f0ee367fd950e199276082833cba1 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 30 Oct 2025 21:29:28 +0100 Subject: [PATCH 025/502] Darwin regtest: various filters Use -q to hide Darwin leaks in HEAP SUMMARY The pcmpgt test uses uint64_t whish is unsigned long long on Darwin but unsigned long on all other amd64 OSes Swap malloc_zone_memalign with posix_memalign --- memcheck/tests/amd64/Makefile.am | 2 +- memcheck/tests/amd64/bug492210_1.vgtest | 1 + memcheck/tests/amd64/bug492210_2.vgtest | 1 + memcheck/tests/amd64/filter_malloc_zone | 4 ++++ memcheck/tests/amd64/filter_pcmpgt | 7 +++++++ memcheck/tests/amd64/pcmpgt.vgtest | 2 +- memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest | 3 ++- memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest | 3 ++- .../common/sh-mem-vec128-plo-no.stderr.exp-64bit-le | 11 ----------- .../common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le | 11 ----------- 10 files changed, 19 insertions(+), 26 deletions(-) create mode 100755 memcheck/tests/amd64/filter_malloc_zone create mode 100755 memcheck/tests/amd64/filter_pcmpgt diff --git a/memcheck/tests/amd64/Makefile.am b/memcheck/tests/amd64/Makefile.am index 98f3f78fa..4b25e1dcf 100644 --- a/memcheck/tests/amd64/Makefile.am +++ b/memcheck/tests/amd64/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = filter_stderr filter_malloc_zone filter_pcmpgt INSN_TESTS = insn_basic insn_mmx insn_sse insn_sse2 insn_fpu diff --git a/memcheck/tests/amd64/bug492210_1.vgtest b/memcheck/tests/amd64/bug492210_1.vgtest index e80be84ec..9a50eaf72 100644 --- a/memcheck/tests/amd64/bug492210_1.vgtest +++ b/memcheck/tests/amd64/bug492210_1.vgtest @@ -1,3 +1,4 @@ +prereq: test -e bug492210 prog: bug492210 vgopts: -q diff --git a/memcheck/tests/amd64/bug492210_2.vgtest b/memcheck/tests/amd64/bug492210_2.vgtest index 1c4e3614f..159e836bf 100644 --- a/memcheck/tests/amd64/bug492210_2.vgtest +++ b/memcheck/tests/amd64/bug492210_2.vgtest @@ -1,3 +1,4 @@ +prereq: test -e bug492210 prog: bug492210 vgopts: -q --expensive-definedness-checks=yes diff --git a/memcheck/tests/amd64/filter_malloc_zone b/memcheck/tests/amd64/filter_malloc_zone new file mode 100755 index 000000000..442d2c46f --- /dev/null +++ b/memcheck/tests/amd64/filter_malloc_zone @@ -0,0 +1,4 @@ +#! /bin/sh + +./filter_stderr "$@" | +sed 's/malloc_zone_memalign/posix_memalign/' diff --git a/memcheck/tests/amd64/filter_pcmpgt b/memcheck/tests/amd64/filter_pcmpgt new file mode 100755 index 000000000..8243e1bf4 --- /dev/null +++ b/memcheck/tests/amd64/filter_pcmpgt @@ -0,0 +1,7 @@ +#! /bin/sh + +../filter_allocs "$@" | + +# on Darwin "uint64_t" becomes unsigned long long +# on other platforms it is unsigned long +sed 's/unsigned long long/unsigned long/' diff --git a/memcheck/tests/amd64/pcmpgt.vgtest b/memcheck/tests/amd64/pcmpgt.vgtest index 15e0d7605..6b7deafe6 100644 --- a/memcheck/tests/amd64/pcmpgt.vgtest +++ b/memcheck/tests/amd64/pcmpgt.vgtest @@ -1,3 +1,3 @@ prog: pcmpgt amd64 prereq: test -e pcmpgt -stderr_filter: ../filter_allocs +stderr_filter: filter_pcmpgt diff --git a/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest b/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest index 160b95b28..e167b251b 100644 --- a/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest +++ b/memcheck/tests/amd64/sh-mem-vec128-plo-no.vgtest @@ -1,3 +1,4 @@ prog: sh-mem-vec128 args: -q -vgopts: --partial-loads-ok=no +vgopts: --partial-loads-ok=no -q +stderr_filter: filter_malloc_zone diff --git a/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest b/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest index 76585dd37..c4216eb2c 100644 --- a/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest +++ b/memcheck/tests/amd64/sh-mem-vec128-plo-yes.vgtest @@ -1,3 +1,4 @@ prog: sh-mem-vec128 args: -q -vgopts: --partial-loads-ok=yes +vgopts: --partial-loads-ok=yes -q +stderr_filter: filter_malloc_zone diff --git a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le index 5edfff1a5..e77862724 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le @@ -1,4 +1,3 @@ - sh-mem-vec128: config: little-endian, 64-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-64bit-le b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le index d05ac5e82..86abd93cc 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le @@ -1,4 +1,3 @@ - sh-mem-vec128: config: little-endian, 64-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) From 78ea7c823789e59c0881eb9eb1582e3f3e48dd0d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 30 Oct 2025 22:01:44 +0100 Subject: [PATCH 026/502] Darwin regtest: another leaky xml test and a suppression test The suppression test needed to use the same lable for Darwin and other OSes. --- memcheck/tests/posix_memalign_supp.supp | 2 +- memcheck/tests/posix_memalign_xml.vgtest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/posix_memalign_supp.supp b/memcheck/tests/posix_memalign_supp.supp index 23572e40f..b0e59a1af 100644 --- a/memcheck/tests/posix_memalign_supp.supp +++ b/memcheck/tests/posix_memalign_supp.supp @@ -15,7 +15,7 @@ # Darwin uses zones { - posix_memalign zero size + posix_memalign size Memcheck:UnsafeZeroSize fun:malloc_zone_memalign fun:posix_memalign diff --git a/memcheck/tests/posix_memalign_xml.vgtest b/memcheck/tests/posix_memalign_xml.vgtest index db119d952..eb587be17 100644 --- a/memcheck/tests/posix_memalign_xml.vgtest +++ b/memcheck/tests/posix_memalign_xml.vgtest @@ -1,3 +1,3 @@ prog: posix_memalign vgopts: --freelist-vol=100000 --freelist-big-blocks=0 --xml=yes --xml-fd=2 --log-file=/dev/null -stderr_filter: filter_xml +stderr_filter: filter_xml_leak From 723f23f9797cdf3c5e060f51600a77c74fb38620 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 1 Nov 2025 13:19:11 +0100 Subject: [PATCH 027/502] Darwin suppression: add a leak suppression for fwrite --- darwin17.supp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/darwin17.supp b/darwin17.supp index 503e7f2ee..c701782af 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -198,6 +198,17 @@ fun:_ZN4dyld24initializeMainExecutableEv } +{ + OSX1013:22-Leak + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:__smakebuf + fun:__swsetup + fun:__sfvwrite + fun:fwrite +} + ############################################ ## Non-leak errors From ad031f8edba0020878e44eb6902b323bab42074b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 1 Nov 2025 13:20:04 +0100 Subject: [PATCH 028/502] clang-tidy: fix some redundant cast warnings. --- coregrind/m_syswrap/syswrap-generic.c | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 37f312fe8..6050f5b65 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -3381,7 +3381,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, PRE_MEM_READ(str2, arg_2_check, sizeof(Addr)); /* argv[0] should not be NULL and valid. */ - if (ML_(safe_to_deref)((HChar **) (Addr)arg_2_check, sizeof(HChar *))) { + if (ML_(safe_to_deref)((HChar **)arg_2_check, sizeof(HChar *))) { Addr argv0 = *(Addr*)arg_2_check; PRE_MEM_RASCIIZ( str3, argv0 ); /* The rest of argv can be NULL or a valid string pointer. */ @@ -3400,7 +3400,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, str3[VG_(strlen)(str)] = '\0'; if (arg_3 != 0) { /* At least the terminating NULL must be addressable. */ - if (!ML_(safe_to_deref)((HChar **) (Addr)arg_3, sizeof(HChar *))) { + if (!ML_(safe_to_deref)((HChar **)arg_3, sizeof(HChar *))) { SET_STATUS_Failure(VKI_EFAULT); return; } @@ -3429,11 +3429,11 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, // debug-only printing if (0) { - VG_(printf)("pathname = %p(%s)\n", (void*)(Addr)pathname, (HChar*)(Addr)pathname); + VG_(printf)("pathname = %p(%s)\n", (void*)pathname, (HChar*)pathname); if (arg_2) { VG_(printf)("arg_2 = "); Int q; - HChar** vec = (HChar**)(Addr)arg_2; + HChar** vec = (HChar**)arg_2; for (q = 0; vec[q]; q++) VG_(printf)("%p(%s) ", vec[q], vec[q]); VG_(printf)("\n"); @@ -3445,10 +3445,10 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, // Decide whether or not we want to follow along { // Make 'child_argv' be a pointer to the child's arg vector // (skipping the exe name) - const HChar** child_argv = (const HChar**)(Addr)arg_2; + const HChar** child_argv = (const HChar**)arg_2; if (child_argv && child_argv[0] == NULL) child_argv = NULL; - trace_this_child = VG_(should_we_trace_this_child)( (HChar*)(Addr)pathname, + trace_this_child = VG_(should_we_trace_this_child)( (HChar*)pathname, child_argv ); } @@ -3456,7 +3456,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, // ok, etc. We allow setuid executables to run only in the case when // we are not simulating them, that is, they to be run natively. setuid_allowed = trace_this_child ? False : True; - res = VG_(pre_exec_check)((const HChar *)(Addr)pathname, NULL, setuid_allowed); + res = VG_(pre_exec_check)((const HChar *)pathname, NULL, setuid_allowed); if (sr_isError(res)) { SET_STATUS_Failure( sr_Err(res) ); return; @@ -3473,7 +3473,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, } /* After this point, we can't recover if the execve fails. */ - VG_(debugLog)(1, "syswrap", "Exec of %s\n", (HChar*)(Addr)pathname); + VG_(debugLog)(1, "syswrap", "Exec of %s\n", (HChar*)pathname); // Terminate gdbserver if it is active. @@ -3509,7 +3509,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, } } else { - path = (HChar*)(Addr)pathname; + path = (HChar*)pathname; } // Set up the child's environment. @@ -3526,7 +3526,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, if (arg_3 == 0) { envp = NULL; } else { - envp = VG_(env_clone)( (HChar**)(Addr)arg_3 ); + envp = VG_(env_clone)( (HChar**)arg_3 ); if (envp == NULL) goto hosed; VG_(env_remove_valgrind_env_stuff)( envp, True /*ro_strings*/, NULL ); } @@ -3545,7 +3545,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, // are omitted. // if (!trace_this_child) { - argv = (HChar**)(Addr)arg_2; + argv = (HChar**)arg_2; } else { vg_assert( VG_(args_for_valgrind) ); vg_assert( VG_(args_for_valgrind_noexecpass) >= 0 ); @@ -3560,7 +3560,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, // name of client exe tot_args++; // args for client exe, skipping [0] - arg2copy = (HChar**)(Addr)arg_2; + arg2copy = (HChar**)arg_2; if (arg2copy && arg2copy[0]) { for (i = 1; arg2copy[i]; i++) tot_args++; @@ -3576,7 +3576,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, continue; argv[j++] = * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i ); } - argv[j++] = (HChar*)(Addr)pathname; + argv[j++] = (HChar*)pathname; if (arg2copy && arg2copy[0]) for (i = 1; arg2copy[i]; i++) argv[j++] = arg2copy[i]; @@ -3650,7 +3650,7 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, vg_assert(FAILURE); VG_(message)(Vg_UserMsg, "execve(%#" FMT_REGWORD "x(%s), %#" FMT_REGWORD "x, %#" FMT_REGWORD "x) failed, errno %lu\n", - pathname, (HChar*)(Addr)pathname, arg_2, arg_3, ERR); + pathname, (HChar*)pathname, arg_2, arg_3, ERR); VG_(message)(Vg_UserMsg, "EXEC FAILED: I can't recover from " "execve() failing, so I'm dying.\n"); VG_(message)(Vg_UserMsg, "Add more stringent tests in PRE(sys_execve), " From 5ef9990f8714b189e7f4770bb47627758397811d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 1 Nov 2025 13:37:28 +0100 Subject: [PATCH 029/502] Darwin regtest: use -q in 2 tests with heap summary diffs --- memcheck/tests/bug155125.stderr.exp | 10 ---------- memcheck/tests/bug155125.vgtest | 1 + memcheck/tests/bug287260.stderr.exp | 10 ---------- memcheck/tests/bug287260.vgtest | 1 + 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/memcheck/tests/bug155125.stderr.exp b/memcheck/tests/bug155125.stderr.exp index ca0025db5..a9c0faf6c 100644 --- a/memcheck/tests/bug155125.stderr.exp +++ b/memcheck/tests/bug155125.stderr.exp @@ -1,15 +1,5 @@ - Argument 'size' of function malloc has a fishy (possibly negative) value: -10 at 0x........: malloc (vg_replace_malloc.c:...) by 0x........: leak_begin_01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789_end (bug155125.c:4) by 0x........: main (bug155125.c:7) - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 0 allocs, 0 frees, 0 bytes allocated - -For a detailed leak analysis, rerun with: --leak-check=full - -For lists of detected and suppressed errors, rerun with: -s -ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/bug155125.vgtest b/memcheck/tests/bug155125.vgtest index d25f61e0a..871699b4c 100644 --- a/memcheck/tests/bug155125.vgtest +++ b/memcheck/tests/bug155125.vgtest @@ -1 +1,2 @@ prog: bug155125 +vgopts: -q diff --git a/memcheck/tests/bug287260.stderr.exp b/memcheck/tests/bug287260.stderr.exp index 6a3b8682b..ea90ee319 100644 --- a/memcheck/tests/bug287260.stderr.exp +++ b/memcheck/tests/bug287260.stderr.exp @@ -1,11 +1 @@ - 45 - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 0 allocs, 0 frees, 0 bytes allocated - -For a detailed leak analysis, rerun with: --leak-check=full - -For lists of detected and suppressed errors, rerun with: -s -ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/bug287260.vgtest b/memcheck/tests/bug287260.vgtest index 928ef8078..78a9af5c3 100644 --- a/memcheck/tests/bug287260.vgtest +++ b/memcheck/tests/bug287260.vgtest @@ -1 +1,2 @@ prog: bug287260 +vgopts: -q From 87631266a5375a5fad1e6e0cb20c93ed8b7ef43f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 1 Nov 2025 16:56:20 +0100 Subject: [PATCH 030/502] Darwin regtest: add an expected for duplicate_align_size_errors Also start trying to del with some redir issues. For some libc functions the plain function gets replaced by a checked version (not sure if this is only for debug builds). For instance in /usr/include/secure/_string.h there are a load of macros that look like /* void *memccpy(void *dst, const void *src, int c, size_t n) */ __builtin___memccpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest)) To defeat these macros I've put the function name in parens. That hasn't solved the issue. In addition these seems to be an ifunc like mechanism that resolves calls to platform functions. For instance nm /usr/lib/system/*dylib | grep memcc 0000000000081e14 T ___memccpy_chk U __platform_memccpy I _memccpy (indirect for __platform_memccpy) 0000000000004eb4 T __platform_memccpy That matches what I see in lldb (memccpy then function lookup code then _platform_memccpy). Need to look at how indirects work. --- memcheck/tests/Makefile.am | 1 + ...licate_align_size_errors.stderr.out-darwin | 22 +++++++++++++++++++ memcheck/tests/memccpy2.c | 8 +++---- memcheck/tests/overlap.c | 10 ++++----- 4 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 memcheck/tests/duplicate_align_size_errors.stderr.out-darwin diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index fd3f89cd2..755f422ee 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -168,6 +168,7 @@ EXTRA_DIST = \ cxx17_aligned_new.stdout.exp \ duplicate_align_size_errors.stderr.exp \ duplicate_align_size_errors.stderr.exp-memalign \ + duplicate_align_size_errors.stderr.exp-darwin \ duplicate_align_size_errors.vgtest \ sized_aligned_new_delete_args.stderr.exp \ sized_aligned_new_delete_args.vgtest \ diff --git a/memcheck/tests/duplicate_align_size_errors.stderr.out-darwin b/memcheck/tests/duplicate_align_size_errors.stderr.out-darwin new file mode 100644 index 000000000..93faa3d16 --- /dev/null +++ b/memcheck/tests/duplicate_align_size_errors.stderr.out-darwin @@ -0,0 +1,22 @@ +Invalid alignment value: 0 (should be non-zero and a power of 2) + at 0x........: operator new(unsigned long, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:19) + +Invalid alignment value: 0 (should be non-zero and a power of 2) + at 0x........: operator delete(void*, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:20) + +Mismatched new/delete size value: 33 + at 0x........: operator delete(void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:43) + Address 0x........ is 0 bytes inside a block of size 32 alloc'd + at 0x........: operator new(unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:42) + +Mismatched new[]/delete[] alignment alloc value: 64 dealloc value: 128 + at 0x........: operator delete[](void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:48) + Address 0x........ is 0 bytes inside a block of size 32 alloc'd + at 0x........: operator new[](unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:47) + diff --git a/memcheck/tests/memccpy2.c b/memcheck/tests/memccpy2.c index 947324581..be7808d5f 100644 --- a/memcheck/tests/memccpy2.c +++ b/memcheck/tests/memccpy2.c @@ -8,9 +8,9 @@ int main(void) { char* astring = strdup("this is a string # with something to seek"); size_t len = strlen(astring); - memccpy(astring+10, astring, '#', len-10); + (memccpy)(astring+10, astring, '#', len-10); sprintf(astring, "this is a string # with something to seek"); - memccpy(astring, astring+10, '#', len); + (memccpy)(astring, astring+10, '#', len); sprintf(astring, "this is a string # with something to seek"); /* @@ -23,10 +23,10 @@ int main(void) assert(res && *res == 'g'); sprintf(astring, "this is a string # with something to seek"); /* length is 0, nothing copied, returns NULL */ - res = memccpy(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 0); + res = (memccpy)(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 0); assert(NULL == res); /* 'z' not found so 20 bytes copied, returns NULL */ - res = memccpy(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 20); + res = (memccpy)(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 20); assert(NULL == res); free(astring); } diff --git a/memcheck/tests/overlap.c b/memcheck/tests/overlap.c index d868886f3..649b1e34d 100644 --- a/memcheck/tests/overlap.c +++ b/memcheck/tests/overlap.c @@ -42,16 +42,16 @@ int main(void) memcpy(x, x+20, 21); // overlap strncpy(x+20, x, 20); // ok - strncpy(x+20, x, 21); // overlap + (strncpy)(x+20, x, 21); // overlap strncpy(x, x+20, 20); // ok - strncpy(x, x+20, 21); // overlap + (strncpy)(x, x+20, 21); // overlap x[39] = '\0'; strcpy(x, x+20); // ok x[39] = 39; x[40] = '\0'; - strcpy(x, x+20); // overlap + (strcpy)(x, x+20); // overlap x[19] = '\0'; strcpy(x+20, x); // ok @@ -109,8 +109,8 @@ int main(void) always run forever, I think... */ for ( i = 0; i < 2; i++) - strncat(a+20, a, 21); // run twice to check 2nd error isn't shown - strncat(a, a+20, 21); + (strncat)(a+20, a, 21); // run twice to check 2nd error isn't shown + (strncat)(a, a+20, 21); /* This is ok, but once gave a warning when strncpy() was wrong, and used 'n' for the length, even when the src was shorter than 'n' */ From d5bd1e62083bb6e75cf78b4aa80fb569c08277a8 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 1 Nov 2025 19:52:53 +0100 Subject: [PATCH 031/502] Add missing expected --- ...licate_align_size_errors.stderr.exp-darwin | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin diff --git a/memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin b/memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin new file mode 100644 index 000000000..93faa3d16 --- /dev/null +++ b/memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin @@ -0,0 +1,22 @@ +Invalid alignment value: 0 (should be non-zero and a power of 2) + at 0x........: operator new(unsigned long, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:19) + +Invalid alignment value: 0 (should be non-zero and a power of 2) + at 0x........: operator delete(void*, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:20) + +Mismatched new/delete size value: 33 + at 0x........: operator delete(void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:43) + Address 0x........ is 0 bytes inside a block of size 32 alloc'd + at 0x........: operator new(unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:42) + +Mismatched new[]/delete[] alignment alloc value: 64 dealloc value: 128 + at 0x........: operator delete[](void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:48) + Address 0x........ is 0 bytes inside a block of size 32 alloc'd + at 0x........: operator new[](unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:47) + From ab5770e5c5d0d580b2c12e91d758ca12684b96f0 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 1 Nov 2025 19:55:00 +0100 Subject: [PATCH 032/502] And remove the one that I copied and pasted the wrong name --- ...licate_align_size_errors.stderr.out-darwin | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 memcheck/tests/duplicate_align_size_errors.stderr.out-darwin diff --git a/memcheck/tests/duplicate_align_size_errors.stderr.out-darwin b/memcheck/tests/duplicate_align_size_errors.stderr.out-darwin deleted file mode 100644 index 93faa3d16..000000000 --- a/memcheck/tests/duplicate_align_size_errors.stderr.out-darwin +++ /dev/null @@ -1,22 +0,0 @@ -Invalid alignment value: 0 (should be non-zero and a power of 2) - at 0x........: operator new(unsigned long, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) - by 0x........: main (duplicate_align_size_errors.cpp:19) - -Invalid alignment value: 0 (should be non-zero and a power of 2) - at 0x........: operator delete(void*, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) - by 0x........: main (duplicate_align_size_errors.cpp:20) - -Mismatched new/delete size value: 33 - at 0x........: operator delete(void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) - by 0x........: main (duplicate_align_size_errors.cpp:43) - Address 0x........ is 0 bytes inside a block of size 32 alloc'd - at 0x........: operator new(unsigned long, std::align_val_t) (vg_replace_malloc.c:...) - by 0x........: main (duplicate_align_size_errors.cpp:42) - -Mismatched new[]/delete[] alignment alloc value: 64 dealloc value: 128 - at 0x........: operator delete[](void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) - by 0x........: main (duplicate_align_size_errors.cpp:48) - Address 0x........ is 0 bytes inside a block of size 32 alloc'd - at 0x........: operator new[](unsigned long, std::align_val_t) (vg_replace_malloc.c:...) - by 0x........: main (duplicate_align_size_errors.cpp:47) - From ba27d633e870caea84a6b27774c021922c573e0e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 2 Nov 2025 17:45:36 +0100 Subject: [PATCH 033/502] Bug 413369 - unhandled amd64-darwin syscall: unix:151 (getpgid) --- .gitignore | 1 + NEWS | 1 + coregrind/m_syswrap/syswrap-darwin.c | 6 +++--- none/tests/darwin/Makefile.am | 2 ++ none/tests/darwin/bug411369.c | 16 ++++++++++++++++ none/tests/darwin/bug411369.stderr.exp | 0 none/tests/darwin/bug411369.vgtest | 2 ++ 7 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 none/tests/darwin/bug411369.c create mode 100644 none/tests/darwin/bug411369.stderr.exp create mode 100644 none/tests/darwin/bug411369.vgtest diff --git a/.gitignore b/.gitignore index 03eecd1ed..fb2aec242 100644 --- a/.gitignore +++ b/.gitignore @@ -1892,6 +1892,7 @@ /none/tests/darwin/bug228343 /none/tests/darwin/bug254164 /none/tests/darwin/bug390269 +/none/tests/darwin/bug411369 /none/tests/darwin/rlimit # /none/tests/linux/ diff --git a/NEWS b/NEWS index 526969ebf..0941034a6 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. +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 ML_(do_syscall_for_client_WRK) diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index de8c37fc3..62bd589ae 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -10652,8 +10652,8 @@ const SyscallTableEntry ML_(syscall_table)[] = { GENXY(__NR_mincore, sys_mincore), GENXY(__NR_getgroups, sys_getgroups), // _____(__NR_setgroups), // 80 - GENX_(__NR_getpgrp, sys_getpgrp), - GENX_(__NR_setpgid, sys_setpgid), + GENX_(__NR_getpgrp, sys_getpgrp), + GENX_(__NR_setpgid, sys_setpgid), GENXY(__NR_setitimer, sys_setitimer), _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(84)), // old wait // _____(__NR_swapon), @@ -10722,7 +10722,7 @@ const SyscallTableEntry ML_(syscall_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(148)), // old setquota _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(149)), // old qquota _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(150)), // old getsockname -// _____(__NR_getpgid), + GENX_(__NR_getpgid, sys_getpgid), // _____(__NR_setprivexec), GENXY(__NR_pread, sys_pread64), GENX_(__NR_pwrite, sys_pwrite64), diff --git a/none/tests/darwin/Makefile.am b/none/tests/darwin/Makefile.am index d19fc4aef..085f049a8 100644 --- a/none/tests/darwin/Makefile.am +++ b/none/tests/darwin/Makefile.am @@ -9,6 +9,7 @@ EXTRA_DIST = \ bug228343.stderr.exp bug228343.stdout.exp bug228343.vgtest \ bug254164.stderr.exp bug254164.vgtest \ bug390269.stderr.exp bug390269.vgtest \ + bug411369.stderr.exp bug411369.vgtest \ rlimit.stderr.exp rlimit.vgtest check_PROGRAMS = \ @@ -17,6 +18,7 @@ check_PROGRAMS = \ bug228343 \ bug254164 \ bug390269 \ + bug411369 \ rlimit diff --git a/none/tests/darwin/bug411369.c b/none/tests/darwin/bug411369.c new file mode 100644 index 000000000..ac4930671 --- /dev/null +++ b/none/tests/darwin/bug411369.c @@ -0,0 +1,16 @@ +#include +#include + +int main() +{ + int pgid; + + if ((pgid = getpgid(0)) == -1) + perror("getpgid"); +/* + else + printf("pgid : %d\n", pgid); +*/ + return pgid; +} + diff --git a/none/tests/darwin/bug411369.stderr.exp b/none/tests/darwin/bug411369.stderr.exp new file mode 100644 index 000000000..e69de29bb diff --git a/none/tests/darwin/bug411369.vgtest b/none/tests/darwin/bug411369.vgtest new file mode 100644 index 000000000..b2b477f35 --- /dev/null +++ b/none/tests/darwin/bug411369.vgtest @@ -0,0 +1,2 @@ +prog: bug411369 +vgopts: -q From d2bd46b27e5357b983388d081b559863d7f1be9d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 3 Nov 2025 21:43:17 +0100 Subject: [PATCH 034/502] regtest: rename memcheck wcpncpy The perl script filter_memcheck removes callstack elements that are not of interest and changes vg_replace_strmem.c/vg_replace_malloc.c line numbers to '...'. It protects lines containing the testcase name. When the testcase name is the same as the C function being tested that's not really what we want. My perl isn't really good enough to be able to only change the line numbers when it is a 'tool file'. Instead I'm renaming the testcase. --- memcheck/tests/Makefile.am | 4 ++-- memcheck/tests/wcpncpy.stderr.exp | 19 ------------------- memcheck/tests/wcpncpy.vgtest | 3 --- memcheck/tests/{wcpncpy.c => wcpncpy1.c} | 0 memcheck/tests/wcpncpy1.stderr.exp | 19 +++++++++++++++++++ memcheck/tests/wcpncpy1.vgtest | 3 +++ 6 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 memcheck/tests/wcpncpy.stderr.exp delete mode 100644 memcheck/tests/wcpncpy.vgtest rename memcheck/tests/{wcpncpy.c => wcpncpy1.c} (100%) create mode 100644 memcheck/tests/wcpncpy1.stderr.exp create mode 100644 memcheck/tests/wcpncpy1.vgtest diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 755f422ee..6343b1b7c 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -461,7 +461,7 @@ EXTRA_DIST = \ vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stdout.exp-solaris \ vcpu_fnfns.stdout.exp-illumos \ vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \ - wcpncpy.stderr.exp wcpncpy.vgtest \ + wcpncpy1.stderr.exp wcpncpy1.vgtest \ wcs.vgtest wcs.stderr.exp wcs.stdout.exp \ wcscat.vgtest wcscat.stderr.exp wcscat.stdout.exp \ wcsncpy.vgtest wcsncpy.stderr.exp \ @@ -656,7 +656,7 @@ check_PROGRAMS += threadname endif if HAVE_WCPNCPY -check_PROGRAMS += wcpncpy +check_PROGRAMS += wcpncpy1 endif # are there still pre-C99 C compilers? diff --git a/memcheck/tests/wcpncpy.stderr.exp b/memcheck/tests/wcpncpy.stderr.exp deleted file mode 100644 index 0ff9e5c74..000000000 --- a/memcheck/tests/wcpncpy.stderr.exp +++ /dev/null @@ -1,19 +0,0 @@ -Conditional jump or move depends on uninitialised value(s) - at 0x........: wcpncpy (vg_replace_strmem.c:2427) - by 0x........: main (wcpncpy.c:14) - -Invalid write of size 4 - at 0x........: wcpncpy (vg_replace_strmem.c:2427) - by 0x........: main (wcpncpy.c:27) - Address 0x........ is 20 bytes inside a block of size 22 alloc'd - at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (wcpncpy.c:10) - -Source and destination overlap in wcpncpy(0x........, 0x........) - at 0x........: wcpncpy (vg_replace_strmem.c:2427) - by 0x........: main (wcpncpy.c:35) - -Source and destination overlap in wcpncpy(0x........, 0x........) - at 0x........: wcpncpy (vg_replace_strmem.c:2427) - by 0x........: main (wcpncpy.c:43) - diff --git a/memcheck/tests/wcpncpy.vgtest b/memcheck/tests/wcpncpy.vgtest deleted file mode 100644 index f4edd4b8d..000000000 --- a/memcheck/tests/wcpncpy.vgtest +++ /dev/null @@ -1,3 +0,0 @@ -prereq: test -e ./wcpncpy -prog: wcpncpy -vgopts: -q diff --git a/memcheck/tests/wcpncpy.c b/memcheck/tests/wcpncpy1.c similarity index 100% rename from memcheck/tests/wcpncpy.c rename to memcheck/tests/wcpncpy1.c diff --git a/memcheck/tests/wcpncpy1.stderr.exp b/memcheck/tests/wcpncpy1.stderr.exp new file mode 100644 index 000000000..1b7fd22b8 --- /dev/null +++ b/memcheck/tests/wcpncpy1.stderr.exp @@ -0,0 +1,19 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: wcpncpy (vg_replace_strmem.c:...) + by 0x........: main (wcpncpy1.c:14) + +Invalid write of size 4 + at 0x........: wcpncpy (vg_replace_strmem.c:...) + by 0x........: main (wcpncpy1.c:27) + Address 0x........ is 20 bytes inside a block of size 22 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (wcpncpy1.c:10) + +Source and destination overlap in wcpncpy(0x........, 0x........) + at 0x........: wcpncpy (vg_replace_strmem.c:...) + by 0x........: main (wcpncpy1.c:35) + +Source and destination overlap in wcpncpy(0x........, 0x........) + at 0x........: wcpncpy (vg_replace_strmem.c:...) + by 0x........: main (wcpncpy1.c:43) + diff --git a/memcheck/tests/wcpncpy1.vgtest b/memcheck/tests/wcpncpy1.vgtest new file mode 100644 index 000000000..052393a39 --- /dev/null +++ b/memcheck/tests/wcpncpy1.vgtest @@ -0,0 +1,3 @@ +prereq: test -e ./wcpncpy1 +prog: wcpncpy1 +vgopts: -q From 7b21f1225f51c1fbd7eed122eaa06bfd16809ba9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 3 Nov 2025 21:56:42 +0100 Subject: [PATCH 035/502] Darwin: add redir for wcpncpy --- .gitignore | 2 +- shared/vg_replace_strmem.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fb2aec242..cfd8c7bd8 100644 --- a/.gitignore +++ b/.gitignore @@ -1050,7 +1050,7 @@ /memcheck/tests/wcscat /memcheck/tests/weirdioctl /memcheck/tests/with space -/memcheck/tests/wcpncpy +/memcheck/tests/wcpncpy1 /memcheck/tests/wcsncpy /memcheck/tests/wmemcmp /memcheck/tests/wrap1 diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index aaa409257..6cc26d9a8 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -2425,6 +2425,8 @@ static inline void my_exit ( int x ) #if defined(VGO_linux) || defined(VGO_freebsd) || defined(VGO_solaris) WCPNCPY(VG_Z_LIBC_SONAME, wcpncpy) +#elif defined(VGO_darwin) + WCPNCPY(libsystemZucZddylib, wcpncpy) #endif /*----------------------- wcscat ----------------------*/ From 8a5e8c6bb7c77a8b47005a6fe5bb479293b408a2 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 4 Nov 2025 07:30:42 +0100 Subject: [PATCH 036/502] Darwin: fix redir for memccpy --- memcheck/tests/filter_libc_variants | 2 +- memcheck/tests/memccpy2.vgtest | 1 + shared/vg_replace_strmem.c | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/memcheck/tests/filter_libc_variants b/memcheck/tests/filter_libc_variants index dce64d4a7..bfffa8468 100755 --- a/memcheck/tests/filter_libc_variants +++ b/memcheck/tests/filter_libc_variants @@ -2,4 +2,4 @@ ./filter_stderr "$@" | -sed 's/ _platform_memcmp / memcmp /;s/ bcmp / memcmp /' +sed 's/ _platform_memcmp / memcmp /;s/ bcmp / memcmp /;s/ _platform_memccpy / memccpy /' diff --git a/memcheck/tests/memccpy2.vgtest b/memcheck/tests/memccpy2.vgtest index 29039f153..988a8cb1c 100644 --- a/memcheck/tests/memccpy2.vgtest +++ b/memcheck/tests/memccpy2.vgtest @@ -1,2 +1,3 @@ prog: memccpy2 vgopts: -q +stderr_filter: filter_libc_variants diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 6cc26d9a8..28fda80ee 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -2380,8 +2380,10 @@ static inline void my_exit ( int x ) return NULL; \ } -#if defined(VGO_linux) || defined(VGO_freebsd) || defined(VGO_darwin) || defined(VGO_solaris) +#if defined(VGO_linux) || defined(VGO_freebsd) || defined(VGO_solaris) MEMCCPY(VG_Z_LIBC_SONAME, memccpy) +#elif defined(VGO_darwin) + MEMCCPY(libsystemZuplatformZddylib, _platform_memccpy) #endif /*---------------------- wcpncpy ----------------------*/ From b461657ef9f2f8c0d983070e84f5387d410303ed Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 4 Nov 2025 08:27:01 +0100 Subject: [PATCH 037/502] Darwin: clean up use of Z-encoded libc component libraries in vg_replace_strmem.c Use macros, mainly for consistency. Not sure how these have evolved post OSX 10.13. --- include/pub_tool_redir.h | 17 ++++++++++------- shared/vg_replace_strmem.c | 38 +++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h index c19fd3d97..043f8ac52 100644 --- a/include/pub_tool_redir.h +++ b/include/pub_tool_redir.h @@ -247,11 +247,11 @@ #else # define VG_Z_LIBC_SONAME libcZdsoZa // libc.so* #endif -#elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6) -# define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib +#elif defined(VGO_darwin) -#elif defined(VGO_darwin) && (DARWIN_VERS == DARWIN_10_7 \ - || DARWIN_VERS == DARWIN_10_8) +#if (DARWIN_VERS <= DARWIN_10_6) +# define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib +#elif (DARWIN_VERS == DARWIN_10_7 || DARWIN_VERS == DARWIN_10_8) # define VG_Z_LIBC_SONAME libsystemZucZaZddylib // libsystem_c*.dylib /* Note that the idea of a single name for the C library falls apart on more recent Darwins (10.8 and later) since the @@ -260,13 +260,16 @@ libsystem_platform.dylib. This makes VG_Z_LIBC_SONAME somewhat useless at least inside vg_replace_strmem.c, and that hardwires some dylib names directly, for OSX 10.9. */ - -#elif defined(VGO_darwin) && (DARWIN_VERS >= DARWIN_10_9) +#elif (DARWIN_VERS >= DARWIN_10_9) # define VG_Z_LIBC_SONAME libsystemZumallocZddylib // libsystem_malloc.dylib +#endif + +/* Not tested on systems older than OSX 10.13 */ +#define VG_Z_LIBSYSTEM_C_SONAME libsystemZucZddylib +#define VG_Z_LIBSYSTEM_PLATFORM_SONAME libsystemZuplatformZddylib #else # error "Unknown platform" - #endif /* --- Sonames of the GNU C++ library. --- */ diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 28fda80ee..5ef4884ef 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -237,7 +237,7 @@ static inline void my_exit ( int x ) //STRRCHR(VG_Z_DYLD, rindex) STRRCHR(VG_Z_LIBC_SONAME, strrchr) # if DARWIN_VERS >= DARWIN_10_9 - STRRCHR(libsystemZucZddylib, strrchr) + STRRCHR(VG_Z_LIBSYSTEM_C_SONAME, strrchr) # endif #elif defined(VGO_solaris) @@ -290,15 +290,15 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRCHR(VG_Z_LIBC_SONAME, strchr) # if DARWIN_VERS == DARWIN_10_9 - STRCHR(libsystemZuplatformZddylib, _platform_strchr) + STRCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_strchr) # endif # if DARWIN_VERS >= DARWIN_10_10 /* _platform_strchr$VARIANT$Generic */ - STRCHR(libsystemZuplatformZddylib, _platform_strchr$VARIANT$Generic) + STRCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_strchr$VARIANT$Generic) /* _platform_strchr$VARIANT$Haswell */ - STRCHR(libsystemZuplatformZddylib, _platform_strchr$VARIANT$Haswell) + STRCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_strchr$VARIANT$Haswell) # endif - STRCHR(libsystemZuplatformZddylib, _platform_strchr$VARIANT$Base) + STRCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_strchr$VARIANT$Base) #elif defined(VGO_solaris) STRCHR(VG_Z_LIBC_SONAME, strchr) @@ -475,7 +475,7 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) # if DARWIN_VERS == DARWIN_10_9 - STRNLEN(libsystemZucZddylib, strnlen) + STRNLEN(VG_Z_LIBSYSTEM_C_SONAME, strnlen) # endif #elif defined(VGO_solaris) @@ -524,7 +524,7 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRLEN(VG_Z_LIBC_SONAME, strlen) # if DARWIN_VERS >= DARWIN_10_9 - STRLEN(libsystemZucZddylib, strlen) + STRLEN(VG_Z_LIBSYSTEM_C_SONAME, strlen) # endif #elif defined(VGO_solaris) @@ -573,7 +573,7 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRCPY(VG_Z_LIBC_SONAME, strcpy) # if DARWIN_VERS == DARWIN_10_9 - STRCPY(libsystemZucZddylib, strcpy) + STRCPY(VG_Z_LIBSYSTEM_C_SONAME, strcpy) # endif #elif defined(VGO_solaris) @@ -621,7 +621,7 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRNCPY(VG_Z_LIBC_SONAME, strncpy) # if DARWIN_VERS >= DARWIN_10_9 - STRNCPY(libsystemZucZddylib, strncpy) + STRNCPY(VG_Z_LIBSYSTEM_C_SONAME, strncpy) # endif #elif defined(VGO_solaris) @@ -730,7 +730,7 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRNCMP(VG_Z_LIBC_SONAME, strncmp) # if DARWIN_VERS >= DARWIN_10_9 - STRNCMP(libsystemZuplatformZddylib, _platform_strncmp) + STRNCMP(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_strncmp) # endif #elif defined(VGO_solaris) @@ -957,7 +957,7 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRCMP(VG_Z_LIBC_SONAME, strcmp) # if DARWIN_VERS >= DARWIN_10_9 - STRCMP(libsystemZuplatformZddylib, _platform_strcmp) + STRCMP(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_strcmp) # endif #elif defined(VGO_solaris) @@ -993,18 +993,18 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) # if DARWIN_VERS == DARWIN_10_9 MEMCHR(VG_Z_DYLD, memchr) - MEMCHR(libsystemZuplatformZddylib, _platform_memchr) + MEMCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memchr) # endif # if DARWIN_VERS >= DARWIN_10_10 MEMCHR(VG_Z_DYLD, memchr) /* _platform_memchr$VARIANT$Generic */ - MEMCHR(libsystemZuplatformZddylib, _platform_memchr$VARIANT$Generic) + MEMCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memchr$VARIANT$Generic) /* _platform_memchr$VARIANT$Haswell */ - MEMCHR(libsystemZuplatformZddylib, _platform_memchr$VARIANT$Haswell) + MEMCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memchr$VARIANT$Haswell) # endif # if DARWIN_VERS >= DARWIN_10_12 /* _platform_memchr$VARIANT$Base */ - MEMCHR(libsystemZuplatformZddylib, _platform_memchr$VARIANT$Base) + MEMCHR(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memchr$VARIANT$Base) #endif #elif defined(VGO_solaris) @@ -1242,7 +1242,7 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) # if DARWIN_VERS >= DARWIN_10_9 - MEMCMP(libsystemZuplatformZddylib, _platform_memcmp) + MEMCMP(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memcmp) # endif #elif defined(VGO_solaris) @@ -1432,7 +1432,7 @@ static inline void my_exit ( int x ) MEMMOVE(VG_Z_LIBC_SONAME, memmoveZDVARIANTZDsse42) /* memmove$VARIANT$sse42 */ # if DARWIN_VERS >= DARWIN_10_9 /* _platform_memmove$VARIANT$Ivybridge, Nehelem etc. */ - MEMMOVE(libsystemZuplatformZddylib, ZuplatformZumemmoveZDVARIANTZDZa) + MEMMOVE(VG_Z_LIBSYSTEM_PLATFORM_SONAME, ZuplatformZumemmoveZDVARIANTZDZa) # endif #elif defined(VGO_solaris) @@ -2383,7 +2383,7 @@ static inline void my_exit ( int x ) #if defined(VGO_linux) || defined(VGO_freebsd) || defined(VGO_solaris) MEMCCPY(VG_Z_LIBC_SONAME, memccpy) #elif defined(VGO_darwin) - MEMCCPY(libsystemZuplatformZddylib, _platform_memccpy) + MEMCCPY(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memccpy) #endif /*---------------------- wcpncpy ----------------------*/ @@ -2428,7 +2428,7 @@ static inline void my_exit ( int x ) #if defined(VGO_linux) || defined(VGO_freebsd) || defined(VGO_solaris) WCPNCPY(VG_Z_LIBC_SONAME, wcpncpy) #elif defined(VGO_darwin) - WCPNCPY(libsystemZucZddylib, wcpncpy) + WCPNCPY(VG_Z_LIBSYSTEM_C_SONAME, wcpncpy) #endif /*----------------------- wcscat ----------------------*/ From 1a60f23515367e99b1cc059d276ce4671a752d4d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 4 Nov 2025 20:36:45 +0100 Subject: [PATCH 038/502] Darwin: add ML_(get_darwin_syscall_entry) There was a comment saying that exposing the table arrays and sizes should be fixed (all other OSes use a function). Now done. Taken from https://github.com/LouisBrunner/valgrind-macos Thanks, Louis Brunner. --- coregrind/m_syswrap/priv_types_n_macros.h | 7 +--- coregrind/m_syswrap/syswrap-darwin.c | 47 ++++++++++++++++++++--- coregrind/m_syswrap/syswrap-main.c | 23 +---------- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/coregrind/m_syswrap/priv_types_n_macros.h b/coregrind/m_syswrap/priv_types_n_macros.h index 0ce26bd33..ff5d6a2de 100644 --- a/coregrind/m_syswrap/priv_types_n_macros.h +++ b/coregrind/m_syswrap/priv_types_n_macros.h @@ -240,12 +240,9 @@ extern SyscallTableEntry* ML_(get_linux_syscall_entry)( UInt sysno ); #elif defined(VGO_darwin) -/* XXX: Darwin still uses the old scheme of exposing the table - array(s) and size(s) directly to syswrap-main.c. This should be - fixed. */ -extern const SyscallTableEntry ML_(syscall_table)[]; -extern const UInt ML_(syscall_table_size); +extern +const SyscallTableEntry* ML_(get_darwin_syscall_entry)( UInt sysno ); #elif defined(VGO_solaris) extern diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 62bd589ae..4eec0eb36 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -11368,14 +11368,49 @@ const SyscallTableEntry ML_(mdep_trap_table)[] = { #error unknown architecture #endif -const UInt ML_(syscall_table_size) = - sizeof(ML_(syscall_table)) / sizeof(ML_(syscall_table)[0]); +const SyscallTableEntry* ML_(get_darwin_syscall_entry) ( UInt sysno ) +{ + const UInt syscall_table_size = + sizeof(ML_(syscall_table)) / sizeof(ML_(syscall_table)[0]); + + const UInt mach_trap_table_size = + sizeof(ML_(mach_trap_table)) / sizeof(ML_(mach_trap_table)[0]); + + const UInt mdep_trap_table_size = + sizeof(ML_(mdep_trap_table)) / sizeof(ML_(mdep_trap_table)[0]); + + const SyscallTableEntry *table; + Int size; + + switch (VG_DARWIN_SYSNO_CLASS(sysno)) { + case VG_DARWIN_SYSCALL_CLASS_UNIX: + table = ML_(syscall_table); + size = syscall_table_size; + break; + case VG_DARWIN_SYSCALL_CLASS_MACH: + table = ML_(mach_trap_table); + size = mach_trap_table_size; + break; + case VG_DARWIN_SYSCALL_CLASS_MDEP: + table = ML_(mdep_trap_table); + size = mdep_trap_table_size; + break; + default: + vg_assert2(0, "invalid syscall class: %d (syscall: %d / %#x)\n", VG_DARWIN_SYSNO_CLASS(sysno), VG_DARWIN_SYSNO_INDEX(sysno), sysno); + break; + } -const UInt ML_(mach_trap_table_size) = - sizeof(ML_(mach_trap_table)) / sizeof(ML_(mach_trap_table)[0]); + sysno = VG_DARWIN_SYSNO_INDEX(sysno); + if (sysno < size) { + const SyscallTableEntry *sys = &table[sysno]; + if (!sys->before) + return NULL; /* no entry */ + return sys; + } -const UInt ML_(mdep_trap_table_size) = - sizeof(ML_(mdep_trap_table)) / sizeof(ML_(mdep_trap_table)[0]); + /* Can't find a wrapper. */ + return NULL; +} #endif // defined(VGO_darwin) diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 49c264c40..884836c26 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -2119,28 +2119,7 @@ static const SyscallTableEntry* get_syscall_entry ( Int syscallno ) sys = ML_(get_freebsd_syscall_entry)( syscallno ); # elif defined(VGO_darwin) - Int idx = VG_DARWIN_SYSNO_INDEX(syscallno); - - switch (VG_DARWIN_SYSNO_CLASS(syscallno)) { - case VG_DARWIN_SYSCALL_CLASS_UNIX: - if (idx >= 0 && idx < ML_(syscall_table_size) && - ML_(syscall_table)[idx].before != NULL) - sys = &ML_(syscall_table)[idx]; - break; - case VG_DARWIN_SYSCALL_CLASS_MACH: - if (idx >= 0 && idx < ML_(mach_trap_table_size) && - ML_(mach_trap_table)[idx].before != NULL) - sys = &ML_(mach_trap_table)[idx]; - break; - case VG_DARWIN_SYSCALL_CLASS_MDEP: - if (idx >= 0 && idx < ML_(mdep_trap_table_size) && - ML_(mdep_trap_table)[idx].before != NULL) - sys = &ML_(mdep_trap_table)[idx]; - break; - default: - vg_assert(0); - break; - } + sys = ML_(get_darwin_syscall_entry)( syscallno ); # elif defined(VGO_solaris) sys = ML_(get_solaris_syscall_entry)(syscallno); From e062c8b55d861d176de6958e106c831e300a8b1c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 4 Nov 2025 21:39:00 +0100 Subject: [PATCH 039/502] FreeBSD: cleanup arg handling for syscalls syscall and __syscall This is with a view to using the same code for Darwin. --- coregrind/m_syswrap/syswrap-main.c | 115 +++++++++++++---------------- 1 file changed, 53 insertions(+), 62 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 884836c26..ac2f161ec 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -1833,7 +1833,7 @@ void putSyscallStatusIntoGuestState ( /*IN*/ ThreadId tid, hardwired. */ static -void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout ) +void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout, /*IN*/Bool syscall_syscall ) { VG_(bzero_inline)(layout, sizeof(*layout)); @@ -1894,27 +1894,57 @@ void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout ) layout->s_arg8 = sizeof(UWord) * 8; #elif defined(VGP_amd64_freebsd) - layout->o_sysno = OFFSET_amd64_RAX; - layout->o_arg1 = OFFSET_amd64_RDI; - layout->o_arg2 = OFFSET_amd64_RSI; - layout->o_arg3 = OFFSET_amd64_RDX; - layout->o_arg4 = OFFSET_amd64_R10; - layout->o_arg5 = OFFSET_amd64_R8; - layout->o_arg6 = OFFSET_amd64_R9; - layout->s_arg7 = sizeof(UWord) * 1; - layout->s_arg8 = sizeof(UWord) * 2; - layout->arg6_is_reg = True; + if (syscall_syscall) + { + layout->o_sysno = OFFSET_amd64_RDI; + layout->o_arg1 = OFFSET_amd64_RSI; + layout->o_arg2 = OFFSET_amd64_RDX; + layout->o_arg3 = OFFSET_amd64_R10; + layout->o_arg4 = OFFSET_amd64_R8; + layout->o_arg5 = OFFSET_amd64_R9; + layout->s_arg6 = sizeof(UWord) * 1; + layout->s_arg7 = sizeof(UWord) * 2; + layout->s_arg8 = sizeof(UWord) * 3; + layout->arg6_is_reg = False; + } + else + { + layout->o_sysno = OFFSET_amd64_RAX; + layout->o_arg1 = OFFSET_amd64_RDI; + layout->o_arg2 = OFFSET_amd64_RSI; + layout->o_arg3 = OFFSET_amd64_RDX; + layout->o_arg4 = OFFSET_amd64_R10; + layout->o_arg5 = OFFSET_amd64_R8; + layout->o_arg6 = OFFSET_amd64_R9; + layout->s_arg7 = sizeof(UWord) * 1; + layout->s_arg8 = sizeof(UWord) * 2; + layout->arg6_is_reg = True; + } #elif defined(VGP_arm64_freebsd) - layout->o_sysno = OFFSET_arm64_X8; - layout->o_arg1 = OFFSET_arm64_X0; - layout->o_arg2 = OFFSET_arm64_X1; - layout->o_arg3 = OFFSET_arm64_X2; - layout->o_arg4 = OFFSET_arm64_X3; - layout->o_arg5 = OFFSET_arm64_X4; - layout->o_arg6 = OFFSET_arm64_X5; - layout->o_arg7 = OFFSET_arm64_X6; - layout->o_arg8 = OFFSET_arm64_X7; + if (syscall_syscall) + { + layout->o_sysno = OFFSET_arm64_X8; + layout->o_arg1 = OFFSET_arm64_X0; + layout->o_arg2 = OFFSET_arm64_X1; + layout->o_arg3 = OFFSET_arm64_X2; + layout->o_arg4 = OFFSET_arm64_X3; + layout->o_arg5 = OFFSET_arm64_X4; + layout->o_arg6 = OFFSET_arm64_X5; + layout->o_arg7 = OFFSET_arm64_X6; + layout->o_arg8 = OFFSET_arm64_X7; + } + else + { + layout->o_sysno = OFFSET_arm64_X0; + layout->o_arg1 = OFFSET_arm64_X1; + layout->o_arg2 = OFFSET_arm64_X2; + layout->o_arg3 = OFFSET_arm64_X3; + layout->o_arg4 = OFFSET_arm64_X4; + layout->o_arg5 = OFFSET_arm64_X5; + layout->o_arg6 = OFFSET_arm64_X6; + layout->o_arg7 = OFFSET_arm64_X7; + } #elif defined(VGP_arm_linux) layout->o_sysno = OFFSET_arm_R7; @@ -2044,36 +2074,6 @@ void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout ) #endif } -#if defined(VGP_amd64_freebsd) || defined(VGP_arm64_freebsd) -static -void getSyscallArgLayout_0_198 ( /*OUT*/SyscallArgLayout* layout ) -{ -#if defined(VGP_amd64_freebsd) - VG_(bzero_inline)(layout, sizeof(*layout)); - layout->o_sysno = OFFSET_amd64_RDI; - layout->o_arg1 = OFFSET_amd64_RSI; - layout->o_arg2 = OFFSET_amd64_RDX; - layout->o_arg3 = OFFSET_amd64_R10; - layout->o_arg4 = OFFSET_amd64_R8; - layout->o_arg5 = OFFSET_amd64_R9; - layout->s_arg6 = sizeof(UWord) * 1; - layout->s_arg7 = sizeof(UWord) * 2; - layout->s_arg8 = sizeof(UWord) * 3; - layout->arg6_is_reg = False; -#else - layout->o_sysno = OFFSET_arm64_X0; - layout->o_arg1 = OFFSET_arm64_X1; - layout->o_arg2 = OFFSET_arm64_X2; - layout->o_arg3 = OFFSET_arm64_X3; - layout->o_arg4 = OFFSET_arm64_X4; - layout->o_arg5 = OFFSET_arm64_X5; - layout->o_arg6 = OFFSET_arm64_X6; - layout->o_arg7 = OFFSET_arm64_X7; -#endif -} -#endif - - /* --------------------------------------------------------------------- The main driver logic ------------------------------------------------------------------ */ @@ -2205,6 +2205,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) const SyscallTableEntry* ent; SyscallArgLayout layout; SyscallInfo* sci; + Bool syscall_syscall = False; ensure_initialised(); @@ -2362,21 +2363,11 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) checks (PRE_REG_READ calls) know which bits of the guest state they need to inspect. */ #if defined(VGP_amd64_freebsd) || defined (VGP_arm64_freebsd) - // PJF - somewhat unfortunate uglificaton of the code, but the current code handles two - // types of syscall with different register use. Mixing them up is not good. - // I've avoided modifying the existing function (I could have added - // a FreeBSD amd64-only flag to it for this purpose). if (sci->orig_args.klass == VG_FREEBSD_SYSCALL0 || sci->orig_args.klass == VG_FREEBSD_SYSCALL198) { - getSyscallArgLayout_0_198( &layout ); - } else { -#endif - - getSyscallArgLayout( &layout ); - -#if defined(VGP_amd64_freebsd) || defined(VGP_arm64_freebsd) + syscall_syscall = True; } #endif - + getSyscallArgLayout( &layout, syscall_syscall ); /* Make sure the tmp signal mask matches the real signal mask; sigsuspend may change this. */ From 9d9a20925bf33157025aaca5ac048ac6adf3761f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 5 Nov 2025 09:20:44 +0100 Subject: [PATCH 040/502] FreeBSD arm64: reverse normal syscall and syscall syscall args Copied and pasted in the wrong order. --- coregrind/m_syswrap/syswrap-main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index ac2f161ec..45ece95cb 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -1923,6 +1923,17 @@ void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout, /*IN*/Bool syscall_s #elif defined(VGP_arm64_freebsd) if (syscall_syscall) + { + layout->o_sysno = OFFSET_arm64_X0; + layout->o_arg1 = OFFSET_arm64_X1; + layout->o_arg2 = OFFSET_arm64_X2; + layout->o_arg3 = OFFSET_arm64_X3; + layout->o_arg4 = OFFSET_arm64_X4; + layout->o_arg5 = OFFSET_arm64_X5; + layout->o_arg6 = OFFSET_arm64_X6; + layout->o_arg7 = OFFSET_arm64_X7; + } + else { layout->o_sysno = OFFSET_arm64_X8; layout->o_arg1 = OFFSET_arm64_X0; @@ -1934,17 +1945,6 @@ void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout, /*IN*/Bool syscall_s layout->o_arg7 = OFFSET_arm64_X6; layout->o_arg8 = OFFSET_arm64_X7; } - else - { - layout->o_sysno = OFFSET_arm64_X0; - layout->o_arg1 = OFFSET_arm64_X1; - layout->o_arg2 = OFFSET_arm64_X2; - layout->o_arg3 = OFFSET_arm64_X3; - layout->o_arg4 = OFFSET_arm64_X4; - layout->o_arg5 = OFFSET_arm64_X5; - layout->o_arg6 = OFFSET_arm64_X6; - layout->o_arg7 = OFFSET_arm64_X7; - } #elif defined(VGP_arm_linux) layout->o_sysno = OFFSET_arm_R7; From 85a06581cc9e725103a2dda0acfcf95b95944755 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 6 Nov 2025 08:33:42 +0100 Subject: [PATCH 041/502] doc: add a text file describing client syscall argument handling To help understand all of the shuffling that gets done for "syscall syscall". --- docs/internals/client_syscall_arguments.txt | 112 ++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 docs/internals/client_syscall_arguments.txt diff --git a/docs/internals/client_syscall_arguments.txt b/docs/internals/client_syscall_arguments.txt new file mode 100644 index 000000000..1ef113db8 --- /dev/null +++ b/docs/internals/client_syscall_arguments.txt @@ -0,0 +1,112 @@ +Client Syscall Arguments +======================== + +This document describes how Valgrind handles arguments for client syscalls. +Everything described here takes place in VG_(client_syscall), syswrap-main.c. + + +Data Structures +~~~~~~~~~~~~~~~ + +There are 3 data structures that get used during the argument handling. + +1. VexGuestArchState, the usual storage for registers. +2. SyscallArgLayout, contains info about where the arguments are. +3. SyscallArgs (two copies in SyscallInfo), contains the argument values. + +Flow +~~~~ + +The main steps in the function are to call the PRE syscall wrapper. +That may perform the syscall (or simulate the syscall) and it may +also mark the syscall as blocking. If the PRE did not mark the syscall +as completed it will proceed to either make a non-blocking or a blocking +call. Lastly the POST gets called, if required. + +All of the above can be complicated by the fact that some platforms have +a "syscall syscall". Most platforms have a libc function called "syscall()". +On some platforms libc shuffles the arguments and just performs the +requested syscall directly . Other platforms have a syscall for performing syscalls. +There may even be more than one such syscall. In these cases it is the kernel +that shuffles the arguments to pass them on to the appropriate +syscall. + +The main platforms that have a "syscall syscall" are Darwin and FreeBSD. +Linux mips32 also has some special handling for syscall syscall. + +In Valgrind when there is a "syscall syscall" we don't want to just pass +all of the parameters through. If we did that then "syscall syscall" PRE wrapper +would need to handle all other kinds of syscalls, probably by some kind +of second level of recursive call. This is not the approach that has been taken. +Instead the arguments get "canonicalised" so that the PRE sees "syscall(SYS_write)" +is if it were just a normal direct write syscall. + +The argument layout for such "syscall syscalls" is the same as normal syscalls +but offset by one in register/stack positions. The first argument will be that for +syscall or __syscall. The second argument will be the target normal syscall +followed by the target arguments. + + +Flow in Detail +~~~~~~~~~~~~~~ + +1. Get the canonical arguments. +Call getSyscallArgsFromGuestState() +This stores the canonical arguments (syscall syscall format gets shuffled) +in the SyscallArgs structure. + +2. Get the syscall argument layout +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 +shuffle around where they are stored. + +4. Call the syscall PRE wrapper +The argument values are passed in a pointer to SyscallArgs. The fields of that +structure are used by the ARGX and SARGX macros to access the argument values +in the wrapper. + +The argument layout is passed in a pointer to SyscallArgLayout. The fields of +this structure are used indirectly by the PRE_REG_READX macros (X being an +integer for the argument position) For each argument the PRE_REG_READX macro +uses a PRAX macro which in turn uses either PSRAn for stack accesses or +PRRAn for register accesses. In the case of amd64 the location of argument 6 +depends on whether it is a normal syscall or a syscall syscall. In the former +case it will be in a register. In the latter case it will be on the stack. +There is special handling for this case. + +If the syscall has not been completed by the PRE then either step 5 or step 6 +will be executed for blocking and non-blocking syscalls respectively. + +5. Perform a blocking syscall +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 +some of the arguments so we need to put the arguments back into +VexGuestArchState. + +The syscall (and the signal mask handling) is performed in a call to +do_syscall_for_client(). This takes the arguments other than the syscall number +from VexGuestArchState. + +6. Perform a non-blocking 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). + +7. Call VG_(post_syscall)() +This will call the POST wrapper if required. + +Future Work +~~~~~~~~~~~ + +The flow would be simpler if do_syscall_for_client() used struct SyscallArgs +to get the arg values like VG_(do_syscall). That would avoid having to +put modified arguments back into the guest state. I have not checked, but +I am not certain that the modified guest state is not visible after the syscall. + +The handling of "syscall syscall" does an excessive amount of shuffling, +especially for the syscall number. I think that this can be simplified. From f15425fa0a9c77e547712a0669e978763de31948 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 6 Nov 2025 18:43:17 +0100 Subject: [PATCH 042/502] doc: add client_syscall_arguments.txt to EXTRA_DIST --- docs/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index 7e5ed389c..b8a15e27f 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -66,6 +66,7 @@ EXTRA_DIST = \ internals/Darwin-debug.txt \ internals/Darwin-notes.txt \ internals/SPEC-notes.txt \ + internals/client_syscall_arguments.txt \ internals/directory-structure.txt \ internals/git-HOWTO.txt \ internals/howto_BUILD_KDE42.txt \ From e3001a5226b122fe031e73ac3d165cb7a370bda2 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 6 Nov 2025 19:40:15 +0100 Subject: [PATCH 043/502] Bug 511713 - Refactor syscall argument handling --- NEWS | 1 + coregrind/m_syswrap/priv_types_n_macros.h | 14 +- coregrind/m_syswrap/syswrap-linux.c | 4 +- coregrind/m_syswrap/syswrap-main.c | 289 ++++++++++------------ coregrind/m_syswrap/syswrap-xen.c | 2 +- include/vki/vki-scnums-freebsd.h | 13 - 6 files changed, 148 insertions(+), 175 deletions(-) diff --git a/NEWS b/NEWS index 0941034a6..a52af5119 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 487055 memcheck/tests/x86-linux/scalar fails running in Docker 511329 Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) +511713 Refactor syscall argument handling To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/priv_types_n_macros.h b/coregrind/m_syswrap/priv_types_n_macros.h index ff5d6a2de..66a11879e 100644 --- a/coregrind/m_syswrap/priv_types_n_macros.h +++ b/coregrind/m_syswrap/priv_types_n_macros.h @@ -50,7 +50,14 @@ /* Arguments for a syscall. */ typedef struct SyscallArgs { - Word sysno; + Word canonical_sysno; +#if defined(VGO_freebsd) + /* + * This may be the same as canonical_sysno (normal syscalls) + * Or it may be __NR_syscall or __NR___syscall + */ + Word original_sysno; +#endif RegWord arg1; RegWord arg2; RegWord arg3; @@ -59,9 +66,6 @@ typedef RegWord arg6; RegWord arg7; RegWord arg8; -#if defined(VGO_freebsd) - Word klass; -#endif } SyscallArgs; @@ -360,7 +364,7 @@ const SyscallTableEntry* ML_(get_freebsd_syscall_entry)( UInt sysno ); /* Reference to the syscall's arguments -- the ones which the pre-wrapper may have modified, not the original copy. */ -#define SYSNO (arrghs->sysno) +#define SYSNO (arrghs->canonical_sysno) #define ARG1 (arrghs->arg1) #define ARG2 (arrghs->arg2) #define ARG3 (arrghs->arg3) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index e8b200385..0105fb98f 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -9577,7 +9577,7 @@ PRE(sys_ioctl) break; VG_(memset)(&harrghs, 0, sizeof(harrghs)); - harrghs.sysno = args->op; + harrghs.canonical_sysno = args->op; harrghs.arg1 = args->arg[0]; harrghs.arg2 = args->arg[1]; harrghs.arg3 = args->arg[2]; @@ -12316,7 +12316,7 @@ POST(sys_ioctl) break; VG_(memset)(&harrghs, 0, sizeof(harrghs)); - harrghs.sysno = args->op; + harrghs.canonical_sysno = args->op; harrghs.arg1 = args->arg[0]; harrghs.arg2 = args->arg[1]; harrghs.arg3 = args->arg[2]; diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 45ece95cb..49f841ff7 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -359,17 +359,10 @@ void do_syscall_for_client ( Int syscallno, syscall_mask, &saved, sizeof(vki_sigset_t) ); # elif defined(VGO_freebsd) - Word real_syscallno; UChar cflag; VG_(sigemptyset)(&saved); - if (tst->arch.vex.guest_SC_CLASS == VG_FREEBSD_SYSCALL0) - real_syscallno = __NR_syscall; - else if (tst->arch.vex.guest_SC_CLASS == VG_FREEBSD_SYSCALL198) - real_syscallno = __NR___syscall; - else - real_syscallno = syscallno; err = ML_(do_syscall_for_client_WRK)( - real_syscallno, &tst->arch.vex, + syscallno, &tst->arch.vex, syscall_mask, &saved, sizeof(vki_sigset_t), &cflag ); @@ -466,7 +459,10 @@ void do_syscall_for_client ( Int syscallno, static Bool eq_SyscallArgs ( SyscallArgs* a1, SyscallArgs* a2 ) { - return a1->sysno == a2->sysno + return a1->canonical_sysno == a2->canonical_sysno +#if defined(VGO_freebsd) + && a1->original_sysno == a2->original_sysno +#endif && a1->arg1 == a2->arg1 && a1->arg2 == a2->arg2 && a1->arg3 == a2->arg3 @@ -517,7 +513,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, { #if defined(VGP_x86_linux) VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla; - canonical->sysno = gst->guest_EAX; + canonical->canonical_sysno = gst->guest_EAX; canonical->arg1 = gst->guest_EBX; canonical->arg2 = gst->guest_ECX; canonical->arg3 = gst->guest_EDX; @@ -529,7 +525,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_amd64_linux) VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla; - canonical->sysno = gst->guest_RAX; + canonical->canonical_sysno = gst->guest_RAX; canonical->arg1 = gst->guest_RDI; canonical->arg2 = gst->guest_RSI; canonical->arg3 = gst->guest_RDX; @@ -541,7 +537,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_ppc32_linux) VexGuestPPC32State* gst = (VexGuestPPC32State*)gst_vanilla; - canonical->sysno = gst->guest_GPR0; + canonical->canonical_sysno = gst->guest_GPR0; canonical->arg1 = gst->guest_GPR3; canonical->arg2 = gst->guest_GPR4; canonical->arg3 = gst->guest_GPR5; @@ -553,7 +549,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux) VexGuestPPC64State* gst = (VexGuestPPC64State*)gst_vanilla; - canonical->sysno = gst->guest_GPR0; + canonical->canonical_sysno = gst->guest_GPR0; canonical->arg1 = gst->guest_GPR3; canonical->arg2 = gst->guest_GPR4; canonical->arg3 = gst->guest_GPR5; @@ -576,20 +572,20 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, // FreeBSD supports different calling conventions switch (gst->guest_EAX) { case __NR_syscall: - canonical->klass = VG_FREEBSD_SYSCALL0; - canonical->sysno = stack[1]; + canonical->canonical_sysno = stack[1]; stack += 1; break; case __NR___syscall: - canonical->klass = VG_FREEBSD_SYSCALL198; - canonical->sysno = stack[1]; + canonical->canonical_sysno = stack[1]; stack += 2; break; default: - canonical->klass = 0; - canonical->sysno = gst->guest_EAX; + canonical->canonical_sysno = gst->guest_EAX; break; } + + canonical->original_sysno = gst->guest_EAX; + // stack[0] is a (fake) return address canonical->arg1 = stack[1]; canonical->arg2 = stack[2]; @@ -604,29 +600,22 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla; UWord *stack = (UWord *)gst->guest_RSP; - // FreeBSD supports different calling conventions - // @todo PJF this all seems over complicated to me - // SYSCALL_STD is OK but for the other - // two here we overwrite canonical->sysno with - // the final syscall number but then in do_syscall_for_client - // we switch real_syscallno back to __NR_syscall or __NR___syscall switch (gst->guest_RAX) { case __NR_syscall: - canonical->klass = VG_FREEBSD_SYSCALL0; - canonical->sysno = gst->guest_RDI; + canonical->canonical_sysno = gst->guest_RDI; break; case __NR___syscall: - canonical->klass = VG_FREEBSD_SYSCALL198; - canonical->sysno = gst->guest_RDI; + canonical->canonical_sysno = gst->guest_RDI; break; default: - canonical->klass = VG_FREEBSD_SYSCALL_STD; - canonical->sysno = gst->guest_RAX; + canonical->canonical_sysno = gst->guest_RAX; break; } + canonical->original_sysno = gst->guest_RAX; + // stack[0] is a (fake) return address - if (canonical->klass == VG_FREEBSD_SYSCALL0 || canonical->klass == VG_FREEBSD_SYSCALL198) { + if (gst->guest_RAX == __NR_syscall || gst->guest_RAX == __NR___syscall) { // stack[0] is return address canonical->arg1 = gst->guest_RSI; canonical->arg2 = gst->guest_RDX; @@ -652,19 +641,20 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, VexGuestARM64State* gst = (VexGuestARM64State*)gst_vanilla; switch (gst->guest_X8) { case __NR_syscall: - canonical->klass = VG_FREEBSD_SYSCALL0; - canonical->sysno = gst->guest_X0; + canonical->canonical_sysno = gst->guest_X0; break; case __NR___syscall: - canonical->klass = VG_FREEBSD_SYSCALL198; - canonical->sysno = gst->guest_X0; + canonical->canonical_sysno = gst->guest_X0; break; default: - canonical->klass = 0; - canonical->sysno = gst->guest_X8; + canonical->canonical_sysno = gst->guest_X8; break; } - if (canonical->klass == VG_FREEBSD_SYSCALL0 || canonical->klass == VG_FREEBSD_SYSCALL198) { + + canonical->original_sysno = gst->guest_X8; + + if (gst->guest_X8 == __NR_syscall || + gst->guest_X8 == __NR___syscall) { canonical->arg1 = gst->guest_X1; canonical->arg2 = gst->guest_X2; canonical->arg3 = gst->guest_X3; @@ -684,7 +674,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_arm_linux) VexGuestARMState* gst = (VexGuestARMState*)gst_vanilla; - canonical->sysno = gst->guest_R7; + canonical->canonical_sysno = gst->guest_R7; canonical->arg1 = gst->guest_R0; canonical->arg2 = gst->guest_R1; canonical->arg3 = gst->guest_R2; @@ -696,7 +686,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_arm64_linux) VexGuestARM64State* gst = (VexGuestARM64State*)gst_vanilla; - canonical->sysno = gst->guest_X8; + canonical->canonical_sysno = gst->guest_X8; canonical->arg1 = gst->guest_X0; canonical->arg2 = gst->guest_X1; canonical->arg3 = gst->guest_X2; @@ -708,8 +698,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_mips32_linux) VexGuestMIPS32State* gst = (VexGuestMIPS32State*)gst_vanilla; - canonical->sysno = gst->guest_r2; // v0 - if (canonical->sysno == __NR_exit) { + canonical->canonical_sysno = gst->guest_r2; // v0 + if (canonical->canonical_sysno == __NR_exit) { canonical->arg1 = gst->guest_r4; // a0 canonical->arg2 = 0; canonical->arg3 = 0; @@ -717,7 +707,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, canonical->arg5 = 0; canonical->arg6 = 0; canonical->arg8 = 0; - } else if (canonical->sysno != __NR_syscall) { + } else if (canonical->canonical_sysno != __NR_syscall) { canonical->arg1 = gst->guest_r4; // a0 canonical->arg2 = gst->guest_r5; // a1 canonical->arg3 = gst->guest_r6; // a2 @@ -728,7 +718,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, canonical->arg8 = 0; } else { // Fixme hack handle syscall() - canonical->sysno = gst->guest_r4; // a0 + canonical->canonical_sysno = gst->guest_r4; // a0 canonical->arg1 = gst->guest_r5; // a1 canonical->arg2 = gst->guest_r6; // a2 canonical->arg3 = gst->guest_r7; // a3 @@ -741,7 +731,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_mips64_linux) VexGuestMIPS64State* gst = (VexGuestMIPS64State*)gst_vanilla; - canonical->sysno = gst->guest_r2; // v0 + canonical->canonical_sysno = gst->guest_r2; // v0 canonical->arg1 = gst->guest_r4; // a0 canonical->arg2 = gst->guest_r5; // a1 canonical->arg3 = gst->guest_r6; // a2 @@ -753,7 +743,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_nanomips_linux) VexGuestMIPS32State* gst = (VexGuestMIPS32State*)gst_vanilla; - canonical->sysno = gst->guest_r2; // t4 + canonical->canonical_sysno = gst->guest_r2; // t4 canonical->arg1 = gst->guest_r4; // a0 canonical->arg2 = gst->guest_r5; // a1 canonical->arg3 = gst->guest_r6; // a2 @@ -766,8 +756,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla; UWord *stack = (UWord *)gst->guest_ESP; // GrP fixme hope syscalls aren't called with really shallow stacks... - canonical->sysno = gst->guest_EAX; - if (canonical->sysno != 0) { + canonical->canonical_sysno = gst->guest_EAX; + if (canonical->canonical_sysno != 0) { // stack[0] is return address canonical->arg1 = stack[1]; canonical->arg2 = stack[2]; @@ -784,8 +774,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, // DDD: the tool can't see that the params have been shifted! Can // lead to incorrect checking, I think, because the PRRAn/PSARn // macros will mention the pre-shifted args. - canonical->sysno = stack[1]; - vg_assert(canonical->sysno != 0); + canonical->canonical_sysno = stack[1]; + vg_assert(canonical->canonical_sysno != 0); canonical->arg1 = stack[2]; canonical->arg2 = stack[3]; canonical->arg3 = stack[4]; @@ -797,7 +787,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, PRINT("SYSCALL[%d,?](0) syscall(%s, ...); please stand by...\n", VG_(getpid)(), /*tid,*/ - VG_SYSNUM_STRING(canonical->sysno)); + VG_SYSNUM_STRING(canonical->canonical_sysno)); } // Here we determine what kind of syscall it was by looking at the @@ -809,29 +799,29 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, switch (trc) { case VEX_TRC_JMP_SYS_INT128: // int $0x80 = Unix, 64-bit result - vg_assert(canonical->sysno >= 0); - canonical->sysno = VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(canonical->sysno); + vg_assert(canonical->canonical_sysno >= 0); + canonical->canonical_sysno = VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(canonical->canonical_sysno); break; case VEX_TRC_JMP_SYS_SYSENTER: // syscall = Unix, 32-bit result // OR Mach, 32-bit result - if (canonical->sysno >= 0) { + if (canonical->canonical_sysno >= 0) { // GrP fixme hack: 0xffff == I386_SYSCALL_NUMBER_MASK - canonical->sysno = VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(canonical->sysno + canonical->canonical_sysno = VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(canonical->canonical_sysno & 0xffff); } else { - canonical->sysno = VG_DARWIN_SYSCALL_CONSTRUCT_MACH(-canonical->sysno); + canonical->canonical_sysno = VG_DARWIN_SYSCALL_CONSTRUCT_MACH(-canonical->canonical_sysno); } break; case VEX_TRC_JMP_SYS_INT129: // int $0x81 = Mach, 32-bit result - vg_assert(canonical->sysno < 0); - canonical->sysno = VG_DARWIN_SYSCALL_CONSTRUCT_MACH(-canonical->sysno); + vg_assert(canonical->canonical_sysno < 0); + canonical->canonical_sysno = VG_DARWIN_SYSCALL_CONSTRUCT_MACH(-canonical->canonical_sysno); break; case VEX_TRC_JMP_SYS_INT130: // int $0x82 = mdep, 32-bit result - vg_assert(canonical->sysno >= 0); - canonical->sysno = VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(canonical->sysno); + vg_assert(canonical->canonical_sysno >= 0); + canonical->canonical_sysno = VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(canonical->canonical_sysno); break; default: vg_assert(0); @@ -845,8 +835,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, vg_assert(trc == VEX_TRC_JMP_SYS_SYSCALL); // GrP fixme hope syscalls aren't called with really shallow stacks... - canonical->sysno = gst->guest_RAX; - if (canonical->sysno != __NR_syscall) { + canonical->canonical_sysno = gst->guest_RAX; + if (canonical->canonical_sysno != __NR_syscall) { // stack[0] is return address canonical->arg1 = gst->guest_RDI; canonical->arg2 = gst->guest_RSI; @@ -863,8 +853,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, // DDD: the tool can't see that the params have been shifted! Can // lead to incorrect checking, I think, because the PRRAn/PSARn // macros will mention the pre-shifted args. - canonical->sysno = VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(gst->guest_RDI); - vg_assert(canonical->sysno != __NR_syscall); + canonical->canonical_sysno = VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(gst->guest_RDI); + vg_assert(canonical->canonical_sysno != __NR_syscall); canonical->arg1 = gst->guest_RSI; canonical->arg2 = gst->guest_RDX; canonical->arg3 = gst->guest_R10; // not rcx with syscall insn @@ -876,14 +866,14 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, PRINT("SYSCALL[%d,?](0) syscall(%s, ...); please stand by...\n", VG_(getpid)(), /*tid,*/ - VG_SYSNUM_STRING(canonical->sysno)); + VG_SYSNUM_STRING(canonical->canonical_sysno)); } - // no canonical->sysno adjustment needed + // no canonical->canonical_sysno adjustment needed #elif defined(VGP_s390x_linux) VexGuestS390XState* gst = (VexGuestS390XState*)gst_vanilla; - canonical->sysno = gst->guest_SYSNO; + canonical->canonical_sysno = gst->guest_SYSNO; canonical->arg1 = gst->guest_r2; canonical->arg2 = gst->guest_r3; canonical->arg3 = gst->guest_r4; @@ -895,7 +885,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_riscv64_linux) VexGuestRISCV64State* gst = (VexGuestRISCV64State*)gst_vanilla; - canonical->sysno = gst->guest_x17; /* a7 */ + canonical->canonical_sysno = gst->guest_x17; /* a7 */ canonical->arg1 = gst->guest_x10; /* a0 */ canonical->arg2 = gst->guest_x11; /* a1 */ canonical->arg3 = gst->guest_x12; /* a2 */ @@ -908,7 +898,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_x86_solaris) VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla; UWord *stack = (UWord *)gst->guest_ESP; - canonical->sysno = gst->guest_EAX; + canonical->canonical_sysno = gst->guest_EAX; /* stack[0] is a return address. */ canonical->arg1 = stack[1]; canonical->arg2 = stack[2]; @@ -932,8 +922,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, break; case VEX_TRC_JMP_SYS_INT210: /* int $0xD2 = fasttrap */ - canonical->sysno - = VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(canonical->sysno); + canonical->canonical_sysno + = VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(canonical->canonical_sysno); break; default: vg_assert(0); @@ -943,7 +933,7 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, #elif defined(VGP_amd64_solaris) VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla; UWord *stack = (UWord *)gst->guest_RSP; - canonical->sysno = gst->guest_RAX; + canonical->canonical_sysno = gst->guest_RAX; /* stack[0] is a return address. */ canonical->arg1 = gst->guest_RDI; canonical->arg2 = gst->guest_RSI; @@ -960,8 +950,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, break; case VEX_TRC_JMP_SYS_INT210: /* int $0xD2 = fasttrap */ - canonical->sysno - = VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(canonical->sysno); + canonical->canonical_sysno + = VG_SOLARIS_SYSCALL_CONSTRUCT_FASTTRAP(canonical->canonical_sysno); break; default: vg_assert(0); @@ -979,7 +969,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, { #if defined(VGP_x86_linux) VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla; - gst->guest_EAX = canonical->sysno; + gst->guest_EAX = canonical->canonical_sysno; gst->guest_EBX = canonical->arg1; gst->guest_ECX = canonical->arg2; gst->guest_EDX = canonical->arg3; @@ -989,7 +979,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_amd64_linux) VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla; - gst->guest_RAX = canonical->sysno; + gst->guest_RAX = canonical->canonical_sysno; gst->guest_RDI = canonical->arg1; gst->guest_RSI = canonical->arg2; gst->guest_RDX = canonical->arg3; @@ -999,7 +989,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_ppc32_linux) VexGuestPPC32State* gst = (VexGuestPPC32State*)gst_vanilla; - gst->guest_GPR0 = canonical->sysno; + gst->guest_GPR0 = canonical->canonical_sysno; gst->guest_GPR3 = canonical->arg1; gst->guest_GPR4 = canonical->arg2; gst->guest_GPR5 = canonical->arg3; @@ -1009,7 +999,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux) VexGuestPPC64State* gst = (VexGuestPPC64State*)gst_vanilla; - gst->guest_GPR0 = canonical->sysno; + gst->guest_GPR0 = canonical->canonical_sysno; gst->guest_GPR3 = canonical->arg1; gst->guest_GPR4 = canonical->arg2; gst->guest_GPR5 = canonical->arg3; @@ -1023,22 +1013,21 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, UWord *stack = (UWord *)gst->guest_ESP; // stack[0] is a (fake) return address - switch (canonical->klass) { - case VG_FREEBSD_SYSCALL0: - gst->guest_EAX = __NR_syscall; - stack[1] = canonical->sysno; + switch (canonical->original_sysno) { + case __NR_syscall: + stack[1] = canonical->canonical_sysno; stack++; break; - case VG_FREEBSD_SYSCALL198: - gst->guest_EAX = __NR___syscall; - stack[1] = canonical->sysno; + case __NR___syscall: + stack[1] = canonical->canonical_sysno; stack += 2; break; default: - gst->guest_EAX = canonical->sysno; break; } + gst->guest_EAX = canonical->original_sysno; + stack[1] = canonical->arg1; stack[2] = canonical->arg2; stack[3] = canonical->arg3; @@ -1052,21 +1041,9 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla; UWord *stack = (UWord *)gst->guest_RSP; - // stack[0] is a (fake) return address - switch (canonical->klass) { - case VG_FREEBSD_SYSCALL0: - gst->guest_RAX = __NR_syscall; - break; - case VG_FREEBSD_SYSCALL198: - gst->guest_RAX = __NR___syscall; - break; - default: - gst->guest_RAX = canonical->sysno; - break; - } - - if (canonical->klass == VG_FREEBSD_SYSCALL0 || canonical->klass == VG_FREEBSD_SYSCALL198) { - gst->guest_RDI = canonical->sysno; + if (canonical->original_sysno == __NR_syscall || + canonical->original_sysno == __NR___syscall) { + gst->guest_RDI = canonical->canonical_sysno; gst->guest_RSI = canonical->arg1; gst->guest_RDX = canonical->arg2; gst->guest_R10 = canonical->arg3; @@ -1086,21 +1063,14 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, stack[2] = canonical->arg8; } + gst->guest_RAX = canonical->original_sysno; + #elif defined(VGP_arm64_freebsd) VexGuestARM64State* gst = (VexGuestARM64State*)gst_vanilla; - switch (canonical->klass) { - case VG_FREEBSD_SYSCALL0: - gst->guest_X8 = __NR_syscall; - break; - case VG_FREEBSD_SYSCALL198: - gst->guest_X8 = __NR___syscall; - break; - default: - gst->guest_X8 = canonical->sysno; - break; - } - if (canonical->klass == VG_FREEBSD_SYSCALL0 || canonical->klass == VG_FREEBSD_SYSCALL198) { - gst->guest_X0 = canonical->sysno; + + if (canonical->original_sysno == __NR_syscall || + canonical->original_sysno == __NR___syscall) { + gst->guest_X0 = canonical->canonical_sysno; gst->guest_X1 = canonical->arg1; gst->guest_X2 = canonical->arg2; gst->guest_X3 = canonical->arg3; @@ -1118,9 +1088,11 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, gst->guest_X6 = canonical->arg7; } + gst->guest_X8 = canonical->original_sysno; + #elif defined(VGP_arm_linux) VexGuestARMState* gst = (VexGuestARMState*)gst_vanilla; - gst->guest_R7 = canonical->sysno; + gst->guest_R7 = canonical->canonical_sysno; gst->guest_R0 = canonical->arg1; gst->guest_R1 = canonical->arg2; gst->guest_R2 = canonical->arg3; @@ -1130,7 +1102,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_arm64_linux) VexGuestARM64State* gst = (VexGuestARM64State*)gst_vanilla; - gst->guest_X8 = canonical->sysno; + gst->guest_X8 = canonical->canonical_sysno; gst->guest_X0 = canonical->arg1; gst->guest_X1 = canonical->arg2; gst->guest_X2 = canonical->arg3; @@ -1142,7 +1114,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla; UWord *stack = (UWord *)gst->guest_ESP; - gst->guest_EAX = VG_DARWIN_SYSNO_FOR_KERNEL(canonical->sysno); + gst->guest_EAX = VG_DARWIN_SYSNO_FOR_KERNEL(canonical->canonical_sysno); // GrP fixme? gst->guest_TEMP_EFLAG_C = 0; // stack[0] is return address @@ -1159,7 +1131,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, VexGuestAMD64State* gst = (VexGuestAMD64State*)gst_vanilla; UWord *stack = (UWord *)gst->guest_RSP; - gst->guest_RAX = VG_DARWIN_SYSNO_FOR_KERNEL(canonical->sysno); + gst->guest_RAX = VG_DARWIN_SYSNO_FOR_KERNEL(canonical->canonical_sysno); // GrP fixme? gst->guest_TEMP_EFLAG_C = 0; // stack[0] is return address @@ -1174,7 +1146,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_s390x_linux) VexGuestS390XState* gst = (VexGuestS390XState*)gst_vanilla; - gst->guest_SYSNO = canonical->sysno; + gst->guest_SYSNO = canonical->canonical_sysno; gst->guest_r2 = canonical->arg1; gst->guest_r3 = canonical->arg2; gst->guest_r4 = canonical->arg3; @@ -1185,7 +1157,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_mips32_linux) VexGuestMIPS32State* gst = (VexGuestMIPS32State*)gst_vanilla; if (canonical->arg8 != __NR_syscall) { - gst->guest_r2 = canonical->sysno; + gst->guest_r2 = canonical->canonical_sysno; gst->guest_r4 = canonical->arg1; gst->guest_r5 = canonical->arg2; gst->guest_r6 = canonical->arg3; @@ -1196,7 +1168,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, } else { canonical->arg8 = 0; gst->guest_r2 = __NR_syscall; - gst->guest_r4 = canonical->sysno; + gst->guest_r4 = canonical->canonical_sysno; gst->guest_r5 = canonical->arg1; gst->guest_r6 = canonical->arg2; gst->guest_r7 = canonical->arg3; @@ -1208,7 +1180,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_nanomips_linux) VexGuestMIPS32State* gst = (VexGuestMIPS32State*)gst_vanilla; - gst->guest_r2 = canonical->sysno; + gst->guest_r2 = canonical->canonical_sysno; gst->guest_r4 = canonical->arg1; gst->guest_r5 = canonical->arg2; gst->guest_r6 = canonical->arg3; @@ -1219,7 +1191,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, gst->guest_r11 = canonical->arg8; #elif defined(VGP_mips64_linux) VexGuestMIPS64State* gst = (VexGuestMIPS64State*)gst_vanilla; - gst->guest_r2 = canonical->sysno; + gst->guest_r2 = canonical->canonical_sysno; gst->guest_r4 = canonical->arg1; gst->guest_r5 = canonical->arg2; gst->guest_r6 = canonical->arg3; @@ -1231,7 +1203,7 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, #elif defined(VGP_riscv64_linux) VexGuestRISCV64State* gst = (VexGuestRISCV64State*)gst_vanilla; - gst->guest_x17 = canonical->sysno; /* a7 */ + gst->guest_x17 = canonical->canonical_sysno; /* a7 */ gst->guest_x10 = canonical->arg1; /* a0 */ gst->guest_x11 = canonical->arg2; /* a1 */ gst->guest_x12 = canonical->arg3; /* a2 */ @@ -1244,9 +1216,9 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, UWord *stack = (UWord *)gst->guest_ESP; /* Fasttraps or anything else cannot go through this way. */ - vg_assert(VG_SOLARIS_SYSNO_CLASS(canonical->sysno) + vg_assert(VG_SOLARIS_SYSNO_CLASS(canonical->canonical_sysno) == VG_SOLARIS_SYSCALL_CLASS_CLASSIC); - gst->guest_EAX = canonical->sysno; + gst->guest_EAX = canonical->canonical_sysno; /* stack[0] is a return address. */ stack[1] = canonical->arg1; stack[2] = canonical->arg2; @@ -1262,9 +1234,9 @@ void putSyscallArgsIntoGuestState ( /*IN*/ SyscallArgs* canonical, UWord *stack = (UWord *)gst->guest_RSP; /* Fasttraps or anything else cannot go through this way. */ - vg_assert(VG_SOLARIS_SYSNO_CLASS(canonical->sysno) + vg_assert(VG_SOLARIS_SYSNO_CLASS(canonical->canonical_sysno) == VG_SOLARIS_SYSCALL_CLASS_CLASSIC); - gst->guest_RAX = canonical->sysno; + gst->guest_RAX = canonical->canonical_sysno; /* stack[0] is a return address. */ gst->guest_RDI = canonical->arg1; gst->guest_RSI = canonical->arg2; @@ -2089,7 +2061,7 @@ void bad_before ( ThreadId tid, /*OUT*/UWord* flags ) { VG_(dmsg)("WARNING: unhandled %s syscall: %s\n", - VG_PLATFORM, VG_SYSNUM_STRING(args->sysno)); + VG_PLATFORM, VG_SYSNUM_STRING(args->canonical_sysno)); if (VG_(clo_verbosity) > 1) { VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size)); } @@ -2178,7 +2150,7 @@ Bool VG_(is_in_kernel_restart_syscall) ( ThreadId tid ) Word VG_(is_in_syscall_no) (ThreadId tid ) { vg_assert(tid < VG_N_THREADS); - return syscallInfo[tid].orig_args.sysno; + return syscallInfo[tid].orig_args.canonical_sysno; } static void ensure_initialised ( void ) @@ -2200,7 +2172,8 @@ static void ensure_initialised ( void ) void VG_(client_syscall) ( ThreadId tid, UInt trc ) { - Word sysno; + Word canonical_sysno; + Word original_sysno; ThreadState* tst; const SyscallTableEntry* ent; SyscallArgLayout layout; @@ -2318,14 +2291,21 @@ 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. */ - sysno = sci->orig_args.sysno; + canonical_sysno = sci->orig_args.canonical_sysno; +#if defined(VGO_freebsd) + original_sysno = sci->orig_args.original_sysno; +#else + /* + * When there is no "syscall syycall" the original + * and canonical sysno values are the same + */ + original_sysno = sci->orig_args.canonical_sysno; +#endif + -# if defined(VGO_freebsd) - tst->arch.vex.guest_SC_CLASS = sci->orig_args.klass; -# endif /* It's sometimes useful, as a crude debugging hack, to get a stack trace at each (or selected) syscalls. */ - if (0 && sysno == __NR_ioctl) { + if (0 && canonical_sysno == __NR_ioctl) { VG_(umsg)("\nioctl:\n"); VG_(get_and_pp_StackTrace)(tid, 10); VG_(umsg)("\n"); @@ -2341,7 +2321,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) because it only has a single syscall return convention and so there is no ambiguity involved in converting the post-signal machine state into a SysRes. */ - tst->arch.vex.guest_SC_CLASS = VG_DARWIN_SYSNO_CLASS(sysno); + tst->arch.vex.guest_SC_CLASS = VG_DARWIN_SYSNO_CLASS(canonical_sysno); # endif /* The default what-to-do-next thing is hand the syscall to the @@ -2355,7 +2335,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) /* Fetch the syscall's handlers. If no handlers exist for this syscall, we are given dummy handlers which force an immediate return with ENOSYS. */ - ent = get_syscall_entry(sysno); + ent = get_syscall_entry(canonical_sysno); /* Fetch the layout information, which tells us where in the guest state the syscall args reside. This is a platform-dependent @@ -2363,7 +2343,8 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) checks (PRE_REG_READ calls) know which bits of the guest state they need to inspect. */ #if defined(VGP_amd64_freebsd) || defined (VGP_arm64_freebsd) - if (sci->orig_args.klass == VG_FREEBSD_SYSCALL0 || sci->orig_args.klass == VG_FREEBSD_SYSCALL198) { + if (original_sysno == __NR_syscall || + original_sysno == __NR___syscall) { syscall_syscall = True; } #endif @@ -2383,7 +2364,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) */ PRINT("SYSCALL[%d,%u](%s) ", - VG_(getpid)(), tid, VG_SYSNUM_STRING(sysno)); + VG_(getpid)(), tid, VG_SYSNUM_STRING(canonical_sysno)); /* Do any pre-syscall actions */ if (VG_(needs).syscall_wrapper) { @@ -2396,7 +2377,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) tmpv[5] = sci->orig_args.arg6; tmpv[6] = sci->orig_args.arg7; tmpv[7] = sci->orig_args.arg8; - VG_TDICT_CALL(tool_pre_syscall, tid, sysno, + VG_TDICT_CALL(tool_pre_syscall, tid, canonical_sysno, &tmpv[0], sizeof(tmpv)/sizeof(tmpv[0])); } @@ -2407,7 +2388,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) &sci->args, &sci->status, &sci->flags ); /* If needed, gdbserver will report syscall entry to GDB */ - VG_(gdbserver_report_syscall)(True, sysno, tid); + VG_(gdbserver_report_syscall)(True, canonical_sysno, tid); /* The pre-handler may have modified: sci->args @@ -2420,7 +2401,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) /* Now we proceed according to what the pre-handler decided. */ vg_assert(sci->status.what == SsHandToKernel || sci->status.what == SsComplete); - vg_assert(sci->args.sysno == sci->orig_args.sysno); + vg_assert(sci->args.canonical_sysno == sci->orig_args.canonical_sysno); if (sci->status.what == SsComplete && !sr_isError(sci->status.sres)) { /* The pre-handler completed the syscall itself, declaring @@ -2503,7 +2484,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) /* Do the call, which operates directly on the guest state, not on our abstracted copies of the args/result. */ - do_syscall_for_client(sysno, tst, &mask); + do_syscall_for_client(original_sysno, tst, &mask); /* do_syscall_for_client may not return if the syscall was interrupted by a signal. In that case, flow of control is @@ -2531,7 +2512,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) /* Be decorative, if required. */ if (VG_(clo_trace_syscalls)) { PRINT("SYSCALL[%d,%u](%s) ... [async] --> %s", - VG_(getpid)(), tid, VG_SYSNUM_STRING(sysno), + VG_(getpid)(), tid, VG_SYSNUM_STRING(canonical_sysno), VG_(sr_as_string)(sci->status.sres)); } @@ -2544,7 +2525,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) guest state. Indeed doing so could be construed as incorrect. */ SysRes sres - = VG_(do_syscall)(sysno, sci->args.arg1, sci->args.arg2, + = VG_(do_syscall)(canonical_sysno, sci->args.arg1, sci->args.arg2, sci->args.arg3, sci->args.arg4, sci->args.arg5, sci->args.arg6, sci->args.arg7, sci->args.arg8 ); @@ -2567,7 +2548,7 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) putSyscallStatusIntoGuestState( tid, &sci->status, &tst->arch.vex ); /* If needed, gdbserver will report syscall return to GDB */ - VG_(gdbserver_report_syscall)(False, sysno, tid); + VG_(gdbserver_report_syscall)(False, canonical_sysno, tid); /* Situation now: - the guest state is now correctly modified following the syscall @@ -2601,7 +2582,7 @@ void VG_(post_syscall) (ThreadId tid) const SyscallTableEntry* ent; SyscallStatus test_status; ThreadState* tst; - Word sysno; + Word canonical_sysno; /* Preliminaries */ vg_assert(VG_(is_valid_tid)(tid)); @@ -2627,12 +2608,12 @@ void VG_(post_syscall) (ThreadId tid) /* Get the system call number. Because the pre-handler isn't allowed to mess with it, it should be the same for both the original and potentially-modified args. */ - vg_assert(sci->args.sysno == sci->orig_args.sysno); - sysno = sci->args.sysno; + vg_assert(sci->args.canonical_sysno == sci->orig_args.canonical_sysno); + canonical_sysno = sci->args.canonical_sysno; getSyscallStatusFromGuestState( &test_status, &tst->arch.vex ); if (!(sci->flags & SfNoWriteResult)) { - vg_assert(eq_SyscallStatus( sysno, &sci->status, &test_status )); + vg_assert(eq_SyscallStatus( canonical_sysno, &sci->status, &test_status )); } /* Failure of the above assertion on Darwin can indicate a problem in the syscall wrappers that pre-fail or pre-succeed the @@ -2650,7 +2631,7 @@ void VG_(post_syscall) (ThreadId tid) - it exists, and - Success or (Failure and PostOnFail is set) */ - ent = get_syscall_entry(sysno); + ent = get_syscall_entry(canonical_sysno); if (ent->after && ((!sr_isError(sci->status.sres)) || (sr_isError(sci->status.sres) @@ -2678,7 +2659,7 @@ void VG_(post_syscall) (ThreadId tid) tmpv[6] = sci->orig_args.arg7; tmpv[7] = sci->orig_args.arg8; VG_TDICT_CALL(tool_post_syscall, tid, - sysno, + canonical_sysno, &tmpv[0], sizeof(tmpv)/sizeof(tmpv[0]), sci->status.sres); } diff --git a/coregrind/m_syswrap/syswrap-xen.c b/coregrind/m_syswrap/syswrap-xen.c index e9f844e0d..5abf6a992 100644 --- a/coregrind/m_syswrap/syswrap-xen.c +++ b/coregrind/m_syswrap/syswrap-xen.c @@ -2519,7 +2519,7 @@ static void bad_before ( ThreadId tid, /*OUT*/UWord* flags ) { VG_(dmsg)("WARNING: unhandled hypercall: %s\n", - VG_SYSNUM_STRING(args->sysno)); + VG_SYSNUM_STRING(args->canonical_sysno)); if (VG_(clo_verbosity) > 1) { VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size)); } diff --git a/include/vki/vki-scnums-freebsd.h b/include/vki/vki-scnums-freebsd.h index 924434f3f..83e4430c2 100644 --- a/include/vki/vki-scnums-freebsd.h +++ b/include/vki/vki-scnums-freebsd.h @@ -30,19 +30,6 @@ #include "config.h" #include -// this is the syscall format used by e.g., libc functions like 'write' -// this is the one used 99.999% of the time -// the two others are only for experimental or testing use -// (but we use them in the scalar tests). -#define VG_FREEBSD_SYSCALL_STD 0 -// this is the syscall format used by 'syscall' -#define VG_FREEBSD_SYSCALL0 1 -// this is the syscall format used by '__syscall' -// it is the same as VG_FREEBSD_SYSCALL0 except that -// it ensures that 64bit argument alignment is correct -// that makes no difference for amd64, x86 not sure -#define VG_FREEBSD_SYSCALL198 2 - // From sys/syscall.h // @todo PJF ugly leading double underscores From b3177c0d27189c5ef772b52b65080b52ebf64895 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 7 Nov 2025 20:40:21 +0100 Subject: [PATCH 044/502] FreeBSD regtest: add comments for a sched_setaffinity equivalent Trying to get a fix for nlvgdbsigqueue flakiness. FreeBSD has cpuset_setaffinity which is similar to sched_setaffinity. Howeever, it needs privileges in order to be used. So I've just put the code there in a comment. --- gdbserver_tests/sleepers.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/gdbserver_tests/sleepers.c b/gdbserver_tests/sleepers.c index 51d197a8e..819536ca1 100644 --- a/gdbserver_tests/sleepers.c +++ b/gdbserver_tests/sleepers.c @@ -15,7 +15,7 @@ static int sleepms = 1000; // in each loop, will sleep "sleepms" milliseconds static int burn = 0; // after each sleep, will burn cpu in a tight 'burn' loop static void setup_sigusr_handler(void); // sigusr1 and 2 sigaction setup. -static pid_t gettid_sys() +static pid_t gettid_sys(void) { #ifdef __NR_gettid return syscall(__NR_gettid); @@ -32,7 +32,7 @@ void whoami(char *msg) } -static void do_burn () +static void do_burn(void) { int i; int loopnr = 0; @@ -124,13 +124,29 @@ static void wait_ready(void) // threads wanting to burn cpu. static void setaffinity(void) { -#ifdef VGO_linux +#if defined(VGO_linux) cpu_set_t single_cpu; CPU_ZERO(&single_cpu); CPU_SET(1, &single_cpu); (void) sched_setaffinity(0, sizeof(single_cpu), &single_cpu); #endif - // GDBTD: equivalent for Darwin ? + +#if defined(VGO_freebsd) + /* + * FreeBSD has something similar but it needs privileges + * somethinmg like this + */ + /* + cpuset_t cpuset; + CPU_ZERO(&cpuset); + CPU_SET(0, &cpuset); + if (cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, -1, sizeof(cpuset), &cpuset) != 0) { + perror("cpuset_setaffinity"); + } + */ +#endif + + // FIXME: equivalent for Darwin and Solaris ? } int main (int argc, char *argv[]) From f1ae846a7feeb4f48f904dd074f490cd96ad1e1b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 9 Nov 2025 09:29:17 +0100 Subject: [PATCH 045/502] FreeBSD regtest: getsockopt and setsockopt scalar tests were wrong getsockopt was miscopied as setsockopt and the memory checks weere not good. --- coregrind/m_syswrap/syswrap-freebsd.c | 2 +- memcheck/tests/freebsd/scalar.c | 17 +++++++++--- memcheck/tests/freebsd/scalar.stderr.exp | 29 +++++++++++++++----- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 29 +++++++++++++++----- 4 files changed, 58 insertions(+), 19 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index dce26ba91..c2fd35d2b 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -1510,7 +1510,7 @@ PRE(sys_getsockopt) PRINT("sys_getsockopt ( %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u, %#" FMT_REGWORD "x, %#" FMT_REGWORD "x )",ARG1,ARG2,ARG3,ARG4,ARG5); PRE_REG_READ5(int, "getsockopt", int, s, int, level, int, optname, - void *, optval, int, *optlen); + void *, optval, vki_socklen_t, *optlen); if (optval_p != (Addr)NULL) { ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p, "getsockopt(optval)", diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index acb4b662e..b4d7a46d1 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -449,8 +449,8 @@ int main(void) SY(SYS_bind, x0, x0, x0); FAIL; /* SYS_setsockopt 105 */ - GO(SYS_setsockopt, "5s 0m"); - SY(SYS_setsockopt, x0, x0, x0, x0, x0); FAIL; + GO(SYS_setsockopt, "5s 1m"); + SY(SYS_setsockopt, x0, x0, x0, px+x0, sizeof(socklen_t)+x0); FAIL; /* SYS_listen 106 */ GO(SYS_listen, "2s 0m"); @@ -482,9 +482,18 @@ int main(void) GO(SYS_getrusage, "2s 1m"); SY(SYS_getrusage, x0, x0); FAIL; + socklen_t *len = malloc(sizeof(socklen_t)); + *len = 2*sizeof(long)+x0; + free(len); + /* + * Should be 2m but it is hard to trigger an optval + * error in the scalar, len needs to be safe to deref + * and the syscall needs to succeed to trigger a write + * error to optval + */ /* SYS_getsockopt 118 */ - GO(SYS_setsockopt, "5s 1m"); - SY(SYS_setsockopt, x0, x0, x0, x0, x0); FAIL; + GO(SYS_getsockopt, "5s 1m"); + SY(SYS_getsockopt, x0, x0, x0, px+x0, len+x0); FAIL; /* unimpl resuba 119 */ diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 2acb864e7..449075f3e 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -856,7 +856,7 @@ Syscall param bind(addrlen) contains uninitialised byte(s) ... --------------------------------------------------------- -105: SYS_setsockopt 5s 0m +105: SYS_setsockopt 5s 1m --------------------------------------------------------- Syscall param setsockopt(s) contains uninitialised byte(s) ... @@ -873,6 +873,12 @@ Syscall param setsockopt(optval) contains uninitialised byte(s) Syscall param setsockopt(optlen) contains uninitialised byte(s) ... +Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s) + ... + Address 0x........ is 0 bytes inside a block of size 16 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + ... + --------------------------------------------------------- 106: SYS_listen 2s 0m --------------------------------------------------------- @@ -913,21 +919,30 @@ Syscall param getrusage(usage) points to unaddressable byte(s) Address 0x........ is not stack'd, malloc'd or (recently) free'd --------------------------------------------------------- -105: SYS_setsockopt 5s 1m +118: SYS_getsockopt 5s 1m --------------------------------------------------------- -Syscall param setsockopt(s) contains uninitialised byte(s) +Syscall param getsockopt(s) contains uninitialised byte(s) ... -Syscall param setsockopt(level) contains uninitialised byte(s) +Syscall param getsockopt(level) contains uninitialised byte(s) ... -Syscall param setsockopt(optname) contains uninitialised byte(s) +Syscall param getsockopt(optname) contains uninitialised byte(s) ... -Syscall param setsockopt(optval) contains uninitialised byte(s) +Syscall param getsockopt(optval) contains uninitialised byte(s) ... -Syscall param setsockopt(optlen) contains uninitialised byte(s) +Syscall param getsockopt(*optlen) contains uninitialised byte(s) + ... + +Syscall param getsockopt(optlen) points to unaddressable byte(s) + ... + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + ... + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) ... --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 957ffb205..e7e2ce0a6 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -856,7 +856,7 @@ Syscall param bind(addrlen) contains uninitialised byte(s) ... --------------------------------------------------------- -105: SYS_setsockopt 5s 0m +105: SYS_setsockopt 5s 1m --------------------------------------------------------- Syscall param setsockopt(s) contains uninitialised byte(s) ... @@ -873,6 +873,12 @@ Syscall param setsockopt(optval) contains uninitialised byte(s) Syscall param setsockopt(optlen) contains uninitialised byte(s) ... +Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s) + ... + Address 0x........ is 0 bytes inside a block of size 16 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + ... + --------------------------------------------------------- 106: SYS_listen 2s 0m --------------------------------------------------------- @@ -913,21 +919,30 @@ Syscall param getrusage(usage) points to unaddressable byte(s) Address 0x........ is not stack'd, malloc'd or (recently) free'd --------------------------------------------------------- -105: SYS_setsockopt 5s 1m +118: SYS_getsockopt 5s 1m --------------------------------------------------------- -Syscall param setsockopt(s) contains uninitialised byte(s) +Syscall param getsockopt(s) contains uninitialised byte(s) ... -Syscall param setsockopt(level) contains uninitialised byte(s) +Syscall param getsockopt(level) contains uninitialised byte(s) ... -Syscall param setsockopt(optname) contains uninitialised byte(s) +Syscall param getsockopt(optname) contains uninitialised byte(s) ... -Syscall param setsockopt(optval) contains uninitialised byte(s) +Syscall param getsockopt(optval) contains uninitialised byte(s) ... -Syscall param setsockopt(optlen) contains uninitialised byte(s) +Syscall param getsockopt(*optlen) contains uninitialised byte(s) + ... + +Syscall param getsockopt(optlen) points to unaddressable byte(s) + ... + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + ... + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) ... --------------------------------------------------------- From 7f71b26b924df4e81aa2f39cd5075338fb25bb8b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 9 Nov 2025 19:28:13 +0100 Subject: [PATCH 046/502] Darwin: rework syscall arg handling There were numerous issues, particularly with syscall SYS_syscall and the scalar tests. Only tested on amd64, I don't have access to an OSX 10.12 or earlier machine to do any testing. The key elements in VG_(client_syscall) are, when the PRE wrapper does not handle the syscall 1. getSyscallArgsFromGuestState 2. getSyscallArgLayout 3. call PRE wrapper either blocking 4. putSyscallArgsIntoGuestState 5. do_syscall_for_client or non-blocking 6. VG_(do_syscall) What has changed ---------------- struct SyscallArgs now like FreeBSD, stores both the canonical_sysno (which is the final syscall number, never SYS_syscall) and the original_sysno (which can be SYS_syscall). These get set in getSyscallArgsFromGuestState which has changed accordingly. getSyscallArgsFromGuestState has changed to always get the layout coresponding to the canonical layout. This was the cause of the problems with the scalar tests - the arguments were effectively out by one. Many subsequent changes to the scalar test, filter and expected. The scalar test still isn't quite right. __NR_kevent_qos is missing a scalar error from argument 6. That's the one with special case handling because it is a register argument for a normal syscall but a stack argument for syscall SYS_syscall. --- coregrind/m_syswrap/priv_types_n_macros.h | 6 +- coregrind/m_syswrap/syswrap-darwin.c | 8 +- coregrind/m_syswrap/syswrap-generic.c | 5 + coregrind/m_syswrap/syswrap-main.c | 16 +- memcheck/tests/darwin/Makefile.am | 2 +- memcheck/tests/darwin/filter_scalar | 13 + memcheck/tests/darwin/scalar.c | 61 ++-- memcheck/tests/darwin/scalar.stderr.exp | 298 ++++++------------- memcheck/tests/darwin/scalar.vgtest | 1 + memcheck/tests/darwin/scalar_nocancel.vgtest | 1 + 10 files changed, 161 insertions(+), 250 deletions(-) create mode 100755 memcheck/tests/darwin/filter_scalar diff --git a/coregrind/m_syswrap/priv_types_n_macros.h b/coregrind/m_syswrap/priv_types_n_macros.h index 66a11879e..6da1cad31 100644 --- a/coregrind/m_syswrap/priv_types_n_macros.h +++ b/coregrind/m_syswrap/priv_types_n_macros.h @@ -51,7 +51,7 @@ typedef struct SyscallArgs { Word canonical_sysno; -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) /* * This may be the same as canonical_sysno (normal syscalls) * Or it may be __NR_syscall or __NR___syscall @@ -125,7 +125,7 @@ typedef Int s_arg6; Int s_arg7; Int s_arg8; -# elif defined(VGP_amd64_freebsd) +# elif defined(VGP_amd64_freebsd) || defined(VGP_amd64_darwin) Int o_arg1; Int o_arg2; Int o_arg3; @@ -168,7 +168,7 @@ typedef Int s_arg6; Int s_arg7; Int s_arg8; -# elif defined(VGP_amd64_darwin) || defined(VGP_amd64_solaris) +# elif defined(VGP_amd64_solaris) Int o_arg1; Int o_arg2; Int o_arg3; diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 4eec0eb36..987e7ee0f 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -2764,7 +2764,7 @@ PRE(fstat_extended) PRE_REG_READ4(int, "fstat_extended", int, fd, struct stat *, buf, void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_WRITE( "fstat_extended(buf)", ARG2, sizeof(struct vki_stat) ); - if (ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE("fstat_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "fstat_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } @@ -2785,7 +2785,7 @@ PRE(stat64_extended) void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_RASCIIZ( "stat64_extended(file_name)", ARG1 ); PRE_MEM_WRITE( "stat64_extended(buf)", ARG2, sizeof(struct vki_stat64) ); - if (ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE("stat64_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "stat64_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } @@ -2806,7 +2806,7 @@ PRE(lstat64_extended) void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_RASCIIZ( "lstat64_extended(file_name)", ARG1 ); PRE_MEM_WRITE( "lstat64_extended(buf)", ARG2, sizeof(struct vki_stat64) ); - if (ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE( "lstat64_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "lstat64_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } @@ -2826,7 +2826,7 @@ PRE(fstat64_extended) PRE_REG_READ4(int, "fstat64_extended", int, fd, struct stat64 *, buf, void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_WRITE( "fstat64_extended(buf)", ARG2, sizeof(struct vki_stat64) ); - if (ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE("fstat64_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "fstat64_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 6050f5b65..2c113c69c 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -5030,8 +5030,13 @@ PRE(sys_poll) *flags |= SfMayBlock; PRINT("sys_poll ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %ld )\n", ARG1, ARG2, SARG3); +#if defined(VGO_darwin) + PRE_REG_READ3(long, "poll", + struct vki_pollfd *, ufds, unsigned int, nfds, int, timeout); +#else PRE_REG_READ3(long, "poll", struct vki_pollfd *, ufds, unsigned int, nfds, long, timeout); +#endif for (i = 0; i < ARG2; i++) { PRE_MEM_READ( "poll(ufds.fd)", diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 49f841ff7..02993a58f 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -460,7 +460,7 @@ static Bool eq_SyscallArgs ( SyscallArgs* a1, SyscallArgs* a2 ) { return a1->canonical_sysno == a2->canonical_sysno -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) && a1->original_sysno == a2->original_sysno #endif && a1->arg1 == a2->arg1 @@ -790,6 +790,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, VG_SYSNUM_STRING(canonical->canonical_sysno)); } + canonical->original_sysno = gst->guest_EAX; + // Here we determine what kind of syscall it was by looking at the // interrupt kind, and then encode the syscall number using the 64-bit // encoding for Valgrind's internal use. @@ -869,6 +871,8 @@ void getSyscallArgsFromGuestState ( /*OUT*/SyscallArgs* canonical, VG_SYSNUM_STRING(canonical->canonical_sysno)); } + canonical->original_sysno = gst->guest_RAX; + // no canonical->canonical_sysno adjustment needed #elif defined(VGP_s390x_linux) @@ -1865,7 +1869,7 @@ void getSyscallArgLayout ( /*OUT*/SyscallArgLayout* layout, /*IN*/Bool syscall_s layout->s_arg7 = sizeof(UWord) * 7; layout->s_arg8 = sizeof(UWord) * 8; -#elif defined(VGP_amd64_freebsd) +#elif defined(VGP_amd64_freebsd) || defined(VGP_amd64_darwin) if (syscall_syscall) { layout->o_sysno = OFFSET_amd64_RDI; @@ -2292,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) +#if defined(VGO_freebsd) || defined(VGO_darwin) original_sysno = sci->orig_args.original_sysno; #else /* @@ -2347,6 +2351,12 @@ void VG_(client_syscall) ( ThreadId tid, UInt trc ) original_sysno == __NR___syscall) { syscall_syscall = True; } +#endif +#if defined(VGP_amd64_darwin) + if (original_sysno == __NR_syscall) { + syscall_syscall = True; + } + original_sysno = canonical_sysno; #endif getSyscallArgLayout( &layout, syscall_syscall ); diff --git a/memcheck/tests/darwin/Makefile.am b/memcheck/tests/darwin/Makefile.am index 0810accdc..e43d4af79 100644 --- a/memcheck/tests/darwin/Makefile.am +++ b/memcheck/tests/darwin/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = filter_stderr filter_scalar noinst_HEADERS = scalar.h diff --git a/memcheck/tests/darwin/filter_scalar b/memcheck/tests/darwin/filter_scalar new file mode 100755 index 000000000..13972326a --- /dev/null +++ b/memcheck/tests/darwin/filter_scalar @@ -0,0 +1,13 @@ +#! /bin/sh + +sed '/in frame #., created by/d' | + +./filter_stderr "$@" | + +sed '/by 0x.*: main.*scalar.*\.c.*/d' | + +# get rid of error limit message +# but there is still an added extra blank line before +sed '/More than 100 errors detected. Subsequent errors/d' | +sed '/will still be recorded, but in less detail than before./d' + diff --git a/memcheck/tests/darwin/scalar.c b/memcheck/tests/darwin/scalar.c index 225615523..dd53145d2 100644 --- a/memcheck/tests/darwin/scalar.c +++ b/memcheck/tests/darwin/scalar.c @@ -4,6 +4,7 @@ #include #include #include +#include // See memcheck/tests/x86-linux/scalar.c for an explanation of what this test // is doing. @@ -210,7 +211,7 @@ int main(void) // __NR_bind 104 GO(__NR_setsockopt, 105, "5s 1m"); - SY(__NR_setsockopt, x0, x0, x0, x0+1, x0+1); FAIL; + SY(__NR_setsockopt, x0, x0, x0, px+x0, sizeof(socklen_t)+x0); FAIL; // __NR_listen 106 @@ -236,10 +237,11 @@ int main(void) // __NR_gettimeofday 116 // __NR_getrusage 117 - // Nb: there's no "getsockopt(optlen) points to unaddressable byte(s)"; - // difficult to get with arg4 being checked with buf_and_len_pre_check. - GO(__NR_getsockopt, 118, "5s 1m"); - SY(__NR_getsockopt, x0, x0, x0, x0+1, x0+&px[1]); FAIL; + socklen_t *len = malloc(sizeof(socklen_t)); + *len = 2*sizeof(long)+x0; + free(len); + GO(__NR_getsockopt, 118, "5s 2m"); + SY(__NR_getsockopt, x0, x0, x0, x0+1, len+x0); FAIL; GO_UNIMP(119, "old resuba"); @@ -505,10 +507,12 @@ int main(void) // requires the 4th arg to point to a valid value. SY(__NR_lstat_extended, 0, 0, 0, &one); FAIL; - GO(__NR_fstat_extended, 280, "4s 3m"); + GO(__NR_fstat_extended, 280, "4s 2m"); SY(__NR_fstat_extended, x0, x0, x0, x0); FAIL; + // Go again to get a complaint about where the 3rd arg points; it // requires the 4th arg to point to a valid value. + GO(__NR_fstat_extended, 280, "0s 2m"); SY(__NR_fstat_extended, 0, 0, 0, &one); FAIL; } @@ -611,20 +615,26 @@ int main(void) size_t one = 1; GO(__NR_stat64_extended, 341, "4s 4m"); SY(__NR_stat64_extended, x0, x0, x0, x0); FAIL; + // Go again to get a complaint about where the 3rd arg points; it // requires the 4th arg to point to a valid value. + GO(__NR_stat64_extended, 341, "0s 3m"); SY(__NR_stat64_extended, 0, 0, 0, &one); FAIL; GO(__NR_lstat64_extended, 342, "4s 4m"); SY(__NR_lstat64_extended, x0, x0, x0, x0); FAIL; + // Go again to get a complaint about where the 3rd arg points; it // requires the 4th arg to point to a valid value. + GO(__NR_lstat64_extended, 342, "0s 3m"); SY(__NR_lstat64_extended, 0, 0, 0, &one); FAIL; - GO(__NR_fstat64_extended, 342, "4s 3m"); + GO(__NR_fstat64_extended, 342, "4s 2m"); SY(__NR_fstat64_extended, x0, x0, x0, x0); FAIL; + // Go again to get a complaint about where the 3rd arg points; it // requires the 4th arg to point to a valid value. + GO(__NR_fstat64_extended, 342, "0s 2m"); SY(__NR_fstat64_extended, 0, 0, 0, &one); FAIL; } @@ -662,13 +672,10 @@ int main(void) GO_UNIMP(369-373, "unused"); -#if DARWIN_VERS >= DARWIN_10_11 - { - long args[8] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1, x0+1, x0+1, x0+1 }; - GO(__NR_kevent_qos, 374, "1s 8m"); - SY(__NR_kevent_qos, args+x0); FAIL; - } -#endif /* DARWIN_VERS >= DARWIN_10_11 */ +#if defined(__NR_kevent_qos) + GO(__NR_kevent_qos, 374, "8s 4m"); + SY(__NR_kevent_qos, x0+8, x0+0xffffffee, x0+1, x0+1, x0+1, x0+1, x0+1, x0+1); FAIL; +#endif GO_UNIMP(375-379, "unused"); @@ -687,15 +694,11 @@ int main(void) // __NR___mac_get_lctx 392 // __NR___mac_set_lctx 393 -#if DARWIN_VERS >= DARWIN_10_11 - { - long args[6] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1, x0+1 }; - GO(__NR_pselect, 394, "1s 6m"); - SY(__NR_pselect, args+x0); FAIL; - } -#else +#if defined(__NR_pselect) + GO(__NR_pselect, 394, "5s 4m"); + SY(__NR_pselect, x0+8, x0+0xffffffee, x0+1, x0+1, x0+1, x0+1); FAIL; +#endif // __NR_setlcid 394 -#endif /* DARWIN_VERS >= DARWIN_10_11 */ // __NR_getlcid 395 @@ -1005,11 +1008,8 @@ int main(void) SY(__NR_setgroups, x0+1, x0+1); FAIL; // __NR_select 82 - { - long args[5] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1 }; - GO(__NR_select, "1s 5m"); - SY(__NR_select, args+x0); FAIL; - } + GO(__NR_select, "5s ?m"); + SY(__NR_select, x0+8, x0+0xffffffee, x0+1, x0+1, x0+1); FAIL; // __NR_symlink 83 GO(__NR_symlink, "2s 2m"); @@ -1040,11 +1040,8 @@ int main(void) // (superseded, not handled by Valgrind) // __NR_mmap 90 - { - long args[6] = { x0, x0, x0, x0, x0-1, x0 }; - GO(__NR_mmap, "1s 1m"); - SY(__NR_mmap, args+x0); FAIL; - } + GO(__NR_mmap, "6s 1m"); + SY(__NR_mmap, x0, x0, x0, x0, x0-1, x0); FAIL; // __NR_munmap 91 GO(__NR_munmap, "2s 0m"); diff --git a/memcheck/tests/darwin/scalar.stderr.exp b/memcheck/tests/darwin/scalar.stderr.exp index 9212c8fcc..a33641360 100644 --- a/memcheck/tests/darwin/scalar.stderr.exp +++ b/memcheck/tests/darwin/scalar.stderr.exp @@ -9,23 +9,18 @@ x2000003(3): __NR_read 1+3s 1m ----------------------------------------------------- Syscall param (syscallno) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:31) Syscall param read(fd) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:31) Syscall param read(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:31) Syscall param read(count) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:31) Syscall param read(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:31) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -33,19 +28,15 @@ x2000004(4): __NR_write 3s 1m ----------------------------------------------------- Syscall param write(fd) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:34) Syscall param write(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:34) Syscall param write(count) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:34) Syscall param write(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:34) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -53,15 +44,12 @@ x2000005(5): __NR_open (2-args) 2s 1m ----------------------------------------------------- Syscall param open(filename) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:38) Syscall param open(flags) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:38) Syscall param open(filename) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:38) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -81,28 +69,22 @@ x2000007(7): __NR_wait4 4s 2m ----------------------------------------------------- Syscall param wait4(pid) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:49) Syscall param wait4(status) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:49) Syscall param wait4(options) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:49) Syscall param wait4(rusage) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:49) Syscall param wait4(status) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:49) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param wait4(rusage) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:49) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -113,20 +95,16 @@ x2000009(9): __NR_link 2s 2m ----------------------------------------------------- Syscall param link(oldpath) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:54) Syscall param link(newpath) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:54) Syscall param link(oldpath) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:54) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param link(newpath) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:54) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -134,11 +112,9 @@ x200000a(10): __NR_unlink 1s 1m ----------------------------------------------------- Syscall param unlink(pathname) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:57) Syscall param unlink(pathname) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:57) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -149,11 +125,9 @@ x200000c(12): __NR_chdir 1s 1m ----------------------------------------------------- Syscall param chdir(path) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:62) Syscall param chdir(path) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:62) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -167,19 +141,15 @@ x200000e(14): __NR_mknod 3s 1m ----------------------------------------------------- Syscall param mknod(pathname) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:68) Syscall param mknod(mode) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:68) Syscall param mknod(dev) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:68) Syscall param mknod(pathname) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:68) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -187,15 +157,12 @@ x200000f(15): __NR_chmod 2s 1m ----------------------------------------------------- Syscall param chmod(path) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:71) Syscall param chmod(mode) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:71) Syscall param chmod(path) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:71) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -203,19 +170,15 @@ x2000010(16): __NR_chown 3s 1m ----------------------------------------------------- Syscall param chown(path) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:74) Syscall param chown(owner) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:74) Syscall param chown(group) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:74) Syscall param chown(path) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:74) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -226,19 +189,15 @@ x2000012(18): __NR_getfsstat 3s 1m ----------------------------------------------------- Syscall param getfsstat(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:79) Syscall param getfsstat(bufsize) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:79) Syscall param getfsstat(flags) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:79) Syscall param getfsstat(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:79) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -297,19 +256,15 @@ x200004e(78): __NR_mincore 3s 1m ----------------------------------------------------- Syscall param mincore(start) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:165) Syscall param mincore(length) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:165) Syscall param mincore(vec) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:165) Syscall param mincore(vec) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:165) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -317,11 +272,9 @@ x2000052(82): __NR_setpgid 2s 0m ----------------------------------------------------- Syscall param setpgid(pid) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:172) Syscall param setpgid(pgid) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:172) ----------------------------------------------------- (78): old wait @@ -355,28 +308,23 @@ x2000069(105): __NR_setsockopt 5s 1m ----------------------------------------------------- Syscall param setsockopt(s) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:213) Syscall param setsockopt(level) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:213) Syscall param setsockopt(optname) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:213) Syscall param setsockopt(optval) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:213) Syscall param setsockopt(optlen) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:213) -Syscall param socketcall.setsockopt(optval) points to unaddressable byte(s) +Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s) ... - by 0x........: main (scalar.c:213) - Address 0x........ is not stack'd, malloc'd or (recently) free'd + Address 0x........ is 0 bytes inside a block of size 8 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) ----------------------------------------------------- (107): old vtimes @@ -406,34 +354,36 @@ x200006f(111): __NR_sigsuspend ignore (115): old vtrace ----------------------------------------------------- ----------------------------------------------------- -x2000076(118): __NR_getsockopt 5s 1m +x2000076(118): __NR_getsockopt 5s 2m ----------------------------------------------------- Syscall param getsockopt(s) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:242) Syscall param getsockopt(level) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:242) Syscall param getsockopt(optname) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:242) Syscall param getsockopt(optval) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:242) Syscall param getsockopt(optlen) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:242) Syscall param socketcall.getsockopt(optlen) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:242) - Address 0x........ is 0 bytes after a block of size 8 alloc'd + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + Block was alloc'd at at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (scalar.c:14) + +Syscall param socketcall.getsockopt(optval) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Conditional jump or move depends on uninitialised value(s) + ... ----------------------------------------------------- (119): old resuba @@ -450,16 +400,16 @@ Syscall param socketcall.getsockopt(optlen) points to unaddressable byte(s) ----------------------------------------------------- x2000084(132): __NR_mkfifo 2s 1m ----------------------------------------------------- +Syscall param mkfifo(path) contains uninitialised byte(s) + ... + Syscall param mkfifo(mode) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:265) Syscall param mkfifo(path) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:265) Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ ----------------------------------------------------- (141): old getpeername ----------------------------------------------------- @@ -504,28 +454,22 @@ x20000a7(167): __NR_mount 4s 2m ----------------------------------------------------- Syscall param mount(type) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:323) Syscall param mount(dir) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:323) Syscall param mount(flags) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:323) Syscall param mount(data) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:323) Syscall param mount(type) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:323) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param mount(dir) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:323) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -536,23 +480,18 @@ x20000a9(169): __NR_csops 4s 1m ----------------------------------------------------- Syscall param csops(pid) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:328) Syscall param csops(ops) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:328) Syscall param csops(useraddr) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:328) Syscall param csops(usersize) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:328) Syscall param csops(useraddr) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:328) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -587,24 +526,19 @@ x20000df(223): __NR_exchangedata 3s 2m ----------------------------------------------------- Syscall param exchangedata(path1) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:398) Syscall param exchangedata(path2) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:398) Syscall param exchangedata(options) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:398) Syscall param exchangedata(path1) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:398) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param exchangedata(path2) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:398) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -624,34 +558,27 @@ x2000106(262): __NR_shmat 3s 0m ----------------------------------------------------- Syscall param shmat(shmid) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:447) Syscall param shmat(shmaddr) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:447) Syscall param shmat(shmflg) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:447) ----------------------------------------------------- x2000107(263): __NR_shmctl 3s 1m ----------------------------------------------------- Syscall param shmctl(shmid) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:450) Syscall param shmctl(cmd) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:450) Syscall param shmctl(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:450) Syscall param shmctl(IPC_STAT, buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:450) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -665,30 +592,24 @@ x2000109(265): __NR_shmget 3s 0m ----------------------------------------------------- Syscall param shmget(key) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:456) Syscall param shmget(size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:456) Syscall param shmget(shmflg) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:456) ----------------------------------------------------- x200010c(268): __NR_sem_open 2s 1m ----------------------------------------------------- Syscall param sem_open(name) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:462) Syscall param sem_open(oflag) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:462) Syscall param sem_open(name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:462) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -709,13 +630,12 @@ Syscall param sem_close(sem) contains uninitialised byte(s) ----------------------------------------------------- x200010e(270): __NR_sem_unlink 1s 1m ----------------------------------------------------- + Syscall param sem_unlink(name) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:472) Syscall param sem_unlink(name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:472) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -741,19 +661,15 @@ x2000113(275): __NR_sem_init 3s 1m ----------------------------------------------------- Syscall param sem_init(sem) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:486) Syscall param sem_init(pshared) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:486) Syscall param sem_init(value) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:486) Syscall param sem_init(sem) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:486) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -761,11 +677,9 @@ x2000114(276): __NR_sem_destroy 1s 1m ----------------------------------------------------- Syscall param sem_destroy(sem) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:489) Syscall param sem_destroy(sem) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:489) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -773,48 +687,38 @@ x2000117(279): __NR_stat_extended 4s 4m ----------------------------------------------------- Syscall param stat_extended(file_name) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:497) Syscall param stat_extended(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:497) Syscall param stat_extended(fsacl) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:497) Syscall param stat_extended(fsacl_size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:497) Syscall param stat_extended(file_name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:497) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:497) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat_extended(fsacl_size) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:497) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat_extended(file_name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:500) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:500) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat_extended(fsacl) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:500) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -822,97 +726,72 @@ x2000118(280): __NR_lstat_extended 4s 4m ----------------------------------------------------- Syscall param lstat_extended(file_name) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:503) Syscall param lstat_extended(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:503) Syscall param lstat_extended(fsacl) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:503) Syscall param lstat_extended(fsacl_size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:503) Syscall param lstat_extended(file_name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:503) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:503) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat_extended(fsacl_size) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:503) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat_extended(file_name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:506) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:506) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat_extended(fsacl) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:506) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- -x2000119(280): __NR_fstat_extended 4s 3m +x2000119(280): __NR_fstat_extended 4s 2m ----------------------------------------------------- Syscall param fstat_extended(fd) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:509) Syscall param fstat_extended(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:509) Syscall param fstat_extended(fsacl) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:509) Syscall param fstat_extended(fsacl_size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:509) - -Syscall param fstat_extended(fd) points to unaddressable byte(s) - ... - by 0x........: main (scalar.c:509) - Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param fstat_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:509) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param fstat_extended(fsacl_size) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:509) - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param fstat_extended(fd) points to unaddressable byte(s) - ... - by 0x........: main (scalar.c:512) Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +x2000119(280): __NR_fstat_extended 0s 2m +----------------------------------------------------- Syscall param fstat_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:512) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param fstat_extended(fsacl) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:512) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -920,23 +799,18 @@ x200011c(284):__NR_access_extended 4s 1m ----------------------------------------------------- Syscall param access_extended(entries) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:521) Syscall param access_extended(size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:521) Syscall param access_extended(results) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:521) Syscall param access_extended(uid) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:521) Syscall param access_extended(entries) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:521) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -965,19 +839,15 @@ x200013b(315): __NR_aio_suspend 1s 0m ----------------------------------------------------- Syscall param aio_suspend(aiocbp) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:563) Syscall param aio_suspend(nent) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:563) Syscall param aio_suspend(timeout) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:563) Syscall param aio_suspend(list) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:563) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -991,11 +861,9 @@ x200013e(318): __NR_aio_read 1s 1m ----------------------------------------------------- Syscall param aio_read(aiocbp) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:571) Syscall param aio_read(aiocbp) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:571) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -1003,11 +871,9 @@ x200013f(319): __NR_aio_write 1s 1m ----------------------------------------------------- Syscall param aio_write(aiocbp) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:574) Syscall param aio_write(aiocbp) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:574) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -1021,22 +887,21 @@ x2000148(328): __NR___pthread_kill 2s 0m ----------------------------------------------------- Syscall param __pthread_kill(thread) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:590) Syscall param __pthread_kill(sig) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:590) ----------------------------------------------------- x2000149(329):__NR___pthread_sigmask 3s 0m ----------------------------------------------------- +Syscall param __pthread_sigmask(how) contains uninitialised byte(s) + ... + Syscall param __pthread_sigmask(set) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:593) Syscall param __pthread_sigmask(oldset) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:593) ----------------------------------------------------- (335): old utrace @@ -1046,38 +911,41 @@ x2000155(341):__NR_stat64_extended 4s 4m ----------------------------------------------------- Syscall param stat64_extended(file_name) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:613) Syscall param stat64_extended(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:613) Syscall param stat64_extended(fsacl) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:613) Syscall param stat64_extended(fsacl_size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:613) Syscall param stat64_extended(file_name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:613) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat64_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:613) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat64_extended(fsacl_size) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:613) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +----------------------------------------------------- +x2000155(341):__NR_stat64_extended 0s 3m +----------------------------------------------------- +Syscall param stat64_extended(file_name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param stat64_extended(buf) points to unaddressable byte(s) + ... Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param stat64_extended(fsacl) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:616) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -1085,72 +953,75 @@ x2000156(342):__NR_lstat64_extended 4s 4m ----------------------------------------------------- Syscall param lstat64_extended(file_name) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:619) Syscall param lstat64_extended(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:619) Syscall param lstat64_extended(fsacl) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:619) Syscall param lstat64_extended(fsacl_size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:619) Syscall param lstat64_extended(file_name) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:619) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat64_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:619) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat64_extended(fsacl_size) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:619) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +----------------------------------------------------- +x2000156(342):__NR_lstat64_extended 0s 3m +----------------------------------------------------- +Syscall param lstat64_extended(file_name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lstat64_extended(buf) points to unaddressable byte(s) + ... Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param lstat64_extended(fsacl) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:622) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- -x2000157(342):__NR_fstat64_extended 4s 3m +x2000157(342):__NR_fstat64_extended 4s 2m ----------------------------------------------------- Syscall param fstat64_extended(fd) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:625) Syscall param fstat64_extended(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:625) Syscall param fstat64_extended(fsacl) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:625) Syscall param fstat64_extended(fsacl_size) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:625) Syscall param fstat64_extended(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:625) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param fstat64_extended(fsacl_size) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:625) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +----------------------------------------------------- +x2000157(342):__NR_fstat64_extended 0s 2m +----------------------------------------------------- +Syscall param fstat64_extended(buf) points to unaddressable byte(s) + ... Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param fstat64_extended(fsacl) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:628) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- @@ -1158,82 +1029,95 @@ x200015b(347): __NR_getfsstat64 3s 1m ----------------------------------------------------- Syscall param getfsstat64(buf) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:637) Syscall param getfsstat64(bufsize) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:637) Syscall param getfsstat64(flags) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:637) Syscall param getfsstat64(buf) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:637) Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- (369-373): unused ----------------------------------------------------- ----------------------------------------------------- -x2000176(374): __NR_kevent_qos 1s 8m +x2000176(374): __NR_kevent_qos 8s 4m ----------------------------------------------------- +Syscall param kevent_qos(kq) contains uninitialised byte(s) + ... + Syscall param kevent_qos(changelist) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:669) Syscall param kevent_qos(nchanges) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:669) + +Syscall param kevent_qos(eventlist) contains uninitialised byte(s) + ... + +Syscall param kevent_qos(nevents) contains uninitialised byte(s) + ... Syscall param kevent_qos(data_available) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:669) Syscall param kevent_qos(flags) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:669) -Syscall param kevent_qos(changelist) points to uninitialised byte(s) +Syscall param kevent_qos(changelist) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:669) - Address 0x........ is on thread 1's stack - in frame #1, created by main (scalar.c:12) + Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param kevent_qos(eventlist) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:669) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param kevent_qos(data_out) points to unaddressable byte(s) + ... Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- (375-379): unused ----------------------------------------------------- ----------------------------------------------------- -x200018a(394): __NR_pselect 1s 6m +x200018a(394): __NR_pselect 5s 4m ----------------------------------------------------- +Syscall param pselect(n) contains uninitialised byte(s) + ... + Syscall param pselect(readfds) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:694) Syscall param pselect(writefds) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:694) -Syscall param pselect(readfds) points to uninitialised byte(s) +Syscall param pselect(exceptfds) contains uninitialised byte(s) + ... + +Syscall param pselect(timeout) contains uninitialised byte(s) ... - by 0x........: main (scalar.c:694) - Address 0x........ is on thread 1's stack - in frame #1, created by main (scalar.c:12) + +Syscall param pselect(readfds) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param pselect(writefds) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:694) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param pselect(exceptfds) points to unaddressable byte(s) ... - by 0x........: main (scalar.c:694) + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param pselect(timeout) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param pselect(sigmask) points to unaddressable byte(s) + ... Address 0x........ is not stack'd, malloc'd or (recently) free'd ----------------------------------------------------- diff --git a/memcheck/tests/darwin/scalar.vgtest b/memcheck/tests/darwin/scalar.vgtest index 897d9e73c..2e1038637 100644 --- a/memcheck/tests/darwin/scalar.vgtest +++ b/memcheck/tests/darwin/scalar.vgtest @@ -1,3 +1,4 @@ prog: scalar vgopts: -q --error-limit=no args: < scalar.c +stderr_filter: filter_scalar diff --git a/memcheck/tests/darwin/scalar_nocancel.vgtest b/memcheck/tests/darwin/scalar_nocancel.vgtest index 788757263..9ad0aa093 100644 --- a/memcheck/tests/darwin/scalar_nocancel.vgtest +++ b/memcheck/tests/darwin/scalar_nocancel.vgtest @@ -1,3 +1,4 @@ prog: scalar_nocancel vgopts: -q --error-limit=no args: < scalar_nocancel.c +stderr_filter: filter_scalar From ed27b47d8101f6d850a8fd50589e750cae09c43e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 9 Nov 2025 21:57:01 +0100 Subject: [PATCH 047/502] Darwin redirs: add several str* amd mem* redirs to vg_replace_strmem.c Mostly these are _chk variants. I've also undone a change that forced the compiler to not use these variants. --- memcheck/tests/Makefile.am | 22 ++++++++++++++++++++++ memcheck/tests/filter_libc_variants | 2 +- memcheck/tests/memccpy2.c | 8 ++++---- memcheck/tests/overlap.c | 10 +++++----- memcheck/tests/overlap.vgtest | 1 + shared/vg_replace_strmem.c | 15 ++++++++------- 6 files changed, 41 insertions(+), 17 deletions(-) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 6343b1b7c..5cdc2082c 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -814,7 +814,13 @@ origin4_many_CFLAGS = $(AM_CFLAGS) -O @FLAG_W_NO_USE_AFTER_FREE@ @FLAG_W_NO_UNIN # Apply -O so as to run in reasonable time. origin5_bz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline +if VGCONF_OS_IS_DARWIN +origin5_bz2_CFLAGS += -fno-inline +endif origin6_fp_CFLAGS = $(AM_CFLAGS) -O +if VGCONF_OS_IS_DARWIN +origin6_fp_CFLAGS += -fno-inline +endif # Don't allow GCC to inline memcpy() and strcpy(), # because then we can't intercept it @@ -876,11 +882,27 @@ wrap6_CFLAGS = $(AM_CFLAGS) -O2 # To make it a bit more realistic, have some optimisation enabled # for the varinfo tests. We still expect sane results. varinfo1_CFLAGS = $(AM_CFLAGS) -O @FLAG_W_NO_MAYBE_UNINITIALIZED@ +if VGCONF_OS_IS_DARWIN +varinfo1_CFLAGS += -fno-inline +endif varinfo2_CFLAGS = $(AM_CFLAGS) -O -Wno-shadow @FLAG_W_NO_MAYBE_UNINITIALIZED@ +if VGCONF_OS_IS_DARWIN +varinfo2_CFLAGS += -fno-inline +endif varinfo3_CFLAGS = $(AM_CFLAGS) -O @FLAG_W_NO_MAYBE_UNINITIALIZED@ +if VGCONF_OS_IS_DARWIN +varinfo3_CFLAGS += -fno-inline +endif varinfo4_CFLAGS = $(AM_CFLAGS) -O @FLAG_W_NO_MAYBE_UNINITIALIZED@ +if VGCONF_OS_IS_DARWIN +varinfo4_CFLAGS += -fno-inline +endif varinfo5_CFLAGS = $(AM_CFLAGS) -O varinfo6_CFLAGS = $(AM_CFLAGS) -O @FLAG_W_NO_MAYBE_UNINITIALIZED@ +if VGCONF_OS_IS_DARWIN +varinfo6_CFLAGS += -fno-inline +endif + # Build shared object for varinfo5 varinfo5_SOURCES = varinfo5.c diff --git a/memcheck/tests/filter_libc_variants b/memcheck/tests/filter_libc_variants index bfffa8468..3ecf1fb80 100755 --- a/memcheck/tests/filter_libc_variants +++ b/memcheck/tests/filter_libc_variants @@ -2,4 +2,4 @@ ./filter_stderr "$@" | -sed 's/ _platform_memcmp / memcmp /;s/ bcmp / memcmp /;s/ _platform_memccpy / memccpy /' +sed 's/ _platform_memcmp / memcmp /;s/ bcmp / memcmp /;s/ _platform_memccpy / memccpy /;s/ __memccpy_chk / memccpy /;s/ __strncat_chk / strncat /;s/ __strncpy_chk / strncpy /;s/ __strcpy_chk / strcpy /' diff --git a/memcheck/tests/memccpy2.c b/memcheck/tests/memccpy2.c index be7808d5f..947324581 100644 --- a/memcheck/tests/memccpy2.c +++ b/memcheck/tests/memccpy2.c @@ -8,9 +8,9 @@ int main(void) { char* astring = strdup("this is a string # with something to seek"); size_t len = strlen(astring); - (memccpy)(astring+10, astring, '#', len-10); + memccpy(astring+10, astring, '#', len-10); sprintf(astring, "this is a string # with something to seek"); - (memccpy)(astring, astring+10, '#', len); + memccpy(astring, astring+10, '#', len); sprintf(astring, "this is a string # with something to seek"); /* @@ -23,10 +23,10 @@ int main(void) assert(res && *res == 'g'); sprintf(astring, "this is a string # with something to seek"); /* length is 0, nothing copied, returns NULL */ - res = (memccpy)(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 0); + res = memccpy(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 0); assert(NULL == res); /* 'z' not found so 20 bytes copied, returns NULL */ - res = (memccpy)(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 20); + res = memccpy(astring, "abcdefhhijklmnopqrstuvwxy", 'z', 20); assert(NULL == res); free(astring); } diff --git a/memcheck/tests/overlap.c b/memcheck/tests/overlap.c index 649b1e34d..d868886f3 100644 --- a/memcheck/tests/overlap.c +++ b/memcheck/tests/overlap.c @@ -42,16 +42,16 @@ int main(void) memcpy(x, x+20, 21); // overlap strncpy(x+20, x, 20); // ok - (strncpy)(x+20, x, 21); // overlap + strncpy(x+20, x, 21); // overlap strncpy(x, x+20, 20); // ok - (strncpy)(x, x+20, 21); // overlap + strncpy(x, x+20, 21); // overlap x[39] = '\0'; strcpy(x, x+20); // ok x[39] = 39; x[40] = '\0'; - (strcpy)(x, x+20); // overlap + strcpy(x, x+20); // overlap x[19] = '\0'; strcpy(x+20, x); // ok @@ -109,8 +109,8 @@ int main(void) always run forever, I think... */ for ( i = 0; i < 2; i++) - (strncat)(a+20, a, 21); // run twice to check 2nd error isn't shown - (strncat)(a, a+20, 21); + strncat(a+20, a, 21); // run twice to check 2nd error isn't shown + strncat(a, a+20, 21); /* This is ok, but once gave a warning when strncpy() was wrong, and used 'n' for the length, even when the src was shorter than 'n' */ diff --git a/memcheck/tests/overlap.vgtest b/memcheck/tests/overlap.vgtest index 7e49d95c8..166bf73f7 100644 --- a/memcheck/tests/overlap.vgtest +++ b/memcheck/tests/overlap.vgtest @@ -2,3 +2,4 @@ prog: overlap vgopts: -q # https://bugs.kde.org/show_bug.cgi?id=402833 prereq: ! ../../tests/os_test linux || ! ../../tests/arch_test amd64 +stderr_filter: filter_libc_variants diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 5ef4884ef..d9de90b41 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -386,7 +386,8 @@ static inline void my_exit ( int x ) STRNCAT(VG_Z_LIBC_SONAME, strncat) #elif defined(VGO_darwin) - //STRNCAT(VG_Z_LIBC_SONAME, strncat) + STRNCAT(VG_Z_LIBSYSTEM_C_SONAME, strncat) + STRNCAT(VG_Z_LIBSYSTEM_C_SONAME, __strncat_chk) //STRNCAT(VG_Z_DYLD, strncat) #elif defined(VGO_solaris) @@ -572,9 +573,8 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRCPY(VG_Z_LIBC_SONAME, strcpy) -# if DARWIN_VERS == DARWIN_10_9 - STRCPY(VG_Z_LIBSYSTEM_C_SONAME, strcpy) -# endif + STRCPY(VG_Z_LIBSYSTEM_C_SONAME, strcpy) + STRCPY(VG_Z_LIBSYSTEM_C_SONAME, __strcpy_chk) #elif defined(VGO_solaris) STRCPY(VG_Z_LIBC_SONAME, strcpy) @@ -620,9 +620,8 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRNCPY(VG_Z_LIBC_SONAME, strncpy) -# if DARWIN_VERS >= DARWIN_10_9 - STRNCPY(VG_Z_LIBSYSTEM_C_SONAME, strncpy) -# endif + STRNCPY(VG_Z_LIBSYSTEM_C_SONAME, strncpy) + STRNCPY(VG_Z_LIBSYSTEM_C_SONAME, __strncpy_chk) #elif defined(VGO_solaris) STRNCPY(VG_Z_LIBC_SONAME, strncpy) @@ -1175,6 +1174,7 @@ static inline void my_exit ( int x ) # endif MEMCPY(VG_Z_LIBC_SONAME, memcpyZDVARIANTZDsse3x) /* memcpy$VARIANT$sse3x */ MEMCPY(VG_Z_LIBC_SONAME, memcpyZDVARIANTZDsse42) /* memcpy$VARIANT$sse42 */ + MEMCPY(VG_Z_LIBSYSTEM_C_SONAME, __memcpy_chk) #elif defined(VGO_solaris) MEMCPY(VG_Z_LIBC_SONAME, memcpy) @@ -2383,6 +2383,7 @@ static inline void my_exit ( int x ) #if defined(VGO_linux) || defined(VGO_freebsd) || defined(VGO_solaris) MEMCCPY(VG_Z_LIBC_SONAME, memccpy) #elif defined(VGO_darwin) + MEMCCPY(VG_Z_LIBSYSTEM_C_SONAME, __memccpy_chk) MEMCCPY(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memccpy) #endif From c430409dd6b7a7d43ae62c98a2c025709dce8057 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 10 Nov 2025 09:25:54 +0100 Subject: [PATCH 048/502] Darwin syscall args: missing piece for layout Getting the layout and PRE_REG_READX in the PRE wrappers should now be correct for amd64. --- coregrind/m_syswrap/priv_types_n_macros.h | 4 ++-- memcheck/tests/darwin/scalar.stderr.exp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/priv_types_n_macros.h b/coregrind/m_syswrap/priv_types_n_macros.h index 6da1cad31..3cc0be8a4 100644 --- a/coregrind/m_syswrap/priv_types_n_macros.h +++ b/coregrind/m_syswrap/priv_types_n_macros.h @@ -491,7 +491,7 @@ static inline UWord getERR ( SyscallStatus* st ) { # define PRA7(s,t,a) PSRAn(7,s,t,a) # define PRA8(s,t,a) PSRAn(8,s,t,a) -#elif defined(VGP_amd64_freebsd) +#elif defined(VGP_amd64_freebsd) || defined(VGP_amd64_darwin) /* Up to 8 parameters, 6 in registers, 2 on the stack. */ /* or 7 in registers and 3 on the stack */ # define PRA1(s,t,a) PRRAn(1,s,t,a) @@ -531,7 +531,7 @@ static inline UWord getERR ( SyscallStatus* st ) { # define PRA7(s,t,a) PSRAn(7,s,t,a) # define PRA8(s,t,a) PSRAn(8,s,t,a) -#elif defined(VGP_amd64_darwin) || defined(VGP_amd64_solaris) +#elif defined(VGP_amd64_solaris) /* Up to 8 parameters, 6 in registers, 2 on the stack. */ # define PRA1(s,t,a) PRRAn(1,s,t,a) # define PRA2(s,t,a) PRRAn(2,s,t,a) diff --git a/memcheck/tests/darwin/scalar.stderr.exp b/memcheck/tests/darwin/scalar.stderr.exp index a33641360..b0fd9e4a3 100644 --- a/memcheck/tests/darwin/scalar.stderr.exp +++ b/memcheck/tests/darwin/scalar.stderr.exp @@ -1061,6 +1061,9 @@ Syscall param kevent_qos(eventlist) contains uninitialised byte(s) Syscall param kevent_qos(nevents) contains uninitialised byte(s) ... +Syscall param kevent_qos(data_out) contains uninitialised byte(s) + ... + Syscall param kevent_qos(data_available) contains uninitialised byte(s) ... From 2da8f5e4d9306de608d8d15b3354b56e07f09de4 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 10 Nov 2025 22:15:51 +0100 Subject: [PATCH 049/502] Darwin syscall: fix signal masks Merged From Louis Brunner's git repo. Fixes a few more regtest failures with OSX 10.13 amd64. --- coregrind/m_syswrap/syscall-amd64-darwin.S | 32 ++++++---------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/coregrind/m_syswrap/syscall-amd64-darwin.S b/coregrind/m_syswrap/syscall-amd64-darwin.S index 456b4c84c..fbc81ff5d 100644 --- a/coregrind/m_syswrap/syscall-amd64-darwin.S +++ b/coregrind/m_syswrap/syscall-amd64-darwin.S @@ -99,18 +99,13 @@ L_$0_1: /* Even though we can't take a signal until the sigprocmask completes, If rip is in the range [1,2), the syscall hasn't been started yet */ /* Set the signal mask which should be current during the syscall. */ - /* GrP fixme signals - DDD: JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask - movq $__NR_rt_sigprocmask, %rax // syscall # - movq $VKI_SIG_SETMASK, %rdi // how + movq $$__NR___pthread_sigmask, %rax // syscall # + movq $$VKI_SIG_SETMASK, %rdi // how movq -24(%rbp), %rsi // sysmask movq -32(%rbp), %rdx // postmask - movq -40(%rbp), %r10 // sigsetSzB in r10 not rcx - DDD: fixme return address syscall - jnc 7f // sigprocmask failed - */ + jc L_$0_7 // sigprocmask failed /* OK, that worked. Now do the syscall proper. */ @@ -156,35 +151,26 @@ L_$0_3: /* In the range [3, 4), the syscall result is in %rax, L_$0_4: /* Re-block signals. If eip is in [4,5), then the syscall is complete and we needn't worry about it. */ - /* GrP fixme signals - DDD: JRS fixme: use __NR___pthread_sigmask, not __NR_rt_sigprocmask - PUSH_di_si_dx_cx_8 - - movq $__NR_rt_sigprocmask, %rax // syscall # - movq $VKI_SIG_SETMASK, %rdi // how - movq %rcx, %rsi // postmask + movq $$__NR___pthread_sigmask, %rax // syscall # + movq $$VKI_SIG_SETMASK, %rdi // how + movq -32(%rbp), %rsi // postmask xorq %rdx, %rdx // NULL - movq %r8, %r10 // sigsetSzB - DDD: fixme return address syscall - POP_di_si_dx_cx_8 + jc L_$0_7 // sigprocmask failed - jnc 7f // sigprocmask failed - */ L_$0_5: /* now safe from signals */ movq $$0, %rax /* SUCCESS */ movq %rbp, %rsp popq %rbp ret -/* GrP fixme signals L_$0_7: // failure: return 0x8000 | error code - DDD: fixme return value + andq $$0x7FFF, %rax + orq $$0x8000, %rax movq %rbp, %rsp popq %rbp ret -*/ .endmacro From a8e1583c9307ca08f6cc04353a7be1a149575742 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 11 Nov 2025 13:15:51 +0000 Subject: [PATCH 050/502] Warnings: fix executable stack warnings from x86 assmebler tests. --- cachegrind/tests/x86/fpu-28-108.S | 2 ++ memcheck/tests/x86/pushfpopf_s.S | 2 ++ memcheck/tests/x86/tronical.S | 2 ++ none/tests/x86/cpuid_s.S | 2 ++ 4 files changed, 8 insertions(+) diff --git a/cachegrind/tests/x86/fpu-28-108.S b/cachegrind/tests/x86/fpu-28-108.S index 54b2da650..cb770f818 100644 --- a/cachegrind/tests/x86/fpu-28-108.S +++ b/cachegrind/tests/x86/fpu-28-108.S @@ -24,3 +24,5 @@ VG_SYM_ASM(main): movl $0, %eax ret + .section .note.GNU-stack,"",@progbits + diff --git a/memcheck/tests/x86/pushfpopf_s.S b/memcheck/tests/x86/pushfpopf_s.S index 37816898e..3cdd64d56 100644 --- a/memcheck/tests/x86/pushfpopf_s.S +++ b/memcheck/tests/x86/pushfpopf_s.S @@ -46,3 +46,5 @@ 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)" + .section .note.GNU-stack,"",@progbits + diff --git a/memcheck/tests/x86/tronical.S b/memcheck/tests/x86/tronical.S index e5bb4009e..60427c1c2 100644 --- a/memcheck/tests/x86/tronical.S +++ b/memcheck/tests/x86/tronical.S @@ -104,3 +104,5 @@ VG_SYM_ASM(main): .Lfe3: .comm foo,4,4 .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" + .section .note.GNU-stack,"",@progbits + diff --git a/none/tests/x86/cpuid_s.S b/none/tests/x86/cpuid_s.S index 70040ce28..e5012cc92 100644 --- a/none/tests/x86/cpuid_s.S +++ b/none/tests/x86/cpuid_s.S @@ -71,3 +71,5 @@ VG_SYM_ASM(get_cpuid1): .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-98)" + .section .note.GNU-stack,"",@progbits + From 2dca60436a6bf461f15fc305022c325429d84d86 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 11 Nov 2025 15:57:14 +0100 Subject: [PATCH 051/502] Darwin: update wqthread_hijack arguments Taken from Louis Brunner's GitHub repo. Now when I launch TextEdit with memcheck it doesnt fail straight away. I get a few memcheck errors and then it hangs. Looks like the 3 threads are all running JITted code with one blocked having access errors. --- coregrind/m_syswrap/priv_syswrap-darwin.h | 2 +- coregrind/m_syswrap/syswrap-amd64-darwin.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index 67c3412d3..37d330d93 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -826,7 +826,7 @@ extern void pthread_hijack_asm(void); extern void pthread_hijack(Addr self, Addr kport, Addr func, Addr func_arg, Addr stacksize, Addr flags, Addr sp); extern void wqthread_hijack_asm(void); -extern void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, Int reuse, Addr sp); +extern void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, UInt reuse, Int kevent_count, Addr sp); extern Addr pthread_starter; extern Addr wqthread_starter; diff --git a/coregrind/m_syswrap/syswrap-amd64-darwin.c b/coregrind/m_syswrap/syswrap-amd64-darwin.c index e6f284c9a..01ebf1b7c 100644 --- a/coregrind/m_syswrap/syswrap-amd64-darwin.c +++ b/coregrind/m_syswrap/syswrap-amd64-darwin.c @@ -416,7 +416,7 @@ void pthread_hijack(Addr self, Addr kport, Addr func, Addr func_arg, asm( ".globl _wqthread_hijack_asm\n" "_wqthread_hijack_asm:\n" -" movq %rsp,%r9\n" // original sp +" push %rsp\n" // original sp // other values stay where they are in registers " push $0\n" // fake return address " jmp _wqthread_hijack\n" @@ -431,7 +431,7 @@ asm( thread for every work item. */ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, - Int reuse, Addr sp) + UInt reuse, Int kevent_count, Addr sp) { ThreadState *tst; VexGuestAMD64State *vex; @@ -451,8 +451,8 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, if (0) VG_(printf)( "wqthread_hijack: self %#lx, kport %#lx, " - "stackaddr %#lx, workitem %#lx, reuse/flags %x, sp %#lx\n", - self, kport, stackaddr, workitem, (UInt)reuse, sp); + "stackaddr %#lx, workitem %#lx, reuse/flags %#x, kevent_count %d, sp %#lx\n", + self, kport, stackaddr, workitem, (UInt)reuse, kevent_count, sp); /* Start the thread with all signals blocked. VG_(scheduler) will set the mask correctly when we finally get there. */ @@ -476,7 +476,7 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, /* For whatever reason, tst->os_state.pthread appear to have a constant offset of 96 on 10.7, but zero on 10.6 and 10.5. No idea why. */ -# if DARWIN_VERS <= DARWIN_10_6 || DARWIN_VERS == DARWIN_10_13 +# if DARWIN_VERS <= DARWIN_10_6 || DARWIN_VERS >= DARWIN_10_13 UWord magic_delta = 0; # elif DARWIN_VERS == DARWIN_10_7 || DARWIN_VERS == DARWIN_10_8 UWord magic_delta = 0x60; @@ -506,6 +506,10 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, tid, (void *)tst, tst->os_state.pthread, self); vex = &tst->arch.vex; + if (tst->os_state.pthread - magic_delta != self) { + VG_(printf)("wqthread_hijack reuse: tst->os_state.pthread %#lx vs self %#lx (diff: %#lx vs %#lx)\n", + tst->os_state.pthread, self, tst->os_state.pthread - self, magic_delta); + } vg_assert(tst->os_state.pthread - magic_delta == self); } else { @@ -525,7 +529,7 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, vex->guest_RDX = stackaddr; vex->guest_RCX = workitem; vex->guest_R8 = reuse; - vex->guest_R9 = 0; + vex->guest_R9 = kevent_count; vex->guest_RSP = sp; #if DARWIN_VERS >= DARWIN_10_12 vex->guest_GS_CONST = self + pthread_tsd_offset; From 51c5973d9d1f096b9472df75638f2a53324fafed Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 12 Nov 2025 21:46:23 +0100 Subject: [PATCH 052/502] Bug 511972 - valgrind-3.26.0 tests fail to build on upcomig gcc-16: unrecognized command-line option '-Wno-alloc-size-larger-than=18446744073709551615' Initial patch from Sergei Trofimovich, thanks. --- NEWS | 3 +++ configure.ac | 4 ++-- memcheck/tests/Makefile.am | 8 ++++---- memcheck/tests/amd64-freebsd/Makefile.am | 2 +- memcheck/tests/amd64-linux/Makefile.am | 2 +- memcheck/tests/x86-freebsd/Makefile.am | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index a52af5119..0cdbea54e 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,9 @@ are not entered into bugzilla tend to get forgotten about or ignored. 511329 Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) 511713 Refactor syscall argument handling +511972 valgrind-3.26.0 tests fail to build on upcomig gcc-16: + unrecognized command-line option + '-Wno-alloc-size-larger-than=18446744073709551615' To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/configure.ac b/configure.ac index 0092ad2ae..869487db4 100644 --- a/configure.ac +++ b/configure.ac @@ -2538,7 +2538,7 @@ fi AC_DEFUN([AC_GCC_WARNING_SUBST_NO],[ AC_MSG_CHECKING([if gcc accepts -W$1]) safe_CFLAGS=$CFLAGS - CFLAGS="-W$1 -Werror" + CFLAGS="-W$1 -Wno-$1 -Werror" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])], [ AC_SUBST([$2], [-Wno-$1]) AC_MSG_RESULT([yes])], [ @@ -2591,7 +2591,6 @@ AC_GCC_WARNING_SUBST_NO([unused-result], [FLAG_W_NO_UNUSED_RESULT]) AC_GCC_WARNING_SUBST_NO([infinite-recursion], [FLAG_W_NO_INFINITE_RECURSION]) AC_GCC_WARNING_SUBST_NO([deprecated], [FLAG_W_NO_DEPRECATED]) # OK for 32 and 64 bit -AC_GCC_WARNING_SUBST_NO([alloc-size-larger-than=18446744073709551615], [FLAG_W_NO_ALLOC_SIZE_LARGER_THAN]) AC_GCC_WARNING_SUBST_NO([alloc-size], [FLAG_W_NO_ALLOC_SIZE]) AC_GCC_WARNING_SUBST_NO([deprecated-declarations], [FLAG_W_NO_DEPRECATED_DECLARATIONS]) @@ -2606,6 +2605,7 @@ AC_GCC_WARNING_SUBST([missing-parameter-type], [FLAG_W_MISSING_PARAMETER_TYPE]) AC_GCC_WARNING_SUBST([logical-op], [FLAG_W_LOGICAL_OP]) AC_GCC_WARNING_SUBST([enum-conversion], [FLAG_W_ENUM_CONVERSION]) AC_GCC_WARNING_SUBST([implicit-fallthrough=2], [FLAG_W_IMPLICIT_FALLTHROUGH]) +AC_GCC_WARNING_SUBST([alloc-size-larger-than=18446744073709551616], [FLAG_W_ALLOC_SIZE_LARGER_THAN]) # as above, C++ flags AC_DEFUN([AC_GXX_WARNING_SUBST_NO],[ diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 5cdc2082c..1cf97fc82 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -690,19 +690,19 @@ leak_cpp_interior_SOURCES = leak_cpp_interior.cpp # Suppress various gcc warnings which are correct, but for things # we are actually testing for at runtime. -accounting_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ +accounting_CFLAGS = $(AM_CFLAGS) @FLAG_W_ALLOC_SIZE_LARGER_THAN@ badfree_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_FREE_NONHEAP_OBJECT@ brk2_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ -bug155125_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_RESULT@ @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ +bug155125_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_RESULT@ @FLAG_W_ALLOC_SIZE_LARGER_THAN@ bug472219_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ -calloc_overflow_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ +calloc_overflow_CFLAGS = ${AM_CFLAGS} @FLAG_W_ALLOC_SIZE_LARGER_THAN@ malloc_usable_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_MAYBE_UNINITIALIZED@ @FLAG_W_NO_UNINITIALIZED@ mallinfo_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ if VGCONF_OS_IS_SOLARIS mallinfo_LDADD = -lmalloc endif mallinfo2_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ -malloc3_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ @FLAG_W_NO_ALLOC_SIZE@ +malloc3_CFLAGS = $(AM_CFLAGS) @FLAG_W_ALLOC_SIZE_LARGER_THAN@ @FLAG_W_NO_ALLOC_SIZE@ sbfragment_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_DEPRECATED_DECLARATIONS@ if VGCONF_OS_IS_SOLARIS sbfragment_LDADD = -lmalloc diff --git a/memcheck/tests/amd64-freebsd/Makefile.am b/memcheck/tests/amd64-freebsd/Makefile.am index 378446d4c..1eff95fce 100644 --- a/memcheck/tests/amd64-freebsd/Makefile.am +++ b/memcheck/tests/amd64-freebsd/Makefile.am @@ -24,5 +24,5 @@ AM_CCASFLAGS += @FLAG_M64@ posix_fallocate_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ posix_fadvise_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ -reallocarray_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ +reallocarray_CFLAGS = ${AM_CFLAGS} @FLAG_W_ALLOC_SIZE_LARGER_THAN@ diff --git a/memcheck/tests/amd64-linux/Makefile.am b/memcheck/tests/amd64-linux/Makefile.am index 3426c677d..bd12337fe 100644 --- a/memcheck/tests/amd64-linux/Makefile.am +++ b/memcheck/tests/amd64-linux/Makefile.am @@ -32,7 +32,7 @@ AM_CCASFLAGS += @FLAG_M64@ defcfaexpr_SOURCES = defcfaexpr.S defcfaexpr_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@ -reallocarray_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ +reallocarray_CFLAGS = $(AM_CFLAGS) @FLAG_W_ALLOC_SIZE_LARGER_THAN@ scalar_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ # Avoid linker warnings diff --git a/memcheck/tests/x86-freebsd/Makefile.am b/memcheck/tests/x86-freebsd/Makefile.am index 8c48506c2..7839bb309 100644 --- a/memcheck/tests/x86-freebsd/Makefile.am +++ b/memcheck/tests/x86-freebsd/Makefile.am @@ -23,4 +23,4 @@ AM_CCASFLAGS += @FLAG_M32@ posix_fallocate_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ posix_fadvise_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ -reallocarray_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ +reallocarray_CFLAGS = ${AM_CFLAGS} @FLAG_W_ALLOC_SIZE_LARGER_THAN@ From 95cf5eed209f38b8d3e1bc61a68278be420c2778 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 13 Nov 2025 11:46:11 +0000 Subject: [PATCH 053/502] s390x: Fix BZ 512030 As obvious when inspecting the neighbourhood. --- NEWS | 1 + VEX/priv/guest_s390_helpers.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0cdbea54e..29bf4debe 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 511972 valgrind-3.26.0 tests fail to build on upcomig gcc-16: unrecognized command-line option '-Wno-alloc-size-larger-than=18446744073709551615' +512030 s390x: bfp-convert testcase fails To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index 3d6fec5c1..d5e683ab2 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -1013,7 +1013,6 @@ decode_bfp_rounding_mode(UInt irrm) break; \ case S390_BFP_ROUND_PREPARE_SHORT: \ cc = S390_CC_FOR_BFP128_UCONVERT_AUX(opcode,cc_dep1,cc_dep2,3); \ - cc = S390_CC_FOR_BFP_UCONVERT_AUX(opcode,cc_dep1,3); \ break; \ case S390_BFP_ROUND_NEAREST_EVEN: \ cc = S390_CC_FOR_BFP128_UCONVERT_AUX(opcode,cc_dep1,cc_dep2,4); \ From dd3ac939d11bc11366aefb488c2321217bb6c2a7 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 13 Nov 2025 20:32:28 +0100 Subject: [PATCH 054/502] Bug 512037 - malloc trace does not print free size or alignment --- NEWS | 1 + coregrind/m_replacemalloc/vg_replace_malloc.c | 51 +++++++++---------- memcheck/tests/cxx17_aligned_new.stderr.exp | 30 +++++------ .../tests/cxx17_aligned_new.stderr.exp_32 | 30 +++++------ memcheck/tests/sized_delete.stderr.exp | 4 +- memcheck/tests/sized_delete.stderr.exp-x86 | 4 +- 6 files changed, 58 insertions(+), 62 deletions(-) diff --git a/NEWS b/NEWS index 29bf4debe..84673b407 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. unrecognized command-line option '-Wno-alloc-size-larger-than=18446744073709551615' 512030 s390x: bfp-convert testcase fails +512037 malloc trace does not print free size or alignment To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index c3f42b863..f9de7cccd 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -306,7 +306,7 @@ extern int * __error(void) __attribute__((weak)); \ DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE(#fnname "(%llu)", (ULong)n ); \ + MALLOC_TRACE(#fnname "(%zu)", n ); \ \ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n ); \ MALLOC_TRACE(" = %p\n", v ); \ @@ -329,7 +329,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ struct AlignedAllocInfo aligned_alloc_info = { .orig_alignment=alignment, .size=n, .alloc_kind=AllocKind##tag}; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(size %llu, al %llu)", (ULong)n, (ULong)alignment ); \ + MALLOC_TRACE(#fnname "(%zu, %zu)", n, alignment ); \ \ if ((alignment == 0) \ || ((alignment & (alignment - 1)) != 0)) { \ @@ -356,7 +356,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord) zone); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE(#fnname "(%p, %llu)", zone, (ULong)n ); \ + MALLOC_TRACE(#fnname "(%p, %zu)", zone, n ); \ \ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n ); \ MALLOC_TRACE(" = %p\n", v ); \ @@ -376,8 +376,8 @@ extern int * __error(void) __attribute__((weak)); void* v; \ \ DO_INIT; \ - TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE(#fnname "(%llu)", (ULong)n ); \ + TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ + MALLOC_TRACE(#fnname "(%zu)", n ); \ \ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n ); \ MALLOC_TRACE(" = %p\n", v ); \ @@ -407,7 +407,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ struct AlignedAllocInfo aligned_alloc_info = { .orig_alignment=alignment, .size=n, .alloc_kind=AllocKind##tag }; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(size %llu, al %llu)", (ULong)n, (ULong)alignment ); \ + MALLOC_TRACE(#fnname "(%zu, %zu)", n, alignment ); \ \ if ((alignment == 0) \ || ((alignment & (alignment - 1)) != 0)) { \ @@ -1022,7 +1022,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p)\n", p ); \ + MALLOC_TRACE(#fnname "(%p, %zu)\n", p, size ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1065,7 +1065,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)alignment); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p)\n", p ); \ + MALLOC_TRACE(#fnname "(%p, %zu, %zu)\n", p, size, alignment ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1163,7 +1163,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p)\n", p ); \ + MALLOC_TRACE(#fnname "(%p, %zu)\n", p, size ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1238,7 +1238,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)alignment); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p)\n", p ); \ + MALLOC_TRACE(#fnname "(%p, %zu)\n", p, alignment ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1255,7 +1255,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)alignment); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p)\n", p ); \ + MALLOC_TRACE(#fnname "(%p, %zu, %zu)\n", p, size, alignment ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1709,7 +1709,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \ - MALLOC_TRACE("zone_realloc(%p,%p,%llu)", zone, ptrV, (ULong)new_size ); \ + MALLOC_TRACE("zone_realloc(%p,%p,%zu)", zone, ptrV, new_size ); \ v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size ); \ MALLOC_TRACE(" = %p\n", v ); \ if (v == NULL) { \ @@ -1732,7 +1732,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \ - MALLOC_TRACE("realloc(%p,%llu)", ptrV, (ULong)new_size ); \ + MALLOC_TRACE("realloc(%p,%zu)", ptrV, new_size ); \ v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size ); \ MALLOC_TRACE(" = %p\n", v ); \ if (v == NULL) { \ @@ -1755,7 +1755,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \ - MALLOC_TRACE("reallocf(%p,%llu)", ptrV, (ULong)new_size ); \ + MALLOC_TRACE("reallocf(%p,%zu)", ptrV, new_size ); \ v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size ); \ MALLOC_TRACE(" = %p\n", v ); \ if (v == NULL) { \ @@ -1781,7 +1781,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(nmemb); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ - MALLOC_TRACE("reallocarray(%p,%llu,%llu)", ptrV, (ULong)nmemb, (ULong)size ); \ + MALLOC_TRACE("reallocarray(%p,%zu,%zu)", ptrV, nmemb, size ); \ if (nmemb > 0 && (SizeT)-1 / nmemb < size) { \ SET_ERRNO_ENOMEM; \ MALLOC_TRACE(" = 0\n"); \ @@ -1883,8 +1883,8 @@ 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, al %llu, size %llu)", zone, \ - (ULong)alignment, (ULong)n); \ + MALLOC_TRACE("zone_memalign(%p, al %zu, size %zu)", zone, \ + alignment, n); \ \ if (alignment == 0 || alignment % sizeof(void*) != 0 || \ (alignment & (alignment - 1)) != 0) { \ @@ -1952,8 +1952,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("memalign(al %llu, size %llu)", \ - (ULong)alignment, (ULong)n ); \ + MALLOC_TRACE("memalign(al %zu, size %zu)", alignment, n ); \ \ /* Round up to minimum alignment if necessary. */ \ if (alignment < VG_MIN_MALLOC_SZB) \ @@ -1986,8 +1985,7 @@ extern int * __error(void) __attribute__((weak)); \ DO_INIT; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("memalign(alignment %llu, size %llu)", (ULong)alignment, \ - (ULong)size); \ + MALLOC_TRACE("memalign(%zu, %zu)", alignment, size); \ if ((VG_MEMALIGN_NO_SIZE_ZERO && (size == 0)) || \ (VG_MEMALIGN_NO_ALIGN_ZERO && (alignment == 0)) || \ (VG_MEMALIGN_ALIGN_POWER_TWO && \ @@ -2193,8 +2191,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("posix_memalign(al %llu, size %llu)", \ - (ULong)alignment, (ULong)size ); \ + MALLOC_TRACE("posix_memalign(%p, %zu, %zu)", memptr, alignment, size ); \ /* Test whether the alignment argument is valid. It must be \ a power of two multiple of sizeof (void *). */ \ if (alignment == 0 \ @@ -2337,8 +2334,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("aligned_alloc(al %llu, size %llu)", \ - (ULong)alignment, (ULong)size ); \ + MALLOC_TRACE("aligned_alloc(al %zu, size %zu)", alignment, size ); \ \ /* Round up to minimum alignment if necessary. */ \ if (alignment < VG_MIN_MALLOC_SZB) \ @@ -2370,8 +2366,7 @@ extern int * __error(void) __attribute__((weak)); \ DO_INIT; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("aligned_alloc(al %llu, size %llu)", \ - (ULong)alignment, (ULong)size ); \ + MALLOC_TRACE("aligned_alloc(%zu, %zu)", alignment, size ); \ if ((VG_ALIGNED_ALLOC_NO_SIZE_ZERO && (size == 0)) \ || (VG_ALIGNED_ALLOC_NO_ALIGN_ZERO && (alignment == 0)) \ || (VG_ALIGNED_ALLOC_SIZE_MULTIPLE_ALIGN && alignment && (size % alignment != 0)) \ @@ -2431,7 +2426,7 @@ extern int * __error(void) __attribute__((weak)); return 0; \ \ pszB = (SizeT)VALGRIND_NON_SIMD_CALL1( info.tl_malloc_usable_size, p ); \ - MALLOC_TRACE(" = %llu\n", (ULong)pszB ); \ + MALLOC_TRACE(" = %zu\n", pszB ); \ \ return pszB; \ } diff --git a/memcheck/tests/cxx17_aligned_new.stderr.exp b/memcheck/tests/cxx17_aligned_new.stderr.exp index 389bebf74..2cd04045e 100644 --- a/memcheck/tests/cxx17_aligned_new.stderr.exp +++ b/memcheck/tests/cxx17_aligned_new.stderr.exp @@ -3,26 +3,26 @@ _Znwm(4) = 0x........ _ZdlPv(0x........) _Znam(20) = 0x........ _ZdaPv(0x........) -_ZnwmSt11align_val_t(size 64, al 64) = 0x........ -_ZdlPvSt11align_val_t(0x........) -_ZnamSt11align_val_t(size 320, al 64) = 0x........ -_ZdaPvSt11align_val_t(0x........) +_ZnwmSt11align_val_t(64, 64) = 0x........ +_ZdlPvSt11align_val_t(0x........, 64) +_ZnamSt11align_val_t(320, 64) = 0x........ +_ZdaPvSt11align_val_t(0x........, 64) _Znwm(4) = 0x........ -_ZdlPvm(0x........) +_ZdlPvm(0x........, 4) _Znam(20) = 0x........ -_ZdaPvm(0x........) -_ZnwmSt11align_val_t(size 64, al 64) = 0x........ -_ZdlPvmSt11align_val_t(0x........) -_ZnamSt11align_val_t(size 320, al 64) = 0x........ -_ZdaPvmSt11align_val_t(0x........) +_ZdaPvm(0x........, 20) +_ZnwmSt11align_val_t(64, 64) = 0x........ +_ZdlPvmSt11align_val_t(0x........, 64, 64) +_ZnamSt11align_val_t(320, 64) = 0x........ +_ZdaPvmSt11align_val_t(0x........, 320, 64) _ZnwmRKSt9nothrow_t(4) = 0x........ -_ZdlPvm(0x........) +_ZdlPvm(0x........, 4) _ZnamRKSt9nothrow_t(20) = 0x........ _ZdaPv(0x........) -_ZnwmSt11align_val_tRKSt9nothrow_t(size 64, al 64) = 0x........ -_ZdlPvmSt11align_val_t(0x........) -_ZnamSt11align_val_tRKSt9nothrow_t(size 320, al 64) = 0x........ -_ZdaPvSt11align_val_t(0x........) +_ZnwmSt11align_val_tRKSt9nothrow_t(64, 64) = 0x........ +_ZdlPvmSt11align_val_t(0x........, 64, 64) +_ZnamSt11align_val_tRKSt9nothrow_t(320, 64) = 0x........ +_ZdaPvSt11align_val_t(0x........, 64) HEAP SUMMARY: in use at exit: ... bytes in ... blocks diff --git a/memcheck/tests/cxx17_aligned_new.stderr.exp_32 b/memcheck/tests/cxx17_aligned_new.stderr.exp_32 index c7239766b..e5c1debbd 100644 --- a/memcheck/tests/cxx17_aligned_new.stderr.exp_32 +++ b/memcheck/tests/cxx17_aligned_new.stderr.exp_32 @@ -3,26 +3,26 @@ _Znwj(4) = 0x........ _ZdlPv(0x........) _Znaj(20) = 0x........ _ZdaPv(0x........) -_ZnwjSt11align_val_t(size 64, al 64) = 0x........ -_ZdlPvSt11align_val_t(0x........) -_ZnajSt11align_val_t(size 320, al 64) = 0x........ -_ZdaPvSt11align_val_t(0x........) +_ZnwjSt11align_val_t(64, 64) = 0x........ +_ZdlPvSt11align_val_t(0x........, 64) +_ZnajSt11align_val_t(320, 64) = 0x........ +_ZdaPvSt11align_val_t(0x........, 64) _Znwj(4) = 0x........ -_ZdlPvj(0x........) +_ZdlPvj(0x........, 4) _Znaj(20) = 0x........ -_ZdaPvj(0x........) -_ZnwjSt11align_val_t(size 64, al 64) = 0x........ -_ZdlPvjSt11align_val_t(0x........) -_ZnajSt11align_val_t(size 320, al 64) = 0x........ -_ZdaPvjSt11align_val_t(0x........) +_ZdaPvj(0x........, 20) +_ZnwjSt11align_val_t(64, 64) = 0x........ +_ZdlPvjSt11align_val_t(0x........, 64, 64) +_ZnajSt11align_val_t(320, 64) = 0x........ +_ZdaPvjSt11align_val_t(0x........, 320, 64) _ZnwjRKSt9nothrow_t(4) = 0x........ -_ZdlPvj(0x........) +_ZdlPvj(0x........, 4) _ZnajRKSt9nothrow_t(20) = 0x........ _ZdaPv(0x........) -_ZnwjSt11align_val_tRKSt9nothrow_t(size 64, al 64) = 0x........ -_ZdlPvjSt11align_val_t(0x........) -_ZnajSt11align_val_tRKSt9nothrow_t(size 320, al 64) = 0x........ -_ZdaPvSt11align_val_t(0x........) +_ZnwjSt11align_val_tRKSt9nothrow_t(64, 64) = 0x........ +_ZdlPvjSt11align_val_t(0x........, 64, 64) +_ZnajSt11align_val_tRKSt9nothrow_t(320, 64) = 0x........ +_ZdaPvSt11align_val_t(0x........, 64) HEAP SUMMARY: in use at exit: ... bytes in ... blocks diff --git a/memcheck/tests/sized_delete.stderr.exp b/memcheck/tests/sized_delete.stderr.exp index 91bd71c38..a3da508ac 100644 --- a/memcheck/tests/sized_delete.stderr.exp +++ b/memcheck/tests/sized_delete.stderr.exp @@ -1,4 +1,4 @@ _Znwm(4) = 0x........ -_ZdlPvm(0x........) +_ZdlPvm(0x........, 4) _Znam(20) = 0x........ -_ZdaPvm(0x........) +_ZdaPvm(0x........, 20) diff --git a/memcheck/tests/sized_delete.stderr.exp-x86 b/memcheck/tests/sized_delete.stderr.exp-x86 index 1f6e9f915..2f5636d54 100644 --- a/memcheck/tests/sized_delete.stderr.exp-x86 +++ b/memcheck/tests/sized_delete.stderr.exp-x86 @@ -1,4 +1,4 @@ _Znwj(4) = 0x........ -_ZdlPvj(0x........) +_ZdlPvj(0x........, 4) _Znaj(20) = 0x........ -_ZdaPvj(0x........) +_ZdaPvj(0x........, 20) From ec0ec30b0a981748b13432ee79f07107ab50e582 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 15 Nov 2025 11:41:04 +0100 Subject: [PATCH 055/502] Darwin regtest: filter and quieten sh-mem-vec256-plo-yes/no --- memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp | 11 ----------- memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest | 3 ++- memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp | 11 ----------- memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest | 3 ++- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp index d27c1f450..981109388 100644 --- a/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp @@ -1,4 +1,3 @@ - sh-mem-vec256: config: little-endian, 64-bit word size 19543 109 126 31 206 54 112 34 102 152 335 1 36 0 23 33 @@ -877,13 +876,3 @@ dddddddddddddddddddddddddddddddU dddddddddddddddddddddddddddddddd - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 65 allocs, 65 frees, 84,096 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: 130 errors from 100 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest b/memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest index f6bcef4ab..743ede66f 100644 --- a/memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest @@ -1,4 +1,5 @@ prog: sh-mem-vec256 prereq: ../../../tests/x86_amd64_features amd64-avx args: -q -vgopts: --partial-loads-ok=no +vgopts: --partial-loads-ok=no -q +stderr_filter: filter_malloc_zone diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp index c8ce5dd25..299e09951 100644 --- a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp @@ -1,4 +1,3 @@ - sh-mem-vec256: config: little-endian, 64-bit word size 19543 109 126 31 206 54 112 34 102 152 335 1 36 0 23 33 @@ -820,13 +819,3 @@ Invalid read of size 32 dddddddddddddddddddddddddddddddd - -HEAP SUMMARY: - in use at exit: 0 bytes in 0 blocks - total heap usage: 65 allocs, 65 frees, 84,096 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: 99 errors from 99 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest index ca32d1ed8..d3acbbe6f 100644 --- a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest @@ -1,4 +1,5 @@ prog: sh-mem-vec256 prereq: ../../../tests/x86_amd64_features amd64-avx args: -q -vgopts: --partial-loads-ok=yes +vgopts: --partial-loads-ok=yes -q +stderr_filter: filter_malloc_zone From 907ddc7cc2d4083de84428f7fa3b57285f2c2c58 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 15 Nov 2025 11:35:07 +0000 Subject: [PATCH 056/502] s390x decode_bfp_rounding_mode: complete list of rounding modes. --- VEX/priv/guest_s390_helpers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c index d5e683ab2..431967e07 100644 --- a/VEX/priv/guest_s390_helpers.c +++ b/VEX/priv/guest_s390_helpers.c @@ -784,6 +784,10 @@ decode_bfp_rounding_mode(UInt irrm) case Irrm_ZERO: return S390_BFP_ROUND_ZERO; case Irrm_NEAREST_TIE_AWAY_0: return S390_BFP_ROUND_NEAREST_AWAY; case Irrm_PREPARE_SHORTER: return S390_BFP_ROUND_PREPARE_SHORT; + case Irrm_AWAY_FROM_ZERO: + case Irrm_NEAREST_TIE_TOWARD_0: + /* These cannot occur as they are DFP specific */ + break; } vpanic("decode_bfp_rounding_mode"); } From e97cbcaf599e99f30e01c58e1f23943c92f81b70 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 15 Nov 2025 12:27:27 +0000 Subject: [PATCH 057/502] s390x: Support FPC rounding mode 0b111 When get_bfp_rounding_mode_from_fpc was added Irrm_PREPARE_SHORTER was not available. The rounding mode 0x111 in the FPC was mapped to Irrm_NEAREST with fingers crossed. When Irrm_PREPARE_SHORTER was added later on it was forgotten to adjust this function. Now fixed. Comments and bfp-convert testcase adjusted. --- VEX/priv/guest_s390_toIR.c | 42 +++++++++---------------- none/tests/s390x/bfp-convert.stdout.exp | 12 +++---- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index d98802829..bc9e48259 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2518,14 +2518,15 @@ s390_V128_bitwiseITE(IRExpr* vCond, IRExpr* v1, IRExpr* v2) /* Extract the bfp rounding mode from the guest FPC reg and encode it as an IRRoundingMode: - rounding mode | s390 | IR - ------------------------- - to nearest | 00 | 00 - to zero | 01 | 11 - to +infinity | 10 | 10 - to -infinity | 11 | 01 - - So: IR = (4 - s390) & 3 + rounding mode | s390 | IR + ---------------------------- + to nearest | 000 | 000 + to zero | 001 | 011 + to +infinity | 010 | 010 + to -infinity | 011 | 001 + prepare shorter | 111 | 101 + + So: IR = (4 - s390) & (3 | s390) */ static IRExpr * get_bfp_rounding_mode_from_fpc(void) @@ -2538,29 +2539,16 @@ get_bfp_rounding_mode_from_fpc(void) extract the least significant 3 bits. */ assign(fpc_bits, binop(Iop_And32, get_fpc_w0(), mkU32(7))); - /* fixs390: - - - if (! s390_host_has_fpext && rounding_mode > 3) { - emulation warning @ runtime and - set fpc to round nearest - } - */ - - /* For now silently adjust an unsupported rounding mode to "nearest" */ - IRExpr *rm_s390 = mkite(binop(Iop_CmpLE32S, mkexpr(fpc_bits), mkU32(3)), - mkexpr(fpc_bits), - mkU32(S390_FPC_BFP_ROUND_NEAREST_EVEN)); + IRExpr *rm_s390 = mkexpr(fpc_bits); - // rm_IR = (4 - rm_s390) & 3; - return binop(Iop_And32, binop(Iop_Sub32, mkU32(4), rm_s390), mkU32(3)); + // rm_IR = (4 - rm_s390) & (3 | rm_s390); + return binop(Iop_And32, + binop(Iop_Sub32, mkU32(4), rm_s390), + binop(Iop_Or32, mkU32(3), rm_s390)); } /* Encode the s390 rounding mode as it appears in the m3 field of certain - instructions to VEX's IRRoundingMode. Rounding modes that cannot be - represented in VEX are converted to Irrm_NEAREST. The rationale is, that - Irrm_NEAREST refers to IEEE 754's roundTiesToEven which the standard - considers the default rounding mode (4.3.3). */ + instructions to VEX's IRRoundingMode. */ static IRTemp encode_bfp_rounding_mode(UChar mode) { diff --git a/none/tests/s390x/bfp-convert.stdout.exp b/none/tests/s390x/bfp-convert.stdout.exp index 91f46e900..67b34afc0 100644 --- a/none/tests/s390x/bfp-convert.stdout.exp +++ b/none/tests/s390x/bfp-convert.stdout.exp @@ -562,37 +562,37 @@ clgxbr inf cc = 3 ...setting FPC rounding mode to [-> prepare-short] ......f32 -> u32 clfebr 0.000000 cc = 0 -clfebr -0.250000 cc = 1 +clfebr -0.250000 cc = 3 clfebr 2.000000 cc = 2 clfebr nan cc = 3 clfebr inf cc = 3 ......f32 -> u64 clgebr 0.000000 cc = 0 -clgebr -0.250000 cc = 1 +clgebr -0.250000 cc = 3 clgebr 2.000000 cc = 2 clgebr nan cc = 3 clgebr inf cc = 3 ......f64 -> u32 clfdbr 0.000000 cc = 0 -clfdbr -0.250000 cc = 1 +clfdbr -0.250000 cc = 3 clfdbr 2.000000 cc = 2 clfdbr nan cc = 3 clfdbr inf cc = 3 ......f64 -> u64 clgdbr 0.000000 cc = 0 -clgdbr -0.250000 cc = 1 +clgdbr -0.250000 cc = 3 clgdbr 2.000000 cc = 2 clgdbr nan cc = 3 clgdbr inf cc = 3 ......f128 -> u32 clfxbr 0.000000 cc = 0 -clfxbr -0.250000 cc = 1 +clfxbr -0.250000 cc = 3 clfxbr 2.000000 cc = 2 clfxbr nan cc = 3 clfxbr inf cc = 3 ......f128 -> u64 clgxbr 0.000000 cc = 0 -clgxbr -0.250000 cc = 1 +clgxbr -0.250000 cc = 3 clgxbr 2.000000 cc = 2 clgxbr nan cc = 3 clgxbr inf cc = 3 From 1e2e336c14e09b90158ebb4d742c15d84a32f7fb Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 15 Nov 2025 14:31:36 +0100 Subject: [PATCH 058/502] Darwin launcher: executable path changes Fixes memcheck/tests/execve2 Merged from https://github.com/LouisBrunner/valgrind-macos.git --- coregrind/launcher-darwin.c | 56 +++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/coregrind/launcher-darwin.c b/coregrind/launcher-darwin.c index 933050617..743f7c943 100644 --- a/coregrind/launcher-darwin.c +++ b/coregrind/launcher-darwin.c @@ -64,7 +64,7 @@ static struct { MacOS X, but .. the Apple PPC descriptors refer to the BE variant, since the LE variant is something that appeared long after Apple dropped PPC. */ - { CPU_TYPE_POWERPC, "ppc", "ppc32" }, + { CPU_TYPE_POWERPC, "ppc", "ppc32" }, { CPU_TYPE_POWERPC64, "ppc64", "ppc64be" } }; static int valid_archs_count = sizeof(valid_archs)/sizeof(valid_archs[0]); @@ -156,7 +156,7 @@ static const char *select_arch( if (bytes != sizeof(buf)) { return NULL; } - + // If it's thin, return that arch. { struct mach_header *mh = (struct mach_header *)buf; @@ -182,7 +182,7 @@ static const char *select_arch( if (fat_has_cputype(fh, default_cputype)) { return default_arch; } - + // Scan fat headers for any supported arch. for (i = 0; i < valid_archs_count; i++) { if (fat_has_cputype(fh, valid_archs[i].cputype)) { @@ -191,7 +191,7 @@ static const char *select_arch( } } } - + return NULL; } @@ -210,6 +210,7 @@ int main(int argc, char** argv, char** envp) const char *default_arch; cpu_type_t default_cputype; char *toolfile; + char* executable_path; char launcher_name[PATH_MAX+1]; char* new_line; char* set_cwd; @@ -218,7 +219,7 @@ int main(int argc, char** argv, char** envp) char **new_argv; int new_argc; - /* Start the debugging-log system ASAP. First find out how many + /* Start the debugging-log system ASAP. First find out how many "-d"s were specified. This is a pre-scan of the command line. At the same time, look for the tool name. */ loglevel = 0; @@ -235,9 +236,9 @@ int main(int argc, char** argv, char** envp) } break; } - if (0 == strcmp(argv[i], "-d")) + if (0 == strcmp(argv[i], "-d")) loglevel++; - if (0 == strncmp(argv[i], "--tool=", 7)) + if (0 == strncmp(argv[i], "--tool=", 7)) toolname = argv[i] + 7; if (0 == strncmp(argv[i], "--arch=", 7)) archname = argv[i] + 7; @@ -251,7 +252,7 @@ int main(int argc, char** argv, char** envp) if (toolname) { VG_(debugLog)(1, "launcher", "tool '%s' requested\n", toolname); } else { - VG_(debugLog)(1, "launcher", + VG_(debugLog)(1, "launcher", "no tool requested, defaulting to 'memcheck'\n"); toolname = "memcheck"; } @@ -296,14 +297,14 @@ int main(int argc, char** argv, char** envp) free(vgpreload_core); } - /* Find the "default" arch (VGCONF_ARCH_PRI from configure). + /* Find the "default" arch (VGCONF_ARCH_PRI from configure). This is the preferred arch from fat files and the fallback. */ default_arch = NULL; default_cputype = 0; for (i = 0; i < valid_archs_count; i++) { if (!valid_archs[i].cputype) continue; - if (0 == strncmp(VG_PLATFORM, valid_archs[i].valgrind_name, - strlen(valid_archs[i].valgrind_name))) + if (0 == strncmp(VG_PLATFORM, valid_archs[i].valgrind_name, + strlen(valid_archs[i].valgrind_name))) { default_arch = valid_archs[i].valgrind_name; default_cputype = valid_archs[i].cputype; @@ -319,7 +320,7 @@ int main(int argc, char** argv, char** envp) // --arch from command line arch = NULL; for (i = 0; i < valid_archs_count; i++) { - if (0 == strcmp(archname, valid_archs[i].apple_name) || + if (0 == strcmp(archname, valid_archs[i].apple_name) || 0 == strcmp(archname, valid_archs[i].valgrind_name)) { arch = valid_archs[i].valgrind_name; @@ -328,28 +329,28 @@ int main(int argc, char** argv, char** envp) } if (i == valid_archs_count) barf("Unknown --arch '%s'", archname); assert(NULL != arch); - VG_(debugLog)(1, "launcher", "using arch '%s' from --arch=%s\n", + VG_(debugLog)(1, "launcher", "using arch '%s' from --arch=%s\n", arch, archname); - } + } else if (clientname == NULL) { // no client executable; use default as fallback - VG_(debugLog)(1, "launcher", + VG_(debugLog)(1, "launcher", "no client specified, defaulting arch to '%s'\n", default_arch); arch = default_arch; - } + } else if ((arch = select_arch(clientname, default_cputype,default_arch))) { // arch from client executable VG_(debugLog)(1, "launcher", "selected arch '%s'\n", arch); - } + } else { // nothing found in client executable; use default as fallback - VG_(debugLog)(1, "launcher", + VG_(debugLog)(1, "launcher", "no arch detected, defaulting arch to '%s'\n", default_arch); arch = default_arch; } - + cwd = getcwd(NULL, 0); if (!cwd) barf("Current directory no longer exists."); @@ -357,28 +358,35 @@ int main(int argc, char** argv, char** envp) we can tell stage2. stage2 will use the name for recursive invocations of valgrind on child processes. */ memset(launcher_name, 0, PATH_MAX+1); - for (i = 0; envp[i]; i++) + for (i = 0; envp[i]; i++) ; /* executable path is after last envp item */ /* envp[i] == NULL ; envp[i+1] == executable_path */ - if (envp[i+1][0] != '/') { + executable_path = envp[i+1]; + /* Since macOS 10.14.6, executable_path is prefixed by "executable_path=", + like an environment list */ + if (strlen(executable_path) > 16 && strncmp(executable_path, "executable_path=", 16) == 0) { + executable_path = &executable_path[16]; + } + if (executable_path[0] != '/') { strcpy(launcher_name, cwd); strcat(launcher_name, "/"); } - if (strlen(launcher_name) + strlen(envp[i+1]) > PATH_MAX) + if (strlen(launcher_name) + strlen(executable_path) > PATH_MAX) barf("launcher path is too long"); - strcat(launcher_name, envp[i+1]); + strcat(launcher_name, executable_path); VG_(debugLog)(1, "launcher", "launcher_name = %s\n", launcher_name); /* tediously augment the env: VALGRIND_LAUNCHER=launcher_name */ asprintf(&new_line, VALGRIND_LAUNCHER "=%s", launcher_name); /* tediously augment the env: VALGRIND_STARTUP_PWD_%PID_XYZZY=current_working_dir */ - asprintf(&set_cwd, "VALGRIND_STARTUP_PWD_%u_XYZZY=%s", getppid(), cwd); + asprintf(&set_cwd, "VALGRIND_STARTUP_PWD_%d_XYZZY=%s", getppid(), cwd); // Note that Apple binaries get a secret fourth arg, "char* apple", which // contains the executable path. Don't forget about it. for (j = 0; envp[j]; j++) ; + // 4 includes VALGRIND_LAUNCHER, VALGRIND_STARTUP_PWD, NULL and executable_path new_env = malloc((j+4) * sizeof(char*)); if (new_env == NULL) barf("malloc of new_env failed."); From 5f32997518ce3cbc116ec7159fbd50c0ffb1eaa4 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 16 Nov 2025 08:44:45 +0100 Subject: [PATCH 059/502] Linux syscall wrappers: remove some quotes from parameter names The PRE_REG_READX macros already textify the argument names so there are no need for quotes. For consistency I've removed them here. --- coregrind/m_syswrap/syswrap-linux.c | 18 +++++++++--------- .../tests/linux/sys-copy_file_range.stderr.exp | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 0105fb98f..4db8743dd 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -13805,12 +13805,12 @@ PRE(sys_copy_file_range) ARG4, ARG5, ARG6); PRE_REG_READ6(vki_size_t, "copy_file_range", - int, "fd_in", - vki_loff_t *, "off_in", - int, "fd_out", - vki_loff_t *, "off_out", - vki_size_t, "len", - unsigned int, "flags"); + int, fd_in, + vki_loff_t *, off_in, + int, fd_out, + vki_loff_t *, off_out, + vki_size_t, len, + unsigned int, flags); /* File descriptors are "specially" tracked by valgrind. valgrind itself uses some, so make sure someone didn't @@ -13833,8 +13833,8 @@ PRE(sys_pkey_alloc) PRINT("pkey_alloc (%lu, %lu)", ARG1, ARG2); PRE_REG_READ2(long, "pkey_alloc", - unsigned long, "flags", - unsigned long, "access_rights"); + unsigned long, flags, + unsigned long, access_rights); /* The kernel says: pkey_alloc() is always safe to call regardless of whether or not the operating system supports protection keys. It can be @@ -13857,7 +13857,7 @@ PRE(sys_pkey_free) PRINT("pkey_free (%" FMT_REGWORD "u )", ARG1); PRE_REG_READ1(long, "pkey_free", - unsigned long, "pkey"); + unsigned long, pkey); /* Since pkey_alloc () can never succeed, see above, freeing any pkey is always an error. */ diff --git a/memcheck/tests/linux/sys-copy_file_range.stderr.exp b/memcheck/tests/linux/sys-copy_file_range.stderr.exp index 1aa4dc204..28b372028 100644 --- a/memcheck/tests/linux/sys-copy_file_range.stderr.exp +++ b/memcheck/tests/linux/sys-copy_file_range.stderr.exp @@ -1,5 +1,5 @@ -Syscall param copy_file_range("off_in") contains uninitialised byte(s) +Syscall param copy_file_range(off_in) contains uninitialised byte(s) ... by 0x........: main (sys-copy_file_range.c:57) From fafb6efd4bbd073b3c8a0945bac7aa6ad8358666 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 16 Nov 2025 17:41:31 +0000 Subject: [PATCH 060/502] Linux arm regtest: add another leak suppression and broaden filter --- none/tests/fdleak_cmsg_supp.supp | 8 ++++++++ none/tests/filter_fdleak | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/none/tests/fdleak_cmsg_supp.supp b/none/tests/fdleak_cmsg_supp.supp index 7312f6986..b82a314b3 100644 --- a/none/tests/fdleak_cmsg_supp.supp +++ b/none/tests/fdleak_cmsg_supp.supp @@ -103,3 +103,11 @@ fun:main } +{ + sup11 + CoreError:FdNotClosed + fun:__recvmsg64 + fun:client + fun:main +} + diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index 2cc537df7..0de7184b1 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -29,7 +29,7 @@ sed '/__open/d' | sed 's/__systemcall6/creat/' | # arm systems substitute open for creat -perl -p -e 's/open \(open64\.c:[1-9][0-9]*\)/creat (in \/...libc...)/' | +perl -p -e 's/open(?:64)? \(open64\.c:[1-9][0-9]*\)/creat (in \/...libc...)/' | perl -p -e "s/: open \(/: creat (/" | # arm64 write resolved to file:line with debuginfo perl -p -e "s/write\.c:[1-9][0-9]*/in \/...libc.../" | From 88f69009b155c5c7d8b904e0b46e1d3e57b09314 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 19 Nov 2025 09:00:54 +0100 Subject: [PATCH 061/502] Darwin macho debuginfo: fix RW load count Was counting all RW loads. However, load_thing_file() has the extra requirement that the filesize be greater than 0. If the filesize is 0 then an anon map gets done and the associated segment doesn't get flagged as being RW. Also add the prot value to the macho load_segment mmap traces. This fixes memcheck/tests/static_malloc --- coregrind/m_debuginfo/readmacho.c | 4 ++-- coregrind/m_ume/macho.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index 48ef5aaf5..f75726f55 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -140,8 +140,8 @@ Bool ML_(check_macho_and_get_rw_loads)( Int fd, Int* rw_loads ) for (unsigned int i = 0U; i < mh->ncmds; ++i) { if (lc->cmd == LC_SEGMENT_CMD) { const struct SEGMENT_COMMAND* sc = (const struct SEGMENT_COMMAND*)lc; - if (sc->initprot == 3) { - ++*rw_loads; + if (sc->initprot == 3 && sc->filesize) { + ++*rw_loads; } } const char* tmp = (const char*)lc + lc->cmdsize; diff --git a/coregrind/m_ume/macho.c b/coregrind/m_ume/macho.c index ec7257084..239b7fc02 100644 --- a/coregrind/m_ume/macho.c +++ b/coregrind/m_ume/macho.c @@ -243,7 +243,7 @@ load_segment(int fd, vki_off_t offset, vki_off_t size, vmsize = VG_PGROUNDUP(segcmd->vmsize); if (filesize > 0) { addr = slided_addr; - VG_(debugLog)(2, "ume", "mmap fixed (file) (%#lx, %lu)\n", addr, filesize); + VG_(debugLog)(2, "ume", "mmap fixed (file) (%#lx, %lu, %x)\n", addr, filesize, prot); res = VG_(am_mmap_named_file_fixed_client)(addr, filesize, prot, fd, offset + segcmd->fileoff, filename); @@ -260,7 +260,7 @@ load_segment(int fd, vki_off_t offset, vki_off_t size, // page-aligned part SizeT length = vmsize - filesize; addr = (Addr)(filesize + slided_addr); - VG_(debugLog)(2, "ume", "mmap fixed (anon) (%#lx, %lu)\n", addr, length); + VG_(debugLog)(2, "ume", "mmap fixed (anon) (%#lx, %lu, %u)\n", addr, length, prot); res = VG_(am_mmap_anon_fixed_client)(addr, length, prot); check_mmap(res, addr, length, "load_segment2"); } From b640fa64b899af41038c24d2da5989dd6eaa9015 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 19 Nov 2025 13:27:51 +0000 Subject: [PATCH 062/502] s390: Set min. required machine model to z196. (BZ 509562) Bail out if machine is too old. This is the 1st installment of a series of patches raising the min. required machine model to z196. Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- README.s390 | 4 +--- coregrind/m_machine.c | 6 ++++++ coregrind/m_main.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.s390 b/README.s390 index d2236d29f..3ff9bc64a 100644 --- a/README.s390 +++ b/README.s390 @@ -2,9 +2,7 @@ Requirements ------------ - You need GCC 3.4 or later to compile the s390 port. -- To run valgrind a z10 machine or any later model is recommended. - Older machine models down to and including z990 may work but have - not been tested extensively. +- Valgrind requires a machine not older than z196 to run. Limitations diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 9c19b30eb..1bb6cd120 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1541,6 +1541,12 @@ Bool VG_(machine_get_hwcaps)( void ) identification yet. Keeping fingers crossed. */ model = VG_(get_machine_model)(); + if (model < VEX_S390X_MODEL_Z196) { + VG_(message)(Vg_FailMsg, "Your machine is too old. " + "You need at least a z196 to run valgrind.\n"); + VG_(exit)(1); + } + /* Unblock SIGILL and stash away the old action for that signal */ VG_(sigemptyset)(&tmp_set); VG_(sigaddset)(&tmp_set, VKI_SIGILL); diff --git a/coregrind/m_main.c b/coregrind/m_main.c index e1bfae2b5..ce8a7ae6a 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -1530,7 +1530,7 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) VG_(printf)(" * ARM (armv7)\n"); VG_(printf)(" * MIPS (mips32 and above; mips64 and above)\n"); VG_(printf)(" * PowerPC (most; ppc405 and above)\n"); - VG_(printf)(" * System z (64bit only - s390x; z990 and above)\n"); + VG_(printf)(" * System z (64bit only - s390x; z196 and above)\n"); VG_(printf)("\n"); VG_(exit)(1); } From 3a1a378eec4e20fa483f32ca0efae364e3d92900 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 19 Nov 2025 14:26:15 +0000 Subject: [PATCH 063/502] s390: Code cleanup due to availability of ECAG insn. (BZ 509562) Remove EmFail_S390X_ecag Remove none/tests/s390x/ecag.stdout.exp-z10ec because z10-EC predates Z196 Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- README.s390 | 3 --- VEX/priv/guest_s390_toIR.c | 6 +---- VEX/priv/main_main.c | 2 -- VEX/pub/libvex_emnote.h | 3 --- cachegrind/cg_arch.c | 32 ++++---------------------- coregrind/m_cache.c | 5 ---- none/tests/s390x/ecag.stdout.exp-z10ec | 21 ----------------- none/tests/s390x/ecag.vgtest | 1 - 8 files changed, 5 insertions(+), 68 deletions(-) delete mode 100644 none/tests/s390x/ecag.stdout.exp-z10ec diff --git a/README.s390 b/README.s390 index 3ff9bc64a..d0661731c 100644 --- a/README.s390 +++ b/README.s390 @@ -15,9 +15,6 @@ Limitations `docs/internals/s390-opcodes.csv', by grepping for "not implemented". - FP signalling is not accurate. E.g., the "compare and signal" instructions behave like their non-signalling counterparts. -- On machine models predating z10, cachegrind will assume a z10 cache - architecture. Otherwise, cachegrind will query the hosts cache system - and use those parameters. - Some gcc versions use mvc to copy 4/8 byte values. This will affect certain debug messages. For example, memcheck will complain about 4 one-byte reads/writes instead of just a single read/write. diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index bc9e48259..7915b2575 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -16797,11 +16797,7 @@ s390_call_ecag(IRExpr *op2addr) static const HChar * s390_irgen_ECAG(UChar r1, UChar r3 __attribute__((unused)), IRTemp op2addr) { - if (! s390_host_has_gie) { - emulation_failure(EmFail_S390X_ecag); - } else { - put_gpr_dw0(r1, s390_call_ecag(mkexpr(op2addr))); - } + put_gpr_dw0(r1, s390_call_ecag(mkexpr(op2addr))); return "ecag"; } diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 08e4587f1..6098e3c95 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1553,8 +1553,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) return "Instruction stfle is not supported on this host"; case EmFail_S390X_stckf: return "Instruction stckf is not supported on this host"; - case EmFail_S390X_ecag: - return "Instruction ecag is not supported on this host"; case EmFail_S390X_pfpo: return "Instruction pfpo is not supported on this host"; case EmFail_S390X_DFP_insn: diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 331c1b603..9557663fa 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -105,9 +105,6 @@ typedef /* stckf insn is not supported on this host */ EmFail_S390X_stckf, - /* ecag insn is not supported on this host */ - EmFail_S390X_ecag, - /* pfpo insn is not supported on this host */ EmFail_S390X_pfpo, diff --git a/cachegrind/cg_arch.c b/cachegrind/cg_arch.c index f877f95c7..ea95aa7f1 100644 --- a/cachegrind/cg_arch.c +++ b/cachegrind/cg_arch.c @@ -435,34 +435,10 @@ configure_caches(cache_t *I1c, cache_t *D1c, cache_t *LLc, *LLc = (cache_t) { 262144, 8, 64 }; #elif defined(VGA_s390x) - // - // Here is the cache data from older machine models: - // - // I1 D1 I/D L2 - // z900 256k/256/4 256k/256/4 16MB - // z800 256k/256/4 256k/256/4 8MB - // z990 256k/256/4 256k/256/4 32MB - // z890 256k/256/4 256k/256/4 32MB - // z9 256k/256/4 256k/256/4 40MB - // - // Sources: - // (1) IBM System z9 109 Technical Introduction - // www.redbooks.ibm.com/redbooks/pdfs/sg246669.pdf - // (2) The microarchitecture of the IBM eServer z900 processor - // IBM Journal of Research and Development - // Volume 46, Number 4/5, pp 381-395, July/September 2002 - // (3) The IBM eServer z990 microprocessor - // IBM Journal of Research and Development - // Volume 48, Number 3/4, pp 295-309, May/July 2004 - // (4) Charles Webb, IBM - // - // L2 data is unfortunately incomplete. Otherwise, we could support - // machines without the ECAG insn by looking at VEX_S390X_MODEL(hwcaps). - - // Default cache configuration is z10-EC (Source: ECAG insn) - *I1c = (cache_t) { 65536, 4, 256 }; - *D1c = (cache_t) { 131072, 8, 256 }; - *LLc = (cache_t) { 50331648, 24, 256 }; + + // Should never get here as the min. required machine model can + // query cache information via the ECAG insn. + tl_assert(0); #elif defined(VGA_mips32) || defined(VGA_nanomips) diff --git a/coregrind/m_cache.c b/coregrind/m_cache.c index fd6f801c1..2777f8c6f 100644 --- a/coregrind/m_cache.c +++ b/coregrind/m_cache.c @@ -614,11 +614,6 @@ get_cache_info(VexArchInfo *vai) ci->icaches_maintain_coherence = True; - if (! (vai->hwcaps & VEX_HWCAPS_S390X_GIE)) { - // ECAG is not available - return False; - } - UInt level, cache_kind, info, i; ULong topology = ecag(0, 0, 0); // get summary diff --git a/none/tests/s390x/ecag.stdout.exp-z10ec b/none/tests/s390x/ecag.stdout.exp-z10ec deleted file mode 100644 index 13e78550e..000000000 --- a/none/tests/s390x/ecag.stdout.exp-z10ec +++ /dev/null @@ -1,21 +0,0 @@ -L1 topology: separate data and instruction; private -L1 cache line size data: 256 -L1 cache line size insn: 256 -L1 total cachesize data: 131072 -L1 total cachesize insn: 65536 -L1 set. assoc. data: 8 -L1 set. assoc. insn: 4 -L2 topology: unified data and instruction; private -L2 cache line size data: 256 -L2 cache line size insn: 256 -L2 total cachesize data: 3145728 -L2 total cachesize insn: 3145728 -L2 set. assoc. data: 12 -L2 set. assoc. insn: 12 -L3 topology: unified data and instruction; shared -L3 cache line size data: 256 -L3 cache line size insn: 256 -L3 total cachesize data: 50331648 -L3 total cachesize insn: 50331648 -L3 set. assoc. data: 24 -L3 set. assoc. insn: 24 diff --git a/none/tests/s390x/ecag.vgtest b/none/tests/s390x/ecag.vgtest index f4abb7766..610e3f39e 100644 --- a/none/tests/s390x/ecag.vgtest +++ b/none/tests/s390x/ecag.vgtest @@ -1,2 +1 @@ -prereq: ../../../tests/s390x_features s390x-genins prog: ecag From 009022b182aafe21b9b6e454a71fae1b98980ca2 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 20 Nov 2025 02:17:18 +0100 Subject: [PATCH 064/502] none/tests/s390x/Makefile.am (EXTRA_DIST): Remove ecag.stdout.exp-z10ec Fixes: 3a1a378eec4e ("s390: Code cleanup due to availability of ECAG insn") --- none/tests/s390x/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index dda923acc..8ce7e048b 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -46,7 +46,7 @@ EXTRA_DIST = \ bfp-tdc.vgtest bfp-tdc.stdout.exp bfp-tdc.stderr.exp \ bfp-emit.vgtest bfp-emit.stderr.exp bfp-emit.post.exp \ bfp-XxC.vgtest bfp-XxC.stderr.exp bfp-XxC.post.exp \ - ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \ + ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \ ecag.stdout.exp-z16 ecag.stdout.exp-z17 \ op00.stderr.exp op00.vgtest \ From 62765e96f9283f87c550683cc0918b362a6b1249 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 20 Nov 2025 13:53:12 +0100 Subject: [PATCH 065/502] Darwin traces: add a "Reading syms from [filename]" message Makes comparison with ELF loading easier --- coregrind/m_debuginfo/readmacho.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index f75726f55..31f56134d 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -781,6 +781,10 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) di->text_bias = 0; + if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir)) + VG_(message)(Vg_DebugMsg, "Reading syms from %s\n", + di->fsm.filename ); + { DiCursor cmd_cur = ML_(cur_from_sli)(msli); From d254814f3fb48a4da214ad516555505489be8932 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 20 Nov 2025 23:06:31 +0000 Subject: [PATCH 066/502] s390: Code cleanup due to availability of STCKF insn. (BZ 509562) Remove EmFail_S390X_ecag, s390_host_has_stckf, and VEX_HWCAPS_S390X_STCKF. Update none/tests/s390x/stckf.vgtest and tests/s390x_features.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- VEX/priv/guest_s390_toIR.c | 22 +++++++++------------- VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 3 --- VEX/pub/libvex.h | 2 -- VEX/pub/libvex_emnote.h | 3 --- coregrind/m_machine.c | 1 - none/tests/s390x/stckf.vgtest | 1 - tests/s390x_features.c | 2 -- 8 files changed, 9 insertions(+), 27 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 7915b2575..7df56428e 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -15792,20 +15792,16 @@ s390_irgen_STCK(IRTemp op2addr) static const HChar * s390_irgen_STCKF(IRTemp op2addr) { - if (! s390_host_has_stckf) { - emulation_failure(EmFail_S390X_stckf); - } else { - IRTemp cc = newTemp(Ity_I64); + IRTemp cc = newTemp(Ity_I64); - IRDirty *d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_STCKF", - &s390x_dirtyhelper_STCKF, - mkIRExprVec_1(mkexpr(op2addr))); - d->mFx = Ifx_Write; - d->mAddr = mkexpr(op2addr); - d->mSize = 8; - stmt(IRStmt_Dirty(d)); - s390_cc_set(cc); - } + IRDirty *d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_STCKF", + &s390x_dirtyhelper_STCKF, + mkIRExprVec_1(mkexpr(op2addr))); + d->mFx = Ifx_Write; + d->mAddr = mkexpr(op2addr); + d->mSize = 8; + stmt(IRStmt_Dirty(d)); + s390_cc_set(cc); return "stckf"; } diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 3de079e83..fdcc199c6 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -934,8 +934,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_STFLE)) #define s390_host_has_etf3 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF3)) -#define s390_host_has_stckf \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_STCKF)) #define s390_host_has_fpext \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_FPEXT)) #define s390_host_has_lsc \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 6098e3c95..8f3ab8945 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1551,8 +1551,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) " IEEE-invalid-operation exceptions will not be suppressed."; case EmFail_S390X_stfle: return "Instruction stfle is not supported on this host"; - case EmFail_S390X_stckf: - return "Instruction stckf is not supported on this host"; case EmFail_S390X_pfpo: return "Instruction pfpo is not supported on this host"; case EmFail_S390X_DFP_insn: @@ -1933,7 +1931,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_STFLE, "stfle" }, { VEX_HWCAPS_S390X_ETF2, "etf2" }, { VEX_HWCAPS_S390X_ETF3, "etf3" }, - { VEX_HWCAPS_S390X_STCKF, "stckf" }, { VEX_HWCAPS_S390X_FPEXT, "fpext" }, { VEX_HWCAPS_S390X_LSC, "lsc" }, { VEX_HWCAPS_S390X_PFPO, "pfpo" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 0be6deb82..a1eb48f41 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -170,7 +170,6 @@ typedef #define VEX_HWCAPS_S390X_ETF2 (1<<11) /* ETF2-enhancement facility */ #define VEX_HWCAPS_S390X_STFLE (1<<12) /* STFLE facility */ #define VEX_HWCAPS_S390X_ETF3 (1<<13) /* ETF3-enhancement facility */ -#define VEX_HWCAPS_S390X_STCKF (1<<14) /* STCKF facility */ #define VEX_HWCAPS_S390X_FPEXT (1<<15) /* Floating point extension facility */ #define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ #define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ @@ -195,7 +194,6 @@ typedef VEX_HWCAPS_S390X_DFP | \ VEX_HWCAPS_S390X_FGX | \ VEX_HWCAPS_S390X_STFLE | \ - VEX_HWCAPS_S390X_STCKF | \ VEX_HWCAPS_S390X_FPEXT | \ VEX_HWCAPS_S390X_LSC | \ VEX_HWCAPS_S390X_ETF3 | \ diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 9557663fa..fa6c5bf5c 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -102,9 +102,6 @@ typedef /* stfle insn is not supported on this host */ EmFail_S390X_stfle, - /* stckf insn is not supported on this host */ - EmFail_S390X_stckf, - /* pfpo insn is not supported on this host */ EmFail_S390X_pfpo, diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 1bb6cd120..6729e57c6 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1635,7 +1635,6 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 24, VEX_HWCAPS_S390X_ETF2, "ETF2" }, { False, 7, VEX_HWCAPS_S390X_STFLE, "STFLE" }, { False, 30, VEX_HWCAPS_S390X_ETF3, "ETF3" }, - { False, 25, VEX_HWCAPS_S390X_STCKF, "STCKF" }, { False, 37, VEX_HWCAPS_S390X_FPEXT, "FPEXT" }, { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, diff --git a/none/tests/s390x/stckf.vgtest b/none/tests/s390x/stckf.vgtest index c16fbff19..4d9484182 100644 --- a/none/tests/s390x/stckf.vgtest +++ b/none/tests/s390x/stckf.vgtest @@ -1,2 +1 @@ prog:stckf -prereq: ../../../tests/s390x_features s390x-stckf diff --git a/tests/s390x_features.c b/tests/s390x_features.c index e0d4de76c..625984dbb 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -250,8 +250,6 @@ static int go(char *feature, char *cpu) match = (facilities[0] & FAC_BIT(18)) && (facilities[0] & FAC_BIT(19)); } else if (strcmp(feature, "s390x-eimm") == 0 ) { match = facilities[0] & FAC_BIT(21); - } else if (strcmp(feature, "s390x-stckf") == 0 ) { - match = facilities[0] & FAC_BIT(25); } else if (strcmp(feature, "s390x-genins") == 0 ) { match = facilities[0] & FAC_BIT(34); } else if (strcmp(feature, "s390x-exrl") == 0 ) { From 346881fb0afa5edebaaae3a7c595ed2672b551eb Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 21 Nov 2025 15:51:53 +0000 Subject: [PATCH 067/502] s390: long displacement facility related cleanups (BZ 509562) The long displacement facilities are always present on the supported machines. - Remove s390_host_has_ldisp and VEX_HWCAPS_S390X_LDISP - Update tests/s390x_features.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 4 ---- VEX/pub/libvex.h | 4 +--- coregrind/m_machine.c | 20 +------------------- none/tests/libvex_test.c | 2 +- tests/s390x_features.c | 2 -- 6 files changed, 3 insertions(+), 31 deletions(-) diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index fdcc199c6..8fc1a94b9 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_ldisp \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_LDISP)) #define s390_host_has_eimm \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_EIMM)) #define s390_host_has_gie \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 8f3ab8945..c40e642b9 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1923,7 +1923,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) UInt hwcaps_bit; HChar name[6]; } hwcaps_list[] = { - { VEX_HWCAPS_S390X_LDISP, "ldisp" }, { VEX_HWCAPS_S390X_EIMM, "eimm" }, { VEX_HWCAPS_S390X_GIE, "gie" }, { VEX_HWCAPS_S390X_DFP, "dfp" }, @@ -2298,9 +2297,6 @@ static void check_hwcaps ( VexArch arch, UInt hwcaps ) } case VexArchS390X: - if (! s390_host_has_ldisp) - invalid_hwcaps(arch, hwcaps, - "Host does not have long displacement facility.\n"); return; case VexArchMIPS32: diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index a1eb48f41..a3345af5b 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_LDISP (1<<6) /* Long-displacement facility */ #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_DFP (1<<9) /* Decimal floating point facility */ @@ -188,8 +187,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_LDISP | \ - VEX_HWCAPS_S390X_EIMM | \ +#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_EIMM | \ VEX_HWCAPS_S390X_GIE | \ VEX_HWCAPS_S390X_DFP | \ VEX_HWCAPS_S390X_FGX | \ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 6729e57c6..73dfaf8ea 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1533,7 +1533,7 @@ Bool VG_(machine_get_hwcaps)( void ) vki_sigaction_fromK_t saved_sigill_act; vki_sigaction_toK_t tmp_sigill_act; - volatile Bool have_LDISP, have_STFLE; + volatile Bool have_STFLE; Int i, r, model; /* If the model is "unknown" don't treat this as an error. Assume @@ -1570,17 +1570,6 @@ Bool VG_(machine_get_hwcaps)( void ) /* Determine hwcaps. Note, we cannot use the stfle insn because it is not supported on z900. */ - have_LDISP = True; - if (VG_MINIMAL_SETJMP(env_unsup_insn)) { - have_LDISP = False; - } else { - /* BASR loads the address of the next insn into r1. Needed to avoid - a segfault in XY. */ - __asm__ __volatile__("basr %%r1,%%r0\n\t" - ".long 0xe3001000\n\t" /* XY 0,0(%r1) */ - ".short 0x0057" : : : "r0", "r1", "cc", "memory"); - } - /* Check availability of STFLE. If available store facility bits in hoststfle. */ ULong hoststfle[S390_NUM_FACILITY_DW]; @@ -1610,12 +1599,6 @@ Bool VG_(machine_get_hwcaps)( void ) vai.hwcaps = model; if (have_STFLE) vai.hwcaps |= VEX_HWCAPS_S390X_STFLE; - if (have_LDISP) { - /* Use long displacement only on machines >= z990. For all other - machines it is millicoded and therefore slow. */ - if (model >= VEX_S390X_MODEL_Z990) - vai.hwcaps |= VEX_HWCAPS_S390X_LDISP; - } /* Detect presence of certain facilities using the STFLE insn. Note, that these facilities were introduced at the same time or later @@ -1627,7 +1610,6 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, 18, VEX_HWCAPS_S390X_LDISP, "LDISP" }, { False, 21, VEX_HWCAPS_S390X_EIMM, "EIMM" }, { False, 34, VEX_HWCAPS_S390X_GIE, "GIE" }, { False, 42, VEX_HWCAPS_S390X_DFP, "DFP" }, diff --git a/none/tests/libvex_test.c b/none/tests/libvex_test.c index 6a8086ace..b56e9cbd6 100644 --- a/none/tests/libvex_test.c +++ b/none/tests/libvex_test.c @@ -131,7 +131,7 @@ static UInt arch_hwcaps (VexArch va) { case VexArchARM64: return 0; case VexArchPPC32: return 0; case VexArchPPC64: return 0; - case VexArchS390X: return VEX_HWCAPS_S390X_LDISP; + case VexArchS390X: return 0; #if (__mips_isa_rev>=6) case VexArchMIPS32: return VEX_PRID_COMP_MIPS | VEX_MIPS_CPU_ISA_M32R6 | VEX_MIPS_HOST_FR; diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 625984dbb..cad158853 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -246,8 +246,6 @@ static int go(char *feature, char *cpu) match = facilities[0] & FAC_BIT(0); } else if (strcmp(feature, "s390x-stfle") == 0 ) { match = facilities[0] & FAC_BIT(7); - } else if (strcmp(feature, "s390x-ldisp") == 0 ) { - match = (facilities[0] & FAC_BIT(18)) && (facilities[0] & FAC_BIT(19)); } else if (strcmp(feature, "s390x-eimm") == 0 ) { match = facilities[0] & FAC_BIT(21); } else if (strcmp(feature, "s390x-genins") == 0 ) { From 1bd977bff8a394600fa532e5ab71d6b5ffe9f3c9 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 21 Nov 2025 16:54:13 +0000 Subject: [PATCH 068/502] s390: STFLE related cleanups (BZ 509562) The STFLE insn is always present on the supported machines. - Remove s390_host_has_stfle, VEX_HWCAPS_S390X_STFLE, and EmFail_S390X_stfle - Update tests/s390x_features.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- VEX/priv/guest_s390_toIR.c | 4 --- VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 3 -- VEX/pub/libvex.h | 2 -- VEX/pub/libvex_emnote.h | 3 -- coregrind/m_machine.c | 53 ++++------------------------------- none/tests/s390x/stfle.vgtest | 1 - tests/s390x_features.c | 23 ++------------- 8 files changed, 9 insertions(+), 82 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 7df56428e..5693fd9c1 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -15825,10 +15825,6 @@ s390_irgen_STCKE(IRTemp op2addr) static const HChar * s390_irgen_STFLE(UChar b2, UShort d2) { - if (! s390_host_has_stfle) { - emulation_failure(EmFail_S390X_stfle); - return "stfle"; - } extension(S390_EXT_STFLE, b2 | (d2 << 8)); return "stfle"; } diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 8fc1a94b9..eaf8a29bf 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -928,8 +928,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_FGX)) #define s390_host_has_etf2 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF2)) -#define s390_host_has_stfle \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_STFLE)) #define s390_host_has_etf3 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF3)) #define s390_host_has_fpext \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index c40e642b9..917411558 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1549,8 +1549,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_stfle: - return "Instruction stfle is not supported on this host"; case EmFail_S390X_pfpo: return "Instruction pfpo is not supported on this host"; case EmFail_S390X_DFP_insn: @@ -1927,7 +1925,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_GIE, "gie" }, { VEX_HWCAPS_S390X_DFP, "dfp" }, { VEX_HWCAPS_S390X_FGX, "fgx" }, - { VEX_HWCAPS_S390X_STFLE, "stfle" }, { VEX_HWCAPS_S390X_ETF2, "etf2" }, { VEX_HWCAPS_S390X_ETF3, "etf3" }, { VEX_HWCAPS_S390X_FPEXT, "fpext" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index a3345af5b..46001f105 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -167,7 +167,6 @@ typedef #define VEX_HWCAPS_S390X_DFP (1<<9) /* Decimal floating point 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_STFLE (1<<12) /* STFLE facility */ #define VEX_HWCAPS_S390X_ETF3 (1<<13) /* ETF3-enhancement facility */ #define VEX_HWCAPS_S390X_FPEXT (1<<15) /* Floating point extension facility */ #define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ @@ -191,7 +190,6 @@ typedef VEX_HWCAPS_S390X_GIE | \ VEX_HWCAPS_S390X_DFP | \ VEX_HWCAPS_S390X_FGX | \ - VEX_HWCAPS_S390X_STFLE | \ VEX_HWCAPS_S390X_FPEXT | \ VEX_HWCAPS_S390X_LSC | \ VEX_HWCAPS_S390X_ETF3 | \ diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index fa6c5bf5c..ea452970a 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -99,9 +99,6 @@ typedef in VEX and is expected to be zero. */ EmWarn_S390X_XiC_not_zero, - /* stfle insn is not supported on this host */ - EmFail_S390X_stfle, - /* pfpo insn is not supported on this host */ EmFail_S390X_pfpo, diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 73dfaf8ea..711538c07 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -513,10 +513,10 @@ Int VG_(machine_arm_archlevel) = 4; #endif -/* For hwcaps detection on ppc32/64, s390x, and arm we'll need to do SIGILL +/* For hwcaps detection on ppc32/64, mips and arm we'll need to do SIGILL testing, so we need a VG_MINIMAL_JMP_BUF. */ #if defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le) \ - || defined(VGA_arm) || defined(VGA_s390x) || defined(VGA_mips32) \ + || defined(VGA_arm) || defined(VGA_mips32) \ || defined(VGA_mips64) || defined(VGA_arm64) #include "pub_core_libcsetjmp.h" static VG_MINIMAL_JMP_BUF(env_unsup_insn); @@ -1533,8 +1533,7 @@ Bool VG_(machine_get_hwcaps)( void ) vki_sigaction_fromK_t saved_sigill_act; vki_sigaction_toK_t tmp_sigill_act; - volatile Bool have_STFLE; - Int i, r, model; + Int i, model; /* If the model is "unknown" don't treat this as an error. Assume this is a brand-new machine model for which we don't have the @@ -1547,63 +1546,24 @@ Bool VG_(machine_get_hwcaps)( void ) VG_(exit)(1); } - /* Unblock SIGILL and stash away the old action for that signal */ - VG_(sigemptyset)(&tmp_set); - VG_(sigaddset)(&tmp_set, VKI_SIGILL); - - r = VG_(sigprocmask)(VKI_SIG_UNBLOCK, &tmp_set, &saved_set); - vg_assert(r == 0); - - r = VG_(sigaction)(VKI_SIGILL, NULL, &saved_sigill_act); - vg_assert(r == 0); - tmp_sigill_act = saved_sigill_act; - - /* NODEFER: signal handler does not return (from the kernel's point of - view), hence if it is to successfully catch a signal more than once, - we need the NODEFER flag. */ - tmp_sigill_act.sa_flags &= ~VKI_SA_RESETHAND; - tmp_sigill_act.sa_flags &= ~VKI_SA_SIGINFO; - tmp_sigill_act.sa_flags |= VKI_SA_NODEFER; - tmp_sigill_act.ksa_handler = handler_unsup_insn; - VG_(sigaction)(VKI_SIGILL, &tmp_sigill_act, NULL); - - /* Determine hwcaps. Note, we cannot use the stfle insn because it - is not supported on z900. */ - - /* Check availability of STFLE. If available store facility bits - in hoststfle. */ ULong hoststfle[S390_NUM_FACILITY_DW]; for (i = 0; i < S390_NUM_FACILITY_DW; ++i) hoststfle[i] = 0; - have_STFLE = True; - if (VG_MINIMAL_SETJMP(env_unsup_insn)) { - have_STFLE = False; - } else { - register ULong reg0 asm("0") = S390_NUM_FACILITY_DW - 1; + register ULong reg0 asm("0") = S390_NUM_FACILITY_DW - 1; - __asm__(".insn s,0xb2b00000,%0" /* stfle */ + __asm__(".insn s,0xb2b00000,%0" /* stfle */ : "=Q"(hoststfle), "+d"(reg0) : : "cc"); - } - /* Restore signals */ - r = VG_(sigaction)(VKI_SIGILL, &saved_sigill_act, NULL); - vg_assert(r == 0); - r = VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL); - vg_assert(r == 0); va = VexArchS390X; vai.endness = VexEndnessBE; vai.hwcaps = model; - if (have_STFLE) vai.hwcaps |= VEX_HWCAPS_S390X_STFLE; - /* Detect presence of certain facilities using the STFLE insn. - Note, that these facilities were introduced at the same time or later - as STFLE, so the absence of STLFE implies the absence of the facility - we're trying to detect. */ + /* Detect presence of certain facilities using the STFLE insn. */ struct fac_hwcaps_map { UInt installed; UInt facility_bit; @@ -1615,7 +1575,6 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 42, VEX_HWCAPS_S390X_DFP, "DFP" }, { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, { False, 24, VEX_HWCAPS_S390X_ETF2, "ETF2" }, - { False, 7, VEX_HWCAPS_S390X_STFLE, "STFLE" }, { False, 30, VEX_HWCAPS_S390X_ETF3, "ETF3" }, { False, 37, VEX_HWCAPS_S390X_FPEXT, "FPEXT" }, { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, diff --git a/none/tests/s390x/stfle.vgtest b/none/tests/s390x/stfle.vgtest index 458793df3..5a48c07e6 100644 --- a/none/tests/s390x/stfle.vgtest +++ b/none/tests/s390x/stfle.vgtest @@ -1,2 +1 @@ prog:stfle -prereq: ../../../tests/s390x_features s390x-stfle z196: diff --git a/tests/s390x_features.c b/tests/s390x_features.c index cad158853..1dda2f01f 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -1,7 +1,5 @@ /* -*- mode: C; c-basic-offset: 3; -*- */ -#include -#include #include #include #include @@ -40,8 +38,6 @@ // z900:z9 -- Host needs to be at least a z900 and at most a z9. // Any model in between is OK, too. -jmp_buf env; - #if defined(VGA_s390x) // Features that require kernel support should be checked against HWCAP instead @@ -58,11 +54,6 @@ jmp_buf env; /* Number of double words needed to store all facility bits. */ #define S390_NUM_FACILITY_DW 3 -void handle_sigill(int signum) -{ - longjmp(env, 1); -} - static void clear_facilities(unsigned long long *ret) { unsigned int index; @@ -74,15 +65,9 @@ static void clear_facilities(unsigned long long *ret) void stfle(unsigned long long *ret) { - signal(SIGILL, handle_sigill); - if (setjmp(env)) { - /* stfle not available: assume no facilities */ - clear_facilities(ret); - } else { - register unsigned long long r0 asm("0") = S390_NUM_FACILITY_DW - 1; - asm volatile(".insn s,0xb2b00000,%0\n" /* stfle */ - : "=m" (*ret), "+d"(r0) :: "cc", "memory"); - } + register unsigned long long r0 asm("0") = S390_NUM_FACILITY_DW - 1; + asm volatile(".insn s,0xb2b00000,%0\n" /* stfle */ + : "=m" (*ret), "+d"(r0) :: "cc", "memory"); } @@ -244,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-stfle") == 0 ) { - match = facilities[0] & FAC_BIT(7); } else if (strcmp(feature, "s390x-eimm") == 0 ) { match = facilities[0] & FAC_BIT(21); } else if (strcmp(feature, "s390x-genins") == 0 ) { From 6b439cb3898d0611c2d4f7b3ef3468e72270d21e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 21 Nov 2025 22:02:41 +0100 Subject: [PATCH 069/502] Darwin syscalls: correctly set EIP/RIP in ML_(fixup_guest_state_to_restart_syscall) The code was using arch->vex.guest_IP_AT_SYSCALL but that got cleaned out on amd64 a while ago. Use EIP/RIP - 2 instead, like other x86 and amd64 platforms. This fixes 5 more memcheck regression tests. --- coregrind/m_syswrap/syswrap-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 02993a58f..82f3adc5d 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -2963,7 +2963,7 @@ void ML_(fixup_guest_state_to_restart_syscall) ( ThreadArchState* arch ) } #elif defined(VGP_x86_darwin) - arch->vex.guest_EIP = arch->vex.guest_IP_AT_SYSCALL; + arch->vex.guest_EIP -= 2; /* Make sure our caller is actually sane, and we're really backing back over a syscall. @@ -2987,7 +2987,7 @@ void ML_(fixup_guest_state_to_restart_syscall) ( ThreadArchState* arch ) } #elif defined(VGP_amd64_darwin) - arch->vex.guest_RIP = arch->vex.guest_IP_AT_SYSCALL; + arch->vex.guest_RIP -= 2; /* Make sure our caller is actually sane, and we're really backing back over a syscall. From bef37208b428c1d31f42faf62991e6331dc4dd28 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 22 Nov 2025 19:51:14 +0100 Subject: [PATCH 070/502] malloc-trace: format with %lu not %zu (SizeT is not size_t). --- coregrind/m_replacemalloc/vg_replace_malloc.c | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index f9de7cccd..9ed9e7182 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -306,7 +306,7 @@ extern int * __error(void) __attribute__((weak)); \ DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE(#fnname "(%zu)", n ); \ + MALLOC_TRACE(#fnname "(%lu)", n ); \ \ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n ); \ MALLOC_TRACE(" = %p\n", v ); \ @@ -329,7 +329,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ struct AlignedAllocInfo aligned_alloc_info = { .orig_alignment=alignment, .size=n, .alloc_kind=AllocKind##tag}; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%zu, %zu)", n, alignment ); \ + MALLOC_TRACE(#fnname "(%lu, %lu)", n, alignment ); \ \ if ((alignment == 0) \ || ((alignment & (alignment - 1)) != 0)) { \ @@ -356,7 +356,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord) zone); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE(#fnname "(%p, %zu)", zone, n ); \ + MALLOC_TRACE(#fnname "(%p, %lu)", zone, n ); \ \ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n ); \ MALLOC_TRACE(" = %p\n", v ); \ @@ -377,7 +377,7 @@ extern int * __error(void) __attribute__((weak)); \ DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE(#fnname "(%zu)", n ); \ + MALLOC_TRACE(#fnname "(%lu)", n ); \ \ v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, n ); \ MALLOC_TRACE(" = %p\n", v ); \ @@ -407,7 +407,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ struct AlignedAllocInfo aligned_alloc_info = { .orig_alignment=alignment, .size=n, .alloc_kind=AllocKind##tag }; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%zu, %zu)", n, alignment ); \ + MALLOC_TRACE(#fnname "(%lu, %lu)", n, alignment ); \ \ if ((alignment == 0) \ || ((alignment & (alignment - 1)) != 0)) { \ @@ -1022,7 +1022,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p, %zu)\n", p, size ); \ + MALLOC_TRACE(#fnname "(%p, %lu)\n", p, size ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1065,7 +1065,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)alignment); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p, %zu, %zu)\n", p, size, alignment ); \ + MALLOC_TRACE(#fnname "(%p, %lu, %lu)\n", p, size, alignment ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1163,7 +1163,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p, %zu)\n", p, size ); \ + MALLOC_TRACE(#fnname "(%p, %lu)\n", p, size ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1238,7 +1238,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)alignment); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p, %zu)\n", p, alignment ); \ + MALLOC_TRACE(#fnname "(%p, %lu)\n", p, alignment ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1255,7 +1255,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)size); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord)alignment); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE(#fnname "(%p, %zu, %zu)\n", p, size, alignment ); \ + MALLOC_TRACE(#fnname "(%p, %lu, %lu)\n", p, size, alignment ); \ if (p == NULL) \ return; \ (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vg_replacement, p ); \ @@ -1709,7 +1709,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \ - MALLOC_TRACE("zone_realloc(%p,%p,%zu)", zone, ptrV, new_size ); \ + MALLOC_TRACE("zone_realloc(%p,%p,%lu)", zone, ptrV, new_size ); \ v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size ); \ MALLOC_TRACE(" = %p\n", v ); \ if (v == NULL) { \ @@ -1732,7 +1732,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \ - MALLOC_TRACE("realloc(%p,%zu)", ptrV, new_size ); \ + MALLOC_TRACE("realloc(%p,%lu)", ptrV, new_size ); \ v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size ); \ MALLOC_TRACE(" = %p\n", v ); \ if (v == NULL) { \ @@ -1755,7 +1755,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(new_size); \ - MALLOC_TRACE("reallocf(%p,%zu)", ptrV, new_size ); \ + MALLOC_TRACE("reallocf(%p,%lu)", ptrV, new_size ); \ v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size ); \ MALLOC_TRACE(" = %p\n", v ); \ if (v == NULL) { \ @@ -1781,7 +1781,7 @@ extern int * __error(void) __attribute__((weak)); TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(ptrV); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(nmemb); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ - MALLOC_TRACE("reallocarray(%p,%zu,%zu)", ptrV, nmemb, size ); \ + MALLOC_TRACE("reallocarray(%p,%lu,%lu)", ptrV, nmemb, size ); \ if (nmemb > 0 && (SizeT)-1 / nmemb < size) { \ SET_ERRNO_ENOMEM; \ MALLOC_TRACE(" = 0\n"); \ @@ -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, al %zu, size %zu)", zone, \ + MALLOC_TRACE("zone_memalign(%p, %lu, %u)", zone, \ alignment, n); \ \ if (alignment == 0 || alignment % sizeof(void*) != 0 || \ @@ -1952,7 +1952,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("memalign(al %zu, size %zu)", alignment, n ); \ + MALLOC_TRACE("memalign(%lu, %lu)", alignment, n ); \ \ /* Round up to minimum alignment if necessary. */ \ if (alignment < VG_MIN_MALLOC_SZB) \ @@ -1985,7 +1985,7 @@ extern int * __error(void) __attribute__((weak)); \ DO_INIT; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("memalign(%zu, %zu)", alignment, size); \ + MALLOC_TRACE("memalign(%lu, %lu)", alignment, size); \ if ((VG_MEMALIGN_NO_SIZE_ZERO && (size == 0)) || \ (VG_MEMALIGN_NO_ALIGN_ZERO && (alignment == 0)) || \ (VG_MEMALIGN_ALIGN_POWER_TWO && \ @@ -2191,7 +2191,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("posix_memalign(%p, %zu, %zu)", memptr, alignment, size ); \ + MALLOC_TRACE("posix_memalign(%p, %lu, %lu)", memptr, alignment, size ); \ /* Test whether the alignment argument is valid. It must be \ a power of two multiple of sizeof (void *). */ \ if (alignment == 0 \ @@ -2334,7 +2334,7 @@ extern int * __error(void) __attribute__((weak)); DO_INIT; \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("aligned_alloc(al %zu, size %zu)", alignment, size ); \ + MALLOC_TRACE("aligned_alloc(%lu, %lu)", alignment, size ); \ \ /* Round up to minimum alignment if necessary. */ \ if (alignment < VG_MIN_MALLOC_SZB) \ @@ -2366,7 +2366,7 @@ extern int * __error(void) __attribute__((weak)); \ DO_INIT; \ VERIFY_ALIGNMENT(&aligned_alloc_info); \ - MALLOC_TRACE("aligned_alloc(%zu, %zu)", alignment, size ); \ + MALLOC_TRACE("aligned_alloc(%lu, %lu)", alignment, size ); \ if ((VG_ALIGNED_ALLOC_NO_SIZE_ZERO && (size == 0)) \ || (VG_ALIGNED_ALLOC_NO_ALIGN_ZERO && (alignment == 0)) \ || (VG_ALIGNED_ALLOC_SIZE_MULTIPLE_ALIGN && alignment && (size % alignment != 0)) \ @@ -2426,7 +2426,7 @@ extern int * __error(void) __attribute__((weak)); return 0; \ \ pszB = (SizeT)VALGRIND_NON_SIMD_CALL1( info.tl_malloc_usable_size, p ); \ - MALLOC_TRACE(" = %zu\n", pszB ); \ + MALLOC_TRACE(" = %lu\n", pszB ); \ \ return pszB; \ } From 10e067acf160e91829f9a62774906b2267242502 Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Sun, 23 Nov 2025 16:49:01 +0100 Subject: [PATCH 071/502] Ensure none/tests/linux/mremap[456].c remove the shared memory As otherwise, each execution of a test leaves some shared memory lingering. Verified by doing: ipcs -m | wc mremap4 ipcs -m | wc and that the nr does not increase after the fix. --- none/tests/linux/mremap4.c | 3 +++ none/tests/linux/mremap5.c | 3 +++ none/tests/linux/mremap6.c | 11 ++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/none/tests/linux/mremap4.c b/none/tests/linux/mremap4.c index 3fe2307de..2328cb812 100644 --- a/none/tests/linux/mremap4.c +++ b/none/tests/linux/mremap4.c @@ -19,5 +19,8 @@ int main() addr = mremap(addr, 100 * 4096, 40 * 4096, 0); assert(addr != (void *)-1); + int rmid = shmctl(shmid, IPC_RMID, NULL); + assert(rmid == 0); + return 0; } diff --git a/none/tests/linux/mremap5.c b/none/tests/linux/mremap5.c index dcea248d7..e78250aeb 100644 --- a/none/tests/linux/mremap5.c +++ b/none/tests/linux/mremap5.c @@ -19,5 +19,8 @@ int main() addr = mremap(addr, 100 * 4096, 400 * 4096, MREMAP_MAYMOVE); assert(addr != (void *)-1); + int rmid = shmctl(shmid, IPC_RMID, NULL); + assert(rmid == 0); + return 0; } diff --git a/none/tests/linux/mremap6.c b/none/tests/linux/mremap6.c index bcebaf59a..44a733b5d 100644 --- a/none/tests/linux/mremap6.c +++ b/none/tests/linux/mremap6.c @@ -7,10 +7,12 @@ #include #include +static int shmid; + static void *mkmap(unsigned sz) { - int shmid = shmget(IPC_PRIVATE, sz, - IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR); + shmid = shmget(IPC_PRIVATE, sz, + IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR); assert(shmid != -1); void *addr = shmat(shmid, NULL, 0); @@ -22,10 +24,13 @@ static void *mkmap(unsigned sz) int main() { void *np, *p; - + p = mkmap(1024*1024); np = mremap(p, 1024*1024, 2048*1024, MREMAP_MAYMOVE); /* grow, maymove */ assert(np != (void *)-1); + int rmid = shmctl(shmid, IPC_RMID, NULL); + assert(rmid == 0); + return 0; } From ff940096a80dd4fdfadc088d7b4580c1251d0e3d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 23 Nov 2025 21:07:12 +0100 Subject: [PATCH 072/502] FreeBSD regtest: add checks for required kernel modules and sysctl memcheck/tests/descr_belowsp requires a sysctl memcheck/tests/freebsd/scalar requires a kenrnel module neither of trhe above are cleard/loaded by default. --- memcheck/tests/Makefile.am | 3 ++- memcheck/tests/descr_belowsp.vgtest | 1 + memcheck/tests/freebsd/scalar.vgtest | 1 + memcheck/tests/freebsd/sctp.vgtest | 2 +- memcheck/tests/run_descr_belowsp_test | 24 ++++++++++++++++++++++++ 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 memcheck/tests/run_descr_belowsp_test diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 1cf97fc82..39974c18d 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -96,7 +96,8 @@ dist_noinst_SCRIPTS = \ filter_stanza.awk \ filter_used_supp \ filter_stanza_and_size_t \ - filter_malloc_zone + filter_malloc_zone \ + run_descr_belowsp_test noinst_SCRIPTS = \ filter_dw4 \ diff --git a/memcheck/tests/descr_belowsp.vgtest b/memcheck/tests/descr_belowsp.vgtest index 9fa8191f5..47de7d715 100644 --- a/memcheck/tests/descr_belowsp.vgtest +++ b/memcheck/tests/descr_belowsp.vgtest @@ -1,2 +1,3 @@ +prereq: ./run_descr_belowsp_test prog: descr_belowsp vgopts: -q diff --git a/memcheck/tests/freebsd/scalar.vgtest b/memcheck/tests/freebsd/scalar.vgtest index 2f433038c..f2440924f 100644 --- a/memcheck/tests/freebsd/scalar.vgtest +++ b/memcheck/tests/freebsd/scalar.vgtest @@ -1,3 +1,4 @@ +prereq: kldstat -m mqueuefs > /dev/null 2>&1 prog: scalar vgopts: -q --error-limit=no --suppressions=scalar.supp stderr_filter: filter_scalar diff --git a/memcheck/tests/freebsd/sctp.vgtest b/memcheck/tests/freebsd/sctp.vgtest index a96b5c105..ccffdc8bd 100644 --- a/memcheck/tests/freebsd/sctp.vgtest +++ b/memcheck/tests/freebsd/sctp.vgtest @@ -1,3 +1,3 @@ -prereq: kldstat -m sctp > /dev/null +prereq: kldstat -m sctp > /dev/null 2>&1 vgopts: -q --trace-children=yes prog: sctp diff --git a/memcheck/tests/run_descr_belowsp_test b/memcheck/tests/run_descr_belowsp_test new file mode 100755 index 000000000..7740363d2 --- /dev/null +++ b/memcheck/tests/run_descr_belowsp_test @@ -0,0 +1,24 @@ +#!/bin/sh + +# FreeBSD has a (rather iffy if you ask me) belt and braces +# approach to stack guards. When a stack gets dreated the +# kernel adds a gurad page. Fair enough. When a pthread +# is created, the pthread library also creates a stack +# guard. Can't be too careful, eh? + +# From a Valgrind perspectve this is bad news. We use a heuristic +# that uses VG_(am_find_nsegment) to determine whether an address +# is part of a stack (including guard page) then +# find_tid_with_stack_containing() with the address rounded +# up to the nearest page. That doesn't work when there are +# two guard pages. + +# There is a sysctl to turn off the kernel guard page, +# but that requires root privileges + +if [ "$(uname)" = FreeBSD ]; then + + sysctl security.bsd.stack_guard_page | grep 0 > /dev/null + exit $? + +fi From 2de3b4c090a4368c869368a906caf1e4c5aae94c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 23 Nov 2025 21:33:08 +0100 Subject: [PATCH 073/502] FreeBSD wrapper: typo in aligned_alloc redir --- coregrind/m_replacemalloc/vg_replace_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 9ed9e7182..5f3aec0f0 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -2399,7 +2399,7 @@ extern int * __error(void) __attribute__((weak)); ALIGNED_ALLOC(SO_SYN_MALLOC, aligned_alloc); #elif defined(VGO_freebsd) - ALIGNED_ALLOC(G_Z_LIBC_SONAME, aligned_alloc); + ALIGNED_ALLOC(VG_Z_LIBC_SONAME, aligned_alloc); ALIGNED_ALLOC(SO_SYN_MALLOC, aligned_alloc); #elif defined(VGO_darwin) From 610f0e4b5d1c2ab33186e30ab6eef6a69ab7e454 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 23 Nov 2025 22:51:53 +0000 Subject: [PATCH 074/502] s390: floating-point-extension facility related cleanups (BZ 509562) The floating-point-extension facility is always present on the supported machines. - Remove s390_host_has_fpext and VEX_HWCAPS_S390X_FPEXT - Remove EmWarn_S390X_fpext_rounding and EmFail_S390X_fpext - Remove testscases none/tests/s390x/fpext_fail and fpext_warn - Update tests/s390x_features.c and memcheck/tests/vbit-test Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- .gitignore | 2 - VEX/priv/guest_s390_toIR.c | 712 +++++++++---------------- VEX/priv/host_s390_defs.c | 52 -- VEX/priv/host_s390_defs.h | 2 - VEX/priv/host_s390_isel.c | 62 +-- VEX/priv/main_main.c | 10 - VEX/pub/libvex.h | 2 - VEX/pub/libvex_emnote.h | 9 - coregrind/m_machine.c | 6 - memcheck/tests/vbit-test/irops.c | 9 +- none/tests/s390x/Makefile.am | 2 +- none/tests/s390x/bfp-XxC.vgtest | 1 - none/tests/s390x/bfp-convert.vgtest | 1 - none/tests/s390x/bfp-emit.vgtest | 1 - none/tests/s390x/bfp-fpc.vgtest | 1 - none/tests/s390x/dfp-XiC.vgtest | 2 +- none/tests/s390x/dfp-XxC.vgtest | 2 +- none/tests/s390x/dfpext.vgtest | 2 +- none/tests/s390x/fpext_fail.c | 6 - none/tests/s390x/fpext_fail.stderr.exp | 8 - none/tests/s390x/fpext_fail.stdout.exp | 0 none/tests/s390x/fpext_fail.vgtest | 2 - none/tests/s390x/fpext_warn.c | 22 - none/tests/s390x/fpext_warn.stderr.exp | 20 - none/tests/s390x/fpext_warn.stdout.exp | 2 - none/tests/s390x/fpext_warn.vgtest | 3 - tests/s390x_features.c | 2 - 27 files changed, 261 insertions(+), 682 deletions(-) delete mode 100644 none/tests/s390x/fpext_fail.c delete mode 100644 none/tests/s390x/fpext_fail.stderr.exp delete mode 100644 none/tests/s390x/fpext_fail.stdout.exp delete mode 100644 none/tests/s390x/fpext_fail.vgtest delete mode 100644 none/tests/s390x/fpext_warn.c delete mode 100644 none/tests/s390x/fpext_warn.stderr.exp delete mode 100644 none/tests/s390x/fpext_warn.stdout.exp delete mode 100644 none/tests/s390x/fpext_warn.vgtest diff --git a/.gitignore b/.gitignore index cfd8c7bd8..a9cb60c96 100644 --- a/.gitignore +++ b/.gitignore @@ -2184,8 +2184,6 @@ /none/tests/s390x/cu14_1 /none/tests/s390x/cu41 /none/tests/s390x/ecag -/none/tests/s390x/fpext_warn -/none/tests/s390x/fpext_fail /none/tests/s390x/bfp-306054 /none/tests/s390x/bfp-arith /none/tests/s390x/bfp-load diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 5693fd9c1..42bf5ad81 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -11269,7 +11269,7 @@ s390_irgen_SRNM(IRTemp op2addr) UInt input_mask, fpc_mask; input_mask = 3; - fpc_mask = s390_host_has_fpext ? 7 : 3; + fpc_mask = 7; put_fpc_w0(binop(Iop_Or32, binop(Iop_And32, get_fpc_w0(), mkU32(~fpc_mask)), @@ -11284,11 +11284,6 @@ s390_irgen_SRNMB(UChar b2, UShort d2) /* Can only check at IR generation time when b2 == 0 */ if (b2 == 0) { s390_insn_assert("srnmb", d2 <= 3 || d2 == 7); // valid rounding mode - /* d2 == 7 requires fpext */ - if (d2 == 7 && ! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - return "srnmb"; - } } IRTemp op2addr = newTemp(Ity_I64); @@ -11448,11 +11443,7 @@ s390_irgen_ADB(UChar r1, IRTemp op2addr) static const HChar * s390_irgen_CEFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_BFP_ROUND_PER_FPC; - } - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("cefbra", is_valid_rounding_mode(m3)); @@ -11469,7 +11460,7 @@ static const HChar * s390_irgen_CDFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cdfbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -11483,11 +11474,7 @@ s390_irgen_CDFBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_CEGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_BFP_ROUND_PER_FPC; - } - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("cegbra", is_valid_rounding_mode(m3)); @@ -11503,11 +11490,7 @@ s390_irgen_CEGBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_CDGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_BFP_ROUND_PER_FPC; - } - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("cdgbra", is_valid_rounding_mode(m3)); @@ -11523,168 +11506,133 @@ s390_irgen_CDGBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_CELFBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("celfbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("celfbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_fpr_w0(r1, binop(Iop_I32UtoF32, mkexpr(encode_bfp_rounding_mode(m3)), - mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_fpr_w0(r1, binop(Iop_I32UtoF32, mkexpr(encode_bfp_rounding_mode(m3)), + mkexpr(op2))); return "celfbr"; } static const HChar * s390_irgen_CDLFBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cdlfbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cdlfbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_fpr_dw0(r1, unop(Iop_I32UtoF64, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_fpr_dw0(r1, unop(Iop_I32UtoF64, mkexpr(op2))); return "cdlfbr"; } static const HChar * s390_irgen_CELGBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("celgbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("celgbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_fpr_w0(r1, binop(Iop_I64UtoF32, mkexpr(encode_bfp_rounding_mode(m3)), - mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_fpr_w0(r1, binop(Iop_I64UtoF32, mkexpr(encode_bfp_rounding_mode(m3)), + mkexpr(op2))); return "celgbr"; } static const HChar * s390_irgen_CDLGBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cdlgbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cdlgbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_fpr_dw0(r1, binop(Iop_I64UtoF64, - mkexpr(encode_bfp_rounding_mode(m3)), - mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_fpr_dw0(r1, binop(Iop_I64UtoF64, + mkexpr(encode_bfp_rounding_mode(m3)), + mkexpr(op2))); return "cdlgbr"; } static const HChar * s390_irgen_CLFEBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clfebr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clfebr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_F32); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_bfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_F32); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_bfp_rounding_mode(m3); - assign(op, get_fpr_w0(r2)); - assign(result, binop(Iop_F32toI32U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_32, op, rounding_mode); - } + assign(op, get_fpr_w0(r2)); + assign(result, binop(Iop_F32toI32U, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_32, op, rounding_mode); return "clfebr"; } static const HChar * s390_irgen_CLFDBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clfdbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clfdbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_F64); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_bfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_F64); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_bfp_rounding_mode(m3); - assign(op, get_fpr_dw0(r2)); - assign(result, binop(Iop_F64toI32U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_32, op, rounding_mode); - } + assign(op, get_fpr_dw0(r2)); + assign(result, binop(Iop_F64toI32U, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_32, op, rounding_mode); return "clfdbr"; } static const HChar * s390_irgen_CLGEBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clgebr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clgebr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_F32); - IRTemp result = newTemp(Ity_I64); - IRTemp rounding_mode = encode_bfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_F32); + IRTemp result = newTemp(Ity_I64); + IRTemp rounding_mode = encode_bfp_rounding_mode(m3); - assign(op, get_fpr_w0(r2)); - assign(result, binop(Iop_F32toI64U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_64, op, rounding_mode); - } + assign(op, get_fpr_w0(r2)); + assign(result, binop(Iop_F32toI64U, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_64, op, rounding_mode); return "clgebr"; } static const HChar * s390_irgen_CLGDBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clgdbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clgdbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_F64); - IRTemp result = newTemp(Ity_I64); - IRTemp rounding_mode = encode_bfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_F64); + IRTemp result = newTemp(Ity_I64); + IRTemp rounding_mode = encode_bfp_rounding_mode(m3); - assign(op, get_fpr_dw0(r2)); - assign(result, binop(Iop_F64toI64U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_64, op, rounding_mode); - } + assign(op, get_fpr_dw0(r2)); + assign(result, binop(Iop_F64toI64U, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_64, op, rounding_mode); return "clgdbr"; } @@ -11692,7 +11640,7 @@ static const HChar * s390_irgen_CFEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cfebra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F32); @@ -11712,7 +11660,7 @@ static const HChar * s390_irgen_CFDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cfdbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F64); @@ -11732,7 +11680,7 @@ static const HChar * s390_irgen_CGEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cgebra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F32); @@ -11752,7 +11700,7 @@ static const HChar * s390_irgen_CGDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cgdbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F64); @@ -11909,11 +11857,7 @@ s390_irgen_LDEB(UChar r1, IRTemp op2addr) static const HChar * s390_irgen_LEDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_BFP_ROUND_PER_FPC; - } - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("ledbra", is_valid_rounding_mode(m3)); @@ -12078,11 +12022,6 @@ s390_irgen_ADTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D64); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_dw0(r2)); assign(op2, get_dpr_dw0(r3)); @@ -12109,11 +12048,6 @@ s390_irgen_AXTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D128); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_pair(r2)); assign(op2, get_dpr_pair(r3)); @@ -12172,7 +12106,7 @@ s390_irgen_CDFTR(UChar m3 __attribute__((unused)), if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -12190,7 +12124,7 @@ s390_irgen_CXFTR(UChar m3 __attribute__((unused)), emulation_failure(EmFail_S390X_DFP_insn); } else { s390_insn_assert("cxftr", is_valid_fpr_pair(r1)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -12209,11 +12143,7 @@ s390_irgen_CDGTRA(UChar m3, UChar m4, UChar r1, UChar r2) } else { IRTemp op2 = newTemp(Ity_I64); - if (! s390_host_has_fpext && m3 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_DFP_ROUND_PER_FPC_0; - } - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); assign(op2, get_gpr_dw0(r2)); @@ -12231,7 +12161,7 @@ s390_irgen_CXGTRA(UChar m3 __attribute__((unused)), emulation_failure(EmFail_S390X_DFP_insn); } else { s390_insn_assert("cxgtra", is_valid_fpr_pair(r1)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -12252,16 +12182,12 @@ s390_irgen_CDLFTR(UChar m3 __attribute__((unused)), if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_dpr_dw0(r1, unop(Iop_I32UtoD64, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_dpr_dw0(r1, unop(Iop_I32UtoD64, mkexpr(op2))); } return "cdlftr"; } @@ -12273,18 +12199,14 @@ s390_irgen_CXLFTR(UChar m3 __attribute__((unused)), if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cxlftr", is_valid_fpr_pair(r1)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cxlftr", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_dpr_pair(r1, unop(Iop_I32UtoD128, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_dpr_pair(r1, unop(Iop_I32UtoD128, mkexpr(op2))); } return "cxlftr"; } @@ -12295,18 +12217,14 @@ s390_irgen_CDLGTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I64); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_dpr_dw0(r1, binop(Iop_I64UtoD64, - mkexpr(encode_dfp_rounding_mode(m3)), - mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_dpr_dw0(r1, binop(Iop_I64UtoD64, + mkexpr(encode_dfp_rounding_mode(m3)), + mkexpr(op2))); } return "cdlgtr"; } @@ -12318,18 +12236,14 @@ s390_irgen_CXLGTR(UChar m3 __attribute__((unused)), if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_dpr_pair(r1, unop(Iop_I64UtoD128, mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_dpr_pair(r1, unop(Iop_I64UtoD128, mkexpr(op2))); } return "cxlgtr"; } @@ -12340,21 +12254,17 @@ s390_irgen_CFDTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_dw0(r2)); - assign(result, binop(Iop_D64toI32S, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_32, op, rounding_mode); - } + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_dw0(r2)); + assign(result, binop(Iop_D64toI32S, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_32, op, rounding_mode); } return "cfdtr"; } @@ -12365,24 +12275,20 @@ s390_irgen_CFXTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cfxtr", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - - IRTemp op = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_pair(r2)); - assign(result, binop(Iop_D128toI32S, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_32, op, - rounding_mode); - } + s390_insn_assert("cfxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + + IRTemp op = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_pair(r2)); + assign(result, binop(Iop_D128toI32S, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_32, op, + rounding_mode); } return "cfxtr"; } @@ -12393,18 +12299,14 @@ s390_irgen_CGDTRA(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_dw0(r2)); - put_gpr_dw0(r1, binop(Iop_D64toI64S, mkexpr(rounding_mode), mkexpr(op))); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_64, op, rounding_mode); - } + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_dw0(r2)); + put_gpr_dw0(r1, binop(Iop_D64toI64S, mkexpr(rounding_mode), mkexpr(op))); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_64, op, rounding_mode); } return "cgdtra"; } @@ -12415,20 +12317,16 @@ s390_irgen_CGXTRA(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cgxtra", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cgxtra", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D128); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_D128); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_pair(r2)); - put_gpr_dw0(r1, binop(Iop_D128toI64S, mkexpr(rounding_mode), mkexpr(op))); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_64, op, rounding_mode); - } + assign(op, get_dpr_pair(r2)); + put_gpr_dw0(r1, binop(Iop_D128toI64S, mkexpr(rounding_mode), mkexpr(op))); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_64, op, rounding_mode); } return "cgxtra"; } @@ -12484,21 +12382,17 @@ s390_irgen_CLFDTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_dw0(r2)); - assign(result, binop(Iop_D64toI32U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_32, op, rounding_mode); - } + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_dw0(r2)); + assign(result, binop(Iop_D64toI32U, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_32, op, rounding_mode); } return "clfdtr"; } @@ -12509,24 +12403,20 @@ s390_irgen_CLFXTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clfxtr", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - - IRTemp op = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_pair(r2)); - assign(result, binop(Iop_D128toI32U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_32, op, - rounding_mode); - } + s390_insn_assert("clfxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + + IRTemp op = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_pair(r2)); + assign(result, binop(Iop_D128toI32U, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_32, op, + rounding_mode); } return "clfxtr"; } @@ -12537,21 +12427,17 @@ s390_irgen_CLGDTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_I64); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_dw0(r2)); - assign(result, binop(Iop_D64toI64U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_64, op, rounding_mode); - } + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_I64); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_dw0(r2)); + assign(result, binop(Iop_D64toI64U, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_64, op, rounding_mode); } return "clgdtr"; } @@ -12562,24 +12448,20 @@ s390_irgen_CLGXTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clgxtr", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - - IRTemp op = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_I64); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_pair(r2)); - assign(result, binop(Iop_D128toI64U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_64, op, - rounding_mode); - } + s390_insn_assert("clgxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + + IRTemp op = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_I64); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_pair(r2)); + assign(result, binop(Iop_D128toI64U, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_64, op, + rounding_mode); } return "clgxtr"; } @@ -12595,11 +12477,6 @@ s390_irgen_DDTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D64); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_dw0(r2)); assign(op2, get_dpr_dw0(r3)); @@ -12625,11 +12502,6 @@ s390_irgen_DXTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D128); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_pair(r2)); assign(op2, get_dpr_pair(r3)); @@ -12770,15 +12642,9 @@ s390_irgen_LDXTR(UChar m3, UChar m4, UChar r1, UChar r2) s390_insn_assert("ldxtr", is_valid_fpr_pair(r1)); s390_insn_assert("ldxtr", is_valid_fpr_pair(r2)); - /* If fpext is not installed and m3 is in 1:7, - rounding mode performed is unpredictable */ - if (! s390_host_has_fpext && m3 > 0 && m3 < 8) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_DFP_ROUND_PER_FPC_0; - } if ((m4 & 0x8) != 0) emulation_warning(EmWarn_S390X_XiC_not_zero); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_D64); @@ -12795,15 +12661,9 @@ s390_irgen_LEDTR(UChar m3, UChar m4, UChar r1, UChar r2) if (! s390_host_has_dfp) { emulation_failure(EmFail_S390X_DFP_insn); } else { - /* If fpext is not installed and m3 is in 1:7, - rounding mode performed is unpredictable */ - if (! s390_host_has_fpext && m3 > 0 && m3 < 8) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_DFP_ROUND_PER_FPC_0; - } if ((m4 & 0x8) != 0) emulation_warning(EmWarn_S390X_XiC_not_zero); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_D64); @@ -12858,11 +12718,6 @@ s390_irgen_MDTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D64); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_dw0(r2)); assign(op2, get_dpr_dw0(r3)); @@ -12888,11 +12743,6 @@ s390_irgen_MXTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D128); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_pair(r2)); assign(op2, get_dpr_pair(r3)); @@ -12914,13 +12764,6 @@ s390_irgen_QADTR(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D64); IRTemp rounding_mode; - /* If fpext is not installed and m4 is in 1:7, - rounding mode performed is unpredictable */ - if (! s390_host_has_fpext && m4 > 0 && m4 < 8) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_dw0(r2)); assign(op2, get_dpr_dw0(r3)); @@ -12946,13 +12789,6 @@ s390_irgen_QAXTR(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D128); IRTemp rounding_mode; - /* If fpext is not installed and m4 is in 1:7, - rounding mode performed is unpredictable */ - if (! s390_host_has_fpext && m4 > 0 && m4 < 8) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_pair(r2)); assign(op2, get_dpr_pair(r3)); @@ -12974,13 +12810,6 @@ s390_irgen_RRDTR(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D64); IRTemp rounding_mode; - /* If fpext is not installed and m4 is in 1:7, - rounding mode performed is unpredictable */ - if (! s390_host_has_fpext && m4 > 0 && m4 < 8) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_gpr_b7(r2)); assign(op2, get_dpr_dw0(r3)); @@ -13005,13 +12834,6 @@ s390_irgen_RRXTR(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D128); IRTemp rounding_mode; - /* If fpext is not installed and m4 is in 1:7, - rounding mode performed is unpredictable */ - if (! s390_host_has_fpext && m4 > 0 && m4 < 8) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_gpr_b7(r2)); assign(op2, get_dpr_pair(r3)); @@ -13033,11 +12855,6 @@ s390_irgen_SDTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D64); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_dw0(r2)); assign(op2, get_dpr_dw0(r3)); @@ -13064,11 +12881,6 @@ s390_irgen_SXTRA(UChar r3, UChar m4, UChar r1, UChar r2) IRTemp result = newTemp(Ity_D128); IRTemp rounding_mode; - if (! s390_host_has_fpext && m4 != S390_DFP_ROUND_PER_FPC_0) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m4 = S390_DFP_ROUND_PER_FPC_0; - } - rounding_mode = encode_dfp_rounding_mode(m4); assign(op1, get_dpr_pair(r2)); assign(op2, get_dpr_pair(r3)); @@ -14896,7 +14708,7 @@ s390_irgen_CXFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cxfbra", is_valid_fpr_pair(r1)); s390_insn_assert("cxfbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I32); @@ -14910,19 +14722,15 @@ s390_irgen_CXFBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_CXLFBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cxlfbr", is_valid_fpr_pair(r1)); - s390_insn_assert("cxlfbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cxlfbr", is_valid_fpr_pair(r1)); + s390_insn_assert("cxlfbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_fpr_pair(r1, unop(Iop_I32UtoF128, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_fpr_pair(r1, unop(Iop_I32UtoF128, mkexpr(op2))); return "cxlfbr"; } @@ -14932,7 +14740,7 @@ s390_irgen_CXGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cxgbra", is_valid_fpr_pair(r1)); s390_insn_assert("cxgbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op2 = newTemp(Ity_I64); @@ -14946,19 +14754,15 @@ s390_irgen_CXGBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_CXLGBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("cxlgbr", is_valid_fpr_pair(r1)); - s390_insn_assert("cxlgbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cxlgbr", is_valid_fpr_pair(r1)); + s390_insn_assert("cxlgbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_fpr_pair(r1, unop(Iop_I64UtoF128, mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_fpr_pair(r1, unop(Iop_I64UtoF128, mkexpr(op2))); return "cxlgbr"; } @@ -14967,7 +14771,7 @@ s390_irgen_CFXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cfxbra", is_valid_fpr_pair(r2)); s390_insn_assert("cfxbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F128); @@ -14986,24 +14790,20 @@ s390_irgen_CFXBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_CLFXBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clfxbr", is_valid_fpr_pair(r2)); - s390_insn_assert("clfxbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clfxbr", is_valid_fpr_pair(r2)); + s390_insn_assert("clfxbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_F128); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_bfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_F128); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_bfp_rounding_mode(m3); - assign(op, get_fpr_pair(r2)); - assign(result, binop(Iop_F128toI32U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_32, op, rounding_mode); - } + assign(op, get_fpr_pair(r2)); + assign(result, binop(Iop_F128toI32U, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_32, op, rounding_mode); return "clfxbr"; } @@ -15013,7 +14813,7 @@ s390_irgen_CGXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("cgxbra", is_valid_fpr_pair(r2)); s390_insn_assert("cgxbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp op = newTemp(Ity_F128); @@ -15032,25 +14832,21 @@ s390_irgen_CGXBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_CLGXBR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext) { - emulation_failure(EmFail_S390X_fpext); - } else { - s390_insn_assert("clgxbr", is_valid_fpr_pair(r2)); - s390_insn_assert("clgxbr", is_valid_rounding_mode(m3)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clgxbr", is_valid_fpr_pair(r2)); + s390_insn_assert("clgxbr", is_valid_rounding_mode(m3)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_F128); - IRTemp result = newTemp(Ity_I64); - IRTemp rounding_mode = encode_bfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_F128); + IRTemp result = newTemp(Ity_I64); + IRTemp rounding_mode = encode_bfp_rounding_mode(m3); - assign(op, get_fpr_pair(r2)); - assign(result, binop(Iop_F128toI64U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_64, op, - rounding_mode); - } + assign(op, get_fpr_pair(r2)); + assign(result, binop(Iop_F128toI64U, mkexpr(rounding_mode), + mkexpr(op))); + put_gpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_64, op, + rounding_mode); return "clgxbr"; } @@ -15160,7 +14956,7 @@ static const HChar * s390_irgen_FIEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("fiebra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_F32); @@ -15176,7 +14972,7 @@ static const HChar * s390_irgen_FIDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { s390_insn_assert("fidbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_F64); @@ -15194,7 +14990,7 @@ s390_irgen_FIXBRA(UChar m3, UChar m4, UChar r1, UChar r2) s390_insn_assert("fixbra", is_valid_fpr_pair(r1)); s390_insn_assert("fixbra", is_valid_fpr_pair(r2)); s390_insn_assert("fixbra", is_valid_rounding_mode(m3)); - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); IRTemp result = newTemp(Ity_F128); @@ -15287,11 +15083,7 @@ s390_irgen_LPXBR(UChar r1, UChar r2) static const HChar * s390_irgen_LDXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_BFP_ROUND_PER_FPC; - } - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("ldxbra", is_valid_fpr_pair(r1)); s390_insn_assert("ldxbra", is_valid_fpr_pair(r2)); @@ -15309,11 +15101,7 @@ s390_irgen_LDXBRA(UChar m3, UChar m4, UChar r1, UChar r2) static const HChar * s390_irgen_LEXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_fpext && m3 != S390_BFP_ROUND_PER_FPC) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m3 = S390_BFP_ROUND_PER_FPC; - } - if (s390_host_has_fpext && (m4 & 0x4) != 0) + if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); s390_insn_assert("lexbra", is_valid_fpr_pair(r1)); s390_insn_assert("lexbra", is_valid_fpr_pair(r2)); @@ -19462,10 +19250,6 @@ s390_vector_fp_convert(IROp op, IRType fromType, IRType toType, Bool rounding, IRExpr* argument = get_vr(v2, fromType, i * sourceIndexScaleFactor); IRExpr* result; if (rounding) { - if (!s390_host_has_fpext && m5 != S390_BFP_ROUND_PER_FPC) { - emulation_warning(EmWarn_S390X_fpext_rounding); - m5 = S390_BFP_ROUND_PER_FPC; - } result = binop(op, mkexpr(encode_bfp_rounding_mode(m5)), argument); diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 9389364da..6f5191124 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -3941,7 +3941,6 @@ static UChar * s390_emit_CEFBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cefbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -3954,7 +3953,6 @@ static UChar * s390_emit_CDFBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdfbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -3967,7 +3965,6 @@ static UChar * s390_emit_CXFBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxfbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -3980,7 +3977,6 @@ static UChar * s390_emit_CEGBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cegbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -3993,7 +3989,6 @@ static UChar * s390_emit_CDGBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdgbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4006,7 +4001,6 @@ static UChar * s390_emit_CXGBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxgbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4019,7 +4013,6 @@ static UChar * s390_emit_CELFBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("celfbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4032,7 +4025,6 @@ static UChar * s390_emit_CDLFBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdlfbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4045,7 +4037,6 @@ static UChar * s390_emit_CXLFBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxlfbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4058,7 +4049,6 @@ static UChar * s390_emit_CELGBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("celgbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4071,7 +4061,6 @@ static UChar * s390_emit_CDLGBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdlgbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4084,7 +4073,6 @@ static UChar * s390_emit_CXLGBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxlgbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4097,7 +4085,6 @@ static UChar * s390_emit_CLFEBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clfebr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4110,7 +4097,6 @@ static UChar * s390_emit_CLFDBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clfdbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4123,7 +4109,6 @@ static UChar * s390_emit_CLFXBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clfxbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4136,7 +4121,6 @@ static UChar * s390_emit_CLGEBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clgebr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4149,7 +4133,6 @@ static UChar * s390_emit_CLGDBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clgdbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4162,7 +4145,6 @@ static UChar * s390_emit_CLGXBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clgxbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4385,7 +4367,6 @@ static UChar * s390_emit_LEDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("ledbra", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4398,7 +4379,6 @@ static UChar * s390_emit_LDXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("ldxbra", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4411,7 +4391,6 @@ static UChar * s390_emit_LEXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("lexbra", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4423,8 +4402,6 @@ s390_emit_LEXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_FIEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(m3 == 0 || s390_host_has_fpext); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("fiebra", fp_convt_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4435,8 +4412,6 @@ s390_emit_FIEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_FIDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(m3 == 0 || s390_host_has_fpext); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("fidbra", fp_convt_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4447,8 +4422,6 @@ s390_emit_FIDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_FIXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(m3 == 0 || s390_host_has_fpext); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("fixbra", fp_convt_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4590,7 +4563,6 @@ static UChar * s390_emit_ADTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("adtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4602,7 +4574,6 @@ static UChar * s390_emit_AXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("axtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4637,7 +4608,6 @@ s390_emit_CDGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); vassert(m4 == 0); - vassert(m3 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdgtra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4667,7 +4637,6 @@ s390_emit_CDFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4681,7 +4650,6 @@ s390_emit_CXFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4695,7 +4663,6 @@ s390_emit_CDLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4709,7 +4676,6 @@ s390_emit_CXLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4723,7 +4689,6 @@ s390_emit_CDLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4737,7 +4702,6 @@ s390_emit_CXLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4771,7 +4735,6 @@ s390_emit_CFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4785,7 +4748,6 @@ s390_emit_CFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4799,7 +4761,6 @@ s390_emit_CGDTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); vassert(m4 == 0); - vassert(s390_host_has_fpext || m3 < 1 || m3 > 7); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cgdtra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4813,7 +4774,6 @@ s390_emit_CGXTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); vassert(m4 == 0); - vassert(s390_host_has_fpext || m3 < 1 || m3 > 7); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cgxtra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4827,7 +4787,6 @@ s390_emit_CLFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4841,7 +4800,6 @@ s390_emit_CLFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4855,7 +4813,6 @@ s390_emit_CLGDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clgdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4869,7 +4826,6 @@ s390_emit_CLGXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); vassert(s390_host_has_dfp); - vassert(s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clgxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4882,7 +4838,6 @@ static UChar * s390_emit_DDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("ddtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4894,7 +4849,6 @@ static UChar * s390_emit_DXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("dxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4989,7 +4943,6 @@ s390_emit_LEDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); vassert(m4 == 0); - vassert(s390_host_has_fpext || m3 < 1 || m3 > 7); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("ledtr", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -5003,7 +4956,6 @@ s390_emit_LDXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); vassert(m4 == 0); - vassert(s390_host_has_fpext || m3 < 1 || m3 > 7); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("ldxtr", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -5016,7 +4968,6 @@ static UChar * s390_emit_MDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("mdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -5028,7 +4979,6 @@ static UChar * s390_emit_MXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("mxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -5105,7 +5055,6 @@ static UChar * s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("sdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -5117,7 +5066,6 @@ static UChar * s390_emit_SXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { vassert(s390_host_has_dfp); - vassert(m4 == 0 || s390_host_has_fpext); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("sxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index eaf8a29bf..89ebfc747 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -930,8 +930,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF2)) #define s390_host_has_etf3 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF3)) -#define s390_host_has_fpext \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_FPEXT)) #define s390_host_has_lsc \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC)) #define s390_host_has_pfpo \ diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c index 8f87cc239..a0d9b7537 100644 --- a/VEX/priv/host_s390_isel.c +++ b/VEX/priv/host_s390_isel.c @@ -2392,12 +2392,7 @@ s390_isel_float128_expr_wrk(HReg *dst_hi, HReg *dst_lo, ISelEnv *env, irrm = expr->Iex.Binop.arg1; left = expr->Iex.Binop.arg2; - if (s390_host_has_fpext) { - rm = get_bfp_rounding_mode(env, irrm); - } else { - set_bfp_rounding_mode_in_fpc(env, irrm); - rm = S390_BFP_ROUND_PER_FPC; - } + rm = get_bfp_rounding_mode(env, irrm); s390_isel_float128_expr(&op_hi, &op_lo, env, left); /* operand --> (f4, f6) */ @@ -2677,12 +2672,7 @@ s390_isel_float_expr_wrk(ISelEnv *env, IRExpr *expr) /* convert-from-fixed and load-rounded have a rounding mode field when the floating point extension facility is installed. */ dst = newVRegF(env); - if (s390_host_has_fpext) { - rounding_mode = get_bfp_rounding_mode(env, irrm); - } else { - set_bfp_rounding_mode_in_fpc(env, irrm); - rounding_mode = S390_BFP_ROUND_PER_FPC; - } + rounding_mode = get_bfp_rounding_mode(env, irrm); addInstr(env, s390_insn_bfp_convert(size, conv, dst, h1, rounding_mode)); return dst; @@ -2753,14 +2743,7 @@ s390_isel_float_expr_wrk(ISelEnv *env, IRExpr *expr) /* result --> (f12, f14) */ - /* load-rounded has a rounding mode field when the floating point - extension facility is installed. */ - if (s390_host_has_fpext) { - rounding_mode = get_bfp_rounding_mode(env, irrm); - } else { - set_bfp_rounding_mode_in_fpc(env, irrm); - rounding_mode = S390_BFP_ROUND_PER_FPC; - } + rounding_mode = get_bfp_rounding_mode(env, irrm); addInstr(env, s390_insn_bfp128_convert_from(size, conv, f12, f14, f13, f15, rounding_mode)); @@ -2974,15 +2957,7 @@ s390_isel_dfp128_expr_wrk(HReg *dst_hi, HReg *dst_lo, ISelEnv *env, addInstr(env, s390_insn_move(8, f12, op2_hi)); addInstr(env, s390_insn_move(8, f14, op2_lo)); - /* DFP arithmetic ops take rounding mode only when fpext is - installed. But, DFP quantize operation takes rm irrespective - of fpext facility . */ - if (s390_host_has_fpext || op == Iop_QuantizeD128) { - rounding_mode = get_dfp_rounding_mode(env, irrm); - } else { - set_dfp_rounding_mode_in_fpc(env, irrm); - rounding_mode = S390_DFP_ROUND_PER_FPC_0; - } + rounding_mode = get_dfp_rounding_mode(env, irrm); addInstr(env, s390_insn_dfp128_binop(16, dfpop, f13, f15, f9, f11, f12, f14, rounding_mode)); /* Move result to virtual destination register */ @@ -3294,15 +3269,9 @@ s390_isel_dfp_expr_wrk(ISelEnv *env, IRExpr *expr) convert: { s390_dfp_round_t rounding_mode; - /* convert-from-fixed and load-rounded have a rounding mode field - when the floating point extension facility is installed. */ + dst = newVRegF(env); - if (s390_host_has_fpext) { - rounding_mode = get_dfp_rounding_mode(env, irrm); - } else { - set_dfp_rounding_mode_in_fpc(env, irrm); - rounding_mode = S390_DFP_ROUND_PER_FPC_0; - } + rounding_mode = get_dfp_rounding_mode(env, irrm); addInstr(env, s390_insn_dfp_convert(size, conv, dst, h1, rounding_mode)); return dst; @@ -3368,14 +3337,7 @@ s390_isel_dfp_expr_wrk(ISelEnv *env, IRExpr *expr) /* result --> (f12, f14) */ - /* load-rounded has a rounding mode field when the floating point - extension facility is installed. */ - if (s390_host_has_fpext) { - rounding_mode = get_dfp_rounding_mode(env, irrm); - } else { - set_dfp_rounding_mode_in_fpc(env, irrm); - rounding_mode = S390_DFP_ROUND_PER_FPC_0; - } + rounding_mode = get_dfp_rounding_mode(env, irrm); addInstr(env, s390_insn_dfp128_convert_from(size, conv, f12, f14, f13, f15, rounding_mode)); dst = newVRegF(env); @@ -3495,15 +3457,7 @@ s390_isel_dfp_expr_wrk(ISelEnv *env, IRExpr *expr) op2 = s390_isel_dfp_expr(env, left); /* Process 1st operand */ op3 = s390_isel_dfp_expr(env, right); /* Process 2nd operand */ dst = newVRegF(env); - /* DFP arithmetic ops take rounding mode only when fpext is - installed. But, DFP quantize operation takes rm irrespective - of fpext facility . */ - if (s390_host_has_fpext || dfpop == S390_DFP_QUANTIZE) { - rounding_mode = get_dfp_rounding_mode(env, irrm); - } else { - set_dfp_rounding_mode_in_fpc(env, irrm); - rounding_mode = S390_DFP_ROUND_PER_FPC_0; - } + rounding_mode = get_dfp_rounding_mode(env, irrm); addInstr(env, s390_insn_dfp_binop(size, dfpop, dst, op2, op3, rounding_mode)); return dst; diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 917411558..9a12eebad 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1536,11 +1536,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) return "PPC64 function redirection stack overflow"; case EmWarn_PPC64_redir_underflow: return "PPC64 function redirection stack underflow"; - case EmWarn_S390X_fpext_rounding: - return "The specified rounding mode cannot be supported. That\n" - " feature requires the floating point extension facility\n" - " which is not available on this host. Continuing using\n" - " the rounding mode from FPC. Results may differ!"; case EmWarn_S390X_XxC_not_zero: return "Encountered an insn with the IEEE-inexact-exception control\n" " (XxC) bit set to 1. This is not supported. Continuing anyway.\n" @@ -1553,10 +1548,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) return "Instruction pfpo is not supported on this host"; case EmFail_S390X_DFP_insn: return "DFP instructions are not supported on this host"; - case EmFail_S390X_fpext: - return "Encountered an instruction that requires the floating " - "point extension facility.\n" - " That facility is not available on this host"; case EmFail_S390X_invalid_PFPO_rounding_mode: return "The rounding mode in GPR 0 for the PFPO instruction" " is invalid"; @@ -1927,7 +1918,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_FGX, "fgx" }, { VEX_HWCAPS_S390X_ETF2, "etf2" }, { VEX_HWCAPS_S390X_ETF3, "etf3" }, - { VEX_HWCAPS_S390X_FPEXT, "fpext" }, { 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 46001f105..8ff333bc4 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -168,7 +168,6 @@ typedef #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_FPEXT (1<<15) /* Floating point extension 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 */ @@ -190,7 +189,6 @@ typedef VEX_HWCAPS_S390X_GIE | \ VEX_HWCAPS_S390X_DFP | \ VEX_HWCAPS_S390X_FGX | \ - VEX_HWCAPS_S390X_FPEXT | \ VEX_HWCAPS_S390X_LSC | \ VEX_HWCAPS_S390X_ETF3 | \ VEX_HWCAPS_S390X_ETF2 | \ diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index ea452970a..fc2053125 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -84,11 +84,6 @@ typedef EmWarn_PPC64_redir_overflow, EmWarn_PPC64_redir_underflow, - /* insn specifies a rounding mode other than "according to FPC" - which requires the floating point extension facility. But that - facility is not available on this host */ - EmWarn_S390X_fpext_rounding, - /* Various BFP insns have an M4 field containing the IEEE-inexact-exception (XxC) control bit. That bit cannot me modelled in VEX and is expected to be zero. */ @@ -105,10 +100,6 @@ typedef /* DFP insns are not supported on this host */ EmFail_S390X_DFP_insn, - /* insn needs floating point extension facility which is not - available on this host */ - EmFail_S390X_fpext, - /* 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 711538c07..a1fa59351 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1528,11 +1528,6 @@ Bool VG_(machine_get_hwcaps)( void ) # include "libvex_s390x_common.h" { - /* Instruction set detection code borrowed from ppc above. */ - vki_sigset_t saved_set, tmp_set; - vki_sigaction_fromK_t saved_sigill_act; - vki_sigaction_toK_t tmp_sigill_act; - Int i, model; /* If the model is "unknown" don't treat this as an error. Assume @@ -1576,7 +1571,6 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, { False, 24, VEX_HWCAPS_S390X_ETF2, "ETF2" }, { False, 30, VEX_HWCAPS_S390X_ETF3, "ETF3" }, - { False, 37, VEX_HWCAPS_S390X_FPEXT, "FPEXT" }, { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, diff --git a/memcheck/tests/vbit-test/irops.c b/memcheck/tests/vbit-test/irops.c index 46af4fa97..e3e06d7c7 100644 --- a/memcheck/tests/vbit-test/irops.c +++ b/memcheck/tests/vbit-test/irops.c @@ -1234,14 +1234,7 @@ get_irop(IROp op) case Iop_F64toI32U: case Iop_F64toI64U: case Iop_F128toI32U: - case Iop_F128toI64U: { - /* These IROps require the floating point extension facility */ - rc = system(S390X_FEATURES " s390x-fpext"); - // s390x_features returns 1 if feature does not exist - rc /= 256; - if (rc != 0) return NULL; - } - break; + case Iop_F128toI64U: /* PFPO Iops */ case Iop_F32toD32: case Iop_F32toD64: diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 8ce7e048b..66b60a868 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -8,7 +8,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ op_exception stck stckf stcke stfle cksm mvcl clcl troo \ trto trot trtt tr tre cij cgij clij clgij crj cgrj clrj clgrj \ cs csg cds cdsg cu21 cu21_1 cu24 cu24_1 cu42 cu12 cu12_1 \ - ex_sig ex_clone cu14 cu14_1 cu41 ecag fpext_warn fpext_fail \ + ex_sig ex_clone cu14 cu14_1 cu41 ecag \ bfp-fpc bfp-306054 \ bfp-muldiv comp-1 comp-2 exrl tmll tm stmg \ ex clst mvc test_fork test_sig rxsbg popcnt \ diff --git a/none/tests/s390x/bfp-XxC.vgtest b/none/tests/s390x/bfp-XxC.vgtest index af289c94a..5ff2ac168 100644 --- a/none/tests/s390x/bfp-XxC.vgtest +++ b/none/tests/s390x/bfp-XxC.vgtest @@ -1,3 +1,2 @@ -prereq: ../../../tests/s390x_features s390x-fpext prog: /bin/true post: ./emwarn-gen.pl --bfp-XxC diff --git a/none/tests/s390x/bfp-convert.vgtest b/none/tests/s390x/bfp-convert.vgtest index 11cd11c52..693e0d0f8 100644 --- a/none/tests/s390x/bfp-convert.vgtest +++ b/none/tests/s390x/bfp-convert.vgtest @@ -1,2 +1 @@ prog: bfp-convert -prereq: ../../../tests/s390x_features s390x-fpext diff --git a/none/tests/s390x/bfp-emit.vgtest b/none/tests/s390x/bfp-emit.vgtest index 4bfcbac22..3ab61ff6e 100644 --- a/none/tests/s390x/bfp-emit.vgtest +++ b/none/tests/s390x/bfp-emit.vgtest @@ -1,3 +1,2 @@ -prereq: ../../../tests/s390x_features s390x-fpext prog: /bin/true post: ./bfp-emit.pl diff --git a/none/tests/s390x/bfp-fpc.vgtest b/none/tests/s390x/bfp-fpc.vgtest index d7306a2e3..b8463d0f7 100644 --- a/none/tests/s390x/bfp-fpc.vgtest +++ b/none/tests/s390x/bfp-fpc.vgtest @@ -1,2 +1 @@ prog: bfp-fpc -prereq: ../../../tests/s390x_features s390x-fpext diff --git a/none/tests/s390x/dfp-XiC.vgtest b/none/tests/s390x/dfp-XiC.vgtest index bea81fbee..6f4b2d0fd 100644 --- a/none/tests/s390x/dfp-XiC.vgtest +++ b/none/tests/s390x/dfp-XiC.vgtest @@ -1,3 +1,3 @@ -prereq: ../../../tests/s390x_features s390x-fpext && ../../../tests/s390x_features s390x-dfp +prereq: ../../../tests/s390x_features s390x-dfp prog: /bin/true post: ./emwarn-gen.pl --dfp-XiC diff --git a/none/tests/s390x/dfp-XxC.vgtest b/none/tests/s390x/dfp-XxC.vgtest index 681c300a1..76cd80726 100644 --- a/none/tests/s390x/dfp-XxC.vgtest +++ b/none/tests/s390x/dfp-XxC.vgtest @@ -1,3 +1,3 @@ -prereq: ../../../tests/s390x_features s390x-fpext && ../../../tests/s390x_features s390x-dfp +prereq: ../../../tests/s390x_features s390x-dfp prog: /bin/true post: ./emwarn-gen.pl --dfp-XxC diff --git a/none/tests/s390x/dfpext.vgtest b/none/tests/s390x/dfpext.vgtest index ced73e53f..9cca69158 100644 --- a/none/tests/s390x/dfpext.vgtest +++ b/none/tests/s390x/dfpext.vgtest @@ -1,2 +1,2 @@ prog: dfpext -prereq: test -e dfpext && ../../../tests/s390x_features s390x-dfp && ../../../tests/s390x_features s390x-fpext +prereq: test -e dfpext && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/fpext_fail.c b/none/tests/s390x/fpext_fail.c deleted file mode 100644 index 9de7a8e57..000000000 --- a/none/tests/s390x/fpext_fail.c +++ /dev/null @@ -1,6 +0,0 @@ -int main(void) -{ - float val = 0.0f; - __asm__ volatile ("celfbr 1,5,%[f0],0" : : [f0]"f"(val) : "cc", "r1"); - return 0; -} diff --git a/none/tests/s390x/fpext_fail.stderr.exp b/none/tests/s390x/fpext_fail.stderr.exp deleted file mode 100644 index ec1a3be93..000000000 --- a/none/tests/s390x/fpext_fail.stderr.exp +++ /dev/null @@ -1,8 +0,0 @@ - -Emulation fatal error -- Valgrind cannot continue: - Encountered an instruction that requires the floating point extension facility. - That facility is not available on this host - at 0x........: main (fpext.c:136) - -Valgrind has to exit now. Sorry. - diff --git a/none/tests/s390x/fpext_fail.stdout.exp b/none/tests/s390x/fpext_fail.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/s390x/fpext_fail.vgtest b/none/tests/s390x/fpext_fail.vgtest deleted file mode 100644 index 48e8c5984..000000000 --- a/none/tests/s390x/fpext_fail.vgtest +++ /dev/null @@ -1,2 +0,0 @@ -prog: fpext_fail -prereq: test -e fpext_fail && ../../../tests/s390x_features '!s390x-fpext' diff --git a/none/tests/s390x/fpext_warn.c b/none/tests/s390x/fpext_warn.c deleted file mode 100644 index cc4bd764e..000000000 --- a/none/tests/s390x/fpext_warn.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include "opcodes.h" - -/* Test that emulation warnings appear when the floating point - extension facility is not installed and the opcode specifies - a rounding mode other than 0. */ -int -main(void) -{ - printf("before\n"); - __asm__ volatile ( CEGBRA(1,0,0,0) : : : "cc", "memory"); - __asm__ volatile ( CEFBRA(3,0,0,0) : : : "cc", "memory"); - __asm__ volatile ( CDGBRA(4,0,0,0) : : : "cc", "memory"); - - /* Note: an emulation warning is expected for the following - insn but none is given. The reason is that at most 3 warnings - of a given kind will be issued - and we already had three. */ - __asm__ volatile ( CEFBRA(5,0,0,0) : : : "cc", "memory"); - - printf("after\n"); - return 0; -} diff --git a/none/tests/s390x/fpext_warn.stderr.exp b/none/tests/s390x/fpext_warn.stderr.exp deleted file mode 100644 index 0dd3bffb9..000000000 --- a/none/tests/s390x/fpext_warn.stderr.exp +++ /dev/null @@ -1,20 +0,0 @@ - -Emulation warning: unsupported action: - The specified rounding mode cannot be supported. That - feature requires the floating point extension facility - which is not available on this host. Continuing using - the rounding mode from FPC. Results may differ! - at 0x........: main (fpext_warn.c:11) -Emulation warning: unsupported action: - The specified rounding mode cannot be supported. That - feature requires the floating point extension facility - which is not available on this host. Continuing using - the rounding mode from FPC. Results may differ! - at 0x........: main (fpext_warn.c:12) -Emulation warning: unsupported action: - The specified rounding mode cannot be supported. That - feature requires the floating point extension facility - which is not available on this host. Continuing using - the rounding mode from FPC. Results may differ! - at 0x........: main (fpext_warn.c:13) - diff --git a/none/tests/s390x/fpext_warn.stdout.exp b/none/tests/s390x/fpext_warn.stdout.exp deleted file mode 100644 index eecca907f..000000000 --- a/none/tests/s390x/fpext_warn.stdout.exp +++ /dev/null @@ -1,2 +0,0 @@ -before -after diff --git a/none/tests/s390x/fpext_warn.vgtest b/none/tests/s390x/fpext_warn.vgtest deleted file mode 100644 index 6900df96a..000000000 --- a/none/tests/s390x/fpext_warn.vgtest +++ /dev/null @@ -1,3 +0,0 @@ -prog: fpext_warn -prereq: ../../../tests/s390x_features '!s390x-fpext' -vgopts: --show-emwarns=yes diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 1dda2f01f..560fbb843 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -237,8 +237,6 @@ static int go(char *feature, char *cpu) match = facilities[0] & FAC_BIT(35); } else if (strcmp(feature, "s390x-etf3") == 0 ) { match = facilities[0] & FAC_BIT(30); - } else if (strcmp(feature, "s390x-fpext") == 0 ) { - match = facilities[0] & FAC_BIT(37); } else if (strcmp(feature, "s390x-dfp") == 0 ) { match = facilities[0] & FAC_BIT(42); } else if (strcmp(feature, "s390x-pfpo") == 0 ) { From 23c8f597036b6bf47c27b4c694135a7b6ede1634 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 24 Nov 2025 12:55:15 +0100 Subject: [PATCH 075/502] Darwin regtest: make a variant of none require-text-symbol-2 This test looks for a bogus symbol in libc.so. But Darwin has no libc.so, so make this variant that looks in libsystem_c.dylib. The -2 variant now has a !os_test darwin prereq and the new -3 variant has an os_test darwin prereq. --- none/tests/Makefile.am | 1 + none/tests/require-text-symbol-2.vgtest | 1 + none/tests/require-text-symbol-3.stderr.exp | 9 +++++++++ none/tests/require-text-symbol-3.vgtest | 4 ++++ 4 files changed, 15 insertions(+) create mode 100644 none/tests/require-text-symbol-3.stderr.exp create mode 100644 none/tests/require-text-symbol-3.vgtest diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index dabfcd850..c0f473b73 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -232,6 +232,7 @@ EXTRA_DIST = \ require-text-symbol-2.stderr.exp-libcso1 \ require-text-symbol-2.stderr.exp-libcso6 \ require-text-symbol-2.stderr.exp-freebsd \ + require-text-symbol-3.vgtest require-text-symbol-3.stderr.exp \ res_search.stderr.exp res_search.stdout.exp res_search.vgtest \ resolv.stderr.exp resolv.stdout.exp resolv.vgtest \ rlimit_nofile.stderr.exp rlimit_nofile.stdout.exp rlimit_nofile.vgtest \ diff --git a/none/tests/require-text-symbol-2.vgtest b/none/tests/require-text-symbol-2.vgtest index dc319e18c..04ab3a609 100644 --- a/none/tests/require-text-symbol-2.vgtest +++ b/none/tests/require-text-symbol-2.vgtest @@ -1,3 +1,4 @@ +prereq: ! ../../tests/os_test darwin prog: require-text-symbol vgopts: -q "--require-text-symbol=:*libc.so*:doesntexist" --vgdb-prefix=./vgdb-prefix-require-text-symbol-2 cleanup: rm -f ./vgdb-prefix-require-text-symbol-2* diff --git a/none/tests/require-text-symbol-3.stderr.exp b/none/tests/require-text-symbol-3.stderr.exp new file mode 100644 index 000000000..ba768a791 --- /dev/null +++ b/none/tests/require-text-symbol-3.stderr.exp @@ -0,0 +1,9 @@ + +valgrind: Fatal error at when loading library with soname +valgrind: libsystem_c.dylib +valgrind: Cannot find any text symbol with a name that matches the pattern +valgrind: doesntexist +valgrind: as required by a --require-text-symbol= specification. + +valgrind: Cannot continue -- exiting now. + diff --git a/none/tests/require-text-symbol-3.vgtest b/none/tests/require-text-symbol-3.vgtest new file mode 100644 index 000000000..4a1689f94 --- /dev/null +++ b/none/tests/require-text-symbol-3.vgtest @@ -0,0 +1,4 @@ +prereq: ../../tests/os_test darwin +prog: require-text-symbol +vgopts: -q "--require-text-symbol=:*libsystem_c.dylib:doesntexist" --vgdb-prefix=./vgdb-prefix-require-text-symbol-3 +cleanup: rm -f ./vgdb-prefix-require-text-symbol-3* From 49d3e63da64f3e57bd39d8275271535291a66be5 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 24 Nov 2025 16:40:23 +0000 Subject: [PATCH 076/502] s390: decimal-floating-point facility related cleanups (BZ 509562) The decimal-floating-point facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_DFP and s390_host_has_dfp - Remove EmFail_S390X_DFP_insn - Update tests/s390x_features.c Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- VEX/priv/guest_s390_toIR.c | 1018 ++++++++++++------------------- VEX/priv/host_s390_defs.c | 38 -- VEX/priv/host_s390_defs.h | 2 - VEX/priv/main_main.c | 3 - VEX/pub/libvex.h | 2 - VEX/pub/libvex_emnote.h | 3 - coregrind/m_machine.c | 1 - none/tests/s390x/dfp-1.vgtest | 1 - none/tests/s390x/dfp-2.vgtest | 1 - none/tests/s390x/dfp-3.vgtest | 1 - none/tests/s390x/dfp-4.vgtest | 1 - none/tests/s390x/dfp-XiC.vgtest | 1 - none/tests/s390x/dfp-XxC.vgtest | 1 - none/tests/s390x/dfpconv.vgtest | 1 - none/tests/s390x/dfpext.vgtest | 1 - none/tests/s390x/dfptest.vgtest | 1 - none/tests/s390x/srnmt.vgtest | 1 - tests/s390x_features.c | 2 - 18 files changed, 398 insertions(+), 681 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 42bf5ad81..463f389df 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -12014,49 +12014,41 @@ s390_irgen_SDB(UChar r1, IRTemp op2addr) static const HChar * s390_irgen_ADTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_D64); - IRTemp op2 = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_D64); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_dw0(r2)); - assign(op2, get_dpr_dw0(r3)); - assign(result, triop(Iop_AddD64, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); - put_dpr_dw0(r1, mkexpr(result)); - } + IRTemp op1 = newTemp(Ity_D64); + IRTemp op2 = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_dw0(r2)); + assign(op2, get_dpr_dw0(r3)); + assign(result, triop(Iop_AddD64, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); + put_dpr_dw0(r1, mkexpr(result)); return "adtra"; } static const HChar * s390_irgen_AXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("axtra", is_valid_fpr_pair(r1)); - s390_insn_assert("axtra", is_valid_fpr_pair(r2)); - s390_insn_assert("axtra", is_valid_fpr_pair(r3)); + s390_insn_assert("axtra", is_valid_fpr_pair(r1)); + s390_insn_assert("axtra", is_valid_fpr_pair(r2)); + s390_insn_assert("axtra", is_valid_fpr_pair(r3)); - IRTemp op1 = newTemp(Ity_D128); - IRTemp op2 = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_D128); - IRTemp rounding_mode; + IRTemp op1 = newTemp(Ity_D128); + IRTemp op2 = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); + IRTemp rounding_mode; - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_pair(r2)); - assign(op2, get_dpr_pair(r3)); - assign(result, triop(Iop_AddD128, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_pair(r1, mkexpr(result)); + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_pair(r2)); + assign(op2, get_dpr_pair(r3)); + assign(result, triop(Iop_AddD128, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_pair(r1, mkexpr(result)); - s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); - } + s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); return "axtra"; } @@ -12103,16 +12095,12 @@ static const HChar * s390_irgen_CDFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_dpr_dw0(r1, unop(Iop_I32StoD64, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_dpr_dw0(r1, unop(Iop_I32StoD64, mkexpr(op2))); return "cdftr"; } @@ -12120,36 +12108,28 @@ static const HChar * s390_irgen_CXFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("cxftr", is_valid_fpr_pair(r1)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cxftr", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_dpr_pair(r1, unop(Iop_I32StoD128, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_dpr_pair(r1, unop(Iop_I32StoD128, mkexpr(op2))); return "cxftr"; } static const HChar * s390_irgen_CDGTRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op2 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_I64); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - assign(op2, get_gpr_dw0(r2)); - put_dpr_dw0(r1, binop(Iop_I64StoD64, mkexpr(encode_dfp_rounding_mode(m3)), - mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_dpr_dw0(r1, binop(Iop_I64StoD64, mkexpr(encode_dfp_rounding_mode(m3)), + mkexpr(op2))); return "cdgtra"; } @@ -12157,21 +12137,14 @@ static const HChar * s390_irgen_CXGTRA(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("cxgtra", is_valid_fpr_pair(r1)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - - IRTemp op2 = newTemp(Ity_I64); + s390_insn_assert("cxgtra", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - /* No emulation warning here about an non-zero m3 on hosts without - floating point extension facility. No rounding is performed */ + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_dpr_pair(r1, unop(Iop_I64StoD128, mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_dpr_pair(r1, unop(Iop_I64StoD128, mkexpr(op2))); return "cxgtra"; } @@ -12179,16 +12152,12 @@ static const HChar * s390_irgen_CDLFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_dpr_dw0(r1, unop(Iop_I32UtoD64, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_dpr_dw0(r1, unop(Iop_I32UtoD64, mkexpr(op2))); return "cdlftr"; } @@ -12196,36 +12165,27 @@ static const HChar * s390_irgen_CXLFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("cxlftr", is_valid_fpr_pair(r1)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cxlftr", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I32); + IRTemp op2 = newTemp(Ity_I32); - assign(op2, get_gpr_w1(r2)); - put_dpr_pair(r1, unop(Iop_I32UtoD128, mkexpr(op2))); - } + assign(op2, get_gpr_w1(r2)); + put_dpr_pair(r1, unop(Iop_I32UtoD128, mkexpr(op2))); return "cxlftr"; } static const HChar * s390_irgen_CDLGTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I64); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_dpr_dw0(r1, binop(Iop_I64UtoD64, - mkexpr(encode_dfp_rounding_mode(m3)), - mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_dpr_dw0(r1, binop(Iop_I64UtoD64, + mkexpr(encode_dfp_rounding_mode(m3)), mkexpr(op2))); return "cdlgtr"; } @@ -12233,827 +12193,645 @@ static const HChar * s390_irgen_CXLGTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op2 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_I64); - assign(op2, get_gpr_dw0(r2)); - put_dpr_pair(r1, unop(Iop_I64UtoD128, mkexpr(op2))); - } + assign(op2, get_gpr_dw0(r2)); + put_dpr_pair(r1, unop(Iop_I64UtoD128, mkexpr(op2))); return "cxlgtr"; } static const HChar * s390_irgen_CFDTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_dw0(r2)); - assign(result, binop(Iop_D64toI32S, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_32, op, rounding_mode); - } + assign(op, get_dpr_dw0(r2)); + assign(result, binop(Iop_D64toI32S, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_32, op, rounding_mode); return "cfdtr"; } static const HChar * s390_irgen_CFXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("cfxtr", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cfxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_pair(r2)); - assign(result, binop(Iop_D128toI32S, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_32, op, - rounding_mode); - } + assign(op, get_dpr_pair(r2)); + assign(result, binop(Iop_D128toI32S, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_32, op, rounding_mode); return "cfxtr"; } static const HChar * s390_irgen_CGDTRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_dw0(r2)); - put_gpr_dw0(r1, binop(Iop_D64toI64S, mkexpr(rounding_mode), mkexpr(op))); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_64, op, rounding_mode); - } + assign(op, get_dpr_dw0(r2)); + put_gpr_dw0(r1, binop(Iop_D64toI64S, mkexpr(rounding_mode), mkexpr(op))); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_64, op, rounding_mode); return "cgdtra"; } static const HChar * s390_irgen_CGXTRA(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("cgxtra", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("cgxtra", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D128); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_D128); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_pair(r2)); - put_gpr_dw0(r1, binop(Iop_D128toI64S, mkexpr(rounding_mode), mkexpr(op))); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_64, op, rounding_mode); - } + assign(op, get_dpr_pair(r2)); + put_gpr_dw0(r1, binop(Iop_D128toI64S, mkexpr(rounding_mode), mkexpr(op))); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_64, op, rounding_mode); return "cgxtra"; } static const HChar * s390_irgen_CEDTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_D64); - IRTemp op2 = newTemp(Ity_D64); - IRTemp cc_vex = newTemp(Ity_I32); - IRTemp cc_s390 = newTemp(Ity_I32); + IRTemp op1 = newTemp(Ity_D64); + IRTemp op2 = newTemp(Ity_D64); + IRTemp cc_vex = newTemp(Ity_I32); + IRTemp cc_s390 = newTemp(Ity_I32); - assign(op1, get_dpr_dw0(r1)); - assign(op2, get_dpr_dw0(r2)); - assign(cc_vex, binop(Iop_CmpExpD64, mkexpr(op1), mkexpr(op2))); + assign(op1, get_dpr_dw0(r1)); + assign(op2, get_dpr_dw0(r2)); + assign(cc_vex, binop(Iop_CmpExpD64, mkexpr(op1), mkexpr(op2))); - assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); - s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - } + assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); + s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); return "cedtr"; } static const HChar * s390_irgen_CEXTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("cextr", is_valid_fpr_pair(r1)); - s390_insn_assert("cextr", is_valid_fpr_pair(r2)); + s390_insn_assert("cextr", is_valid_fpr_pair(r1)); + s390_insn_assert("cextr", is_valid_fpr_pair(r2)); - IRTemp op1 = newTemp(Ity_D128); - IRTemp op2 = newTemp(Ity_D128); - IRTemp cc_vex = newTemp(Ity_I32); - IRTemp cc_s390 = newTemp(Ity_I32); + IRTemp op1 = newTemp(Ity_D128); + IRTemp op2 = newTemp(Ity_D128); + IRTemp cc_vex = newTemp(Ity_I32); + IRTemp cc_s390 = newTemp(Ity_I32); - assign(op1, get_dpr_pair(r1)); - assign(op2, get_dpr_pair(r2)); - assign(cc_vex, binop(Iop_CmpExpD128, mkexpr(op1), mkexpr(op2))); + assign(op1, get_dpr_pair(r1)); + assign(op2, get_dpr_pair(r2)); + assign(cc_vex, binop(Iop_CmpExpD128, mkexpr(op1), mkexpr(op2))); - assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); - s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - } + assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); + s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); return "cextr"; } static const HChar * s390_irgen_CLFDTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_dw0(r2)); - assign(result, binop(Iop_D64toI32U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_32, op, rounding_mode); - } + assign(op, get_dpr_dw0(r2)); + assign(result, binop(Iop_D64toI32U, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_32, op, rounding_mode); return "clfdtr"; } static const HChar * s390_irgen_CLFXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("clfxtr", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clfxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_I32); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_I32); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_pair(r2)); - assign(result, binop(Iop_D128toI32U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_w1(r1, mkexpr(result)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_32, op, - rounding_mode); - } + assign(op, get_dpr_pair(r2)); + assign(result, binop(Iop_D128toI32U, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_w1(r1, mkexpr(result)); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_32, op, rounding_mode); return "clfxtr"; } static const HChar * s390_irgen_CLGDTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_I64); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - - assign(op, get_dpr_dw0(r2)); - assign(result, binop(Iop_D64toI64U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_64, op, rounding_mode); - } + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_I64); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + + assign(op, get_dpr_dw0(r2)); + assign(result, binop(Iop_D64toI64U, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_64, op, rounding_mode); return "clgdtr"; } static const HChar * s390_irgen_CLGXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("clgxtr", is_valid_fpr_pair(r2)); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); + s390_insn_assert("clgxtr", is_valid_fpr_pair(r2)); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_I64); - IRTemp rounding_mode = encode_dfp_rounding_mode(m3); + IRTemp op = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_I64); + IRTemp rounding_mode = encode_dfp_rounding_mode(m3); - assign(op, get_dpr_pair(r2)); - assign(result, binop(Iop_D128toI64U, mkexpr(rounding_mode), - mkexpr(op))); - put_gpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_64, op, - rounding_mode); - } + assign(op, get_dpr_pair(r2)); + assign(result, binop(Iop_D128toI64U, mkexpr(rounding_mode), mkexpr(op))); + put_gpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_64, op, rounding_mode); return "clgxtr"; } static const HChar * s390_irgen_DDTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_D64); - IRTemp op2 = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_D64); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_dw0(r2)); - assign(op2, get_dpr_dw0(r3)); - assign(result, triop(Iop_DivD64, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_dw0(r1, mkexpr(result)); - } + IRTemp op1 = newTemp(Ity_D64); + IRTemp op2 = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_dw0(r2)); + assign(op2, get_dpr_dw0(r3)); + assign(result, triop(Iop_DivD64, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_dw0(r1, mkexpr(result)); return "ddtra"; } static const HChar * s390_irgen_DXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("dxtra", is_valid_fpr_pair(r1)); - s390_insn_assert("dxtra", is_valid_fpr_pair(r2)); - s390_insn_assert("dxtra", is_valid_fpr_pair(r3)); - - IRTemp op1 = newTemp(Ity_D128); - IRTemp op2 = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_D128); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_pair(r2)); - assign(op2, get_dpr_pair(r3)); - assign(result, triop(Iop_DivD128, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_pair(r1, mkexpr(result)); - } + s390_insn_assert("dxtra", is_valid_fpr_pair(r1)); + s390_insn_assert("dxtra", is_valid_fpr_pair(r2)); + s390_insn_assert("dxtra", is_valid_fpr_pair(r3)); + + IRTemp op1 = newTemp(Ity_D128); + IRTemp op2 = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_pair(r2)); + assign(op2, get_dpr_pair(r3)); + assign(result, triop(Iop_DivD128, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_pair(r1, mkexpr(result)); return "dxtra"; } static const HChar * s390_irgen_EEDTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - put_gpr_dw0(r1, unop(Iop_ExtractExpD64, get_dpr_dw0(r2))); - } + put_gpr_dw0(r1, unop(Iop_ExtractExpD64, get_dpr_dw0(r2))); return "eedtr"; } static const HChar * s390_irgen_EEXTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("eextr", is_valid_fpr_pair(r2)); + s390_insn_assert("eextr", is_valid_fpr_pair(r2)); - put_gpr_dw0(r1, unop(Iop_ExtractExpD128, get_dpr_pair(r2))); - } + put_gpr_dw0(r1, unop(Iop_ExtractExpD128, get_dpr_pair(r2))); return "eextr"; } static const HChar * s390_irgen_ESDTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - put_gpr_dw0(r1, unop(Iop_ExtractSigD64, get_dpr_dw0(r2))); - } + put_gpr_dw0(r1, unop(Iop_ExtractSigD64, get_dpr_dw0(r2))); return "esdtr"; } static const HChar * s390_irgen_ESXTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("esxtr", is_valid_fpr_pair(r2)); + s390_insn_assert("esxtr", is_valid_fpr_pair(r2)); - put_gpr_dw0(r1, unop(Iop_ExtractSigD128, get_dpr_pair(r2))); - } + put_gpr_dw0(r1, unop(Iop_ExtractSigD128, get_dpr_pair(r2))); return "esxtr"; } static const HChar * s390_irgen_IEDTR(UChar r3, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_I64); - IRTemp op2 = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_D64); + IRTemp op1 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); - assign(op1, get_gpr_dw0(r2)); - assign(op2, get_dpr_dw0(r3)); - assign(result, binop(Iop_InsertExpD64, mkexpr(op1), mkexpr(op2))); - put_dpr_dw0(r1, mkexpr(result)); - } + assign(op1, get_gpr_dw0(r2)); + assign(op2, get_dpr_dw0(r3)); + assign(result, binop(Iop_InsertExpD64, mkexpr(op1), mkexpr(op2))); + put_dpr_dw0(r1, mkexpr(result)); return "iedtr"; } static const HChar * s390_irgen_IEXTR(UChar r3, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("iextr", is_valid_fpr_pair(r1)); - s390_insn_assert("iextr", is_valid_fpr_pair(r3)); + s390_insn_assert("iextr", is_valid_fpr_pair(r1)); + s390_insn_assert("iextr", is_valid_fpr_pair(r3)); - IRTemp op1 = newTemp(Ity_I64); - IRTemp op2 = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_D128); + IRTemp op1 = newTemp(Ity_I64); + IRTemp op2 = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); - assign(op1, get_gpr_dw0(r2)); - assign(op2, get_dpr_pair(r3)); - assign(result, binop(Iop_InsertExpD128, mkexpr(op1), mkexpr(op2))); - put_dpr_pair(r1, mkexpr(result)); - } + assign(op1, get_gpr_dw0(r2)); + assign(op2, get_dpr_pair(r3)); + assign(result, binop(Iop_InsertExpD128, mkexpr(op1), mkexpr(op2))); + put_dpr_pair(r1, mkexpr(result)); return "iextr"; } static const HChar * s390_irgen_LDETR(UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x8) != 0) - emulation_warning(EmWarn_S390X_XiC_not_zero); - IRTemp op = newTemp(Ity_D32); + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); + IRTemp op = newTemp(Ity_D32); - assign(op, get_dpr_w0(r2)); - put_dpr_dw0(r1, unop(Iop_D32toD64, mkexpr(op))); - } + assign(op, get_dpr_w0(r2)); + put_dpr_dw0(r1, unop(Iop_D32toD64, mkexpr(op))); return "ldetr"; } static const HChar * s390_irgen_LXDTR(UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x8) != 0) - emulation_warning(EmWarn_S390X_XiC_not_zero); - s390_insn_assert("lxdtr", is_valid_fpr_pair(r1)); + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); + s390_insn_assert("lxdtr", is_valid_fpr_pair(r1)); - IRTemp op = newTemp(Ity_D64); + IRTemp op = newTemp(Ity_D64); - assign(op, get_dpr_dw0(r2)); - put_dpr_pair(r1, unop(Iop_D64toD128, mkexpr(op))); - } + assign(op, get_dpr_dw0(r2)); + put_dpr_pair(r1, unop(Iop_D64toD128, mkexpr(op))); return "lxdtr"; } static const HChar * s390_irgen_LDXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("ldxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("ldxtr", is_valid_fpr_pair(r2)); + s390_insn_assert("ldxtr", is_valid_fpr_pair(r1)); + s390_insn_assert("ldxtr", is_valid_fpr_pair(r2)); - if ((m4 & 0x8) != 0) - emulation_warning(EmWarn_S390X_XiC_not_zero); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp result = newTemp(Ity_D64); + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp result = newTemp(Ity_D64); - assign(result, binop(Iop_D128toD64, mkexpr(encode_dfp_rounding_mode(m3)), - get_dpr_pair(r2))); - put_dpr_dw0(r1, mkexpr(result)); - } + assign(result, binop(Iop_D128toD64, mkexpr(encode_dfp_rounding_mode(m3)), + get_dpr_pair(r2))); + put_dpr_dw0(r1, mkexpr(result)); return "ldxtr"; } static const HChar * s390_irgen_LEDTR(UChar m3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - if ((m4 & 0x8) != 0) - emulation_warning(EmWarn_S390X_XiC_not_zero); - if ((m4 & 0x4) != 0) - emulation_warning(EmWarn_S390X_XxC_not_zero); - IRTemp op = newTemp(Ity_D64); + if ((m4 & 0x8) != 0) + emulation_warning(EmWarn_S390X_XiC_not_zero); + if ((m4 & 0x4) != 0) + emulation_warning(EmWarn_S390X_XxC_not_zero); + IRTemp op = newTemp(Ity_D64); - assign(op, get_dpr_dw0(r2)); - put_dpr_w0(r1, binop(Iop_D64toD32, mkexpr(encode_dfp_rounding_mode(m3)), - mkexpr(op))); - } + assign(op, get_dpr_dw0(r2)); + put_dpr_w0(r1, binop(Iop_D64toD32, mkexpr(encode_dfp_rounding_mode(m3)), + mkexpr(op))); return "ledtr"; } static const HChar * s390_irgen_LTDTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp result = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); - assign(result, get_dpr_dw0(r2)); - put_dpr_dw0(r1, mkexpr(result)); - s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); - } + assign(result, get_dpr_dw0(r2)); + put_dpr_dw0(r1, mkexpr(result)); + s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); return "ltdtr"; } static const HChar * s390_irgen_LTXTR(UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("ltxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("ltxtr", is_valid_fpr_pair(r2)); + s390_insn_assert("ltxtr", is_valid_fpr_pair(r1)); + s390_insn_assert("ltxtr", is_valid_fpr_pair(r2)); - IRTemp result = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); - assign(result, get_dpr_pair(r2)); - put_dpr_pair(r1, mkexpr(result)); - s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); - } + assign(result, get_dpr_pair(r2)); + put_dpr_pair(r1, mkexpr(result)); + s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); return "ltxtr"; } static const HChar * s390_irgen_MDTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_D64); - IRTemp op2 = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_D64); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_dw0(r2)); - assign(op2, get_dpr_dw0(r3)); - assign(result, triop(Iop_MulD64, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_dw0(r1, mkexpr(result)); - } + IRTemp op1 = newTemp(Ity_D64); + IRTemp op2 = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_dw0(r2)); + assign(op2, get_dpr_dw0(r3)); + assign(result, triop(Iop_MulD64, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_dw0(r1, mkexpr(result)); return "mdtra"; } static const HChar * s390_irgen_MXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("mxtra", is_valid_fpr_pair(r1)); - s390_insn_assert("mxtra", is_valid_fpr_pair(r2)); - s390_insn_assert("mxtra", is_valid_fpr_pair(r3)); - - IRTemp op1 = newTemp(Ity_D128); - IRTemp op2 = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_D128); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_pair(r2)); - assign(op2, get_dpr_pair(r3)); - assign(result, triop(Iop_MulD128, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_pair(r1, mkexpr(result)); - } + s390_insn_assert("mxtra", is_valid_fpr_pair(r1)); + s390_insn_assert("mxtra", is_valid_fpr_pair(r2)); + s390_insn_assert("mxtra", is_valid_fpr_pair(r3)); + + IRTemp op1 = newTemp(Ity_D128); + IRTemp op2 = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_pair(r2)); + assign(op2, get_dpr_pair(r3)); + assign(result, triop(Iop_MulD128, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_pair(r1, mkexpr(result)); return "mxtra"; } static const HChar * s390_irgen_QADTR(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_D64); - IRTemp op2 = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_D64); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_dw0(r2)); - assign(op2, get_dpr_dw0(r3)); - assign(result, triop(Iop_QuantizeD64, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_dw0(r1, mkexpr(result)); - } + IRTemp op1 = newTemp(Ity_D64); + IRTemp op2 = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_dw0(r2)); + assign(op2, get_dpr_dw0(r3)); + assign(result, triop(Iop_QuantizeD64, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_dw0(r1, mkexpr(result)); return "qadtr"; } static const HChar * s390_irgen_QAXTR(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("qaxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("qaxtr", is_valid_fpr_pair(r2)); - s390_insn_assert("qaxtr", is_valid_fpr_pair(r3)); - - IRTemp op1 = newTemp(Ity_D128); - IRTemp op2 = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_D128); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_pair(r2)); - assign(op2, get_dpr_pair(r3)); - assign(result, triop(Iop_QuantizeD128, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_pair(r1, mkexpr(result)); - } + s390_insn_assert("qaxtr", is_valid_fpr_pair(r1)); + s390_insn_assert("qaxtr", is_valid_fpr_pair(r2)); + s390_insn_assert("qaxtr", is_valid_fpr_pair(r3)); + + IRTemp op1 = newTemp(Ity_D128); + IRTemp op2 = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_pair(r2)); + assign(op2, get_dpr_pair(r3)); + assign(result, triop(Iop_QuantizeD128, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_pair(r1, mkexpr(result)); return "qaxtr"; } static const HChar * s390_irgen_RRDTR(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_I8); - IRTemp op2 = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_D64); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_gpr_b7(r2)); - assign(op2, get_dpr_dw0(r3)); - assign(result, triop(Iop_SignificanceRoundD64, mkexpr(rounding_mode), - mkexpr(op1), mkexpr(op2))); - put_dpr_dw0(r1, mkexpr(result)); - } + IRTemp op1 = newTemp(Ity_I8); + IRTemp op2 = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_gpr_b7(r2)); + assign(op2, get_dpr_dw0(r3)); + assign(result, triop(Iop_SignificanceRoundD64, mkexpr(rounding_mode), + mkexpr(op1), mkexpr(op2))); + put_dpr_dw0(r1, mkexpr(result)); return "rrdtr"; } static const HChar * s390_irgen_RRXTR(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("rrxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("rrxtr", is_valid_fpr_pair(r3)); + s390_insn_assert("rrxtr", is_valid_fpr_pair(r1)); + s390_insn_assert("rrxtr", is_valid_fpr_pair(r3)); - IRTemp op1 = newTemp(Ity_I8); - IRTemp op2 = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_D128); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_gpr_b7(r2)); - assign(op2, get_dpr_pair(r3)); - assign(result, triop(Iop_SignificanceRoundD128, mkexpr(rounding_mode), - mkexpr(op1), mkexpr(op2))); - put_dpr_pair(r1, mkexpr(result)); - } + IRTemp op1 = newTemp(Ity_I8); + IRTemp op2 = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_gpr_b7(r2)); + assign(op2, get_dpr_pair(r3)); + assign(result, triop(Iop_SignificanceRoundD128, mkexpr(rounding_mode), + mkexpr(op1), mkexpr(op2))); + put_dpr_pair(r1, mkexpr(result)); return "rrxtr"; } static const HChar * s390_irgen_SDTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op1 = newTemp(Ity_D64); - IRTemp op2 = newTemp(Ity_D64); - IRTemp result = newTemp(Ity_D64); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_dw0(r2)); - assign(op2, get_dpr_dw0(r3)); - assign(result, triop(Iop_SubD64, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); - put_dpr_dw0(r1, mkexpr(result)); - } + IRTemp op1 = newTemp(Ity_D64); + IRTemp op2 = newTemp(Ity_D64); + IRTemp result = newTemp(Ity_D64); + IRTemp rounding_mode; + + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_dw0(r2)); + assign(op2, get_dpr_dw0(r3)); + assign(result, triop(Iop_SubD64, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); + put_dpr_dw0(r1, mkexpr(result)); return "sdtra"; } static const HChar * s390_irgen_SXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("sxtra", is_valid_fpr_pair(r1)); - s390_insn_assert("sxtra", is_valid_fpr_pair(r2)); - s390_insn_assert("sxtra", is_valid_fpr_pair(r3)); + s390_insn_assert("sxtra", is_valid_fpr_pair(r1)); + s390_insn_assert("sxtra", is_valid_fpr_pair(r2)); + s390_insn_assert("sxtra", is_valid_fpr_pair(r3)); - IRTemp op1 = newTemp(Ity_D128); - IRTemp op2 = newTemp(Ity_D128); - IRTemp result = newTemp(Ity_D128); - IRTemp rounding_mode; - - rounding_mode = encode_dfp_rounding_mode(m4); - assign(op1, get_dpr_pair(r2)); - assign(op2, get_dpr_pair(r3)); - assign(result, triop(Iop_SubD128, mkexpr(rounding_mode), mkexpr(op1), - mkexpr(op2))); - put_dpr_pair(r1, mkexpr(result)); + IRTemp op1 = newTemp(Ity_D128); + IRTemp op2 = newTemp(Ity_D128); + IRTemp result = newTemp(Ity_D128); + IRTemp rounding_mode; - s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); - } + rounding_mode = encode_dfp_rounding_mode(m4); + assign(op1, get_dpr_pair(r2)); + assign(op2, get_dpr_pair(r3)); + assign(result, triop(Iop_SubD128, mkexpr(rounding_mode), mkexpr(op1), + mkexpr(op2))); + put_dpr_pair(r1, mkexpr(result)); + s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); return "sxtra"; } static const HChar * s390_irgen_SLDT(UChar r3, IRTemp op2addr, UChar r1) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op = newTemp(Ity_D64); + IRTemp op = newTemp(Ity_D64); - assign(op, get_dpr_dw0(r3)); - put_dpr_dw0(r1, binop(Iop_ShlD64, mkexpr(op), - unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), - mkU64(63))))); - } + assign(op, get_dpr_dw0(r3)); + put_dpr_dw0(r1, binop(Iop_ShlD64, mkexpr(op), + unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), + mkU64(63))))); return "sldt"; } static const HChar * s390_irgen_SLXT(UChar r3, IRTemp op2addr, UChar r1) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("slxt", is_valid_fpr_pair(r1)); - s390_insn_assert("slxt", is_valid_fpr_pair(r3)); + s390_insn_assert("slxt", is_valid_fpr_pair(r1)); + s390_insn_assert("slxt", is_valid_fpr_pair(r3)); - IRTemp op = newTemp(Ity_D128); + IRTemp op = newTemp(Ity_D128); - assign(op, get_dpr_pair(r3)); - put_dpr_pair(r1, binop(Iop_ShlD128, mkexpr(op), - unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), - mkU64(63))))); - } + assign(op, get_dpr_pair(r3)); + put_dpr_pair(r1, binop(Iop_ShlD128, mkexpr(op), + unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), + mkU64(63))))); return "slxt"; } static const HChar * s390_irgen_SRDT(UChar r3, IRTemp op2addr, UChar r1) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp op = newTemp(Ity_D64); + IRTemp op = newTemp(Ity_D64); - assign(op, get_dpr_dw0(r3)); - put_dpr_dw0(r1, binop(Iop_ShrD64, mkexpr(op), - unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), - mkU64(63))))); - } + assign(op, get_dpr_dw0(r3)); + put_dpr_dw0(r1, binop(Iop_ShrD64, mkexpr(op), + unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), + mkU64(63))))); return "srdt"; } static const HChar * s390_irgen_SRXT(UChar r3, IRTemp op2addr, UChar r1) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("srxt", is_valid_fpr_pair(r1)); - s390_insn_assert("srxt", is_valid_fpr_pair(r3)); + s390_insn_assert("srxt", is_valid_fpr_pair(r1)); + s390_insn_assert("srxt", is_valid_fpr_pair(r3)); - IRTemp op = newTemp(Ity_D128); + IRTemp op = newTemp(Ity_D128); - assign(op, get_dpr_pair(r3)); - put_dpr_pair(r1, binop(Iop_ShrD128, mkexpr(op), - unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), - mkU64(63))))); - } + assign(op, get_dpr_pair(r3)); + put_dpr_pair(r1, binop(Iop_ShrD128, mkexpr(op), + unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), + mkU64(63))))); return "srxt"; } static const HChar * s390_irgen_TDCET(UChar r1, IRTemp op2addr) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp value = newTemp(Ity_D32); + IRTemp value = newTemp(Ity_D32); - assign(value, get_dpr_w0(r1)); + assign(value, get_dpr_w0(r1)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_32, value, op2addr); - } + s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_32, value, op2addr); return "tdcet"; } static const HChar * s390_irgen_TDCDT(UChar r1, IRTemp op2addr) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp value = newTemp(Ity_D64); + IRTemp value = newTemp(Ity_D64); - assign(value, get_dpr_dw0(r1)); + assign(value, get_dpr_dw0(r1)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_64, value, op2addr); - } + s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_64, value, op2addr); return "tdcdt"; } static const HChar * s390_irgen_TDCXT(UChar r1, IRTemp op2addr) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("tdcxt", is_valid_fpr_pair(r1)); + s390_insn_assert("tdcxt", is_valid_fpr_pair(r1)); - IRTemp value = newTemp(Ity_D128); + IRTemp value = newTemp(Ity_D128); - assign(value, get_dpr_pair(r1)); + assign(value, get_dpr_pair(r1)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDC_128, value, op2addr); - } + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDC_128, value, op2addr); return "tdcxt"; } static const HChar * s390_irgen_TDGET(UChar r1, IRTemp op2addr) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp value = newTemp(Ity_D32); + IRTemp value = newTemp(Ity_D32); - assign(value, get_dpr_w0(r1)); + assign(value, get_dpr_w0(r1)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_32, value, op2addr); - } + s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_32, value, op2addr); return "tdget"; } static const HChar * s390_irgen_TDGDT(UChar r1, IRTemp op2addr) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - IRTemp value = newTemp(Ity_D64); + IRTemp value = newTemp(Ity_D64); - assign(value, get_dpr_dw0(r1)); + assign(value, get_dpr_dw0(r1)); - s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_64, value, op2addr); - } + s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_64, value, op2addr); return "tdgdt"; } static const HChar * s390_irgen_TDGXT(UChar r1, IRTemp op2addr) { - if (! s390_host_has_dfp) { - emulation_failure(EmFail_S390X_DFP_insn); - } else { - s390_insn_assert("tdgxt", is_valid_fpr_pair(r1)); + s390_insn_assert("tdgxt", is_valid_fpr_pair(r1)); - IRTemp value = newTemp(Ity_D128); + IRTemp value = newTemp(Ity_D128); - assign(value, get_dpr_pair(r1)); + assign(value, get_dpr_pair(r1)); - s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDG_128, value, op2addr); - } + s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDG_128, value, op2addr); return "tdgxt"; } diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 6f5191124..4831e1d67 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -4562,7 +4562,6 @@ s390_emit_SXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_ADTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("adtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4573,7 +4572,6 @@ s390_emit_ADTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_AXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("axtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4584,7 +4582,6 @@ s390_emit_AXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CDTR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("cdtr"), FPR(r1), FPR(r2)); @@ -4595,7 +4592,6 @@ s390_emit_CDTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CXTR(UChar *p, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("cxtr"), FPR(r1), FPR(r2)); @@ -4606,7 +4602,6 @@ s390_emit_CXTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CDGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); vassert(m4 == 0); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) @@ -4619,7 +4614,6 @@ s390_emit_CDGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CXGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); vassert(m4 == 0); /* rounding mode m3 is not considered, as the corresponding IRop (Iop_I64StoD128) does not take rounding mode. */ @@ -4636,7 +4630,6 @@ static UChar * s390_emit_CDFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4649,7 +4642,6 @@ static UChar * s390_emit_CXFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4662,7 +4654,6 @@ static UChar * s390_emit_CDLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4675,7 +4666,6 @@ static UChar * s390_emit_CXLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4688,7 +4678,6 @@ static UChar * s390_emit_CDLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cdlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4701,7 +4690,6 @@ static UChar * s390_emit_CXLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cxlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); @@ -4734,7 +4722,6 @@ static UChar * s390_emit_CFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4747,7 +4734,6 @@ static UChar * s390_emit_CFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("cfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4759,7 +4745,6 @@ s390_emit_CFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CGDTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); vassert(m4 == 0); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) @@ -4772,7 +4757,6 @@ s390_emit_CGDTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CGXTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); vassert(m4 == 0); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) @@ -4786,7 +4770,6 @@ static UChar * s390_emit_CLFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4799,7 +4782,6 @@ static UChar * s390_emit_CLFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4812,7 +4794,6 @@ static UChar * s390_emit_CLGDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clgdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4825,7 +4806,6 @@ static UChar * s390_emit_CLGXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("clgxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); @@ -4837,7 +4817,6 @@ s390_emit_CLGXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_DDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("ddtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4848,7 +4827,6 @@ s390_emit_DDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_DXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("dxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4919,7 +4897,6 @@ s390_emit_IEXTR(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_LDETR(UChar *p, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("ldetr"), FPR(r1), FPR(r2), UINT(m4)); @@ -4930,7 +4907,6 @@ s390_emit_LDETR(UChar *p, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_LXDTR(UChar *p, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("lxdtr"), FPR(r1), FPR(r2), UINT(m4)); @@ -4941,7 +4917,6 @@ s390_emit_LXDTR(UChar *p, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_LEDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); vassert(m4 == 0); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) @@ -4954,7 +4929,6 @@ s390_emit_LEDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_LDXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); vassert(m4 == 0); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) @@ -4967,7 +4941,6 @@ s390_emit_LDXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_MDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("mdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -4978,7 +4951,6 @@ s390_emit_MDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_MXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("mxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -5010,7 +4982,6 @@ s390_emit_PFPO(UChar *p) static UChar * s390_emit_QADTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("qadtr"), FPR(r1), FPR(r3), FPR(r2), UINT(m4)); @@ -5021,7 +4992,6 @@ s390_emit_QADTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_QAXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("qaxtr"), FPR(r1), FPR(r3), FPR(r2), UINT(m4)); @@ -5032,7 +5002,6 @@ s390_emit_QAXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_RRDTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("rrdtr"), FPR(r1), FPR(r3), GPR(r2), UINT(m4)); @@ -5043,7 +5012,6 @@ s390_emit_RRDTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_RRXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("rrxtr"), FPR(r1), FPR(r3), GPR(r2), UINT(m4)); @@ -5054,7 +5022,6 @@ s390_emit_RRXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("sdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -5065,7 +5032,6 @@ s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_SXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("sxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); @@ -5076,7 +5042,6 @@ s390_emit_SXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_SLDT(UChar *p, UChar r3, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("sldt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); @@ -5087,7 +5052,6 @@ s390_emit_SLDT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_SLXT(UChar *p, UChar r3, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("slxt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); @@ -5098,7 +5062,6 @@ s390_emit_SLXT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_SRDT(UChar *p, UChar r3, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("srdt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); @@ -5109,7 +5072,6 @@ s390_emit_SRDT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_SRXT(UChar *p, UChar r3, UChar r1, UChar r2) { - vassert(s390_host_has_dfp); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(MNM("srxt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 89ebfc747..da0e2553e 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -922,8 +922,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_EIMM)) #define s390_host_has_gie \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_GIE)) -#define s390_host_has_dfp \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_DFP)) #define s390_host_has_fgx \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_FGX)) #define s390_host_has_etf2 \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 9a12eebad..1cdbd1b4b 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1546,8 +1546,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) " IEEE-invalid-operation exceptions will not be suppressed."; case EmFail_S390X_pfpo: return "Instruction pfpo is not supported on this host"; - case EmFail_S390X_DFP_insn: - return "DFP instructions are 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"; @@ -1914,7 +1912,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) } hwcaps_list[] = { { VEX_HWCAPS_S390X_EIMM, "eimm" }, { VEX_HWCAPS_S390X_GIE, "gie" }, - { VEX_HWCAPS_S390X_DFP, "dfp" }, { VEX_HWCAPS_S390X_FGX, "fgx" }, { VEX_HWCAPS_S390X_ETF2, "etf2" }, { VEX_HWCAPS_S390X_ETF3, "etf3" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 8ff333bc4..a1db9dbf6 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -164,7 +164,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_DFP (1<<9) /* Decimal floating point 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 */ @@ -187,7 +186,6 @@ typedef /* Special value representing all available s390x hwcaps */ #define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_EIMM | \ VEX_HWCAPS_S390X_GIE | \ - VEX_HWCAPS_S390X_DFP | \ VEX_HWCAPS_S390X_FGX | \ VEX_HWCAPS_S390X_LSC | \ VEX_HWCAPS_S390X_ETF3 | \ diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index fc2053125..8e0fc1349 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -97,9 +97,6 @@ typedef /* pfpo insn is not supported on this host */ EmFail_S390X_pfpo, - /* DFP insns are not supported on this host */ - EmFail_S390X_DFP_insn, - /* 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 a1fa59351..4690163f4 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1567,7 +1567,6 @@ Bool VG_(machine_get_hwcaps)( void ) } fac_hwcaps[] = { { False, 21, VEX_HWCAPS_S390X_EIMM, "EIMM" }, { False, 34, VEX_HWCAPS_S390X_GIE, "GIE" }, - { False, 42, VEX_HWCAPS_S390X_DFP, "DFP" }, { False, 41, VEX_HWCAPS_S390X_FGX, "FGX" }, { False, 24, VEX_HWCAPS_S390X_ETF2, "ETF2" }, { False, 30, VEX_HWCAPS_S390X_ETF3, "ETF3" }, diff --git a/none/tests/s390x/dfp-1.vgtest b/none/tests/s390x/dfp-1.vgtest index 0423b34ad..4ec0137dc 100644 --- a/none/tests/s390x/dfp-1.vgtest +++ b/none/tests/s390x/dfp-1.vgtest @@ -1,2 +1 @@ prog: dfp-1 -prereq: test -e dfp-1 && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/dfp-2.vgtest b/none/tests/s390x/dfp-2.vgtest index 164632918..0619fc347 100644 --- a/none/tests/s390x/dfp-2.vgtest +++ b/none/tests/s390x/dfp-2.vgtest @@ -1,2 +1 @@ prog: dfp-2 -prereq: test -e dfp-2 && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/dfp-3.vgtest b/none/tests/s390x/dfp-3.vgtest index e2b5673e4..4748299da 100644 --- a/none/tests/s390x/dfp-3.vgtest +++ b/none/tests/s390x/dfp-3.vgtest @@ -1,2 +1 @@ prog: dfp-3 -prereq: test -e dfp-3 && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/dfp-4.vgtest b/none/tests/s390x/dfp-4.vgtest index 0ffc1a6d6..7591e189c 100644 --- a/none/tests/s390x/dfp-4.vgtest +++ b/none/tests/s390x/dfp-4.vgtest @@ -1,2 +1 @@ prog: dfp-4 -prereq: test -e dfp-4 && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/dfp-XiC.vgtest b/none/tests/s390x/dfp-XiC.vgtest index 6f4b2d0fd..74979eb9b 100644 --- a/none/tests/s390x/dfp-XiC.vgtest +++ b/none/tests/s390x/dfp-XiC.vgtest @@ -1,3 +1,2 @@ -prereq: ../../../tests/s390x_features s390x-dfp prog: /bin/true post: ./emwarn-gen.pl --dfp-XiC diff --git a/none/tests/s390x/dfp-XxC.vgtest b/none/tests/s390x/dfp-XxC.vgtest index 76cd80726..0f29e3fd6 100644 --- a/none/tests/s390x/dfp-XxC.vgtest +++ b/none/tests/s390x/dfp-XxC.vgtest @@ -1,3 +1,2 @@ -prereq: ../../../tests/s390x_features s390x-dfp prog: /bin/true post: ./emwarn-gen.pl --dfp-XxC diff --git a/none/tests/s390x/dfpconv.vgtest b/none/tests/s390x/dfpconv.vgtest index 0b0f133b3..cf2468daa 100644 --- a/none/tests/s390x/dfpconv.vgtest +++ b/none/tests/s390x/dfpconv.vgtest @@ -1,2 +1 @@ prog: dfpconv -prereq: test -e dfpconv && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/dfpext.vgtest b/none/tests/s390x/dfpext.vgtest index 9cca69158..2347c39bc 100644 --- a/none/tests/s390x/dfpext.vgtest +++ b/none/tests/s390x/dfpext.vgtest @@ -1,2 +1 @@ prog: dfpext -prereq: test -e dfpext && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/dfptest.vgtest b/none/tests/s390x/dfptest.vgtest index a6f129139..440c611b4 100644 --- a/none/tests/s390x/dfptest.vgtest +++ b/none/tests/s390x/dfptest.vgtest @@ -1,2 +1 @@ prog: dfptest -prereq: test -e dfptest && ../../../tests/s390x_features s390x-dfp diff --git a/none/tests/s390x/srnmt.vgtest b/none/tests/s390x/srnmt.vgtest index cb7a4485f..358127665 100644 --- a/none/tests/s390x/srnmt.vgtest +++ b/none/tests/s390x/srnmt.vgtest @@ -1,2 +1 @@ prog: srnmt -prereq: test -e srnmt && ../../../tests/s390x_features s390x-dfp diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 560fbb843..1a5b4f5f7 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -237,8 +237,6 @@ static int go(char *feature, char *cpu) match = facilities[0] & FAC_BIT(35); } else if (strcmp(feature, "s390x-etf3") == 0 ) { match = facilities[0] & FAC_BIT(30); - } else if (strcmp(feature, "s390x-dfp") == 0 ) { - match = facilities[0] & FAC_BIT(42); } else if (strcmp(feature, "s390x-pfpo") == 0 ) { match = facilities[0] & FAC_BIT(44); } else if (strcmp(feature, "s390x-highw") == 0 ) { From 232bb62ce8020e915c75587e13ca7f5f55ca884c Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 24 Nov 2025 17:56:44 +0000 Subject: [PATCH 077/502] s390: MSA4 facility related cleanups (BZ 509562) The message-security-assist-extension-4 facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_MSA4 and s390_host_has_msa4 - Remove EmFail_S390X_msa4 Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- VEX/priv/guest_s390_toIR.c | 16 ---------------- 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, 30 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 463f389df..58656966f 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -20142,10 +20142,6 @@ s390_irgen_KMAC(UChar r1, UChar r2) static const HChar * s390_irgen_PCC(void) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "pcc"; - } extension(S390_EXT_PCC, 0); return "pcc"; } @@ -20153,10 +20149,6 @@ s390_irgen_PCC(void) static const HChar * s390_irgen_KMCTR(UChar r3, UChar r1, UChar r2) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "kmctr"; - } s390_insn_assert("kmctr", r1 % 2 == 0 && r1 != 0 && r2 % 2 == 0 && r2 != 0 && r3 % 2 == 0 && r3 != 0); extension(S390_EXT_KMCTR, r1 | (r2 << 4) | (r3 << 8)); @@ -20166,10 +20158,6 @@ s390_irgen_KMCTR(UChar r3, UChar r1, UChar r2) static const HChar * s390_irgen_KMO(UChar r1, UChar r2) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "kmo"; - } s390_insn_assert("kmo", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMO, r1 | (r2 << 4)); return "kmo"; @@ -20178,10 +20166,6 @@ s390_irgen_KMO(UChar r1, UChar r2) static const HChar * s390_irgen_KMF(UChar r1, UChar r2) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "kmf"; - } s390_insn_assert("kmf", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMF, r1 | (r2 << 4)); return "kmf"; diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index da0e2553e..c668a182c 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -952,8 +952,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXD)) #define s390_host_has_msa \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA)) -#define s390_host_has_msa4 \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA4)) #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 1cdbd1b4b..05937d32f 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1581,10 +1581,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) return "Encountered an instruction that requires the message-security" " assist.\n" " That assist is not available on this host"; - case EmFail_S390X_msa4: - return "Encountered an instruction that requires the" - " message-security-assist extension 4.\n" - " That extension is not available on this host"; case EmFail_S390X_msa8: return "Encountered an instruction that requires the" " message-security-assist extension 8.\n" @@ -1927,7 +1923,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_VXE2, "vxe2" }, { VEX_HWCAPS_S390X_VXD, "vxd" }, { VEX_HWCAPS_S390X_MSA, "msa" }, - { VEX_HWCAPS_S390X_MSA4, "msa4" }, { VEX_HWCAPS_S390X_MSA8, "msa8" }, { VEX_HWCAPS_S390X_MSA9, "msa9" }, }; diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index a1db9dbf6..4ff407c1e 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -179,7 +179,6 @@ typedef #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_MSA4 (1<<28) /* Message-security-assist extension 4 */ #define VEX_HWCAPS_S390X_MSA8 (1<<29) /* Message-security-assist extension 8 */ #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ @@ -201,7 +200,6 @@ typedef VEX_HWCAPS_S390X_VXE2 | \ VEX_HWCAPS_S390X_VXD | \ VEX_HWCAPS_S390X_MSA | \ - VEX_HWCAPS_S390X_MSA4 | \ VEX_HWCAPS_S390X_MSA8 | \ VEX_HWCAPS_S390X_MSA9) diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 8e0fc1349..3f5821d52 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -134,10 +134,6 @@ typedef this host */ EmFail_S390X_msa, - /* insn needs message-security-assist extension 4 which is not available - on this host */ - EmFail_S390X_msa4, - /* 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 4690163f4..cdb0ca9a9 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1582,7 +1582,6 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 148, VEX_HWCAPS_S390X_VXE2, "VXE2" }, { False, 134, VEX_HWCAPS_S390X_VXD, "VXD" }, { False, 17, VEX_HWCAPS_S390X_MSA, "MSA" }, - { False, 77, VEX_HWCAPS_S390X_MSA4, "MSA4" }, { False, 146, VEX_HWCAPS_S390X_MSA8, "MSA8" }, { False, 155, VEX_HWCAPS_S390X_MSA9, "MSA9" }, }; From c9ab89c34658f6f1464226896b3fbda423cd4c6e Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 24 Nov 2025 18:16:22 +0000 Subject: [PATCH 078/502] 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 --- 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 58656966f..fffd375de 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 c668a182c..7a5b6f552 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 05937d32f..22eac293e 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 4ff407c1e..1d1b3d7ec 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 3f5821d52..432decb2b 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 cdb0ca9a9..45f185d98 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" }, }; From 9d2e3da555be7d8c874059436cfd425628f98149 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 24 Nov 2025 18:39:39 +0000 Subject: [PATCH 079/502] 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 --- 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 fffd375de..b01849cb6 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 7a5b6f552..9a66b2abc 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 22eac293e..ae97ec182 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 1d1b3d7ec..710b3bb56 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 45f185d98..2c613708a 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 f71248293..6b224d3c2 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 330a2cf7a..b722c3ab9 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 153c7a4ee..92f3ede24 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 992ccdce2..84372fb08 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 1a5b4f5f7..592b5487c 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 623a7e49b8975331430f2e91c18da8e6f52e2e19 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 24 Nov 2025 22:31:44 +0000 Subject: [PATCH 080/502] Fix a typo. --- 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 432decb2b..04a9e0a6e 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 64f3a489997b7f8f574caaa3ed87ee15557390d0 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 24 Nov 2025 23:21:29 +0000 Subject: [PATCH 081/502] 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 --- 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 4831e1d67..7b8dbe63d 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 9a66b2abc..9b5e3f00a 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 ae97ec182..da3ccbd82 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 710b3bb56..cef40335e 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 2c613708a..e7aca5cb3 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 592b5487c..593c8c556 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 097cd6ccfc225c79b33d67b0f022f7179128b7cf Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 25 Nov 2025 08:20:06 +0100 Subject: [PATCH 082/502] 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. --- 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 84673b407..89493bbf6 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 485a588b8..fea9bcff9 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 d14ca727d..90d899319 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 0d7ec71a6..9bc95fcbb 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 2acc312dbcc098a9e33adcbbc309c6a7edfa9d41 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Tue, 25 Nov 2025 09:14:11 +0000 Subject: [PATCH 083/502] 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 --- 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 7b8dbe63d..dde8d6546 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 9b5e3f00a..1845ccd00 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 a0d9b7537..9cb9b65d3 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 da3ccbd82..c1cda1103 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 cef40335e..b5ae0ebcc 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 e7aca5cb3..7f794fd87 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 593c8c556..fa96ee8f4 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 52e90aecccc79383712b3b4227a7ef5196dad6b9 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Tue, 25 Nov 2025 13:03:37 +0000 Subject: [PATCH 084/502] 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 --- 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 dde8d6546..948eb977e 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 1845ccd00..f62244dcf 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 c1cda1103..ce6f6bd11 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 b5ae0ebcc..90fc9e39d 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 7f794fd87..b25358ba0 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 ccbd64548f15918f04ee5ac852de6ad5fa87b6b6 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Tue, 25 Nov 2025 13:23:52 +0000 Subject: [PATCH 085/502] 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 --- 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 948eb977e..948219342 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 f62244dcf..b660b7077 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 ce6f6bd11..9783d0e31 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 90fc9e39d..3fcecd00f 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 b25358ba0..e285ec3d3 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 7c4293783..ca27517f8 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 fa96ee8f4..dc91ab549 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 5e0aa0cefa62fe3a9f712befb21e50650b9b3dea Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Tue, 25 Nov 2025 13:50:37 +0000 Subject: [PATCH 086/502] 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 --- 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 b01849cb6..8f42c844d 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 948219342..96c566823 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 b660b7077..f089eac9a 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 9783d0e31..32a78190a 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 3fcecd00f..07c39eb4e 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 04a9e0a6e..a3fa19652 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 e285ec3d3..01a50c9b2 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 e3e06d7c7..8cd400e62 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 0f1f5b9c4..31d43c285 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 dc91ab549..f9aa96640 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 2b4b31de6965c3af5ecaca2c33b039eb72ec3706 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Tue, 25 Nov 2025 15:07:09 +0100 Subject: [PATCH 087/502] 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 --- .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 +++++- .../tests/linux/filter_ioctl_procmap_query | 6 ++++ memcheck/tests/linux/ioctl_procmap_query.c | 34 +++++++++++++++++++ .../linux/ioctl_procmap_query.stderr.exp | 0 .../linux/ioctl_procmap_query.stdout.exp | 2 ++ .../tests/linux/ioctl_procmap_query.vgtest | 4 +++ 11 files changed, 130 insertions(+), 1 deletion(-) create mode 100755 memcheck/tests/linux/filter_ioctl_procmap_query create mode 100644 memcheck/tests/linux/ioctl_procmap_query.c create mode 100644 memcheck/tests/linux/ioctl_procmap_query.stderr.exp create mode 100644 memcheck/tests/linux/ioctl_procmap_query.stdout.exp create mode 100644 memcheck/tests/linux/ioctl_procmap_query.vgtest diff --git a/.gitignore b/.gitignore index a9cb60c96..5542f4e4b 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 89493bbf6..252c8e8ec 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 869487db4..09a352a70 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 +]], [[ +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 4db8743dd..8bf0bab56 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 3f9272f4d..59c4d57c8 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 e28866fc1..b9f273be8 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 000000000..bdd764132 --- /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 000000000..396cf3d26 --- /dev/null +++ b/memcheck/tests/linux/ioctl_procmap_query.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include +#include +#include + +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 000000000..e69de29bb 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 000000000..280e91aa1 --- /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 000000000..8d12e0795 --- /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 730f1de48ad109a0bc7046154ff8c5a1a8a93886 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 25 Nov 2025 21:03:35 +0100 Subject: [PATCH 088/502] 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. --- 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 874d129f6..09f3dda84 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 e7d7d6e99797083014dbb7d288c09e8c365feb9e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 25 Nov 2025 21:04:17 +0100 Subject: [PATCH 089/502] 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. --- 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 ced90fa18..54b11f7bc 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 09edfcaba..6c60972c2 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 ad69a129f..2e69109a2 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 2020b9914d58cb756aeba645ddd180bc29566415 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 26 Nov 2025 16:50:42 +0000 Subject: [PATCH 090/502] 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 --- 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 1f92d59ec..59cbe54ba 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 f9aa96640..2b6af79f8 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 4968e6f2446e6f8deccdabeccd8d2e2372b5285d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 26 Nov 2025 18:53:49 +0100 Subject: [PATCH 091/502] Darwin ,gitignore: add a wildcard for dSYM direatories in none --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5542f4e4b..33378bcb7 100644 --- a/.gitignore +++ b/.gitignore @@ -1541,6 +1541,7 @@ /nightly/valgrind-old # /none/ +/none/*.dSYM /none/*.so /none/.deps /none/Makefile From 5e584556a9b9a373426de517085ab9003a8c2e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Tue, 4 Nov 2025 13:59:10 -0500 Subject: [PATCH 092/502] 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. --- 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(-) create mode 100644 none/tests/sse4-common.h diff --git a/none/tests/amd64/sse4-64.c b/none/tests/amd64/sse4-64.c index 662dd5200..d795dfde5 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 -#include -#include -#include "tests/malloc.h" -#include - - -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 000000000..80ffb4e77 --- /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 +#include +#include +#include "tests/malloc.h" +#include + +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 0fec4bda6..a93a4acd2 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 -#include -#include -#include "tests/malloc.h" -#include - - -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 83a3116dbbd83cf04b623a1cbc5935807c9e1046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Tue, 11 Nov 2025 04:17:36 -0500 Subject: [PATCH 093/502] 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. --- 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 d795dfde5..7048f96f6 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 80ffb4e77..1e08218b5 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 a93a4acd2..7e4189852 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 e2a244aceb31680d5314afe1a25ad7f6f664dc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Tue, 11 Nov 2025 07:34:10 -0500 Subject: [PATCH 094/502] 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. --- 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 252c8e8ec..3b76257d6 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 8ecfad155..a91551f56 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 6559ad51d..0dbd0fb8a 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 7048f96f6..fc3096344 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 1e08218b5..e3341186b 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 7e4189852..f47f185bf 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 9642a3756..99822c46c 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 8e935144655b94efc121b8432c4f5653e3cc2c01 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 26 Nov 2025 20:25:10 +0100 Subject: [PATCH 095/502] Darwin: fix x86 build and client syscall --- 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 cb770f818..7f99387ff 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 5f3aec0f0..114e92228 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 82f3adc5d..ff9960225 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 7459ef83a..97c044f77 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 3cdd64d56..5fef88e14 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 60427c1c2..52adfd82b 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 e5012cc92..8f8c9611d 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 a0e79f983bfc042fa29eaa83ea6a4324be8935e2 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 26 Nov 2025 20:27:43 +0100 Subject: [PATCH 096/502] A few more syscall comments and doc tweaks --- 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 ff9960225..07f193046 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 1ef113db8..233d33212 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 9240f2d666a30549365eada1d9090aedd394eaa0 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 26 Nov 2025 21:22:51 +0100 Subject: [PATCH 097/502] 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. --- 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 114e92228..7d92450c4 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 7256b7bf018eb77cf37d356c8b8cdc3e2a003ed0 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 26 Nov 2025 21:37:10 +0100 Subject: [PATCH 098/502] 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. --- .../common/sh-mem-vec128-plo-no.stderr.exp-32bit-le | 11 ----------- .../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 b4cdfe84b..630d27a69 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 a6bea4241..7a0cfa94a 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 6cc8f18f2..ea875e008 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 bc2a13567..572d3c027 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 3275a177f99d36836107a425b46c84964f1ad354 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Thu, 27 Nov 2025 09:25:07 +0100 Subject: [PATCH 099/502] 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 --- 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 3b76257d6..b944b1fb9 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 21cb32829..2c878c8c5 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 234b056e5..5dccb47b3 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 9e1b2efb4..af3ec18dd 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 418c78443..05a39ed07 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 8bf0bab56..e17aff6a4 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 6132c9ff1..126244925 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 238b1cda0..f39bb58cc 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 bb20cd7d3..00bd2e756 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 4d7e43130..99f71b7a6 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 826c87937..e8996b6b7 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 78b1b6b42..3dbae3cb6 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 c16b69731..d96adecde 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 423feac56..a83c02b04 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 59c4d57c8..48aacea22 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 8efba6169..704e6378c 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 dbf8d4d9bc3eba8c692782cb825f326f3a993058 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 27 Nov 2025 13:14:43 +0100 Subject: [PATCH 100/502] 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. --- 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 515913e3c..a79373876 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 3fcb17db4..5d44e96ad 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 fcfaec508..a605a9b31 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 dc5679ddd..55f7cf740 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 9ec545cad..24da5ad02 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 7ffcfb580..4e0b08ec9 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 2508ad91f..6a67f8a60 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 820e7e51b..257aaec67 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 42c449b9f..36e311869 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 6be3a661d..d880ad9f2 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 a005c1c60..783ed5d63 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 c33c3a8d2..e85493a5d 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 7ac5ef1f8..ad1a1ade2 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 58ee5c501..d7242de19 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 2c3db3a79..c04e97306 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 86cc5b7d3..83a4f8779 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 1c1b01422..e66bef588 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 b55c154b7..58e68c67f 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 13b90882a..34f32e878 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 30c01ef3b..01139e0f7 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 9c6bb699c..11dddd6c0 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 5405fd7f5..75e9f10f0 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 723c11c23..3ca0b6f07 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 cebcc682a..aa592c557 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 5f639422c..a5d205c61 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 2da8ae30e..2259b309f 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 286e9bd7b..77e5bc17d 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 e561194f0..acd67b87a 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 8c884a8e3..cef505e50 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 29c03fd32..bcaf7a8ec 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 a4da73438..3b3166e1c 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 9021b926e..a064110ce 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 82f539638..627dced49 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 35ac4b1a6..a23eedb0e 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 a45a3bc49..0bd1eea93 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 786017260..eff405574 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 f60595c39..c36e52a7f 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 595ba779f..3d038d353 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 6605299e9..ca10f9b04 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 e23a9f59c..93c57c2c3 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 57afa5036..19ea0db35 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 1f3d27ec4..b8caf841a 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 b984fc060..9eee9c60b 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 4e4ae8101..a346a4bb9 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 73b440f8a..89a3152fc 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 a0b1908b8..abffae857 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 73edd1a7c..0455ce552 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 bb45ac52d..a51f019b9 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=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/overloaded-new.post.exp b/massif/tests/overloaded-new.post.exp index eb741e746..7767dc7be 100644 --- a/massif/tests/overloaded-new.post.exp +++ b/massif/tests/overloaded-new.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./overloaded-new -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 +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/overloaded-new.post.exp-mips32 b/massif/tests/overloaded-new.post.exp-mips32 index 0812599da..046971ba9 100644 --- a/massif/tests/overloaded-new.post.exp-mips32 +++ b/massif/tests/overloaded-new.post.exp-mips32 @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./overloaded-new -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 +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index 85a839c1d..dc51475a7 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -4,5 +4,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 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 -post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ./filter_new_aligned +post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ./filter_new_aligned | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/pages_as_heap.vgtest b/massif/tests/pages_as_heap.vgtest index 0ed73ea13..480c6b6b5 100644 --- a/massif/tests/pages_as_heap.vgtest +++ b/massif/tests/pages_as_heap.vgtest @@ -3,5 +3,5 @@ prog: pages_as_heap vgopts: --stacks=no --time-unit=B --heap-admin=0 --pages-as-heap=yes --massif-out-file=massif.out --detailed-freq=3 vgopts: --ignore-fn=mmap # would be nice to test that pages as heap works properly using -# 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/peak.post.exp b/massif/tests/peak.post.exp index 66c2a0169..e8c9e8f50 100644 --- a/massif/tests/peak.post.exp +++ b/massif/tests/peak.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./peak -Massif arguments: --stacks=no --time-unit=B --peak-inaccuracy=0 --heap-admin=128 --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 --peak-inaccuracy=0 --heap-admin=128 --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/peak.vgtest b/massif/tests/peak.vgtest index 8011a4466..044e6c70b 100644 --- a/massif/tests/peak.vgtest +++ b/massif/tests/peak.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --peak-inaccuracy=0 --heap-admin=128 --massif- 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/peak2.post.exp b/massif/tests/peak2.post.exp index 35ad85de3..cc60cf75d 100644 --- a/massif/tests/peak2.post.exp +++ b/massif/tests/peak2.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./peak -Massif arguments: --stacks=no --time-unit=B --peak-inaccuracy=10.0 --heap-admin=128 --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 --peak-inaccuracy=10.0 --heap-admin=128 --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/peak2.vgtest b/massif/tests/peak2.vgtest index 890e36fe8..b11005803 100644 --- a/massif/tests/peak2.vgtest +++ b/massif/tests/peak2.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/realloc.post.exp b/massif/tests/realloc.post.exp index ea0ff231a..1853c4341 100644 --- a/massif/tests/realloc.post.exp +++ b/massif/tests/realloc.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./realloc -Massif arguments: --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --massif-out-file=massif.out --realloc-zero-bytes-frees=yes --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 --heap-admin=0 --time-unit=B --threshold=0 --massif-out-file=massif.out --realloc-zero-bytes-frees=yes --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: --threshold=0 massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/realloc.vgtest b/massif/tests/realloc.vgtest index af17aa011..7d2b5c9ab 100644 --- a/massif/tests/realloc.vgtest +++ b/massif/tests/realloc.vgtest @@ -5,5 +5,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 --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/thresholds_0_0.post.exp b/massif/tests/thresholds_0_0.post.exp index 96ccc0019..dd307b608 100644 --- a/massif/tests/thresholds_0_0.post.exp +++ b/massif/tests/thresholds_0_0.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./thresholds -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --threshold=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 --threshold=0 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out --threshold=0 -------------------------------------------------------------------------------- diff --git a/massif/tests/thresholds_0_0.vgtest b/massif/tests/thresholds_0_0.vgtest index a2528999a..8965fb3b5 100644 --- a/massif/tests/thresholds_0_0.vgtest +++ b/massif/tests/thresholds_0_0.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file 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 --threshold=0 | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_0_10.post.exp b/massif/tests/thresholds_0_10.post.exp index bdab02532..b7ab56d73 100644 --- a/massif/tests/thresholds_0_10.post.exp +++ b/massif/tests/thresholds_0_10.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./thresholds -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --threshold=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 --threshold=0 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out --threshold=10 -------------------------------------------------------------------------------- diff --git a/massif/tests/thresholds_0_10.vgtest b/massif/tests/thresholds_0_10.vgtest index b9e4fae42..647b28533 100644 --- a/massif/tests/thresholds_0_10.vgtest +++ b/massif/tests/thresholds_0_10.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file 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 --threshold=10 | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_0.post.exp b/massif/tests/thresholds_10_0.post.exp index e4ae32714..9f461f0cc 100644 --- a/massif/tests/thresholds_10_0.post.exp +++ b/massif/tests/thresholds_10_0.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./thresholds -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --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 --threshold=10 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out --threshold=0 -------------------------------------------------------------------------------- diff --git a/massif/tests/thresholds_10_0.vgtest b/massif/tests/thresholds_10_0.vgtest index aaaf53cae..5a026cf71 100644 --- a/massif/tests/thresholds_10_0.vgtest +++ b/massif/tests/thresholds_10_0.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-fil 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 --threshold=0 | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_10.post.exp b/massif/tests/thresholds_10_10.post.exp index 87d94a6d4..d44615e42 100644 --- a/massif/tests/thresholds_10_10.post.exp +++ b/massif/tests/thresholds_10_10.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./thresholds -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --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 --threshold=10 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out --threshold=10 -------------------------------------------------------------------------------- diff --git a/massif/tests/thresholds_10_10.vgtest b/massif/tests/thresholds_10_10.vgtest index 1c7c5d2e0..4b64764d5 100644 --- a/massif/tests/thresholds_10_10.vgtest +++ b/massif/tests/thresholds_10_10.vgtest @@ -3,5 +3,6 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-fil 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 --threshold=10 | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn + cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_0.post.exp b/massif/tests/thresholds_5_0.post.exp index aaf4952a6..bfc527600 100644 --- a/massif/tests/thresholds_5_0.post.exp +++ b/massif/tests/thresholds_5_0.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./thresholds -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --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 --threshold=5 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out --threshold=0 -------------------------------------------------------------------------------- diff --git a/massif/tests/thresholds_5_0.vgtest b/massif/tests/thresholds_5_0.vgtest index c588e82e3..7b4fa5993 100644 --- a/massif/tests/thresholds_5_0.vgtest +++ b/massif/tests/thresholds_5_0.vgtest @@ -3,5 +3,6 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file 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 --threshold=0 | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn + cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_10.post.exp b/massif/tests/thresholds_5_10.post.exp index 058d887ad..a60e40bc9 100644 --- a/massif/tests/thresholds_5_10.post.exp +++ b/massif/tests/thresholds_5_10.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./thresholds -Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --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 --threshold=5 --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: massif.out --threshold=10 -------------------------------------------------------------------------------- diff --git a/massif/tests/thresholds_5_10.vgtest b/massif/tests/thresholds_5_10.vgtest index 073013082..2343a2cd9 100644 --- a/massif/tests/thresholds_5_10.vgtest +++ b/massif/tests/thresholds_5_10.vgtest @@ -3,5 +3,6 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file 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 --threshold=10 | ../../tests/filter_addresses +post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn + cleanup: rm massif.out diff --git a/massif/tests/zero1.post.exp b/massif/tests/zero1.post.exp index f54a3f09c..ddc9a4055 100644 --- a/massif/tests/zero1.post.exp +++ b/massif/tests/zero1.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./zero -Massif arguments: --stacks=no --heap-admin=0 --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 --heap-admin=0 --time-unit=B --massif-out-file=massif.out --alloc-fn=_xpc_malloc --alloc-fn=strdup --alloc-fn=_xpc_calloc ms_print arguments: --threshold=0 massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/zero1.vgtest b/massif/tests/zero1.vgtest index 9a5511f28..b5f10f25d 100644 --- a/massif/tests/zero1.vgtest +++ b/massif/tests/zero1.vgtest @@ -3,5 +3,6 @@ vgopts: --stacks=no --heap-admin=0 --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 --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/zero2.post.exp b/massif/tests/zero2.post.exp index 7525a15c6..25256f715 100644 --- a/massif/tests/zero2.post.exp +++ b/massif/tests/zero2.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./zero -Massif arguments: --stacks=no --heap-admin=0 --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 --heap-admin=0 --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/zero2.vgtest b/massif/tests/zero2.vgtest index 5e50713da..44de552f3 100644 --- a/massif/tests/zero2.vgtest +++ b/massif/tests/zero2.vgtest @@ -3,5 +3,5 @@ vgopts: --stacks=no --heap-admin=0 --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 From 65165ae36f7048542c34813da20e2b608409900d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 27 Nov 2025 13:26:20 +0100 Subject: [PATCH 101/502] Add missing massif filter file --- massif/tests/filter_ignore_fn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 massif/tests/filter_ignore_fn diff --git a/massif/tests/filter_ignore_fn b/massif/tests/filter_ignore_fn new file mode 100755 index 000000000..2b524f08b --- /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 bf7c22738b4ba6ad72615c66f3a65bda530843cb Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 27 Nov 2025 07:22:18 +0100 Subject: [PATCH 102/502] Darwin: many fixes for OSX 10.13 Most of these changes are from Louis Brunner's GitHub repo. The most imortant changes are to the memory space and to the code related to getting the host filename during startup. This means that when Valgrind crashes or hits an assert we now get a legible host stacktrrace. This also fixes none/tests/darwin/bug228343 --- NEWS | 3 +- coregrind/m_aspacemgr/aspacemgr-linux.c | 381 +++++++++++++++++++++++- coregrind/m_aspacemgr/priv_aspacemgr.h | 3 + coregrind/m_initimg/initimg-darwin.c | 55 +++- coregrind/m_main.c | 36 +-- coregrind/m_syswrap/syswrap-darwin.c | 51 +++- coregrind/pub_core_mach.h | 5 + docs/internals/Darwin-notes.txt | 10 - include/vki/vki-darwin.h | 101 ++++++- memcheck/mc_main.c | 30 +- none/tests/darwin/bug228343.c | 3 +- none/tests/darwin/bug228343.stdout.exp | 2 +- none/tests/pth_term_signal.vgtest | 1 + tests/filter_stderr_basic.in | 5 +- 14 files changed, 623 insertions(+), 63 deletions(-) diff --git a/NEWS b/NEWS index b944b1fb9..2cedad448 100644 --- a/NEWS +++ b/NEWS @@ -25,10 +25,11 @@ 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 +228343 none/tests/darwin/bug228343 fails on OS X 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 +510864 Add SSE4.1 PMAXSD and PMINSD instructions support for 32-bit x86 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_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c index 214b4a808..d5715c444 100644 --- a/coregrind/m_aspacemgr/aspacemgr-linux.c +++ b/coregrind/m_aspacemgr/aspacemgr-linux.c @@ -631,7 +631,10 @@ static Bool sane_NSegment ( const NSegment* s ) case SkAnonC: case SkAnonV: case SkShmC: return s->smode == SmFixed - && s->dev == 0 && s->ino == 0 && s->offset == 0 && s->fnIdx == -1 +#if !defined(VGO_darwin) // on macOS we use ino as the vm_tag holder + && s->ino == 0 +#endif + && s->dev == 0 && s->offset == 0 && s->fnIdx == -1 && (s->kind==SkAnonC ? True : !s->isCH); case SkFileC: case SkFileV: @@ -1451,6 +1454,11 @@ void split_nsegments_lo_and_hi ( Addr sLo, Addr sHi, /* Not that I'm overly paranoid or anything, definitely not :-) */ } +#if defined(VGO_darwin) +#include "pub_core_tooliface.h" + +static void fill_segment(NSegment* seg); +#endif /* Add SEG to the collection, deleting/truncating any it overlaps. This deals with all the tricky cases of splitting up segments as @@ -1464,6 +1472,11 @@ static void add_segment ( const NSegment* seg ) Addr sStart = seg->start; Addr sEnd = seg->end; +#if defined(VGO_darwin) + // FIXME: the cast is unfortunate but I don't want to change every callsite to call 2 functions + fill_segment((NSegment*) (Addr) seg); +#endif + aspacem_assert(sStart <= sEnd); aspacem_assert(VG_IS_PAGE_ALIGNED(sStart)); aspacem_assert(VG_IS_PAGE_ALIGNED(sEnd+1)); @@ -1659,12 +1672,12 @@ Addr VG_(am_startup) ( Addr sp_at_startup ) // --- Darwin ------------------------------------------- #if defined(VGO_darwin) -# if VG_WORDSIZE == 4 +#if defined(VGP_x86_darwin) aspacem_maxAddr = (Addr) 0xffffffff; aspacem_cStart = aspacem_minAddr; aspacem_vStart = 0xf0000000; // 0xc0000000..0xf0000000 available -# else +#elif defined(VGP_amd64_darwin) aspacem_maxAddr = (Addr) 0x7fffffffffff; aspacem_cStart = aspacem_minAddr; @@ -3692,6 +3705,7 @@ static void parse_procselfmaps ( #elif defined(VGO_darwin) #include #include +#include static unsigned int mach2vki(unsigned int vm_prot) { @@ -3701,6 +3715,353 @@ static unsigned int mach2vki(unsigned int vm_prot) ((vm_prot & VM_PROT_EXECUTE) ? VKI_PROT_EXEC : 0) ; } +static Int get_filename_for_region(int pid, Addr addr, HChar* path, SizeT path_len, ULong* vm_tag) { + int ret; + SizeT len; + struct proc_regionwithpathinfo info; + VG_(memset)(&info, 0, sizeof(info)); + ret = sr_Res(VG_(do_syscall6)(__NR_proc_info, 2, pid, PROC_PIDREGIONPATHINFO, addr, (Addr)&info, sizeof(info))); + if (ret == -1) { + return ret; + } + if (vm_tag) { + *vm_tag = info.prp_prinfo.pri_user_tag; + } + len = VG_(strlen)(&info.prp_vip.vip_path[0]); + if (len == 0) { + return 0; + } + len += 1; // include the null terminator + if (len > path_len) { + len = path_len; + } + VG_(strlcpy)(path, info.prp_vip.vip_path, len); + return len; +} + +static Bool get_name_from_tag(int tag, HChar* path, SizeT path_len) { + switch (tag) { + case VKI_VM_MEMORY_DYLD: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[internal dyld memory]", path_len); + return True; + case VKI_VM_MEMORY_OS_ALLOC_ONCE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[kernel alloc once]", path_len); + return True; + case VKI_VM_MEMORY_GENEALOGY: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[activity tracing]", path_len); + return True; + case VKI_VM_MEMORY_BRK: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[brk]", path_len); + return True; + case VKI_VM_MEMORY_MALLOC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc memory]", path_len); + return True; + case VKI_VM_MEMORY_MALLOC_HUGE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (huge) memory]", path_len); + return True; + case VKI_VM_MEMORY_MALLOC_LARGE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (large) memory]", path_len); + return True; + case VKI_VM_MEMORY_MALLOC_SMALL: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (small) memory]", path_len); + return True; + case VKI_VM_MEMORY_MALLOC_TINY: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (tiny) memory]", path_len); + return True; + case VKI_VM_MEMORY_MALLOC_NANO: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (nano) memory]", path_len); + return True; + case VM_MEMORY_MACH_MSG: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[mach message]", path_len); + return True; + case VKI_VM_MEMORY_ANALYSIS_TOOL: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[analysis tool]", path_len); + return True; + case VKI_VM_MEMORY_STACK: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[stack]", path_len); + return True; + case VKI_VM_MEMORY_SHARED_PMAP: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[shared pmap]", path_len); + return True; + case VKI_VM_MEMORY_UNSHARED_PMAP: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[unshared pmap]", path_len); + return True; + case VKI_VM_MEMORY_REALLOC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[realloc]", path_len); + break; + case VKI_VM_MEMORY_MALLOC_LARGE_REUSABLE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (large, reusable) memory]", path_len); + break; + case VKI_VM_MEMORY_MALLOC_LARGE_REUSED: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (large, reused) memory]", path_len); + break; + case VKI_VM_MEMORY_MALLOC_MEDIUM: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc (medium) memory]", path_len); + break; + case VKI_VM_MEMORY_MALLOC_PROB_GUARD: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[malloc prob guard]", path_len); + break; + case VKI_VM_MEMORY_IOKIT: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[iokit]", path_len); + break; + case VKI_VM_MEMORY_GUARD: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[guard]", path_len); + break; + case VKI_VM_MEMORY_DYLIB: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[dylib]", path_len); + break; + case VKI_VM_MEMORY_OBJC_DISPATCHERS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[objc dispatchers]", path_len); + break; + case VKI_VM_MEMORY_APPKIT: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[appkit]", path_len); + break; + case VKI_VM_MEMORY_FOUNDATION: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[foundation]", path_len); + break; + case VKI_VM_MEMORY_COREGRAPHICS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core graphics]", path_len); + break; + case VKI_VM_MEMORY_CORESERVICES: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core services]", path_len); + break; + case VKI_VM_MEMORY_JAVA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[java]", path_len); + break; + case VKI_VM_MEMORY_COREDATA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core data]", path_len); + break; + case VKI_VM_MEMORY_COREDATA_OBJECTIDS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core data object ids]", path_len); + break; + case VKI_VM_MEMORY_ATS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[ats]", path_len); + break; + case VKI_VM_MEMORY_LAYERKIT: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[layer kit]", path_len); + break; + case VKI_VM_MEMORY_CGIMAGE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core graphics image]", path_len); + break; + case VKI_VM_MEMORY_TCMALLOC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[tcmalloc]", path_len); + break; + case VKI_VM_MEMORY_COREGRAPHICS_DATA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core graphics data]", path_len); + break; + case VKI_VM_MEMORY_COREGRAPHICS_SHARED: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core graphics shared]", path_len); + break; + case VKI_VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core graphics framebuffers]", path_len); + break; + case VKI_VM_MEMORY_COREGRAPHICS_BACKINGSTORES: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core graphics backing stores]", path_len); + break; + case VKI_VM_MEMORY_COREGRAPHICS_XALLOC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core graphics xalloc]", path_len); + break; + case VKI_VM_MEMORY_DYLD_MALLOC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[dyld malloc]", path_len); + break; + case VKI_VM_MEMORY_SQLITE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[sqlite]", path_len); + break; + case VKI_VM_MEMORY_JAVASCRIPT_CORE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[javascript core]", path_len); + break; + case VKI_VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[javascript jit executable allocator]", path_len); + break; + case VKI_VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[javascript jit register file]", path_len); + break; + case VKI_VM_MEMORY_GLSL: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[glsl]", path_len); + break; + case VKI_VM_MEMORY_OPENCL: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[opencl]", path_len); + break; + case VKI_VM_MEMORY_COREIMAGE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core image]", path_len); + break; + case VKI_VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[webcore purgeable buffers]", path_len); + break; + case VKI_VM_MEMORY_IMAGEIO: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[imageio]", path_len); + break; + case VKI_VM_MEMORY_COREPROFILE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core profile]", path_len); + break; + case VKI_VM_MEMORY_ASSETSD: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[assetsd]", path_len); + break; + case VKI_VM_MEMORY_LIBDISPATCH: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[libdispatch]", path_len); + break; + case VKI_VM_MEMORY_ACCELERATE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[accelerate]", path_len); + break; + case VKI_VM_MEMORY_COREUI: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core ui]", path_len); + break; + case VKI_VM_MEMORY_COREUIFILE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core ui file]", path_len); + break; + case VKI_VM_MEMORY_RAWCAMERA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[raw camera]", path_len); + break; + case VKI_VM_MEMORY_CORPSEINFO: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[corpse info]", path_len); + break; + case VKI_VM_MEMORY_ASL: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[asl]", path_len); + break; + case VKI_VM_MEMORY_SWIFT_RUNTIME: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[swift runtime]", path_len); + break; + case VKI_VM_MEMORY_SWIFT_METADATA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[swift metadata]", path_len); + break; + case VKI_VM_MEMORY_DHMM: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[dhmm]", path_len); + break; + case VKI_VM_MEMORY_SCENEKIT: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[scene kit]", path_len); + break; + case VKI_VM_MEMORY_SKYWALK: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[skywalk]", path_len); + break; + case VKI_VM_MEMORY_IOSURFACE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[io surface]", path_len); + break; + case VKI_VM_MEMORY_LIBNETWORK: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[libnetwork]", path_len); + break; + case VKI_VM_MEMORY_AUDIO: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[audio]", path_len); + break; + case VKI_VM_MEMORY_VIDEOBITSTREAM: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[video bitstream]", path_len); + break; + case VKI_VM_MEMORY_CM_XPC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[cm xpc]", path_len); + break; + case VKI_VM_MEMORY_CM_RPC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[cm rpc]", path_len); + break; + case VKI_VM_MEMORY_CM_MEMORYPOOL: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[cm memory pool]", path_len); + break; + case VKI_VM_MEMORY_CM_READCACHE: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[cm read cache]", path_len); + break; + case VKI_VM_MEMORY_CM_CRABS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[cm crabs]", path_len); + break; + case VKI_VM_MEMORY_QUICKLOOK_THUMBNAILS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[quicklook thumbnails]", path_len); + break; + case VKI_VM_MEMORY_ACCOUNTS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[accounts]", path_len); + break; + case VKI_VM_MEMORY_SANITIZER: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[sanitizer]", path_len); + break; + case VKI_VM_MEMORY_IOACCELERATOR: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[io accelerator]", path_len); + break; + case VKI_VM_MEMORY_CM_REGWARP: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[cm regwarp]", path_len); + break; + case VKI_VM_MEMORY_EAR_DECODER: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[ear decoder]", path_len); + break; + case VKI_VM_MEMORY_COREUI_CACHED_IMAGE_DATA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[core ui cached image data]", path_len); + break; + case VKI_VM_MEMORY_COLORSYNC: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[color sync]", path_len); + break; + case VKI_VM_MEMORY_BTINFO: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[bt info]", path_len); + break; + case VKI_VM_MEMORY_CM_HLS: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[cm hls]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA_THREAD_CONTEXT: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta thread context]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta indirect branch map]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA_RETURN_STACK: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta return stack]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA_EXECUTABLE_HEAP: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta executable heap]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA_USER_LDT: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta user ldt]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA_ARENA: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta arena]", path_len); + break; + case VKI_VM_MEMORY_ROSETTA_10: + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[rosetta 10]", path_len); + break; + case VKI_VM_MEMORY_VALGRIND: + case 0: + return False; + default: + if (tag >= VKI_VM_MEMORY_APPLICATION_SPECIFIC_1 && tag <= VKI_VM_MEMORY_APPLICATION_SPECIFIC_16) { + VG_(strlcpy)(path, DARWIN_FAKE_MEMORY_PATH "[application specific]", path_len); + return True; + } + VG_(debugLog)(0, "aspacem", "unknown vm tag: %d\n", tag); + return False; + } + return True; +} + +static void fill_segment(NSegment* seg) { + Int pid; + HChar name[VKI_PATH_MAX]; + Int ret; + + if (seg->fnIdx != -1 || seg->kind == SkFree || seg->kind == SkResvn) { + return; + } + + pid = sr_Res(VG_(do_syscall0)(__NR_getpid)); + ret = get_filename_for_region(pid, seg->start, name, sizeof(name), &seg->ino); + if (ret != 0) { + if (ret == -1) { + return; + } + } else if (get_name_from_tag(seg->ino, name, sizeof(name))) { + // these are owned by the kernel and are already initialized + // we flag them as client so m_main.c track them correctly + seg->kind = SkFileC; + } else { + return; + } + seg->fnIdx = ML_(am_allocate_segname)( name ); +} + +static Bool endswith(const HChar* str, const HChar* suffix) { + SizeT str_len = VG_(strlen)(str); + SizeT suffix_len = VG_(strlen)(suffix); + if (str_len < suffix_len) { + return False; + } + return VG_(strcmp)(str + str_len - suffix_len, suffix) == 0; +} + static UInt stats_machcalls = 0; static void parse_procselfmaps ( @@ -3713,13 +4074,16 @@ static void parse_procselfmaps ( vm_address_t iter; unsigned int depth; vm_address_t last; + HChar name[VKI_PATH_MAX]; + Bool ret; + Int pid = sr_Res(VG_(do_syscall0)(__NR_getpid)); iter = 0; depth = 0; last = 0; while (1) { mach_vm_address_t addr = iter; - mach_vm_size_t size; + mach_vm_size_t size = 0; vm_region_submap_short_info_data_64_t info; kern_return_t kr; @@ -3739,12 +4103,19 @@ static void parse_procselfmaps ( } iter = addr + size; + // FIXME: not sure we should fill up anything here as it will added later anyway + ret = get_filename_for_region(pid, addr, name, sizeof(name), NULL); + if (!ret) { + ret = get_name_from_tag(info.user_tag, name, sizeof(name)); + } + + if (addr > last && record_gap) { (*record_gap)(last, addr - last); } if (record_mapping) { (*record_mapping)(addr, size, mach2vki(info.protection), - 0, 0, info.offset, NULL, False); + 0, info.user_tag, info.offset, ret ? name : NULL, False); } last = addr + size; } diff --git a/coregrind/m_aspacemgr/priv_aspacemgr.h b/coregrind/m_aspacemgr/priv_aspacemgr.h index 978c58b98..338b3545b 100644 --- a/coregrind/m_aspacemgr/priv_aspacemgr.h +++ b/coregrind/m_aspacemgr/priv_aspacemgr.h @@ -58,6 +58,9 @@ #endif #include "pub_core_aspacemgr.h" // self +#if defined(VGO_darwin) +#include "pub_core_mach.h" // macos support +#endif /* --------------- Implemented in aspacemgr-common.c ---------------*/ diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index d4452fd9d..3ddc9806c 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -48,6 +48,7 @@ #include "pub_core_threadstate.h" /* ThreadArchState */ #include "pub_core_pathscan.h" /* find_executable */ #include "pub_core_initimg.h" /* self */ +#include "pub_core_mach.h" /*====================================================================*/ @@ -63,6 +64,7 @@ static void load_client ( /*OUT*/ExeInfo* info, Int ret; vg_assert( VG_(args_the_exename) != NULL); + vg_assert( VG_(strlen)(VG_(args_the_exename)) >= 1 ); exe_name = VG_(find_executable)( VG_(args_the_exename) ); if (!exe_name) { @@ -338,6 +340,9 @@ Addr setup_client_stack( void* init_sp, stringsize += VG_(strlen)(info->interp_args) + 1; } + vg_assert( VG_(args_the_exename) ); + vg_assert( VG_(strlen)( VG_(args_the_exename) ) >= 1 ); + /* now scan the args we're given... */ stringsize += VG_(strlen)( VG_(args_the_exename) ) + 1; @@ -355,8 +360,16 @@ Addr setup_client_stack( void* init_sp, stringsize += VG_(strlen)(*cpp) + 1; } + // @todo PJF there is a bug in the size calculation or rounding + // somewhere. This should be "+= 2" (one of the pointer to exec + // path and one for the terminating NULL pointer). When I run + // "./tests/vg_regtest none/tests" from a Korn shell script + // then the allexec32/64 tests fail because they print out "argv[0]". + // I think that what happens is that writing to "ptr" overwrites the + // start of strtab resulting in the argv[0] the exe name being a + // string starting with 8 \0s (not tested) /* Darwin executable_path + NULL */ - auxsize += 2 * sizeof(Word); + auxsize += 3 * sizeof(Word); if (info->executable_path) { stringsize += 1 + VG_(strlen)(info->executable_path); } @@ -367,8 +380,8 @@ Addr setup_client_stack( void* init_sp, /* OK, now we know how big the client stack is */ stacksize = sizeof(Word) + /* argc */ - sizeof(HChar **) + /* argc[0] == exename */ - sizeof(HChar **)*argc + /* argv */ + sizeof(HChar **) + /* argv[0] == exename */ + sizeof(HChar **)*argc + /* argv guest args */ sizeof(HChar **) + /* terminal NULL */ sizeof(HChar **)*envc + /* envp */ sizeof(HChar **) + /* terminal NULL */ @@ -441,9 +454,9 @@ Addr setup_client_stack( void* init_sp, /* --- executable_path + NULL --- */ if (info->executable_path) - *ptr++ = (Addr)copy_str(&strtab, info->executable_path); + *ptr++ = (Addr)copy_str(&strtab, info->executable_path); else - *ptr++ = 0; + *ptr++ = 0; *ptr++ = 0; vg_assert((strtab-stringbase) == stringsize); @@ -470,6 +483,38 @@ Addr setup_client_stack( void* init_sp, /*=== Record system memory regions ===*/ /*====================================================================*/ +void VG_(mach_record_system_memory)(void) { + /* Darwin only: tell the tools where the client's kernel commpage + is. It would be better to do this by telling aspacemgr about + it -- see the now disused record_system_memory() below -- + but that causes the sync checker to fail, + since the mapping doesn't appear in the kernel-supplied + process map. So do it here instead. */ + +#if defined(VGA_amd64) + VG_TRACK( new_mem_startup, + 0x7fffffe00000, 0x7ffffffff000-0x7fffffe00000, + True, False, True, /* r-x */ + 0 /* di_handle: no associated debug info */ ); +#elif defined(VGA_x86) + VG_TRACK( new_mem_startup, + 0xfffec000, 0xfffff000-0xfffec000, + True, False, True, /* r-x */ + 0 /* di_handle: no associated debug info */ ); +#elif defined(VGA_arm64) + VG_TRACK( new_mem_startup, + 0xfffff4000, 0x1000, + True, False, True, /* r-- */ + 0 /* di_handle: no associated debug info */ ); + VG_TRACK( new_mem_startup, + 0xfffffc000, 0x1000, + True, False, True, /* r-x */ + 0 /* di_handle: no associated debug info */ ); +#else +# error "Unknown Darwin architecture" +#endif +} + static void record_system_memory(void) { /* JRS 2014-Jul-08: this messes up the sync checker, because the diff --git a/coregrind/m_main.c b/coregrind/m_main.c index ce8a7ae6a..ecd159e97 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -1910,7 +1910,7 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) addr2dihandle = VG_(newXA)( VG_(malloc), "main.vm.2", VG_(free), sizeof(Addr_n_ULong) ); -# if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) +# if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_darwin) || defined(VGO_freebsd) { Addr* seg_starts; Int n_seg_starts; Addr_n_ULong anu; @@ -1932,22 +1932,6 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) } } - VG_(free)( seg_starts ); - } -# elif defined(VGO_darwin) - { Addr* seg_starts; - Int n_seg_starts; - seg_starts = VG_(get_segment_starts)( SkFileC, &n_seg_starts ); - vg_assert(seg_starts && n_seg_starts >= 0); - - /* show them all to the debug info reader. - Don't read from V segments (unlike Linux) */ - // GrP fixme really? - for (i = 0; i < n_seg_starts; i++) { - VG_(di_notify_mmap)( seg_starts[i], False/*don't allow_SkFileV*/, - -1/*don't use_fd*/); - } - VG_(free)( seg_starts ); } # else @@ -2101,22 +2085,8 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) True /* executable? */, 0 /* di_handle: no associated debug info */ ); - /* Darwin only: tell the tools where the client's kernel commpage - is. It would be better to do this by telling aspacemgr about - it -- see the now disused record_system_memory() in - initimg-darwin.c -- but that causes the sync checker to fail, - since the mapping doesn't appear in the kernel-supplied - process map. So do it here instead. */ -# if defined(VGP_amd64_darwin) - VG_TRACK( new_mem_startup, - 0x7fffffe00000, 0x7ffffffff000-0x7fffffe00000, - True, False, True, /* r-x */ - 0 /* di_handle: no associated debug info */ ); -# elif defined(VGP_x86_darwin) - VG_TRACK( new_mem_startup, - 0xfffec000, 0xfffff000-0xfffec000, - True, False, True, /* r-x */ - 0 /* di_handle: no associated debug info */ ); +#if defined(VGO_darwin) + VG_(mach_record_system_memory)(); # endif /* Clear the running thread indicator */ diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 987e7ee0f..606fbccff 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -247,8 +247,6 @@ static void run_a_thread_NORETURN ( Word tidW ) } else { - mach_msg_header_t msg; - VG_(debugLog)(1, "syswrap-darwin", "run_a_thread_NORETURN(tid=%u): " "not last one standing\n", @@ -262,6 +260,8 @@ static void run_a_thread_NORETURN ( Word tidW ) /* tid is now invalid. */ +# if DARWIN_VERS < DARWIN_10_14 + mach_msg_header_t msg; // GrP fixme exit race msg.msgh_bits = MACH_MSGH_BITS(17, MACH_MSG_TYPE_MAKE_SEND_ONCE); msg.msgh_request_port = VG_(gettid)(); @@ -274,6 +274,51 @@ static void run_a_thread_NORETURN ( Word tidW ) // GrP fixme use bsdthread_terminate for safe cleanup? mach_msg(&msg, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, sizeof(msg), 0, 0, MACH_MSG_TIMEOUT_NONE, 0); + +#else + /* We have to use this sequence to terminate the thread to + prevent a subtle race. If VG_(exit_thread)() had left the + ThreadState as Empty, then it could have been reallocated, + reusing the stack while we're doing these last cleanups. + Instead, VG_(exit_thread) leaves it as Zombie to prevent + reallocation. We need to make sure we don't touch the stack + between marking it Empty and exiting. Hence the + assembler. */ +#if defined(VGP_x86_darwin) + asm volatile ( + "movl %1, %0\n" /* set tst->status = VgTs_Empty */ + "movl %2, %%eax\n" /* set %eax = __NR_bsdthread_terminate */ + "movl $0, %%ebx\n" + "pushl %%ebx\n" /* args on stack */ + "pushl %%ebx\n" + "pushl %%ebx\n" + "pushl %%ebx\n" + "int $0x81\n" /* bsdthread_terminate(0, 0, 0, 0) */ + "popl %%ebx\n" /* pop args */ + "popl %%ebx\n" + "popl %%ebx\n" + "popl %%ebx\n" + : "=m" (tst->status) + : "n" (VgTs_Empty), "n" (__NR_bsdthread_terminate) + : "eax", "ebx" + ); +#elif defined(VGP_amd64_darwin) + asm volatile ( + "movl %1, %0\n" /* set tst->status = VgTs_Empty */ + "movq %2, %%rax\n" /* set %rax = __NR_bsdthread_terminate */ + "movq $0, %%rdi\n" + "movq $0, %%rsi\n" + "movq $0, %%rdx\n" + "movq $0, %%r10\n" + "syscall\n" /* bsdthread_terminate(0, 0, 0, 0) */ + : "=m" (tst->status) + : "n" (VgTs_Empty), "n" (__NR_bsdthread_terminate) + : "rax", "rdi", "rsi", "rdx", "r10" + ); +#else +# error Unknown platform +#endif +#endif // DDD: This is reached sometimes on none/tests/manythreads, maybe // because of the race above. @@ -2143,6 +2188,7 @@ PRE(workq_ops) // GrP fixme may block? break; case VKI_WQOPS_THREAD_KEVENT_RETURN: + case VKI_WQOPS_THREAD_WORKLOOP_RETURN: case VKI_WQOPS_THREAD_RETURN: { // The interesting case. The kernel will do one of two things: // 1. Return normally. We continue; libc proceeds to stop the thread. @@ -2176,7 +2222,6 @@ PRE(workq_ops) // RK fixme this just sets scheduling priorities - don't think we need // to do anything here break; - case VKI_WQOPS_THREAD_WORKLOOP_RETURN: case VKI_WQOPS_SHOULD_NARROW: // RK fixme need anything here? // RK fixme may block? diff --git a/coregrind/pub_core_mach.h b/coregrind/pub_core_mach.h index 8ab46417a..694bbee37 100644 --- a/coregrind/pub_core_mach.h +++ b/coregrind/pub_core_mach.h @@ -31,6 +31,8 @@ #ifndef __PUB_CORE_MACH_H #define __PUB_CORE_MACH_H +#define DARWIN_FAKE_MEMORY_PATH "/dev/macos/internals/" + //-------------------------------------------------------------------- // PURPOSE: This module contains the Mach kernel interface, // for operating systems like Darwin / Mac OS X that use it. @@ -39,6 +41,9 @@ // Call this early in Valgrind's main(). It depends on nothing. extern void VG_(mach_init)(void); +// Record system memory after aspace has been init'd +extern void VG_(mach_record_system_memory)(void); + #endif // __PUB_CORE_MACH_H #endif // defined(VGO_darwin) diff --git a/docs/internals/Darwin-notes.txt b/docs/internals/Darwin-notes.txt index 8c320a35b..61d1931ad 100644 --- a/docs/internals/Darwin-notes.txt +++ b/docs/internals/Darwin-notes.txt @@ -61,10 +61,6 @@ machinery was removed in r10155. Valgrind-developer notes, todos re the MacOSX port ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* m_syswrap/syscall-amd64-darwin.S - - correct signal mask is not applied during syscall - - restart-labels are completely bogus - * m_syswrap/syswrap-darwin.c: - PRE(sys_posix_spawn) completely ignores signal issues, and also ignores the file_actions argument @@ -95,12 +91,6 @@ Valgrind-developer notes, todos re the MacOSX port -------- -m_main doesn't read symbols for the valgrind exe itself, which is -annoying. On minimal investigation it seems that the executable isn't -even listed by aspacem. This is very strange and not in accordance -with the Linux or AIX ports. - - m_main: relatedly, Darwin version does not collect/give out initial debuginfo handles; hence ptrcheck won't work diff --git a/include/vki/vki-darwin.h b/include/vki/vki-darwin.h index 93433d4f0..5cffcd1b6 100644 --- a/include/vki/vki-darwin.h +++ b/include/vki/vki-darwin.h @@ -83,13 +83,112 @@ // magic mmap() flags #define VKI_MAP_ANONYMOUS MAP_ANON // linux synonym +// See xnu/osfmk/mach/vm_statistics.h +#define VKI_VM_MEMORY_MALLOC 1 +#define VKI_VM_MEMORY_MALLOC_SMALL 2 +#define VKI_VM_MEMORY_MALLOC_LARGE 3 +#define VKI_VM_MEMORY_MALLOC_HUGE 4 +#define VKI_VM_MEMORY_BRK 5 +#define VKI_VM_MEMORY_REALLOC 6 +#define VKI_VM_MEMORY_MALLOC_TINY 7 +#define VKI_VM_MEMORY_MALLOC_LARGE_REUSABLE 8 +#define VKI_VM_MEMORY_MALLOC_LARGE_REUSED 9 +#define VKI_VM_MEMORY_ANALYSIS_TOOL 10 +#define VKI_VM_MEMORY_MALLOC_NANO 11 +#define VKI_VM_MEMORY_MALLOC_MEDIUM 12 +#define VKI_VM_MEMORY_MALLOC_PROB_GUARD 13 +#define VKI_VM_MEMORY_MACH_MSG 20 +#define VKI_VM_MEMORY_IOKIT 21 +#define VKI_VM_MEMORY_STACK 30 +#define VKI_VM_MEMORY_GUARD 31 +#define VKI_VM_MEMORY_SHARED_PMAP 32 +#define VKI_VM_MEMORY_DYLIB 33 +#define VKI_VM_MEMORY_OBJC_DISPATCHERS 34 +#define VKI_VM_MEMORY_UNSHARED_PMAP 35 +#define VKI_VM_MEMORY_APPKIT 40 +#define VKI_VM_MEMORY_FOUNDATION 41 +#define VKI_VM_MEMORY_COREGRAPHICS 42 +#define VKI_VM_MEMORY_CORESERVICES 43 +#define VKI_VM_MEMORY_JAVA 44 +#define VKI_VM_MEMORY_COREDATA 45 +#define VKI_VM_MEMORY_COREDATA_OBJECTIDS 46 +#define VKI_VM_MEMORY_ATS 50 +#define VKI_VM_MEMORY_LAYERKIT 51 +#define VKI_VM_MEMORY_CGIMAGE 52 +#define VKI_VM_MEMORY_TCMALLOC 53 +#define VKI_VM_MEMORY_COREGRAPHICS_DATA 54 +#define VKI_VM_MEMORY_COREGRAPHICS_SHARED 55 +#define VKI_VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS 56 +#define VKI_VM_MEMORY_COREGRAPHICS_BACKINGSTORES 57 +#define VKI_VM_MEMORY_COREGRAPHICS_XALLOC 58 +#define VKI_VM_MEMORY_DYLD 60 +#define VKI_VM_MEMORY_DYLD_MALLOC 61 +#define VKI_VM_MEMORY_SQLITE 62 +#define VKI_VM_MEMORY_JAVASCRIPT_CORE 63 +#define VKI_VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64 +#define VKI_VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65 +#define VKI_VM_MEMORY_GLSL 66 +#define VKI_VM_MEMORY_OPENCL 67 +#define VKI_VM_MEMORY_COREIMAGE 68 +#define VKI_VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS 69 +#define VKI_VM_MEMORY_IMAGEIO 70 +#define VKI_VM_MEMORY_COREPROFILE 71 +#define VKI_VM_MEMORY_ASSETSD 72 +#define VKI_VM_MEMORY_OS_ALLOC_ONCE 73 +#define VKI_VM_MEMORY_LIBDISPATCH 74 +#define VKI_VM_MEMORY_ACCELERATE 75 +#define VKI_VM_MEMORY_COREUI 76 +#define VKI_VM_MEMORY_COREUIFILE 77 +#define VKI_VM_MEMORY_GENEALOGY 78 +#define VKI_VM_MEMORY_RAWCAMERA 79 +#define VKI_VM_MEMORY_CORPSEINFO 80 +#define VKI_VM_MEMORY_ASL 81 +#define VKI_VM_MEMORY_SWIFT_RUNTIME 82 +#define VKI_VM_MEMORY_SWIFT_METADATA 83 +#define VKI_VM_MEMORY_DHMM 84 +#define VKI_VM_MEMORY_SCENEKIT 86 +#define VKI_VM_MEMORY_SKYWALK 87 +#define VKI_VM_MEMORY_IOSURFACE 88 +#define VKI_VM_MEMORY_LIBNETWORK 89 +#define VKI_VM_MEMORY_AUDIO 90 +#define VKI_VM_MEMORY_VIDEOBITSTREAM 91 +#define VKI_VM_MEMORY_CM_XPC 92 +#define VKI_VM_MEMORY_CM_RPC 93 +#define VKI_VM_MEMORY_CM_MEMORYPOOL 94 +#define VKI_VM_MEMORY_CM_READCACHE 95 +#define VKI_VM_MEMORY_CM_CRABS 96 +#define VKI_VM_MEMORY_QUICKLOOK_THUMBNAILS 97 +#define VKI_VM_MEMORY_ACCOUNTS 98 +#define VKI_VM_MEMORY_SANITIZER 99 +#define VKI_VM_MEMORY_IOACCELERATOR 100 +#define VKI_VM_MEMORY_CM_REGWARP 101 +#define VKI_VM_MEMORY_EAR_DECODER 102 +#define VKI_VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103 +#define VKI_VM_MEMORY_COLORSYNC 104 +#define VKI_VM_MEMORY_BTINFO 105 +#define VKI_VM_MEMORY_CM_HLS 106 +#define VKI_VM_MEMORY_ROSETTA 230 +#define VKI_VM_MEMORY_ROSETTA_THREAD_CONTEXT 231 +#define VKI_VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232 +#define VKI_VM_MEMORY_ROSETTA_RETURN_STACK 233 +#define VKI_VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234 +#define VKI_VM_MEMORY_ROSETTA_USER_LDT 235 +#define VKI_VM_MEMORY_ROSETTA_ARENA 236 +#define VKI_VM_MEMORY_ROSETTA_10 239 +#define VKI_VM_MEMORY_APPLICATION_SPECIFIC_1 240 +#define VKI_VM_MEMORY_VALGRIND 242 +#define VKI_VM_MEMORY_APPLICATION_SPECIFIC_16 255 + // fds for mmap(MAP_ANON), displayed by vmmap -#define VM_TAG_VALGRIND VM_MAKE_TAG(239) // SkAnonV +#define VM_TAG_VALGRIND VM_MAKE_TAG(VKI_VM_MEMORY_VALGRIND) // SkAnonV // page sizes #define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT #define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE +// pthread +#define VKI_PTHREAD_START_CUSTOM 0x01000000 + // types typedef uint32_t vki_u32; diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 9a14f8436..d4ac9fc20 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -1664,6 +1664,18 @@ void mc_STOREVn_slow ( Addr a, SizeT nBits, ULong vbytes, Bool bigendian ) /*--- Setting permissions over address ranges. ---*/ /*------------------------------------------------------------*/ +#if defined(VGO_darwin) +#if DARWIN_VERS >= DARWIN_26_00 && 0 +// The new xzm_main_malloc_zone_create makes a 25GB (0x600000000) map in memory so, no choice but to raise the limit... +# define VA_LARGE_RANGE ( 25UL * 1024 * 1024 * 1024) +# else +// Now that we parse the DSC, we might get mmap which are up to 4GB, put 2GB to be safe for now +# define VA_LARGE_RANGE ( 2UL * 1024 * 1024 * 1024) +#endif +#else +#define VA_LARGE_RANGE 256UL * 1024 * 1024 +#endif + static void set_address_range_perms ( Addr a, SizeT lenT, UWord vabits16, UWord dsm_num ) { @@ -1689,8 +1701,8 @@ static void set_address_range_perms ( Addr a, SizeT lenT, UWord vabits16, if (lenT == 0) return; - if (lenT > 256 * 1024 * 1024) { - if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) { + if ((ULong)lenT > VA_LARGE_RANGE) { + if (VG_(clo_verbosity) > 1 && !VG_(clo_xml)) { const HChar* s = "unknown???"; if (vabits16 == VA_BITS16_NOACCESS ) s = "noaccess"; if (vabits16 == VA_BITS16_UNDEFINED) s = "undefined"; @@ -5881,7 +5893,21 @@ Bool MC_(is_within_valid_secondary) ( Addr a ) Bool MC_(is_valid_aligned_word) ( Addr a ) { tl_assert(sizeof(UWord) == 4 || sizeof(UWord) == 8); +#if defined(VGO_darwin) + // on Darwin some of the memcheck/tests/leak-autofreepool-* + // tests are failing here. VALGRIND_MALLOCLIKE_BLOCK is passed + // an address that is not word aligned. But that's also the case + // on other platforms, on FreeBSD leak-autofreepool 0 uses addresses + // that are only 2 aligned. The problem is more likely that Darwin + // should not be looking at this chunk of memory. + if (!VG_IS_WORD_ALIGNED(a) && VG_(clo_verbosity) > 1) + { + VG_(printf)("In %s, invariant violation, pointer %p should be word aligned\n", __func__, (void*)a); + MC_(pp_describe_addr) (VG_(current_DiEpoch)(), a); + } +#else tl_assert(VG_IS_WORD_ALIGNED(a)); +#endif if (get_vabits8_for_aligned_word32 (a) != VA_BITS8_DEFINED) return False; if (sizeof(UWord) == 8) { diff --git a/none/tests/darwin/bug228343.c b/none/tests/darwin/bug228343.c index f25f99e22..266c8dd4b 100644 --- a/none/tests/darwin/bug228343.c +++ b/none/tests/darwin/bug228343.c @@ -55,6 +55,7 @@ int main() { pthread_create(&w_2, NULL, Worker, NULL); pthread_join(w_1, NULL); pthread_join(w_2, NULL); - printf("\tGLOB=%d\n", GLOB); + if (GLOB) + printf("\tGLOB was incremented\n"); return 0; } diff --git a/none/tests/darwin/bug228343.stdout.exp b/none/tests/darwin/bug228343.stdout.exp index f2b5cc1d5..2bf105714 100644 --- a/none/tests/darwin/bug228343.stdout.exp +++ b/none/tests/darwin/bug228343.stdout.exp @@ -1 +1 @@ - GLOB=0 + GLOB was incremented diff --git a/none/tests/pth_term_signal.vgtest b/none/tests/pth_term_signal.vgtest index 959160576..05f0d3fb4 100644 --- a/none/tests/pth_term_signal.vgtest +++ b/none/tests/pth_term_signal.vgtest @@ -1,2 +1,3 @@ +prereq: ! ../../tests/os_test darwin prog: pth_term_signal vgopts: -q diff --git a/tests/filter_stderr_basic.in b/tests/filter_stderr_basic.in index 90d899319..8f9a0e200 100644 --- a/tests/filter_stderr_basic.in +++ b/tests/filter_stderr_basic.in @@ -82,4 +82,7 @@ $SED '/warning: evaluate_Dwarf3_Expr: unhandled DW_OP_/d' | # Suppress Darwin dyld errors $SED '/^used_suppression:.*OSX.*dyld.*default.supp:*/d' | # Suppress Darwin running dsymutil -$SED -e '/^run: \/usr\/bin\/dsymutil.*/d' \ +$SED -e '/run: \/usr\/bin\/dsymutil.*/d' | +# Suppress Darwin unknown mach ports +$SED -e '/UNKNOWN Mach port modified/d' + From 2474ffed7fdf16aeac889c431e82865d730d2688 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 27 Nov 2025 20:12:26 +0100 Subject: [PATCH 103/502] Darwin massif: more ingore functions in regtest, x86 new uses unsigned long --- massif/ms_main.c | 6 +++--- massif/tests/bug469146.vgtest | 2 ++ massif/tests/inlinfomalloc.vgtest | 2 ++ massif/tests/overloaded-new.vgtest | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/massif/ms_main.c b/massif/ms_main.c index 94eca658e..5ce8ee029 100644 --- a/massif/ms_main.c +++ b/massif/ms_main.c @@ -321,13 +321,13 @@ static void init_alloc_fns(void) // DO("malloc" ); DO("__builtin_new" ); -# if VG_WORDSIZE == 4 +# if VG_WORDSIZE == 4 && !defined(VGO_darwin) DO("operator new(unsigned)" ); #else DO("operator new(unsigned long)" ); #endif DO("__builtin_vec_new" ); -# if VG_WORDSIZE == 4 +# if VG_WORDSIZE == 4 && !defined(VGO_darwin) DO("operator new[](unsigned)" ); #else DO("operator new[](unsigned long)" ); @@ -338,7 +338,7 @@ static void init_alloc_fns(void) DO("memalign" ); DO("posix_memalign" ); DO("valloc" ); -# if VG_WORDSIZE == 4 +# if VG_WORDSIZE == 4 && !defined(VGO_darwin) DO("operator new(unsigned, std::nothrow_t const&)" ); DO("operator new[](unsigned, std::nothrow_t const&)" ); DO("operator new(unsigned, std::align_val_t)" ); diff --git a/massif/tests/bug469146.vgtest b/massif/tests/bug469146.vgtest index 83a4f8779..60847a185 100644 --- a/massif/tests/bug469146.vgtest +++ b/massif/tests/bug469146.vgtest @@ -4,5 +4,7 @@ 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 +# macOS allocations +vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_nolock --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInser --ignore-fn=add_class_to_loadable_list --ignore-fn=NXHashInsert --ignore-fn=class_createInstance --ignore-fn=_xpc_malloc --ignore-fn=strdup --ignore-fn=_xpc_calloc 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/inlinfomalloc.vgtest b/massif/tests/inlinfomalloc.vgtest index a064110ce..4b410b6ad 100644 --- a/massif/tests/inlinfomalloc.vgtest +++ b/massif/tests/inlinfomalloc.vgtest @@ -1,6 +1,8 @@ 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 +# macOS allocations +vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=map_images_nolock --ignore-fn=NXCreateHashTableFromZone --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=_xpc_malloc --ignore-fn=strdup --ignore-fn=_xpc_calloc stderr_filter: filter_verbose post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index dc51475a7..292b6cc73 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -4,5 +4,7 @@ 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 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 +# macOS allocations +vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_nolock --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_malloc post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ./filter_new_aligned | ./filter_ignore_fn cleanup: rm massif.out From 4186a0f2a2138b865214bdc99082f030a66d681d Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 27 Nov 2025 21:18:40 +0000 Subject: [PATCH 104/502] s390: Renumber hardware capabilities (BZ 509562) Plenty of room for new ones again. Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- VEX/pub/libvex.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 07c39eb4e..8aeb230eb 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -162,17 +162,17 @@ typedef #define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F -#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 */ -#define VEX_HWCAPS_S390X_LSC2 (1<<21) /* Conditional load/store facility2 */ -#define VEX_HWCAPS_S390X_VXE (1<<22) /* Vector-enhancements facility */ -#define VEX_HWCAPS_S390X_NNPA (1<<23) /* NNPA facility */ -#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_MSA8 (1<<29) /* Message-security-assist extension 8 */ -#define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ +#define VEX_HWCAPS_S390X_VX (1 << 6) /* Vector facility */ +#define VEX_HWCAPS_S390X_MSA5 (1 << 7) /* Message-security-assistance facility 5 */ +#define VEX_HWCAPS_S390X_MI2 (1 << 8) /* Miscellaneous-instruction-extensions facility 2 */ +#define VEX_HWCAPS_S390X_LSC2 (1 << 9) /* Conditional load/store facility2 */ +#define VEX_HWCAPS_S390X_VXE (1 << 10) /* Vector-enhancements facility */ +#define VEX_HWCAPS_S390X_NNPA (1 << 11) /* NNPA facility */ +#define VEX_HWCAPS_S390X_DFLT (1 << 12) /* Deflate-conversion facility */ +#define VEX_HWCAPS_S390X_VXE2 (1 << 13) /* Vector-enhancements facility 2 */ +#define VEX_HWCAPS_S390X_VXD (1 << 14) /* Vector packed-decimal facility */ +#define VEX_HWCAPS_S390X_MSA8 (1 << 15) /* Message-security-assist extension 8 */ +#define VEX_HWCAPS_S390X_MSA9 (1 << 16) /* Message-security-assist extension 9 */ /* Special value representing all available s390x hwcaps */ #define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_VX | \ From c13a414625d14a3146bfc54d795c4e09dcbf162f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 27 Nov 2025 21:21:59 +0000 Subject: [PATCH 105/502] s390: Tidy and a bit of constification --- VEX/priv/host_s390_defs.c | 30 ++++++++++++++++++------------ VEX/priv/host_s390_defs.h | 4 ++-- coregrind/m_machine.c | 8 ++++---- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 96c566823..063ede22a 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -322,7 +322,8 @@ is_virtual_gpr(HReg reg) /* Helper function for all vector operations */ static UChar -s390_getM_from_size(const UChar size) { +s390_getM_from_size(const UChar size) +{ switch(size) { case 1: return 0; @@ -342,7 +343,8 @@ s390_getM_from_size(const UChar size) { /* Helper for generating RXB field in vector instructions */ static UChar -s390_update_rxb(const UChar rxb, const UChar index, UChar* vr) { +s390_update_rxb(const UChar rxb, const UChar index, UChar* vr) +{ vassert((index >= 1) && (index <= 4)); UChar result = rxb; if(vr != NULL) { @@ -684,7 +686,8 @@ directReload_S390(HInstr* i, HReg vreg, Short spill_off) return NULL; } -s390_insn* genMove_S390(HReg from, HReg to, Bool mode64) +s390_insn * +genMove_S390(HReg from, HReg to, Bool mode64) { switch (hregClass(from)) { case HRcInt64: @@ -6822,7 +6825,7 @@ s390_insn_profinc(void) s390_insn * s390_insn_vec_amodeop(UChar size, s390_vec_amodeop_t tag, HReg dst, HReg op1, - s390_amode *op2) + s390_amode *op2) { s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn)); @@ -6838,8 +6841,9 @@ s390_insn_vec_amodeop(UChar size, s390_vec_amodeop_t tag, HReg dst, HReg op1, return insn; } -s390_insn *s390_insn_vec_amodeintop(UChar size, s390_vec_amodeintop_t tag, HReg dst, - s390_amode* op2, HReg op3) +s390_insn * +s390_insn_vec_amodeintop(UChar size, s390_vec_amodeintop_t tag, HReg dst, + s390_amode* op2, HReg op3) { s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn)); @@ -6855,8 +6859,9 @@ s390_insn *s390_insn_vec_amodeintop(UChar size, s390_vec_amodeintop_t tag, HReg return insn; } -s390_insn *s390_insn_vec_binop(UChar size, s390_vec_binop_t tag, HReg dst, - HReg op1, HReg op2) +s390_insn * +s390_insn_vec_binop(UChar size, s390_vec_binop_t tag, HReg dst, + HReg op1, HReg op2) { s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn)); @@ -6872,8 +6877,9 @@ s390_insn *s390_insn_vec_binop(UChar size, s390_vec_binop_t tag, HReg dst, return insn; } -s390_insn *s390_insn_vec_triop(UChar size, s390_vec_triop_t tag, HReg dst, - HReg op1, HReg op2, HReg op3) +s390_insn * +s390_insn_vec_triop(UChar size, s390_vec_triop_t tag, HReg dst, + HReg op1, HReg op2, HReg op3) { s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn)); @@ -6889,8 +6895,8 @@ s390_insn *s390_insn_vec_triop(UChar size, s390_vec_triop_t tag, HReg dst, return insn; } -s390_insn *s390_insn_vec_replicate(UChar size, HReg dst, HReg op1, - UChar idx) +s390_insn * +s390_insn_vec_replicate(UChar size, HReg dst, HReg op1, UChar idx) { s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn)); diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index f089eac9a..48ea79f18 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -890,8 +890,8 @@ Int emit_S390Instr ( Bool *, UChar *, Int, const s390_insn *, Bool, const RRegUniverse *getRRegUniverse_S390( void ); void genSpill_S390 ( HInstr **, HInstr **, HReg , Int , Bool ); void genReload_S390 ( HInstr **, HInstr **, HReg , Int , Bool ); -HInstr* directReload_S390 ( HInstr *, HReg, Short ); -extern s390_insn* genMove_S390(HReg from, HReg to, Bool mode64); +HInstr *directReload_S390 ( HInstr *, HReg, Short ); +s390_insn *genMove_S390 ( HReg from, HReg to, Bool mode64); HInstrArray *iselSB_S390 ( const IRSB *, VexArch, const VexArchInfo *, const VexAbiInfo *, Int, Int, Bool, Bool, Addr); diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 01a50c9b2..860ce1f9d 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -602,7 +602,7 @@ static UInt VG_(get_machine_model)(void) { static struct model_map { const HChar name[5]; - UInt id; + const UInt id; } model_map[] = { { "2064", VEX_S390X_MODEL_Z900 }, { "2066", VEX_S390X_MODEL_Z800 }, @@ -1561,9 +1561,9 @@ Bool VG_(machine_get_hwcaps)( void ) /* Detect presence of certain facilities using the STFLE insn. */ struct fac_hwcaps_map { UInt installed; - UInt facility_bit; - UInt hwcaps_bit; - const HChar name[6]; // may need adjustment for new facility names + const UInt facility_bit; + const UInt hwcaps_bit; + const HChar name[5]; // may need adjustment for new facility names } fac_hwcaps[] = { { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, { False, 57, VEX_HWCAPS_S390X_MSA5, "MSA5" }, From d4d17178aba87645c41e4ed105e7c520c6ab2dec Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 28 Nov 2025 07:44:51 +0100 Subject: [PATCH 106/502] Darwin Helgrind/DRD: change pthread lib, more filters and suppressions And turn off one test that is hanging. More to come. --- darwin17.supp | 41 +++++++++++++-------------------- helgrind/tests/bug484480.vgtest | 1 + include/pub_tool_redir.h | 3 ++- tests/filter_stderr_basic.in | 5 ++-- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/darwin17.supp b/darwin17.supp index c701782af..90d99f074 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -617,28 +617,10 @@ obj:*libdispatch.dylib* } -##{ -## OSX1013:CoreImage-1 -## Memcheck:Cond -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -##} - -##{ -## OSX1013:strncpy-1 -## Memcheck:Cond -## fun:strncpy -## obj:*CoreServicesInternal.framework*CoreServicesInternal -## obj:*CoreServicesInternal.framework*CoreServicesInternal -##} - { OSX1013:pthread_rwlock_init Memcheck:Cond fun:pthread_rwlock_init - obj:*ImageIO.framework*ImageIO* - obj:*ImageIO.framework*ImageIO* } { @@ -756,13 +738,6 @@ fun:setenv } -# See https://bugs.kde.org/show_bug.cgi?id=196528 -{ -macos-__pthread_rwlock_init-see-our-bug-196528 -Memcheck:Cond -fun:pthread_rwlock_init -} - # macOS 10.13 mach-o loader at startup { OSX1013:map_images-1 @@ -780,6 +755,7 @@ fun:pthread_rwlock_init fun:map_images_nolock fun:map_images } + { OSX1013:map_images-3 Memcheck:Leak @@ -1127,6 +1103,20 @@ fun:pthread_rwlock_init fun:nw_path_copy_interface_with_generation_internal } + +{ + OSX1013:helgrind:rwlock_tt::read() + Helgrind:Race + fun:_ZN9rwlock_ttILb0EE4readEv +} + +{ + OSX1013:helgrind:rwlock_tt::write() + Helgrind:Race + fun:_ZN9rwlock_ttILb0EE5writeEv +} + + { OSX1013:drd:object_dispose drd:ConflictingAccess @@ -1160,3 +1150,4 @@ fun:pthread_rwlock_init ... fun:xpc_pipe_routine } + diff --git a/helgrind/tests/bug484480.vgtest b/helgrind/tests/bug484480.vgtest index b130a2744..44e7c68bb 100644 --- a/helgrind/tests/bug484480.vgtest +++ b/helgrind/tests/bug484480.vgtest @@ -1,2 +1,3 @@ +prereq: ! ../../tests/os_test darwin vgopts: -q prog: bug484480 diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h index 043f8ac52..f2d768108 100644 --- a/include/pub_tool_redir.h +++ b/include/pub_tool_redir.h @@ -289,7 +289,8 @@ #elif defined(VGO_freebsd) # define VG_Z_LIBPTHREAD_SONAME libthrZdsoZa // libthr.so* #elif defined(VGO_darwin) -# define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib +//# define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib +# define VG_Z_LIBPTHREAD_SONAME libsystemZupthreadZddylib // libSystem.*.dylib #elif defined(VGO_solaris) # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd1 // libpthread.so.1 #else diff --git a/tests/filter_stderr_basic.in b/tests/filter_stderr_basic.in index 8f9a0e200..b0d37d9f1 100644 --- a/tests/filter_stderr_basic.in +++ b/tests/filter_stderr_basic.in @@ -83,6 +83,7 @@ $SED '/warning: evaluate_Dwarf3_Expr: unhandled DW_OP_/d' | $SED '/^used_suppression:.*OSX.*dyld.*default.supp:*/d' | # Suppress Darwin running dsymutil $SED -e '/run: \/usr\/bin\/dsymutil.*/d' | -# Suppress Darwin unknown mach ports -$SED -e '/UNKNOWN Mach port modified/d' +# Suppress Darwin unknown mach ports and mach_msg +$SED -e '/UNKNOWN Mach port modified/d' | +$SED -e '/UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option/d' From 6a5c15def701a4dfccec322d2367eb4464f8a88e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 28 Nov 2025 13:36:43 +0100 Subject: [PATCH 107/502] Darwin DRD and Helgrind: clean up suppressions Also fix one DRD testcase where a pthread function returns a different error code. --- darwin17.supp | 134 ++++---------------------------------------- drd/tests/trylock.c | 7 ++- 2 files changed, 16 insertions(+), 125 deletions(-) diff --git a/darwin17.supp b/darwin17.supp index 90d99f074..6966f101c 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -585,13 +585,6 @@ obj:*CoreServices.framework*LaunchServices* } -##{ -## OSX1013:libsystem_pthread-1 -## Memcheck:Cond -## obj:*libsystem_pthread*dylib* -## obj:*ImageIO.framework*ImageIO* -## obj:*ImageIO.framework*ImageIO* -##} { OSX1013:ApplicationServices-1 @@ -779,13 +772,6 @@ fun:*NXHash* } -{ - OSX1013:_pthread_start - Helgrind:Race - fun:_pthread_start - fun:thread_start -} - { OSX1013:vng_aes_encrypt_opt Memcheck:Value8 @@ -799,40 +785,9 @@ } { - OSX1013:helgrind:_pthread_deallocate - Helgrind:Race - fun:_pthread_deallocate -} - -{ - OSX1013:helgrind:_pthread_join_cleanup - Helgrind:Race - fun:_pthread_join_cleanup -} - -{ - OSX1013:helgrind:_pthread_join - Helgrind:Race - ... - fun:_pthread_join -} - -{ - OSX1013:helgrind:_pthread_terminate + OSX1013:helgrind:pthread library Helgrind:Race - fun:_pthread_terminate -} - -{ - OSX1013:helgrind:_pthread_exit - Helgrind:Race - fun:_pthread_exit -} - -{ - OSX1013:helgrind:_pthread_body - Helgrind:Race - fun:_pthread_body + obj:/usr/lib/system/libsystem_pthread.dylib } # various getaddrinfo suppressions @@ -890,13 +845,6 @@ fun:cache_fill } -{ - OSX1013:helgrind:pthead_once - Helgrind:Race - ... - fun:pthread_once -} - { OSX1013:helgrind:objc_destructInstance Helgrind:Race @@ -919,50 +867,14 @@ } { - OSX1013:nanosleep + OSX1013:drd:nanosleep drd:ConflictingAccess fun:nanosleep } { - OSX1013:_pthread_join + OSX1013:drd:pthread library drd:ConflictingAccess - fun:_pthread_join -} -{ - OSX1013:usleep - drd:ConflictingAccess - fun:pthread_testcancel - fun:usleep -} -{ - OSX1013:_pthread_join_cleanup - drd:ConflictingAccess - fun:_pthread_join_cleanup -} -{ - OSX1013:pthread_mutex_destroy - drd:ConflictingAccess - fun:pthread_mutex_destroy -} -{ - OSX1013:pthread_cond_destroy - drd:ConflictingAccess - fun:pthread_cond_destroy -} -{ - OSX1013:pthread_mutex_unlock - drd:ConflictingAccess - fun:pthread_mutex_unlock -} -{ - OSX1013:pthread_mutex_lock - drd:ConflictingAccess - fun:pthread_mutex_lock -} -{ - OSX1013:_pthread_deallocate - drd:ConflictingAccess - fun:_pthread_deallocate + obj:/usr/lib/system/libsystem_pthread.dylib } { OSX1013:std::timed_mutex::unlock @@ -974,36 +886,11 @@ drd:ConflictingAccess fun:_ZNSt3__111timed_mutex14try_lock_untilINS_6chrono12steady_clockENS2_8durationIxNS_5ratio* } -{ - OSX1013:_pthread_cond_updateval - drd:ConflictingAccess - fun:_pthread_cond_updateval -} -{ - OSX1013:pthread_cond_signal - drd:ConflictingAccess - fun:pthread_cond_signal -} -{ - OSX1013:_pthread_mutex_droplock - drd:ConflictingAccess - fun:_pthread_mutex_droplock -} -{ - OSX1013:_pthread_cond_wait - drd:ConflictingAccess - fun:_pthread_cond_wait -} { OSX1013:mach_timebase_info drd:ConflictingAccess fun:mach_timebase_info } -{ - OSX1013:pthread_testcancel - drd:ConflictingAccess - fun:pthread_testcancel -} # take care with this, don't want to suppress anything in user # thread functions { @@ -1116,6 +1003,11 @@ fun:_ZN9rwlock_ttILb0EE5writeEv } +{ + OSX1013:helgrind:gomp_barrier_wait + Helgrind:Race + fun:gomp_barrier_wait +} { OSX1013:drd:object_dispose @@ -1138,12 +1030,6 @@ fun:objc_destructInstance } -{ - OSX1013:drd:pthread_rwlock_unlock - drd:ConflictingAccess - fun:pthread_rwlock_unlock -} - { OSX1013:drd:xpc_pipe_routine drd:ConflictingAccess diff --git a/drd/tests/trylock.c b/drd/tests/trylock.c index 1aca70340..b2199e305 100644 --- a/drd/tests/trylock.c +++ b/drd/tests/trylock.c @@ -57,7 +57,12 @@ int main(int argc, char** argv) #endif fprintf(stderr, "Attempt to lock for writing recursively (not allowed).\n"); r = pthread_rwlock_wrlock(&rwlock); assert(r == 0); - r = pthread_rwlock_trywrlock(&rwlock); assert(r == EBUSY); + r = pthread_rwlock_trywrlock(&rwlock); +#if defined(__APPLE__) + assert(r == EDEADLK); +#else + assert(r == EBUSY); +#endif r = pthread_rwlock_unlock(&rwlock); assert(r == 0); r = pthread_rwlock_destroy(&rwlock); assert(r == 0); From 7c5fa1ac43196165c359ddc864fb3f7b3c4c6edb Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 28 Nov 2025 13:39:26 +0100 Subject: [PATCH 108/502] Darwin .gitignore: add lines for cachegrind callgrind and lackey dSYM directories --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 33378bcb7..58b81fa46 100644 --- a/.gitignore +++ b/.gitignore @@ -79,6 +79,7 @@ # /cachegrind/ /cachegrind/*.so +/cachegrind/*.dSYM /cachegrind/.deps /cachegrind/cachegrind-*-darwin /cachegrind/cachegrind-*-linux @@ -129,6 +130,7 @@ # /callgrind/ /callgrind/*.so +/callgrind/*.dSYM /callgrind/.deps /callgrind/callgrind-*-darwin /callgrind/callgrind-*-linux @@ -746,6 +748,7 @@ # /lackey/ /lackey/*.so +/lackey/*.dSYM /lackey/.deps /lackey/lackey-*-darwin /lackey/lackey-*-linux From 5d68d627f1d8ced4973ff9e138a1ec06922446e2 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 28 Nov 2025 22:49:25 +0100 Subject: [PATCH 109/502] Darwin: update signal tramp, helgrind and drd suppressions Change a couple of testcase asserts to match Darwin quirks. Signal tramp from Louis Brunner --- coregrind/m_libcsignal.c | 26 ++++++++++++++++++-------- darwin17.supp | 19 +++++++++++++++++++ helgrind/tests/tc12_rwl_trivial.c | 2 +- helgrind/tests/tc23_bogus_condwait.c | 5 ++++- include/vki/vki-darwin.h | 3 +++ 5 files changed, 45 insertions(+), 10 deletions(-) diff --git a/coregrind/m_libcsignal.c b/coregrind/m_libcsignal.c index d8563a4d0..d28b0b9b2 100644 --- a/coregrind/m_libcsignal.c +++ b/coregrind/m_libcsignal.c @@ -240,19 +240,29 @@ Int VG_(sigprocmask)( Int how, const vki_sigset_t* set, vki_sigset_t* oldset) #if defined(VGO_darwin) /* A helper function for sigaction on Darwin. */ -static -void darwin_signal_demux(void* a1, UWord a2, UWord a3, void* a4, void* a5) { +static +void darwin_signal_demux(void* catcher, UWord infostyle, UWord sig, void* sinfo, void* uctx +# if defined(VGA_arm64) +, void* token +# endif +) { VG_(debugLog)(2, "libcsignal", - "PRE demux sig, a2 = %lu, signo = %lu\n", a2, a3); - if (a2 == 1) - ((void(*)(int))a1) (a3); + "PRE demux sig, infostyle = %s, signo = %lu\n", infostyle == VKI_UC_TRAD ? "TRAD" : "FLAVOR", sig); + if (infostyle == VKI_UC_TRAD) + ((void(*)(int))catcher) (sig); else - ((void(*)(int,void*,void*))a1) (a3,a4,a5); + ((void(*)(int,void*,void*))catcher) (sig, sinfo, uctx); VG_(debugLog)(2, "libcsignal", - "POST demux sig, a2 = %lu, signo = %lu\n", a2, a3); - VG_(do_syscall2)(__NR_sigreturn, (UWord)a5, 0x1E); + "POST demux sig, infostyle = %s, signo = %lu\n", infostyle == VKI_UC_TRAD ? "TRAD" : "FLAVOR", sig); +# if defined(VGA_arm64) + VG_(do_syscall3)(__NR_sigreturn, (UWord)uctx, VKI_UC_FLAVOR, (UWord)token); + /* NOTREACHED */ + __asm__ __volatile__("udf #0"); +# else + VG_(do_syscall2)(__NR_sigreturn, (UWord)uctx, VKI_UC_FLAVOR); /* NOTREACHED */ __asm__ __volatile__("ud2"); +# endif } #endif diff --git a/darwin17.supp b/darwin17.supp index 6966f101c..528a9f139 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -866,6 +866,13 @@ fun:dispatch_once_f } +{ + OSX1013:helgrind:nanosleep + Helgrind:Race + ... + fun:nanosleep +} + { OSX1013:drd:nanosleep drd:ConflictingAccess @@ -1009,6 +1016,18 @@ fun:gomp_barrier_wait } +{ + OSX1013:helgrind:_os_unfair_lock_lock_slow + Helgrind:Race + fun:_os_unfair_lock_lock_slow +} + +{ + OSX1013:helgrind:sem_trywait + Helgrind:Race + fun:sem_trywait +} + { OSX1013:drd:object_dispose drd:ConflictingAccess diff --git a/helgrind/tests/tc12_rwl_trivial.c b/helgrind/tests/tc12_rwl_trivial.c index 35702ebb0..24f312c66 100644 --- a/helgrind/tests/tc12_rwl_trivial.c +++ b/helgrind/tests/tc12_rwl_trivial.c @@ -27,7 +27,7 @@ int main ( void ) /* this should fail - lock is unowned now */ r = pthread_rwlock_unlock( &rwl ); -#if defined(VGO_darwin) || defined(VGO_solaris) || defined(VGO_freebsd) +#if defined(VGO_solaris) || defined(VGO_freebsd) assert(r != 0); #else assert(r == 0); diff --git a/helgrind/tests/tc23_bogus_condwait.c b/helgrind/tests/tc23_bogus_condwait.c index f2ccf3517..b10674817 100644 --- a/helgrind/tests/tc23_bogus_condwait.c +++ b/helgrind/tests/tc23_bogus_condwait.c @@ -90,7 +90,10 @@ int main ( void ) r= pthread_join( my_rescuer, NULL ); assert(!r); r= pthread_join( grabber, NULL ); assert(!r); - r= my_sem_destroy( quit_now ); assert(!r); + r= my_sem_destroy( quit_now ); +#if !defined(VGO_darwin) + assert(!r); +#endif return 0; } diff --git a/include/vki/vki-darwin.h b/include/vki/vki-darwin.h index 5cffcd1b6..d7fb765ed 100644 --- a/include/vki/vki-darwin.h +++ b/include/vki/vki-darwin.h @@ -526,6 +526,9 @@ typedef struct { //typedef struct __sigaction vki_sigaction_toK_t; //typedef struct sigaction vki_sigaction_fromK_t; +#define VKI_UC_TRAD 1 +#define VKI_UC_FLAVOR 30 + typedef struct { void* ksa_handler; From dde5c22436e7b8c8f73b8366ed8e5ec967a132c4 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 29 Nov 2025 21:14:44 +0100 Subject: [PATCH 110/502] Darwin: updates to macho loading and turn off hanging regtests Code merges from Louis Brunner. Turn off 7 tests that are hanging. Updates to filtering. --- configure.ac | 9 +++ coregrind/m_debuginfo/debuginfo.c | 7 +- coregrind/m_debuginfo/readmacho.c | 93 +++++++++++++----------- drd/tests/annotate_sem.vgtest | 2 +- drd/tests/pth_cond_destroy_busy.vgtest | 2 +- drd/tests/swapcontext.vgtest | 2 +- helgrind/tests/bug392331.vgtest | 2 +- helgrind/tests/bug392331_supp.vgtest | 2 +- helgrind/tests/filter_stderr.in | 9 ++- helgrind/tests/shared_timed_mutex.vgtest | 2 +- helgrind/tests/tc22_exit_w_lock.vgtest | 2 +- helgrind/tests/tc24_nonzero_sem.c | 5 +- 12 files changed, 84 insertions(+), 53 deletions(-) diff --git a/configure.ac b/configure.ac index 09a352a70..54df9c1e1 100644 --- a/configure.ac +++ b/configure.ac @@ -396,6 +396,15 @@ case "${host_os}" in AC_DEFINE([DARWIN_10_11], 101100, [DARWIN_VERS value for Mac OS X 10.11]) AC_DEFINE([DARWIN_10_12], 101200, [DARWIN_VERS value for macOS 10.12]) AC_DEFINE([DARWIN_10_13], 101300, [DARWIN_VERS value for macOS 10.13]) + AC_DEFINE([DARWIN_10_14], 101400, [DARWIN_VERS value for macOS 10.14 / iOS 12]) + AC_DEFINE([DARWIN_10_15], 101500, [DARWIN_VERS value for macOS 10.15 / iOS 13]) + AC_DEFINE([DARWIN_11_00], 110000, [DARWIN_VERS value for macOS 11.0 / iOS 14]) + AC_DEFINE([DARWIN_12_00], 120000, [DARWIN_VERS value for macOS 12.0 / iOS 15]) + AC_DEFINE([DARWIN_13_00], 130000, [DARWIN_VERS value for macOS 13.0 / iOS 16]) + AC_DEFINE([DARWIN_14_00], 140000, [DARWIN_VERS value for macOS 14.0 / iOS 17]) + AC_DEFINE([DARWIN_15_00], 150000, [DARWIN_VERS value for macOS 15.0 / iOS 18]) + AC_DEFINE([DARWIN_15_04], 150400, [DARWIN_VERS value for macOS 15.4]) + AC_DEFINE([DARWIN_26_00], 260000, [DARWIN_VERS value for macOS / iOS 26]) AC_MSG_CHECKING([for the kernel version]) kernel=`uname -r` diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 18152b9e2..bb208925d 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -60,11 +60,11 @@ #if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) # include "priv_readelf.h" # include "priv_readdwarf3.h" -# include "priv_readpdb.h" #elif defined(VGO_darwin) # include "priv_readmacho.h" -# include "priv_readpdb.h" +# include "pub_core_mach.h" #endif +# include "priv_readpdb.h" #if defined(VGO_freebsd) #include "pub_core_clientstate.h" #endif @@ -1196,6 +1196,9 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) if (sr_isError(statres)) { DebugInfo fake_di; Bool quiet = VG_(strstr)(filename, "/var/run/nscd/") != NULL +#if defined(VGO_darwin) + || VG_(strstr)(filename, DARWIN_FAKE_MEMORY_PATH) != NULL +#endif || VG_(strstr)(filename, "/dev/shm/") != NULL || VG_(strncmp)("/memfd:", filename, VG_(strlen)("/memfd:")) == 0; diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index 31f56134d..dc2023bc7 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -83,6 +83,41 @@ /*--- ---*/ /*------------------------------------------------------------*/ +static Int count_rw_loads(const struct load_command* macho_load_commands, unsigned int ncmds) +{ + Int rw_loads = 0; + const struct load_command* lc = (const struct load_command*)macho_load_commands; + for (unsigned int i = 0U; i < ncmds; ++i) { + if (lc->cmd == LC_SEGMENT_CMD) { + const struct SEGMENT_COMMAND* sc = (const struct SEGMENT_COMMAND*)lc; + if (sc->initprot == 3 && sc->filesize +#if DARWIN_VERS >= DARWIN_13_00 +// FIXME: somehow __DATA_CONST appears as rw- in most binaries in macOS 13 and later (not sure when that started) +// so we ignore it otherwise some binaries don't get symbols + && VG_(strcmp)(sc->segname, "__DATA_CONST") != 0 +#endif + ) { + rw_loads += 1; + } + } + const char* tmp = (const char*)lc + lc->cmdsize; + lc = (const struct load_command*)tmp; + } + return rw_loads; +} + +static Bool check_fat_macho_and_get_rw_loads(const void* macho_header, Int* rw_loads) +{ + const struct fat_header* fh_be = (const struct fat_header*)macho_header; + vg_assert(fh_be); + if (VG_(ntohl)(fh_be->magic) == FAT_MAGIC) { + // @todo PJF not yet handled, previous behaviour was to assume that the count is 1 + *rw_loads = 1; + return True; + } + return False; +} + /* A DiSlice is used to handle the thin/fat distinction for MachO images. (1) the entire mapped-in ("primary") image, fat headers, kitchen sink, whatnot: the entire file. This is the DiImage* that is the backing @@ -93,20 +128,11 @@ memory that falls entirely inside the primary image. */ +STATIC_ASSERT(sizeof(struct fat_header) <= sizeof(struct MACH_HEADER)); + Bool ML_(check_macho_and_get_rw_loads)( Int fd, Int* rw_loads ) { - /* (JRS: the Mach-O headers might not be in this mapped data, - because we only mapped a page for this initial check, - or at least not very much, and what's at the start of the file - is in general a so-called fat header. The Mach-O object we're - interested in could be arbitrarily far along the image, and so - we can't assume its header will fall within this page.) */ - - /* But we can say that either it's a fat object, in which case it - begins with a fat header, or it's unadorned Mach-O, in which - case it starts with a normal header. At least do what checks we - can to establish whether or not we're looking at something - sane. */ + vg_assert(rw_loads); HChar macho_header[sizeof(struct MACH_HEADER)]; SysRes preadres = VG_(pread)( fd, macho_header, sizeof(struct MACH_HEADER), 0 ); @@ -115,43 +141,26 @@ Bool ML_(check_macho_and_get_rw_loads)( Int fd, Int* rw_loads ) return False; } - const struct fat_header* fh_be = (const struct fat_header*)macho_header; - const struct MACH_HEADER* mh = (const struct MACH_HEADER*)macho_header; - - vg_assert(fh_be); - vg_assert(mh); - vg_assert(rw_loads); - STATIC_ASSERT(sizeof(struct fat_header) <= sizeof(struct MACH_HEADER)); - if (VG_(ntohl)(fh_be->magic) == FAT_MAGIC) { - // @todo PJF not yet handled, previous behaviour was to assume that the count is 1 - *rw_loads = 1; + if (check_fat_macho_and_get_rw_loads(macho_header, rw_loads)) { return True; } - if (mh->magic == MAGIC) { - HChar* macho_load_commands = ML_(dinfo_zalloc)("di.readmacho.macho_load_commands", mh->sizeofcmds); - preadres = VG_(pread)( fd, macho_load_commands, mh->sizeofcmds, sizeof(struct MACH_HEADER) ); - if (sr_isError(preadres) || sr_Res(preadres) < mh->sizeofcmds) { - ML_(dinfo_free)(macho_load_commands); - return False; - } + const struct MACH_HEADER* mh = (const struct MACH_HEADER*)macho_header; + vg_assert(mh); + if (mh->magic != MAGIC) { + return False; + } - const struct load_command* lc = (const struct load_command*)macho_load_commands; - for (unsigned int i = 0U; i < mh->ncmds; ++i) { - if (lc->cmd == LC_SEGMENT_CMD) { - const struct SEGMENT_COMMAND* sc = (const struct SEGMENT_COMMAND*)lc; - if (sc->initprot == 3 && sc->filesize) { - ++*rw_loads; - } - } - const char* tmp = (const char*)lc + lc->cmdsize; - lc = (const struct load_command*)tmp; - } + HChar* macho_load_commands = ML_(dinfo_zalloc)("di.readmacho.macho_load_commands", mh->sizeofcmds); + preadres = VG_(pread)( fd, macho_load_commands, mh->sizeofcmds, sizeof(struct MACH_HEADER) ); + if (sr_isError(preadres) || sr_Res(preadres) < mh->sizeofcmds) { ML_(dinfo_free)(macho_load_commands); - return True; + return False; } - return False; + *rw_loads = count_rw_loads((const struct load_command*)macho_load_commands, mh->ncmds); + ML_(dinfo_free)(macho_load_commands); + return True; } diff --git a/drd/tests/annotate_sem.vgtest b/drd/tests/annotate_sem.vgtest index 3c5071ca1..4cec9ee37 100644 --- a/drd/tests/annotate_sem.vgtest +++ b/drd/tests/annotate_sem.vgtest @@ -1,4 +1,4 @@ -prereq: test -e annotate_sem && ./supported_libpthread +prereq: test -e annotate_sem && ./supported_libpthread && ! ../../tests/os_test darwin vgopts: --fair-sched=try --read-var-info=yes --check-stack-var=yes --show-confl-seg=no prog: annotate_sem stderr_filter: filter_stderr_and_thread_no diff --git a/drd/tests/pth_cond_destroy_busy.vgtest b/drd/tests/pth_cond_destroy_busy.vgtest index f3cf77825..a5895f352 100644 --- a/drd/tests/pth_cond_destroy_busy.vgtest +++ b/drd/tests/pth_cond_destroy_busy.vgtest @@ -1,2 +1,2 @@ -prereq: ./supported_libpthread && ! ../../tests/libc_test glibc 2.24.90 +prereq: ./supported_libpthread && ! ../../tests/libc_test glibc 2.24.90 && ! ../../tests/os_test darwin prog: pth_cond_destroy_busy diff --git a/drd/tests/swapcontext.vgtest b/drd/tests/swapcontext.vgtest index 98e3712c4..0c05ab702 100644 --- a/drd/tests/swapcontext.vgtest +++ b/drd/tests/swapcontext.vgtest @@ -1,4 +1,4 @@ -prereq: test -e swapcontext && ./supported_libpthread +prereq: test -e swapcontext && ./supported_libpthread && ! ../../tests/os_test darwin vgopts: --read-var-info=yes --check-stack-var=yes --show-confl-seg=no --num-callers=2 prog: swapcontext stderr_filter: filter_stderr diff --git a/helgrind/tests/bug392331.vgtest b/helgrind/tests/bug392331.vgtest index f300c5cc1..3484935de 100644 --- a/helgrind/tests/bug392331.vgtest +++ b/helgrind/tests/bug392331.vgtest @@ -1,4 +1,4 @@ -prereq: test -e bug392331 +prereq: test -e bug392331 && ! ../../tests/os_test darwin vgopts: -q --check-cond-signal-mutex=yes prog: bug392331 stderr_filter: filter_bug392331 diff --git a/helgrind/tests/bug392331_supp.vgtest b/helgrind/tests/bug392331_supp.vgtest index 64fc72960..5b4c526bf 100644 --- a/helgrind/tests/bug392331_supp.vgtest +++ b/helgrind/tests/bug392331_supp.vgtest @@ -1,3 +1,3 @@ -prereq: test -e bug392331 +prereq: test -e bug392331 && ! ../../tests/os_test darwin vgopts: -q --suppressions=bug392331.supp prog: bug392331 diff --git a/helgrind/tests/filter_stderr.in b/helgrind/tests/filter_stderr.in index 03a7d9e3b..3a89f54bd 100644 --- a/helgrind/tests/filter_stderr.in +++ b/helgrind/tests/filter_stderr.in @@ -19,7 +19,14 @@ fi | # And FreeBSD if $dir/../../tests/os_test freebsd; then - #perl -p $dir/filter_stderr_freebsd + awk -f $dir/filter_freebsd.awk +else + cat +fi | + +# And Darwin +if $dir/../../tests/os_test darwin; then + # reuse the FreeBSD filter to start with awk -f $dir/filter_freebsd.awk else cat diff --git a/helgrind/tests/shared_timed_mutex.vgtest b/helgrind/tests/shared_timed_mutex.vgtest index d3a044379..8903894e6 100644 --- a/helgrind/tests/shared_timed_mutex.vgtest +++ b/helgrind/tests/shared_timed_mutex.vgtest @@ -1,3 +1,3 @@ -prereq: test -e ../../drd/tests/shared_timed_mutex +prereq: test -e ../../drd/tests/shared_timed_mutex && ! ../../tests/os_test darwin vgopts: --read-var-info=yes prog: ../../drd/tests/shared_timed_mutex diff --git a/helgrind/tests/tc22_exit_w_lock.vgtest b/helgrind/tests/tc22_exit_w_lock.vgtest index 2e6190a72..8dd7531ec 100644 --- a/helgrind/tests/tc22_exit_w_lock.vgtest +++ b/helgrind/tests/tc22_exit_w_lock.vgtest @@ -1,3 +1,3 @@ -prereq: test -e tc22_exit_w_lock +prereq: test -e tc22_exit_w_lock && ! ../../tests/os_test darwin prog: tc22_exit_w_lock cleanup: rm -f vgcore.* diff --git a/helgrind/tests/tc24_nonzero_sem.c b/helgrind/tests/tc24_nonzero_sem.c index 541fa7ddb..2fe408191 100644 --- a/helgrind/tests/tc24_nonzero_sem.c +++ b/helgrind/tests/tc24_nonzero_sem.c @@ -44,7 +44,10 @@ int main ( void ) assert(!r); } - r= my_sem_destroy(sem); assert(!r); + r= my_sem_destroy(sem); +#if !defined(VGO_darwin) + assert(!r); +#endif return 0; } From 34b849de8406fe2b8a37083e6e153a0693de204d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 29 Nov 2025 21:52:00 +0100 Subject: [PATCH 111/502] debuginfo: small code simplification Merge two identical cases (and there may be a third if and when Darwin arm64 makes it here). --- coregrind/m_debuginfo/debuginfo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index bb208925d..3daa38a3a 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -3517,9 +3517,7 @@ Bool VG_(use_CF_info) ( /*MOD*/D3UnwindRegs* uregsHere, # elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_nanomips) ipHere = uregsHere->pc; # elif defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le) -# elif defined(VGP_arm64_linux) - ipHere = uregsHere->pc; -# elif defined(VGP_arm64_freebsd) +# elif defined(VGA_arm64) ipHere = uregsHere->pc; # elif defined(VGP_riscv64_linux) ipHere = uregsHere->pc; From 502fb19a40194c52f051c603c311c0dd2d5c29b2 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 30 Nov 2025 08:33:41 +0000 Subject: [PATCH 112/502] s390: Remove S390_NUM_FACILITY_DW; fix testcase stfle.c (BZ 509562) Now that the stfle insn is available we can use it to tell uas how many double words are needed to store all facility bits. Hence, S390_NUM_FACILITY_DW can go. none/tests/s390x/stfle.c: The bug is here if (bit_to_test < 64) return (hoststfle[0] & (1ULL << (63 - bit_to_test))); else if (bit_to_test < 128) return (hoststfle[1] & (1ULL << (63 - bit_to_test))); else if (bit_to_test < 192) return (hoststfle[2] & (1ULL << (63 - bit_to_test))); when bit_to_test >= 64. Now fixed and test added. Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- VEX/pub/libvex_s390x_common.h | 3 -- coregrind/m_machine.c | 20 +++++++++---- none/tests/s390x/stfle.c | 43 ++++++++++++++++++--------- none/tests/s390x/stfle.stdout.exp | 2 ++ none/tests/s390x/stfle.stdout.exp-z16 | 2 ++ tests/s390x_features.c | 32 +++++++++++++------- 6 files changed, 69 insertions(+), 33 deletions(-) diff --git a/VEX/pub/libvex_s390x_common.h b/VEX/pub/libvex_s390x_common.h index 295e0c29b..5fc0be916 100644 --- a/VEX/pub/libvex_s390x_common.h +++ b/VEX/pub/libvex_s390x_common.h @@ -99,9 +99,6 @@ /* Number of arguments that can be passed in registers */ #define S390_NUM_GPRPARMS 5 -/* Number of double words needed to store all facility bits. */ -#define S390_NUM_FACILITY_DW 4 - #endif /* __LIBVEX_PUB_S390X_H */ /*--------------------------------------------------------------------*/ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 860ce1f9d..4c65ec6cb 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1541,15 +1541,24 @@ Bool VG_(machine_get_hwcaps)( void ) VG_(exit)(1); } - ULong hoststfle[S390_NUM_FACILITY_DW]; + /* Get number of double words to store all facilities */ + unsigned long long dummy[1]; - for (i = 0; i < S390_NUM_FACILITY_DW; ++i) - hoststfle[i] = 0; + register ULong r0 asm("0") = 0; + asm volatile(".insn s,0xb2b00000,%0\n" /* stfle */ + : "=Q" (dummy), "+d"(r0) + : + : "cc", "memory"); + UInt num_dw = r0 + 1; + + /* Get the facility bits */ + ULong hoststfle[num_dw]; - register ULong reg0 asm("0") = S390_NUM_FACILITY_DW - 1; + for (i = 0; i < num_dw; ++i) + hoststfle[i] = 0; __asm__(".insn s,0xb2b00000,%0" /* stfle */ - : "=Q"(hoststfle), "+d"(reg0) + : "=Q"(hoststfle), "+d"(r0) : : "cc"); @@ -1582,7 +1591,6 @@ Bool VG_(machine_get_hwcaps)( void ) UChar dw_number = 0; UChar fac_bit = 0; for (i=0; i < sizeof fac_hwcaps / sizeof fac_hwcaps[0]; ++i) { - vg_assert(fac_hwcaps[i].facility_bit <= 191); // for now dw_number = fac_hwcaps[i].facility_bit / 64; fac_bit = fac_hwcaps[i].facility_bit % 64; if (hoststfle[dw_number] & (1ULL << (63 - fac_bit))) { diff --git a/none/tests/s390x/stfle.c b/none/tests/s390x/stfle.c index 5926964c6..db432c6d9 100644 --- a/none/tests/s390x/stfle.c +++ b/none/tests/s390x/stfle.c @@ -1,12 +1,22 @@ #include +#include -/* Number of double words needed to store all facility bits. */ -#define S390_NUM_FACILITY_DW 4 +/* Return the number of double words needed to store all facility bits */ +static unsigned get_num_facility_dw(void) +{ + unsigned long long dummy[1]; + register unsigned long long r0 asm("0") = 0; + asm volatile(".insn s,0xb2b00000,%0\n" /* stfle */ + : "=Q" (dummy), "+d"(r0) + : + : "cc", "memory"); + return r0 + 1; +} unsigned long long stfle(unsigned long dw, unsigned bit_to_test) { - unsigned long long hoststfle[S390_NUM_FACILITY_DW]; + unsigned long long hoststfle[dw]; register unsigned long long __nr asm("0") = dw - 1; int cc; @@ -16,20 +26,19 @@ unsigned long long stfle(unsigned long dw, unsigned bit_to_test) : "=Q" (*hoststfle), "+d" (__nr), "=d" (cc) : : "cc", "memory"); printf("the value of cc is %d and #double words is %llu\n", cc, __nr + 1); - if (bit_to_test < 64) - return (hoststfle[0] & (1ULL << (63 - bit_to_test))); - else if (bit_to_test < 128) - return (hoststfle[1] & (1ULL << (63 - bit_to_test))); - else if (bit_to_test < 192) - return (hoststfle[2] & (1ULL << (63 - bit_to_test))); - - printf("code needs to be updated\n"); - return 0; + + for (unsigned i = 0; i < dw; ++i) { + if (bit_to_test < (i + 1) * 64) { + bit_to_test -= i * 64; + return (hoststfle[i] & (1ULL << (63 - bit_to_test))); + } + } + assert(0); } -int main() +int main(void) { - int dw = S390_NUM_FACILITY_DW; + int dw = get_num_facility_dw(); /* Test #1: Make sure STFLE returns sensible values. z/Arch facilities must be present. */ @@ -44,6 +53,12 @@ int main() else printf("STFLE facility is not installed\n"); + /* Test #2.1: Test facility 77 which is installed for z196 and later */ + if (stfle(dw, 77)) + printf("Facility 77 is installed\n"); + else + printf("Facility 77 is not installed\n"); + /* Test #3: Tell STFLE to only write 1 DW of facility bits. Expected condition code should be 3 because this test is run on those machines only that need 3 do double words to store facility bits. */ diff --git a/none/tests/s390x/stfle.stdout.exp b/none/tests/s390x/stfle.stdout.exp index 895551e07..ff00c06cb 100644 --- a/none/tests/s390x/stfle.stdout.exp +++ b/none/tests/s390x/stfle.stdout.exp @@ -3,6 +3,8 @@ the value of cc is 0 and #double words is 3 The z/Architecture architectural mode is installed and active the value of cc is 0 and #double words is 3 STFLE facility is installed +the value of cc is 0 and #double words is 3 +Facility 77 is installed the value of cc is 3 and #double words is 3 the value of cc is 3 and #double words is 3 The z/Architecture architectural mode is installed and active diff --git a/none/tests/s390x/stfle.stdout.exp-z16 b/none/tests/s390x/stfle.stdout.exp-z16 index 8b01a2bec..8c74a068a 100644 --- a/none/tests/s390x/stfle.stdout.exp-z16 +++ b/none/tests/s390x/stfle.stdout.exp-z16 @@ -3,6 +3,8 @@ the value of cc is 0 and #double words is 4 The z/Architecture architectural mode is installed and active the value of cc is 0 and #double words is 4 STFLE facility is installed +the value of cc is 0 and #double words is 4 +Facility 77 is installed the value of cc is 3 and #double words is 4 the value of cc is 3 and #double words is 4 The z/Architecture architectural mode is installed and active diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 2b6af79f8..954db9f05 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -51,23 +51,33 @@ #define GET_HWCAP() 0UL #endif -/* Number of double words needed to store all facility bits. */ -#define S390_NUM_FACILITY_DW 3 +/* Return the number of double words needed to store all facility bits */ +static unsigned get_num_facility_dw(void) +{ + unsigned long long facilities[1]; -static void clear_facilities(unsigned long long *ret) + register unsigned long long r0 asm("0") = 0; + asm volatile(".insn s,0xb2b00000,%0\n" /* stfle */ + : "=Q" (facilities), "+d"(r0) + : + : "cc", "memory"); + return r0 + 1; +} + +static void clear_facilities(unsigned long long *ret, unsigned num_dw) { unsigned int index; - for(index = 0; index < S390_NUM_FACILITY_DW; index++) + for(index = 0; index < num_dw; index++) { ret[index] = 0ULL; } } -void stfle(unsigned long long *ret) +void stfle(unsigned long long *ret, unsigned num_dw) { - register unsigned long long r0 asm("0") = S390_NUM_FACILITY_DW - 1; + register unsigned long long r0 asm("0") = num_dw - 1; asm volatile(".insn s,0xb2b00000,%0\n" /* stfle */ - : "=m" (*ret), "+d"(r0) :: "cc", "memory"); + : "=Q" (*ret), "+d"(r0) :: "cc", "memory"); } @@ -217,13 +227,15 @@ static model_info *get_host(void) static int go(char *feature, char *cpu) { - unsigned long long facilities[S390_NUM_FACILITY_DW]; unsigned long long match; model_info *host, *from, *to, *p; char *colon; - clear_facilities(facilities); - stfle(facilities); + unsigned num_dw = get_num_facility_dw(); + unsigned long long facilities[num_dw]; + + clear_facilities(facilities, num_dw); + stfle(facilities, num_dw); if (strcmp(feature, "s390x-vx") == 0 ) { /* VX needs kernel support; thus check the appropriate HWCAP bit. */ From e4559d9fc88df83dc7a727871020e9d66bad11c9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 30 Nov 2025 15:51:20 +0100 Subject: [PATCH 113/502] Darwin: add code for text_slide Code from Louis Brunner --- coregrind/m_mach/mach_basics.c | 12 +++++++++++- coregrind/m_mach/mach_msg.c | 20 ++++++++++---------- coregrind/m_ume/macho.c | 12 ++++++++++-- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/coregrind/m_mach/mach_basics.c b/coregrind/m_mach/mach_basics.c index f0f45f573..73b802bdd 100644 --- a/coregrind/m_mach/mach_basics.c +++ b/coregrind/m_mach/mach_basics.c @@ -30,6 +30,7 @@ #include "pub_core_basics.h" #include "pub_core_mach.h" +#include "pub_core_libcassert.h" // vg_assert #include #include @@ -40,6 +41,7 @@ extern mach_port_name_t thread_self_trap(void); extern mach_port_t mach_reply_port(void); /* Global variables set in mach_init() */ +int vm_page_shift = 0; vm_size_t vm_page_size = 0; mach_port_name_t mach_task_self_ = 0; @@ -60,6 +62,10 @@ mach_port_t mig_get_reply_port(void) // its own behalf, and doesn't call mig outside the semaphore } +void mach_msg_destroy(mach_msg_header_t *msg) +{ + // TODO: copy from XNU? +} void mig_dealloc_reply_port(mach_port_t reply_port) { @@ -79,7 +85,11 @@ void VG_(mach_init)(void) mach_task_self_ = task_self_trap(); // GrP fixme host_page_size(host_self_trap(), &vm_page_size); - vm_page_size = 4096; + vm_page_shift = 12; + // FIXME: stored in COMM_PAGE + 0x025, (1 << 12) = 4096 + vm_page_size = 0x1000; + + vg_assert(1 << vm_page_shift == vm_page_size); } #endif // defined(VGO_darwin) diff --git a/coregrind/m_mach/mach_msg.c b/coregrind/m_mach/mach_msg.c index c21425472..adf95c1cf 100644 --- a/coregrind/m_mach/mach_msg.c +++ b/coregrind/m_mach/mach_msg.c @@ -39,6 +39,7 @@ #if defined(VGO_darwin) +#include "config.h" // for DARWIN_VERS #include "pub_core_basics.h" #include "pub_core_mach.h" @@ -56,16 +57,15 @@ mach_msg_trap(mach_msg_header_t *msg, mach_msg_timeout_t timeout, mach_port_t notify); -mach_msg_return_t -mach_msg(msg, option, send_size, rcv_size, rcv_name, timeout, notify) - mach_msg_header_t *msg; - mach_msg_option_t option; - mach_msg_size_t send_size; - mach_msg_size_t rcv_size; - mach_port_t rcv_name; - mach_msg_timeout_t timeout; - mach_port_t notify; -{ +mach_msg_return_t mach_msg( + mach_msg_header_t *msg, + mach_msg_option_t option, + mach_msg_size_t send_size, + mach_msg_size_t rcv_size, + mach_port_t rcv_name, + mach_msg_timeout_t timeout, + mach_port_t notify +) { mach_msg_return_t mr; /* diff --git a/coregrind/m_ume/macho.c b/coregrind/m_ume/macho.c index 239b7fc02..a8fdfd708 100644 --- a/coregrind/m_ume/macho.c +++ b/coregrind/m_ume/macho.c @@ -74,6 +74,7 @@ typedef struct load_info_t { vki_uint8_t *linker_entry; // dylinker entry point Addr linker_offset; // dylinker text offset vki_size_t max_addr; // biggest address reached while loading segments + Addr text_slide; // slide of the text segment because of "ASLR" (arm64-only) } load_info_t; static void print(const HChar *str) @@ -180,7 +181,7 @@ load_segment(int fd, vki_off_t offset, vki_off_t size, vki_size_t vmsize; // page-aligned vki_size_t vmend; // page-aligned unsigned int prot; - Addr slided_addr = segcmd->vmaddr + out_info->linker_offset; + Addr slided_addr = segcmd->vmaddr + out_info->linker_offset + out_info->text_slide; // GrP fixme mark __UNIXSTACK as SF_STACK @@ -449,6 +450,7 @@ load_dylinker(struct dylinker_command *dycmd, load_info_t *out_info) linker_info.entry = NULL; linker_info.linker_entry = NULL; linker_info.linker_offset = 0; + linker_info.text_slide = 0; linker_info.max_addr = out_info->max_addr; if (dycmd->name.offset >= dycmd->cmdsize) { @@ -816,7 +818,7 @@ Bool VG_(match_macho)(const void *hdr, SizeT len) // GrP fixme check more carefully for matching fat arch? - return (len >= VKI_PAGE_SIZE && + return (len >= sizeof(*magic) && (*magic == MAGIC || *magic == VG_(ntohl)(FAT_MAGIC))) ? True : False; } @@ -834,6 +836,7 @@ Int VG_(load_macho)(Int fd, const HChar *name, ExeInfo *info) load_info.linker_entry = NULL; load_info.linker_offset = 0; load_info.max_addr = 0; + load_info.text_slide = 0; err = VG_(fstat)(fd, &sb); if (err) { @@ -856,6 +859,11 @@ Int VG_(load_macho)(Int fd, const HChar *name, ExeInfo *info) info->text = (Addr) load_info.text; info->dynamic = load_info.linker_entry ? True : False; + if (!info->dynamic && load_info.text_slide) { + print("cannot slide static executables\n"); + return VKI_ENOEXEC; + } + info->executable_path = VG_(strdup)("ume.macho.executable_path", name); SysRes res = VG_(dup)(fd); From db4da40262410a10b67d410b4d5d4fe7f72bf788 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 30 Nov 2025 15:58:38 +0100 Subject: [PATCH 114/502] Add sse4-common.h to none/tests/Makefile.am noinst_HEADERS Fixes: 5e584556a9b9 ("Add none/tests/sse4-common.h header") --- none/tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index c0f473b73..20be62cbd 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -95,7 +95,7 @@ dist_noinst_SCRIPTS = \ allexec_prepare_prereq \ filter_sort -noinst_HEADERS = fdleak.h +noinst_HEADERS = fdleak.h sse4-common.h EXTRA_DIST = \ allexec32.stdout.exp allexec32.stderr.exp allexec32.vgtest\ From 175d836a83d297c637b7d6966e94c6bdaec7c35b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 30 Nov 2025 17:27:17 +0100 Subject: [PATCH 115/502] Darwin: update syscalls Code merged from Louis Brunner, mainly up to OSX 10.13 --- coregrind/m_syswrap/priv_syswrap-darwin.h | 13 +- coregrind/m_syswrap/syswrap-darwin.c | 302 ++++++++++++++++++++-- include/vki/vki-darwin.h | 5 + include/vki/vki-scnums-darwin.h | 2 + 4 files changed, 295 insertions(+), 27 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index 37d330d93..1e770d43a 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -39,14 +39,6 @@ void start_thread_NORETURN ( Word arg ); void assign_port_name(mach_port_t port, const char *name); void record_named_port(ThreadId tid, mach_port_t port, mach_port_right_t right, const char *name); -extern const SyscallTableEntry ML_(mach_trap_table)[]; -extern const SyscallTableEntry ML_(syscall_table)[]; -extern const SyscallTableEntry ML_(mdep_trap_table)[]; - -extern const UInt ML_(syscall_table_size); -extern const UInt ML_(mach_trap_table_size); -extern const UInt ML_(mdep_trap_table_size); - void VG_(show_open_ports)(void); Bool ML_(sync_mappings)(const HChar *when, const HChar *where, UWord num); @@ -240,7 +232,7 @@ DECL_TEMPLATE(darwin, csops_audittoken); // 170 // NYI kdebug_typefilter // 177 #endif /* DARWIN_VERS >= DARWIN_10_12 */ #if DARWIN_VERS >= DARWIN_10_11 -// NYI kdebug_trace_string // 178 +DECL_TEMPLATE(darwin, kdebug_trace_string); // 178 #endif /* DARWIN_VERS >= DARWIN_10_11 */ // 179 DECL_TEMPLATE(darwin, kdebug_trace); // 180 @@ -589,7 +581,7 @@ DECL_TEMPLATE(darwin, faccessat); // 466 // NYI fstatat // 469 DECL_TEMPLATE(darwin, fstatat64); // 470 // NYI linkat // 471 -// NYI unlinkat // 472 +DECL_TEMPLATE(darwin, unlinkat); // 472 DECL_TEMPLATE(darwin, readlinkat); // 473 // NYI symlinkat // 474 DECL_TEMPLATE(darwin, mkdirat); // 475 @@ -768,6 +760,7 @@ DECL_TEMPLATE(darwin, semaphore_wait_signal); DECL_TEMPLATE(darwin, semaphore_timedwait); DECL_TEMPLATE(darwin, semaphore_timedwait_signal); DECL_TEMPLATE(darwin, task_for_pid); +DECL_TEMPLATE(darwin, task_name_for_pid); DECL_TEMPLATE(darwin, pid_for_task); #if DARWIN_VERS >= DARWIN_10_13 diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 606fbccff..28ae9b4d5 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -66,6 +66,7 @@ #include #include #include +#include /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */ #define msgh_request_port msgh_remote_port @@ -271,7 +272,6 @@ static void run_a_thread_NORETURN ( Word tidW ) tst->status = VgTs_Empty; // GrP fixme race here! new thread may claim this V thread stack // before we get out here! - // GrP fixme use bsdthread_terminate for safe cleanup? mach_msg(&msg, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, sizeof(msg), 0, 0, MACH_MSG_TIMEOUT_NONE, 0); @@ -715,6 +715,189 @@ void VG_(show_open_ports)(void) } +/* --------------------------------------------------------------------- + kdebug helpers + ------------------------------------------------------------------ */ + +// Adapted from https://newosxbook.com/tools/kdv.html +static const HChar *kdebug_std_codes[] = +{ + NULL, + "MACH", // #define DBG_MACH 1 + "NETWORK", // #define DBG_NETWORK 2 + "FSYSTEM", // #define DBG_FSYSTEM 3 + "BSD", // #define DBG_BSD 4 + "IOKIT", // #define DBG_IOKIT 5 + "DRIVERS", // #define DBG_DRIVERS 6 + "TRACE", // #define DBG_TRACE 7 + "DLIL", // #define DBG_DLIL 8 + "PTHREAD", // #define DBG_PTHREAD 9 + "CORESTORAGE", // #define DBG_CORESTORAGE 10 + "COREGRAPHICS", // #define DBG_CG 11 + "MONOTONICS", // #define DBG_MONOTONIC 12 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "MISC", // #define DBG_MISC 20 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "SECURITY", // As of 10.10 + "DYLD", // #define DBG_DYLD 31 + "QT", // #define DBG_QT 32 + "APPS", // #define DBG_APPS 33 + "LAUNCHD", // #define DBG_LAUNCHD 34 + "SILICON", // #define DBG_SILICON 35 + "HANGTRACER", // iOS 9: undocumented + "PERF" , // #define DBG_PERF 37 + // added in 10.9 + "IMPORTANCE", // #define DBG_IMPORTANCE 38 + NULL, // Apparently present in iOS? + // Added in 10.10 + "BANK", // #define DBG_BANK 40 + "XPC", //#define DBG_XPC 41 + "ATM" , // #define DBG_ATM 42 + "ARIADNE", // #define DBG_ARIADNE 43 + // Added in 10.11 + "DAEMON", // #define DBG_DAEMON 44 + "ENERGYTRACE", // #define DBG_ENERGYTRACE 45 + "DISPATCH", // #define DBG_DISPATCH 46 + NULL, NULL, + "IMG", // #define DBG_IMG 49 + NULL, + "UMALLOC", // #define DBG_UMALLOC 51 + NULL, + "TURNSTILE", // #define DBG_TURNSTILE 53 + "AUDIO", // #define DBG_AUDIO 54 + NULL, NULL, NULL, NULL, NULL, // 55-59 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 60-69 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 70-79 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 80-89 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 90-99 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 100-109 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 110-119 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 120-129 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 130-139 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 140-149 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 150-159 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 160-169 + "WINDOWSERVER", // apparently deprecated in 10.11 and merged with 49 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 171-179 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 180-189 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 190-199 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 200-209 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 210-219 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 220-229 + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 230-238 + "IOS_APPS", // iOS: Used by tons of Apps, undocumented + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, // 240-249 + NULL, NULL, NULL, NULL, NULL, // 250-254 + "MIG", // #define DBG_MIG 255 +}; + +struct KDebugTraceCode { + ULong code; + const HChar name[64]; +}; + +static const HChar *kdebug_debugid(ULong did) +{ + static Bool kdebug_trace_codes_initd = False; + static UInt kdebug_trace_codes_count = 0; + static struct KDebugTraceCode* kdebug_trace_codes = NULL; + + static HChar buf[64]; + + Int class = KDBG_EXTRACT_CLASS(did); + ULong event_id = did & KDBG_EVENTID_MASK; + HChar dir = '\0'; + const HChar* found_class = NULL; + + if (!kdebug_trace_codes_initd) { + HChar rbuf[1024]; + Int leftover = 0; + + kdebug_trace_codes_initd = True; + SysRes fd = VG_(open)("/usr/share/misc/trace.codes", O_RDONLY, 0); + if (sr_isError(fd)) { + VG_(close)(sr_Res(fd)); + } else { + kdebug_trace_codes_count = 0; + while (1) { + Int count = VG_(read)(sr_Res(fd), rbuf, sizeof(rbuf)); + if (count <= 0) { + break; + } + for (HChar* p = rbuf; p < rbuf + count; p += 1) { + if (*p == '\n') { + kdebug_trace_codes_count += 1; + } + } + } + kdebug_trace_codes = VG_(malloc)("kdebug_trace_codes", + kdebug_trace_codes_count * + sizeof(struct KDebugTraceCode)); + VG_(lseek)(sr_Res(fd), 0, VKI_SEEK_SET); + kdebug_trace_codes_count = 0; + while (1) { + Int count = VG_(read)(sr_Res(fd), rbuf+leftover, sizeof(rbuf)-leftover); + if (count <= 0) { + break; + } + count += leftover; + Int start = 0; + for (HChar* p = rbuf; p < rbuf + count; p += 1) { + if (*p != '\n') { + continue; + } + + HChar* end = NULL; + *p = '\0'; + kdebug_trace_codes[kdebug_trace_codes_count].code = VG_(strtoll16)(rbuf+start, &end); + while (*end == ' ' || *end == '\t') { + end += 1; + } + // FIXME: gross cast! + VG_(strlcpy)((HChar*)(Addr)kdebug_trace_codes[kdebug_trace_codes_count].name, end, sizeof(kdebug_trace_codes[kdebug_trace_codes_count].name)); + kdebug_trace_codes_count += 1; + start = p - rbuf + 1; + } + if (start < count) { + leftover = count - start; + VG_(memmove)(rbuf, rbuf+start, leftover); + } + } + VG_(close)(sr_Res(fd)); + } + } + + for (Int i = 0; i < kdebug_trace_codes_count; i += 1) { + const struct KDebugTraceCode* entry = &kdebug_trace_codes[i]; + if (entry->code == event_id) { + found_class = entry->name; + break; + } + } + if (found_class == NULL) { + found_class = kdebug_std_codes[class]; + } + if (found_class == NULL) { + found_class = "UNKNOWN"; + } + + if (did & DBG_FUNC_START) { + dir = '>'; + } + if (did & DBG_FUNC_END) { + dir = '<'; + } + + if (dir) { + VG_(sprintf)(buf, "%c%s", dir, found_class); + } else { + VG_(sprintf)(buf, "%s", found_class); + } + + return buf; +} + + /* --------------------------------------------------------------------- sync_mappings ------------------------------------------------------------------ */ @@ -2055,7 +2238,7 @@ PRE(disconnectx) PRE(kevent) { PRINT("kevent( %ld, %#lx, %ld, %#lx, %ld, %#lx )", - SARG1, ARG2, ARG3, ARG4, ARG5, ARG6); + SARG1, ARG2, SARG3, ARG4, SARG5, ARG6); PRE_REG_READ6(int,"kevent", int,kq, const struct vki_kevent *,changelist, int,nchanges, struct vki_kevent *,eventlist, int,nevents, @@ -2073,7 +2256,7 @@ PRE(kevent) POST(kevent) { - PRINT("kevent ret %ld dst %#lx (%zu)", RES, ARG4, sizeof(struct vki_kevent)); + PRINT("kevent ret %ld dst %#lx (%zu)", (Word)RES, ARG4, sizeof(struct vki_kevent)); if (RES > 0) POST_MEM_WRITE(ARG4, RES * sizeof(struct vki_kevent)); } @@ -2169,6 +2352,7 @@ static const HChar *workqop_name(int op) case VKI_WQOPS_SET_EVENT_MANAGER_PRIORITY: return "SET_EVENT_MANAGER_PRIORITY"; case VKI_WQOPS_THREAD_WORKLOOP_RETURN: return "THREAD_WORKLOOP_RETURN"; case VKI_WQOPS_SHOULD_NARROW: return "SHOULD_NARROW"; + case VKI_WQOPS_SETUP_DISPATCH: return "SETUP_DISPATCH"; default: return "?"; } } @@ -2226,11 +2410,33 @@ PRE(workq_ops) // RK fixme need anything here? // RK fixme may block? break; + case VKI_WQOPS_SETUP_DISPATCH: { + // docs says: setup pthread workqueue-related operations +#if DARWIN_VERS >= DARWIN_10_15 +#pragma pack(4) + struct workq_dispatch_config { + uint32_t wdc_version; + uint32_t wdc_flags; + uint64_t wdc_queue_serialno_offs; + uint64_t wdc_queue_label_offs; + }; +#pragma pack() + PRE_MEM_READ("workq_ops(item)", ARG2, MIN(sizeof(struct workq_dispatch_config), SARG3)); + struct workq_dispatch_config* cfg = (struct workq_dispatch_config*)ARG2; + if (cfg->wdc_flags & ~VKI_WORKQ_DISPATCH_SUPPORTED_FLAGS || + cfg->wdc_version < VKI_WORKQ_DISPATCH_MIN_SUPPORTED_VERSION) { + SET_STATUS_Failure( VKI_ENOTSUP ); + } +#endif + break; + } default: - VG_(printf)("UNKNOWN workq_ops option %ld\n", ARG1); + PRINT("workq_ops ( %lu [??], ... )", ARG1); + log_decaying("UNKNOWN workq_ops option %lu!", ARG1); break; } } + POST(workq_ops) { ThreadState *tst = VG_(get_ThreadState)(tid); @@ -2809,10 +3015,11 @@ PRE(fstat_extended) PRE_REG_READ4(int, "fstat_extended", int, fd, struct stat *, buf, void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_WRITE( "fstat_extended(buf)", ARG2, sizeof(struct vki_stat) ); - if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if (ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE("fstat_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "fstat_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } + POST(fstat_extended) { POST_MEM_WRITE( ARG2, sizeof(struct vki_stat) ); @@ -2830,10 +3037,11 @@ PRE(stat64_extended) void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_RASCIIZ( "stat64_extended(file_name)", ARG1 ); PRE_MEM_WRITE( "stat64_extended(buf)", ARG2, sizeof(struct vki_stat64) ); - if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if (ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE("stat64_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "stat64_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } + POST(stat64_extended) { POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) ); @@ -2842,7 +3050,6 @@ POST(stat64_extended) POST_MEM_WRITE( ARG4, sizeof(vki_size_t) ); } - PRE(lstat64_extended) { PRINT("lstat64_extended( %#lx(%s), %#lx, %#lx, %#lx )", @@ -2851,10 +3058,11 @@ PRE(lstat64_extended) void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_RASCIIZ( "lstat64_extended(file_name)", ARG1 ); PRE_MEM_WRITE( "lstat64_extended(buf)", ARG2, sizeof(struct vki_stat64) ); - if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if ( ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE( "lstat64_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "lstat64_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } + POST(lstat64_extended) { POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) ); @@ -2871,10 +3079,11 @@ PRE(fstat64_extended) PRE_REG_READ4(int, "fstat64_extended", int, fd, struct stat64 *, buf, void *, fsacl, vki_size_t *, fsacl_size); PRE_MEM_WRITE( "fstat64_extended(buf)", ARG2, sizeof(struct vki_stat64) ); - if (ARG4 && ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) + if (ML_(safe_to_deref)( (void*)ARG4, sizeof(vki_size_t) )) PRE_MEM_WRITE("fstat64_extended(fsacl)", ARG3, *(vki_size_t *)ARG4 ); PRE_MEM_READ( "fstat64_extended(fsacl_size)", ARG4, sizeof(vki_size_t) ); } + POST(fstat64_extended) { POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) ); @@ -5131,6 +5340,7 @@ POST(host_get_clock_service) Reply *reply = (Reply *)ARG1; + record_named_port(tid, reply->clock_serv.name, -1, "clock-%p"); assign_port_name(reply->clock_serv.name, "clock-%p"); PRINT("%s", name_for_port(reply->clock_serv.name)); } @@ -6053,6 +6263,7 @@ POST(task_get_special_port) switch (MACH_ARG(task_get_special_port.which_port)) { case TASK_BOOTSTRAP_PORT: vg_bootstrap_port = reply->special_port.name; + record_named_port(tid, reply->special_port.name, -1, "bootstrap"); assign_port_name(reply->special_port.name, "bootstrap"); break; case TASK_KERNEL_PORT: @@ -6155,6 +6366,7 @@ POST(semaphore_create) Reply *reply = (Reply *)ARG1; + record_named_port(tid, reply->semaphore.name, -1, "semaphore-%p"); assign_port_name(reply->semaphore.name, "semaphore-%p"); PRINT("%s", name_for_port(reply->semaphore.name)); } @@ -8921,6 +9133,25 @@ PRE(__semwait_signal) // *flags |= SfMayBlock; //} +PRE(task_name_for_pid) +{ + PRINT("task_name_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), SARG2, ARG3); + PRE_REG_READ3(long, "task_name_for_pid", + mach_port_t,"target", + vki_pid_t, "pid", mach_port_t *,"task"); + PRE_MEM_WRITE("task_name_for_pid(task)", ARG3, sizeof(mach_port_t)); +} + +POST(task_name_for_pid) +{ + mach_port_t task; + + POST_MEM_WRITE(ARG3, sizeof(mach_port_t)); + + task = *(mach_port_t *)ARG3; + record_named_port(tid, task, MACH_PORT_RIGHT_SEND, "task-name-%p"); + PRINT("task-name %#x", task); +} PRE(task_for_pid) { @@ -9472,6 +9703,17 @@ static void munge_wll(UWord* a1, ULong* a2, ULong* a3, # endif } +static void munge_wlww(UWord* a1, ULong* a2, UWord* a3, UWord* a4, + UWord aRG1, UWord aRG2, UWord aRG3, + UWord aRG4, UWord aRG5) +{ +# if defined(VGA_x86) + *a1 = aRG1; *a2 = LOHI64(aRG2,aRG3); *a3 = aRG4; *a4 = aRG5; +# else + *a1 = aRG1; *a2 = aRG2; *a3 = aRG3; *a4 = aRG4; +# endif +} + static void munge_wwlw(UWord* a1, UWord* a2, ULong* a3, UWord* a4, UWord aRG1, UWord aRG2, UWord aRG3, UWord aRG4, UWord aRG5) @@ -9757,9 +9999,12 @@ PRE(kernelrpc_mach_port_construct_trap) { UWord a1; UWord a2; ULong a3; UWord a4; munge_wwlw(&a1, &a2, &a3, &a4, ARG1, ARG2, ARG3, ARG4, ARG5); + mach_port_options_t* options = (mach_port_options_t*) a2; PRINT("kernelrpc_mach_port_construct_trap" - "(target: %s, options: %#lx, content: %llx, name: %p)", - name_for_port(a1), a2, a3, *(mach_port_name_t**)a4); + "(target: %s, options: %#lx {flags: %#x, mpl_ql: %#x}, context: %llx, name: %p)", + name_for_port(a1), a2, options->flags, options->mpl.mpl_qlimit, a3, *(mach_port_name_t**)a4); + PRE_MEM_READ("kernelrpc_mach_port_construct_trap(options)", a2, + sizeof(mach_port_options_t)); PRE_MEM_WRITE("kernelrpc_mach_port_construct_trap(name)", a4, sizeof(mach_port_name_t*)); } @@ -9925,6 +10170,15 @@ POST(fstatat64) POST_MEM_WRITE( ARG3, sizeof(struct vki_stat64) ); } +PRE(unlinkat) +{ + PRINT("unlinkat ( %ld, %#lx(%s), %#lx )", + SARG1, ARG2, (HChar*)ARG2, ARG3); + PRE_REG_READ3(long, "unlinkat", + int, fd, const char *, path, int, flag); + PRE_MEM_RASCIIZ( "unlinkat(path)", ARG2 ); +} + PRE(readlinkat) { PRINT("readlinkat ( %ld, %#lx(%s), %#lx, %ld )", @@ -10080,6 +10334,15 @@ PRE(mkdirat) #if DARWIN_VERS >= DARWIN_10_11 +PRE(kdebug_trace_string) +{ + PRINT("kdebug_trace_string(%#lx (%s), %#lx, %s)", ARG1, kdebug_debugid(ARG1), ARG2, (HChar*)(Addr)ARG3); + if (ARG3 != 0) { + PRE_MEM_RASCIIZ("kdebug_trace_string(string)", ARG3); + } + SET_STATUS_Success(0); +} + PRE(kevent_qos) { PRINT("kevent_qos( %ld, %#lx, %ld, %#lx, %ld, %#lx, %ld, %ld )", @@ -10798,6 +11061,11 @@ const SyscallTableEntry ML_(syscall_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(175)), // old gc_control // _____(__NR_add_profil), _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(177)), // ??? +#if DARWIN_VERS >= DARWIN_10_11 + MACX_(__NR_kdebug_trace_string, kdebug_trace_string), // 178 +#else + _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(178)), // ??? +#endif _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(178)), // ??? _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(179)), // ??? MACX_(__NR_kdebug_trace, kdebug_trace), // 180 @@ -11143,7 +11411,9 @@ const SyscallTableEntry ML_(syscall_table)[] = { #endif MACX_(__NR_faccessat, faccessat), // 466 MACXY(__NR_fstatat64, fstatat64), // 470 + MACX_(__NR_unlinkat, unlinkat), // 472 MACXY(__NR_readlinkat, readlinkat), // 473 + MACX_(__NR_mkdirat, mkdirat), // 475 MACX_(__NR_bsdthread_ctl, bsdthread_ctl), // 478 MACXY(__NR_csrctl, csrctl), // 483 MACX_(__NR_guarded_open_dprotected_np, guarded_open_dprotected_np), // 484 @@ -11228,7 +11498,7 @@ const SyscallTableEntry ML_(mach_trap_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(9)), # if DARWIN_VERS >= DARWIN_10_8 - MACXY(__NR_kernelrpc_mach_vm_allocate_trap, kernelrpc_mach_vm_allocate_trap), + MACXY(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(10), kernelrpc_mach_vm_allocate_trap), # else _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(10)), # endif @@ -11318,7 +11588,7 @@ const SyscallTableEntry ML_(mach_trap_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(43)), # endif -// _____(__NR_task_name_for_pid), + MACXY(__NR_task_name_for_pid, task_name_for_pid), MACXY(__NR_task_for_pid, task_for_pid), MACXY(__NR_pid_for_task, pid_for_task), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(47)), @@ -11401,17 +11671,15 @@ const SyscallTableEntry ML_(mach_trap_table)[] = { // calling convention instead of the syscall convention. // Use ML_(mdep_trap_table)[syscallno - ML_(mdep_trap_base)] . -#if defined(VGA_x86) const SyscallTableEntry ML_(mdep_trap_table)[] = { +#if defined(VGA_x86) MACX_(__NR_thread_fast_set_cthread_self, thread_fast_set_cthread_self), -}; #elif defined(VGA_amd64) -const SyscallTableEntry ML_(mdep_trap_table)[] = { MACX_(__NR_thread_fast_set_cthread_self, thread_fast_set_cthread_self), -}; #else #error unknown architecture #endif +}; const SyscallTableEntry* ML_(get_darwin_syscall_entry) ( UInt sysno ) { diff --git a/include/vki/vki-darwin.h b/include/vki/vki-darwin.h index d7fb765ed..e89888e65 100644 --- a/include/vki/vki-darwin.h +++ b/include/vki/vki-darwin.h @@ -981,6 +981,11 @@ struct ByteRangeLockPB2 #define VKI_WQOPS_SET_EVENT_MANAGER_PRIORITY 128 /* max() in the provided priority in the the priority of the event manager */ #define VKI_WQOPS_THREAD_WORKLOOP_RETURN 256 /* parks the thread after delivering the passed kevent array */ #define VKI_WQOPS_SHOULD_NARROW 512 /* checks whether we should narrow our concurrency */ +#define VKI_WQOPS_SETUP_DISPATCH 1024 /* setup pthread workqueue-related operations */ + +#define VKI_WORKQ_DISPATCH_CONFIG_VERSION 2 +#define VKI_WORKQ_DISPATCH_MIN_SUPPORTED_VERSION 1 +#define VKI_WORKQ_DISPATCH_SUPPORTED_FLAGS 0 #include diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index 3a3352078..f7f3b1105 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -782,7 +782,9 @@ #endif #define __NR_faccessat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(466) #define __NR_fstatat64 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(470) +#define __NR_unlinkat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(472) #define __NR_readlinkat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(473) +#define __NR_mkdirat VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(475) #define __NR_bsdthread_ctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(478) #define __NR_csrctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(483) #define __NR_guarded_open_dprotected_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(484) From e06e758b33111f012301dc54f6577c0c81dc12a9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 30 Nov 2025 18:21:56 +0100 Subject: [PATCH 116/502] Darwin: update x86 syswrap code Code from Louis Brunner. --- coregrind/m_syswrap/syswrap-x86-darwin.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-x86-darwin.c b/coregrind/m_syswrap/syswrap-x86-darwin.c index 97c044f77..a0bc1a1e7 100644 --- a/coregrind/m_syswrap/syswrap-x86-darwin.c +++ b/coregrind/m_syswrap/syswrap-x86-darwin.c @@ -195,7 +195,7 @@ ThreadState *build_thread(const thread_state_t state, // Edit the thread state to send to the real kernel. // The real thread will run start_thread_NORETURN(tst) // on a separate non-client stack. -void hijack_thread_state(thread_state_t mach_generic, +void hijack_thread_state(thread_state_t mach_generic, thread_state_flavor_t flavor, mach_msg_type_number_t count, ThreadState *tst) @@ -271,7 +271,7 @@ asm( -void pthread_hijack(Addr self, Addr kport, Addr func, Addr func_arg, +void pthread_hijack(Addr self, Addr kport, Addr func, Addr func_arg, Addr stacksize, Addr flags, Addr sp) { vki_sigset_t blockall; @@ -358,6 +358,7 @@ asm( " push $0\n" // alignment " push $0\n" // alignment " push %ebp\n" // original sp +" push %esi\n" // kevent_count " push %edi\n" // reuse " push %edx\n" // workitem " push %ecx\n" // stackaddr @@ -375,7 +376,7 @@ 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, +void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, UInt reuse, Int kevent_count, Addr sp) { ThreadState *tst; @@ -396,8 +397,8 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, if (0) VG_(printf)( "wqthread_hijack: self %#lx, kport %#lx, " - "stackaddr %#lx, workitem %#lx, reuse/flags %x, sp %#lx\n", - self, kport, stackaddr, workitem, reuse, sp); + "stackaddr %#lx, workitem %#lx, reuse/flags %x, kevent_count %d, sp %#lx\n", + self, kport, stackaddr, workitem, reuse, kevent_count, sp); /* Start the thread with all signals blocked. VG_(scheduler) will set the mask correctly when we finally get there. */ @@ -429,7 +430,8 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, || DARWIN_VERS == DARWIN_10_10 \ || DARWIN_VERS == DARWIN_10_11 \ || DARWIN_VERS == DARWIN_10_12 \ - || DARWIN_VERS == DARWIN_10_13 + || DARWIN_VERS == DARWIN_10_13 \ + || DARWIN_VERS == DARWIN_10_14 UWord magic_delta = 0xB0; # else # error "magic_delta: to be computed on new OS version" @@ -452,6 +454,10 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, tid, tst, tst->os_state.pthread, self); vex = &tst->arch.vex; + if (tst->os_state.pthread - magic_delta != self) { + VG_(printf)("wqthread_hijack reuse: tst->os_state.pthread %#lx vs self %#lx (diff: %#lx vs %#lx)\n", + tst->os_state.pthread, self, tst->os_state.pthread - self, magic_delta); + } vg_assert(tst->os_state.pthread - magic_delta == self); } else { @@ -471,7 +477,7 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, vex->guest_ECX = stackaddr; vex->guest_EDX = workitem; vex->guest_EDI = reuse; - vex->guest_ESI = 0; + vex->guest_ESI = kevent_count; vex->guest_ESP = sp; stacksize = 512*1024; // wq stacks are always DEFAULT_STACK_SIZE From e6a4ea43e1c3d96ec41fd4bea4a5d8bec8535f4a Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 30 Nov 2025 21:52:32 +0000 Subject: [PATCH 117/502] NEWS / README.s390 update BZ 509562 closed --- NEWS | 2 ++ README.s390 | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2cedad448..6068d611d 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ X86/macOS 10.13, AMD64/macOS 10.13 and nanoMIPS/Linux. * ================== PLATFORM CHANGES ================= +s390x: Machine models older than z196 are no longer supported. * ==================== TOOL CHANGES =================== @@ -28,6 +29,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 228343 none/tests/darwin/bug228343 fails on OS X 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) 487055 memcheck/tests/x86-linux/scalar fails running in Docker +509562 s390x: Define minimum required machine model 510416 Missing syswraps for file_getattr and file_setattr 510864 Add SSE4.1 PMAXSD and PMINSD instructions support for 32-bit x86 511329 Darwin and FreeBSD: Move setting of carry flag out of diff --git a/README.s390 b/README.s390 index d0661731c..980285ab7 100644 --- a/README.s390 +++ b/README.s390 @@ -1,7 +1,8 @@ Requirements ------------ -- You need GCC 3.4 or later to compile the s390 port. +- You need a GCC-compatible compiler with C11 support to compile + the s390 port. - Valgrind requires a machine not older than z196 to run. From cfc8b0706a9a0fbf05525a0ce142e2bf4cc53fed Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 1 Dec 2025 08:12:30 +0100 Subject: [PATCH 118/502] Linux DRD suppression: add an entry for __is_decorate_maps_enabled Seen on Fedora 43 --- drd/tests/std_thread2.supp | 7 +++++++ glibc-2.X-drd.supp.in | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/drd/tests/std_thread2.supp b/drd/tests/std_thread2.supp index 40741b06f..39a201da9 100644 --- a/drd/tests/std_thread2.supp +++ b/drd/tests/std_thread2.supp @@ -98,3 +98,10 @@ drd:ConflictingAccess fun:__set_vma_name } + +{ + drd-libc-__is_decorate_maps_enabled + drd:ConflictingAccess + fun:__is_decorate_maps_enabled +} + diff --git a/glibc-2.X-drd.supp.in b/glibc-2.X-drd.supp.in index 419ff2256..686690447 100644 --- a/glibc-2.X-drd.supp.in +++ b/glibc-2.X-drd.supp.in @@ -369,3 +369,9 @@ fun:_dl_exception_create_format } +{ + drd-libc-__is_decorate_maps_enabled + drd:ConflictingAccess + fun:__is_decorate_maps_enabled +} + From b599858486bb7db6d2ff3e6ddc4e7f71791d393d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 1 Dec 2025 08:18:56 +0100 Subject: [PATCH 119/502] Linux Helgrind: add a suppression for _dl_allocate_tls_init Seen on Fedora 43 amd64 --- glibc-2.X-helgrind.supp.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glibc-2.X-helgrind.supp.in b/glibc-2.X-helgrind.supp.in index 9b1ef9ae4..61d4e1d72 100644 --- a/glibc-2.X-helgrind.supp.in +++ b/glibc-2.X-helgrind.supp.in @@ -356,3 +356,9 @@ obj:/usr/lib/*/libnss_mdns4*.so.* } +{ + helgrind---_dl_allocate_tls_init + Helgrind:Race + fun:mempcpy + fun:_dl_allocate_tls_init +} From 6da5389ecf5f6efe3c174d64eb2e60194c728f96 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 1 Dec 2025 09:04:46 +0100 Subject: [PATCH 120/502] Darwin: update readmacho code Code from Louis Brunner --- coregrind/m_debuginfo/readmacho.c | 520 ++++++++++++++++++++++-------- coregrind/pub_core_mach.h | 36 ++- 2 files changed, 423 insertions(+), 133 deletions(-) diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index dc2023bc7..66fd57e06 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -37,6 +37,7 @@ #include "pub_core_libcfile.h" #include "pub_core_libcproc.h" #include "pub_core_aspacemgr.h" /* for mmaping debuginfo files */ +#include "pub_core_mach.h" /* VG_(dyld_cache_get_slide) */ #include "pub_core_machine.h" /* VG_ELF_CLASS */ #include "pub_core_options.h" #include "pub_core_oset.h" @@ -145,7 +146,7 @@ Bool ML_(check_macho_and_get_rw_loads)( Int fd, Int* rw_loads ) return True; } - const struct MACH_HEADER* mh = (const struct MACH_HEADER*)macho_header; + const struct MACH_HEADER* mh = (const struct MACH_HEADER*)macho_header; vg_assert(mh); if (mh->magic != MAGIC) { return False; @@ -154,15 +155,36 @@ Bool ML_(check_macho_and_get_rw_loads)( Int fd, Int* rw_loads ) HChar* macho_load_commands = ML_(dinfo_zalloc)("di.readmacho.macho_load_commands", mh->sizeofcmds); preadres = VG_(pread)( fd, macho_load_commands, mh->sizeofcmds, sizeof(struct MACH_HEADER) ); if (sr_isError(preadres) || sr_Res(preadres) < mh->sizeofcmds) { - ML_(dinfo_free)(macho_load_commands); - return False; + ML_(dinfo_free)(macho_load_commands); + return False; } - *rw_loads = count_rw_loads((const struct load_command*)macho_load_commands, mh->ncmds); ML_(dinfo_free)(macho_load_commands); return True; } +Bool ML_(check_macho_and_get_rw_loads_from_memory)( const void* buf, SizeT szB, Int* rw_loads ) +{ + vg_assert(buf); + vg_assert(rw_loads); + + if (szB < sizeof(struct fat_header)) { + return False; + } + if (check_fat_macho_and_get_rw_loads(buf, rw_loads)) { + return True; + } + + const struct MACH_HEADER* mh = (const struct MACH_HEADER*)buf; + vg_assert(mh); + if (mh->magic != MAGIC) { + return False; + } + + *rw_loads = count_rw_loads((const struct load_command*)((const HChar*)mh + sizeof(struct MACH_HEADER)), mh->ncmds); + return True; +} + /* Unmap an image mapped in by map_image_aboard. */ static void unmap_image ( /*MOD*/DiSlice* sli ) @@ -174,19 +196,29 @@ static void unmap_image ( /*MOD*/DiSlice* sli ) } } - /* Open the given file, find the thin part if necessary, do some checks, and return a DiSlice containing details of both the thin part and (implicitly, via the contained DiImage*) the fat part. returns DiSlice_INVALID if it fails. If it succeeds, the returned slice is guaranteed to refer to a valid(ish) Mach-O image. */ static DiSlice map_image_aboard ( DebugInfo* di, /* only for err msgs */ - const HChar* filename ) + const HChar* filename, + const DebugInfoMapping* rx_map ) { DiSlice sli = DiSlice_INVALID; /* First off, try to map the thing in. */ - DiImage* mimg = ML_(img_from_local_file)(filename); + DiImage* mimg; + + if (rx_map != NULL) { + // FIXME: basically, we make a slice from the place where the mach_header is until the end of the memory space + // unfortunately, all the data needed for parsing from the DSC is spread across many places in memory + // and there is no way to know for sure the size of the DSC perfectly, so this is the best method at the moment + // and it's _very_ unsafe + mimg = ML_(img_from_memory)(rx_map->avma, MACH_DSC_END - rx_map->avma, filename); + } else { + mimg = ML_(img_from_local_file)(filename); + } if (mimg == NULL) { VG_(message)(Vg_UserMsg, "warning: connection to image %s failed\n", filename ); @@ -199,7 +231,7 @@ static DiSlice map_image_aboard ( DebugInfo* di, /* only for err msgs */ DiOffT fh_be_ioff = 0; struct fat_header fh_be; struct fat_header fh; - + // Assume initially that we have a thin image, and narrow // the bounds if it turns out to be fat. This stores |mimg| as // |sli.img|, so NULL out |mimg| after this point, for the sake of @@ -240,6 +272,8 @@ static DiSlice map_image_aboard ( DebugInfo* di, /* only for err msgs */ Int cputype = CPU_TYPE_X86; # elif defined(VGA_amd64) Int cputype = CPU_TYPE_X86_64; +# elif defined(VGA_arm64) + Int cputype = CPU_TYPE_ARM64; # else # error "unknown architecture" # endif @@ -328,20 +362,108 @@ static DiSlice map_image_aboard ( DebugInfo* di, /* only for err msgs */ /*--- ---*/ /*------------------------------------------------------------*/ +static +void add_symbol( /*OUT*/XArray* /* DiSym */ syms, + struct _DebugInfo* di, + struct NLIST* nl, Addr sym_addr, + const HChar* prefix, + DiCursor strtab_cur, UInt strtab_sz ) +{ + DiSym disym; + + // "start_according_to_valgrind" + static const HChar* s_a_t_v = NULL; /* do not make non-static */ + + Bool inside_text = di->text_present && sym_addr >= di->text_avma && sym_addr < di->text_avma + di->text_size; + Bool inside_data = di->data_present && sym_addr >= di->data_avma && sym_addr < di->data_avma + di->data_size; + Bool inside_d_data = di->sdata_present && sym_addr >= di->sdata_avma && sym_addr < di->sdata_avma + di->sdata_size; + + if (di->trace_symtab) { + HChar* str = ML_(cur_read_strdup)( + ML_(cur_plus)(strtab_cur, nl->n_un.n_strx), + "di.read_symtab.1"); + VG_(printf)("nlist raw: avma %010lx %s in %s %s\n", + sym_addr, str, + inside_text ? "__TEXT" : inside_data ? "__DATA" : inside_d_data ? "__DATA_DIRTY" : "???", + prefix + ); + ML_(dinfo_free)(str); + } + + /* If no part of the symbol falls within the mapped range, + ignore it. */ + if (!inside_text && !inside_data && !inside_d_data) { + return; + } + + /* skip names which point outside the string table; + following these risks segfaulting Valgrind */ + if (nl->n_un.n_strx < 0 || nl->n_un.n_strx >= strtab_sz) { + return; + } + + HChar* name + = ML_(cur_read_strdup)( ML_(cur_plus)(strtab_cur, nl->n_un.n_strx), + "di.read_symtab.2"); + + /* skip nameless symbols; these appear to be common, but + useless */ + if (*name == 0) { + ML_(dinfo_free)(name); + return; + } + + if (prefix[0]) { + HChar* newname = ML_(dinfo_zalloc)("di.read_symtab.3", + VG_(strlen)(prefix) + VG_(strlen)(name)); + VG_(strcpy)(newname, prefix); + VG_(strcat)(newname, name); + ML_(dinfo_free)(name); + name = newname; + } + + VG_(bzero_inline)(&disym, sizeof(disym)); + disym.avmas.main = sym_addr; + SET_TOCPTR_AVMA(disym, 0); + SET_LOCAL_EP_AVMA(disym, 0); + disym.pri_name = ML_(addStr)(di, name, -1); + disym.sec_names = NULL; + disym.size = // let canonicalize fix it + di->text_avma+di->text_size - sym_addr; + disym.isText = inside_text; + disym.isIFunc = False; + disym.isGlobal = inside_data || inside_d_data; + // Lots of user function names get prepended with an underscore. Eg. the + // function 'f' becomes the symbol '_f'. And the "below main" + // function is called "start". So we skip the leading underscore, and + // if we see 'start' and --show-below-main=no, we rename it as + // "start_according_to_valgrind", which makes it easy to spot later + // and display as "(below main)". + if (disym.pri_name[0] == '_') { + disym.pri_name++; + } + else if (!VG_(clo_show_below_main) && VG_STREQ(disym.pri_name, "start")) { + if (s_a_t_v == NULL) + s_a_t_v = ML_(addStr)(di, "start_according_to_valgrind", -1); + vg_assert(s_a_t_v); + disym.pri_name = s_a_t_v; + } + + vg_assert(disym.pri_name); + VG_(addToXA)( syms, &disym ); + ML_(dinfo_free)(name); +} + /* Read a symbol table (nlist). Add the resulting candidate symbols to 'syms'; the caller will post-process them and hand them off to ML_(addSym) itself. */ static void read_symtab( /*OUT*/XArray* /* DiSym */ syms, - struct _DebugInfo* di, + struct _DebugInfo* di, DiCursor symtab_cur, UInt symtab_count, DiCursor strtab_cur, UInt strtab_sz ) { Int i; - DiSym disym; - - // "start_according_to_valgrind" - static const HChar* s_a_t_v = NULL; /* do not make non-static */ for (i = 0; i < symtab_count; i++) { struct NLIST nl; @@ -358,72 +480,37 @@ void read_symtab( /*OUT*/XArray* /* DiSym */ syms, } else { continue; } - - if (di->trace_symtab) { - HChar* str = ML_(cur_read_strdup)( - ML_(cur_plus)(strtab_cur, nl.n_un.n_strx), - "di.read_symtab.1"); - VG_(printf)("nlist raw: avma %010lx %s\n", sym_addr, str ); - ML_(dinfo_free)(str); - } - /* If no part of the symbol falls within the mapped range, - ignore it. */ - if (sym_addr <= di->text_avma - || sym_addr >= di->text_avma+di->text_size) { - continue; - } - - /* skip names which point outside the string table; - following these risks segfaulting Valgrind */ - if (nl.n_un.n_strx < 0 || nl.n_un.n_strx >= strtab_sz) { - continue; - } - - HChar* name - = ML_(cur_read_strdup)( ML_(cur_plus)(strtab_cur, nl.n_un.n_strx), - "di.read_symtab.2"); + add_symbol(syms, di, &nl, sym_addr, "", strtab_cur, strtab_sz); + } +} - /* skip nameless symbols; these appear to be common, but - useless */ - if (*name == 0) { - ML_(dinfo_free)(name); - continue; - } +// See reason for disabling later in this file +#if 0 +static +void add_indirect_symbols( /*OUT*/XArray* /* DiSym */ syms, + struct _DebugInfo* di, + struct SECTION* section, SizeT entry_size, + DiCursor indir_cur, UInt indir_count, + DiCursor symtab_cur, UInt symtab_count, + DiCursor strtab_cur, UInt strtab_sz ) +{ + for (Int i = 0; i < indir_count; i++) { + Int index; + struct NLIST nl; + ML_(cur_read_get)(&index, + ML_(cur_plus)(indir_cur, i * sizeof(Int)), + sizeof(index)); + ML_(cur_read_get)(&nl, + ML_(cur_plus)(symtab_cur, index * sizeof(struct NLIST)), + sizeof(nl)); - VG_(bzero_inline)(&disym, sizeof(disym)); - disym.avmas.main = sym_addr; - SET_TOCPTR_AVMA(disym, 0); - SET_LOCAL_EP_AVMA(disym, 0); - disym.pri_name = ML_(addStr)(di, name, -1); - disym.sec_names = NULL; - disym.size = // let canonicalize fix it - di->text_avma+di->text_size - sym_addr; - disym.isText = True; - disym.isIFunc = False; - disym.isGlobal = False; - // Lots of user function names get prepended with an underscore. Eg. the - // function 'f' becomes the symbol '_f'. And the "below main" - // function is called "start". So we skip the leading underscore, and - // if we see 'start' and --show-below-main=no, we rename it as - // "start_according_to_valgrind", which makes it easy to spot later - // and display as "(below main)". - if (disym.pri_name[0] == '_') { - disym.pri_name++; - } - else if (!VG_(clo_show_below_main) && VG_STREQ(disym.pri_name, "start")) { - if (s_a_t_v == NULL) - s_a_t_v = ML_(addStr)(di, "start_according_to_valgrind", -1); - vg_assert(s_a_t_v); - disym.pri_name = s_a_t_v; - } + Addr sym_addr = di->text_bias + section->addr + i * entry_size; - vg_assert(disym.pri_name); - VG_(addToXA)( syms, &disym ); - ML_(dinfo_free)(name); + add_symbol(syms, di, &nl, sym_addr, section->sectname, strtab_cur, strtab_sz); } } - +#endif /* Compare DiSyms by their start address, and for equal addresses, use the primary name as a secondary sort key. */ @@ -536,7 +623,7 @@ static Bool file_exists_p(const HChar *path) } -/* Search for an existing dSYM file as a possible separate debug file. +/* Search for an existing dSYM file as a possible separate debug file. Adapted from gdb. */ static HChar * find_separate_debug_file (const HChar *executable_name) @@ -545,7 +632,7 @@ find_separate_debug_file (const HChar *executable_name) HChar *dot_ptr; HChar *slash_ptr; HChar *dsymfile; - + /* Make sure the object file name itself doesn't contain ".dSYM" in it or we will end up with an infinite loop where after we add a dSYM symbol file, it will then enter this function asking if there is a debug file for the @@ -554,23 +641,23 @@ find_separate_debug_file (const HChar *executable_name) { /* Check for the existence of a .dSYM file for a given executable. */ basename_str = VG_(basename) (executable_name); - dsymfile = ML_(dinfo_zalloc)("di.readmacho.dsymfile", + dsymfile = ML_(dinfo_zalloc)("di.readmacho.dsymfile", VG_(strlen) (executable_name) + VG_(strlen) (APPLE_DSYM_EXT_AND_SUBDIRECTORY) + VG_(strlen) (basename_str) + 1 ); - + /* First try for the dSYM in the same directory as the original file. */ VG_(strcpy) (dsymfile, executable_name); VG_(strcat) (dsymfile, APPLE_DSYM_EXT_AND_SUBDIRECTORY); VG_(strcat) (dsymfile, basename_str); - + if (file_exists_p (dsymfile)) return dsymfile; - + /* Now search for any parent directory that has a '.' in it so we can find - Mac OS X applications, bundles, plugins, and any other kinds of files. + Mac OS X applications, bundles, plugins, and any other kinds of files. Mac OS X application bundles wil have their program in "/some/path/MyApp.app/Contents/MacOS/MyApp" (or replace ".app" with ".bundle" or ".plugin" for other types of bundles). So we look for any @@ -595,7 +682,7 @@ find_separate_debug_file (const HChar *executable_name) if (file_exists_p (dsymfile)) return dsymfile; } - + /* NULL terminate the string at the '.' character and append the path down to the dSYM file. */ *dot_ptr = '\0'; @@ -603,11 +690,11 @@ find_separate_debug_file (const HChar *executable_name) VG_(strcat) (dot_ptr, basename_str); if (file_exists_p (dsymfile)) return dsymfile; - + /* NULL terminate the string at the '.' locatated by the strrchr() function again. */ *dot_ptr = '\0'; - + /* We found a previous extension '.' character and did not find a dSYM file so now find previous directory delimiter so we don't try multiple times on a file name that may have a version number @@ -640,7 +727,7 @@ static DiSlice getsectdata ( DiSlice img, Int c; for (c = 0; c < mh.ncmds; c++) { - struct load_command cmd; + struct load_command cmd; ML_(cur_read_get)(&cmd, cur, sizeof(cmd)); if (cmd.cmd == LC_SEGMENT_CMD) { struct SEGMENT_COMMAND seg; @@ -652,7 +739,7 @@ static DiSlice getsectdata ( DiSlice img, for (s = 0; s < seg.nsects; s++) { struct SECTION sect; ML_(cur_step_get)(§, §s_cur, sizeof(sect)); - if (0 == VG_(strncmp)(sect.sectname, sectname, + if (0 == VG_(strncmp)(sect.sectname, sectname, sizeof(sect.sectname))) { DiSlice res = img; res.ioff = sect.offset; @@ -741,17 +828,31 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) DiCursor dysym_cur = DiCursor_INVALID; HChar* dsymfilename = NULL; Bool have_uuid = False; + Bool from_memory = False; // True if we're reading from DSC + Bool have_rw = False; + Addr kernel_slide = 0; // Used when from_memory is True UChar uuid[16]; Word i; + struct SEGMENT_COMMAND data_const = {.cmd = 0}; + struct SEGMENT_COMMAND link_edit = {.cmd = 0}; const DebugInfoMapping* rx_map = NULL; const DebugInfoMapping* rw_map = NULL; - /* mmap the object file to look for di->soname and di->text_bias + /* mmap the object file to look for di->soname and di->text_bias and uuid and nlist */ /* This should be ensured by our caller (that we're in the accept state). */ vg_assert(di->fsm.have_rx_map); +#if DARWIN_VERS >= DARWIN_11_00 + if (di->from_memory) { + from_memory = True; + kernel_slide = VG_(dyld_cache_get_slide)(); + } +#endif + if (di->fsm.rw_map_count) { + have_rw = True; + } for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) { const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i); @@ -759,19 +860,27 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) rx_map = map; if (map->rw && !rw_map) rw_map = map; - if (rx_map && rw_map) + if (rx_map && (rw_map || !have_rw)) break; } vg_assert(rx_map); + vg_assert(!have_rw || rw_map); - if (VG_(clo_verbosity) > 1) + if (VG_(clo_verbosity) > 1) { + if (!have_rw) { + VG_(message)(Vg_DebugMsg, + "%s (rx at %#lx)\n", di->fsm.filename, + rx_map->avma); + } else { VG_(message)(Vg_DebugMsg, "%s (rx at %#lx, rw at %#lx)\n", di->fsm.filename, rx_map->avma, rw_map->avma ); + } + } VG_(memset)(&uuid, 0, sizeof(uuid)); - msli = map_image_aboard( di, di->fsm.filename ); + msli = map_image_aboard( di, di->fsm.filename, from_memory ? rx_map : NULL ); if (!ML_(sli_is_valid)(msli)) { ML_(symerr)(di, False, "Connect to main image failed."); goto fail; @@ -782,19 +891,15 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) /* Poke around in the Mach-O header, to find some important stuff. */ // Find LC_SYMTAB and LC_DYSYMTAB, if present. - // Read di->soname from LC_ID_DYLIB if present, - // or from LC_ID_DYLINKER if present, + // Read di->soname from LC_ID_DYLIB if present, + // or from LC_ID_DYLINKER if present, // or use "NONE". // Get di->text_bias (aka slide) based on the corresponding LC_SEGMENT // Get uuid for later dsym search di->text_bias = 0; - if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir)) - VG_(message)(Vg_DebugMsg, "Reading syms from %s\n", - di->fsm.filename ); - - { + { DiCursor cmd_cur = ML_(cur_from_sli)(msli); struct MACH_HEADER mh; @@ -808,13 +913,13 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) for (c = 0; c < mh.ncmds; c++) { struct load_command cmd; ML_(cur_read_get)(&cmd, cmd_cur, sizeof(cmd)); - + if (cmd.cmd == LC_SYMTAB) { sym_cur = cmd_cur; - } + } else if (cmd.cmd == LC_DYSYMTAB) { dysym_cur = cmd_cur; - } + } else if (cmd.cmd == LC_ID_DYLIB && mh.filetype == MH_DYLIB) { // GrP fixme bundle? struct dylib_command dcmd; @@ -879,7 +984,7 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) if (!di->text_present && 0 == VG_(strcmp)(&seg.segname[0], "__TEXT") /* DDD: is the next line a kludge? -- JRS */ - && seg.fileoff == 0 && seg.filesize != 0) { + && (from_memory || seg.fileoff == 0) && seg.filesize != 0) { di->text_present = True; di->text_svma = (Addr)seg.vmaddr; di->text_avma = rx_map->avma; @@ -893,18 +998,56 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) di->text_debug_svma = di->text_svma; di->text_debug_bias = di->text_bias; } + if (0 == VG_(strcmp)(seg.segname, "__DATA_CONST")) { + data_const = seg; + } /* Try for __DATA */ - if (!di->data_present + if (have_rw && !di->data_present && 0 == VG_(strcmp)(&seg.segname[0], "__DATA") /* && DDD:seg->fileoff == 0 */ && seg.filesize != 0) { di->data_present = True; di->data_svma = (Addr)seg.vmaddr; di->data_avma = rw_map->avma; +#if defined(VGA_arm64) + // FIXME: the same mmap contains both __DATA_CONST, __DATA and __DATA_DIRTY + // this means that symbols in __DATA/__DATA_DIRTY are offset by the size of __DATA_CONST + // not sure when this started to be an issue so I am going to gate this under arm64 for now + if (data_const.cmd != 0) { + di->data_avma += data_const.vmsize; + } +#endif di->data_size = seg.vmsize; di->data_bias = di->data_avma - di->data_svma; di->data_debug_svma = di->data_svma; di->data_debug_bias = di->data_bias; } + /* We store __DATA_DIRTY inside .sdata (because they correspond somewhat). + Some binaries have very important information there, + notably dyld and its dyld_all_image_infos. */ + if (have_rw && !di->sdata_present + && 0 == VG_(strcmp)(&seg.segname[0], "__DATA_DIRTY") + /* && DDD:seg->fileoff == 0 */ && seg.filesize != 0) { + di->sdata_present = True; + di->sdata_svma = (Addr)seg.vmaddr; + // FIXME: assumes __DATA was found first (which in practice should be fine) + di->sdata_avma = rw_map->avma + di->data_size; +#if defined(VGA_arm64) + // FIXME: the same mmap contains both __DATA_CONST, __DATA and __DATA_DIRTY + // this means that symbols in __DATA/__DATA_DIRTY are offset by the size of __DATA_CONST + // not sure when this started to be an issue so I am going to gate this under arm64 for now + if (data_const.cmd != 0) { + di->sdata_avma += data_const.vmsize; + } +#endif + di->sdata_size = seg.vmsize; + di->sdata_bias = di->sdata_avma - di->sdata_svma; + di->sdata_debug_svma = di->sdata_svma; + di->sdata_debug_bias = di->sdata_bias; + } + /* Try for __LINKEDIT */ + if (0 == VG_(strcmp)(&seg.segname[0], "__LINKEDIT")) { + link_edit = seg; + } } else if (cmd.cmd == LC_UUID) { ML_(cur_read_get)(&uuid, cmd_cur, sizeof(uuid)); @@ -915,6 +1058,11 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) } } + if (from_memory && link_edit.cmd == 0) { + ML_(symerr)(di, False, "Invalid Mach-O file (missing __LINKEDIT)."); + goto fail; + } + if (!di->soname) { di->soname = ML_(dinfo_strdup)("di.readmacho.noname", "NONE"); } @@ -930,13 +1078,19 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) // We already asserted that .. vg_assert(msli.img != NULL && msli.szB > 0); - if (ML_(cur_is_valid)(sym_cur) && ML_(cur_is_valid)(dysym_cur)) { + if (ML_(cur_is_valid)(sym_cur)) { + // Some binaries (e.g. Valgrind's tools themselves, like memcheck) + // don't have dynamic symbols because they are static binaries. + // Let's try to load symbols using a single table. + Bool has_dynamic = ML_(cur_is_valid)(dysym_cur); struct symtab_command symcmd; struct dysymtab_command dysymcmd; ML_(cur_read_get)(&symcmd, sym_cur, sizeof(symcmd)); - ML_(cur_read_get)(&dysymcmd, dysym_cur, sizeof(dysymcmd)); + if (has_dynamic) { + ML_(cur_read_get)(&dysymcmd, dysym_cur, sizeof(dysymcmd)); + } /* Read nlist symbol table */ DiCursor syms = DiCursor_INVALID; @@ -944,25 +1098,50 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) XArray* /* DiSym */ candSyms = NULL; Word nCandSyms; - if (msli.szB < symcmd.stroff + symcmd.strsize - || msli.szB < symcmd.symoff + symcmd.nsyms - * sizeof(struct NLIST)) { + // FIXME: there is no real nice way to check this when using DSC + // the chunk that msli points to is only the mach_header + load_commands + // but not the actual sections (__TEXT, __DATA, __LINKEDIT, etc) + // so those checks will always fail because they point to data much further in memory + // (as DSC groups all this kind of data together for X amount of images) + if (!from_memory + && (msli.szB < symcmd.stroff + symcmd.strsize + || msli.szB < symcmd.symoff + symcmd.nsyms * sizeof(struct NLIST))) { ML_(symerr)(di, False, "Invalid Mach-O file (5 too small)."); goto fail; - } - if (dysymcmd.ilocalsym + dysymcmd.nlocalsym > symcmd.nsyms - || dysymcmd.iextdefsym + dysymcmd.nextdefsym > symcmd.nsyms) { + } + if (has_dynamic + && (dysymcmd.ilocalsym + dysymcmd.nlocalsym > symcmd.nsyms + || dysymcmd.iextdefsym + dysymcmd.nextdefsym > symcmd.nsyms)) { ML_(symerr)(di, False, "Invalid Mach-O file (bad symbol table)."); goto fail; } - syms = ML_(cur_plus)(ML_(cur_from_sli)(msli), symcmd.symoff); - strs = ML_(cur_plus)(ML_(cur_from_sli)(msli), symcmd.stroff); - - if (VG_(clo_verbosity) > 1) + if (from_memory) { + // First, we calculate the real position of __LINKEDIT in the DSC by adding the slide + // Then we get the offset of syms/strings within __LINKEDIT by removing the fileoffset + // Then we add the __LINKEDIT address + // Finally we calculate the proper offset of those addresses compared to the mach_header slice + Addr link_edit_addr = link_edit.vmaddr + kernel_slide; + syms = ML_(cur_from_sli)(msli); + syms.ioff = (link_edit_addr + (symcmd.symoff - link_edit.fileoff)) - rx_map->avma; + strs = ML_(cur_from_sli)(msli); + strs.ioff = (link_edit_addr + (symcmd.stroff - link_edit.fileoff)) - rx_map->avma; + } else { + syms = ML_(cur_plus)(ML_(cur_from_sli)(msli), symcmd.symoff); + strs = ML_(cur_plus)(ML_(cur_from_sli)(msli), symcmd.stroff); + } + + if (VG_(clo_verbosity) > 1) { + if (has_dynamic) { VG_(message)(Vg_DebugMsg, - " reading syms from primary file (%d %d)\n", + " reading syms from primary file (%u %u)\n", dysymcmd.nextdefsym, dysymcmd.nlocalsym ); + } else { + VG_(message)(Vg_DebugMsg, + " reading syms from primary file (%u)\n", + symcmd.nsyms ); + } + } /* Read candidate symbols into 'candSyms', so we can truncate overlapping ends and generally tidy up, before presenting @@ -972,18 +1151,95 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) ML_(dinfo_free), sizeof(DiSym) ); - // extern symbols - read_symtab(candSyms, - di, - ML_(cur_plus)(syms, - dysymcmd.iextdefsym * sizeof(struct NLIST)), - dysymcmd.nextdefsym, strs, symcmd.strsize); - // static and private_extern symbols - read_symtab(candSyms, - di, - ML_(cur_plus)(syms, - dysymcmd.ilocalsym * sizeof(struct NLIST)), - dysymcmd.nlocalsym, strs, symcmd.strsize); + if (has_dynamic) { + // extern symbols + read_symtab(candSyms, + di, + ML_(cur_plus)(syms, + dysymcmd.iextdefsym * sizeof(struct NLIST)), + dysymcmd.nextdefsym, strs, symcmd.strsize); + // static and private_extern symbols + read_symtab(candSyms, + di, + ML_(cur_plus)(syms, + dysymcmd.ilocalsym * sizeof(struct NLIST)), + dysymcmd.nlocalsym, strs, symcmd.strsize); + +// Due to the usage of dyld_cache, I am unsure how to properly capture the stubs from there +// moreover we don't have a rw_map for those so loads of logic need to change above. +// This is only really useful when reading librairies from disk which is limited now. +// Finally, there is also a weird overflow of some kind on arm64 macOS 15. +// So I am disabling this for now. +#if 0 + { + DiCursor cmd_cur = ML_(cur_from_sli)(msli); + DiCursor indirs = DiCursor_INVALID; + + if (from_memory) { + Addr link_edit_addr = link_edit.vmaddr + kernel_slide; + indirs = ML_(cur_from_sli)(msli); + indirs.ioff = (link_edit_addr + (dysymcmd.indirectsymoff - link_edit.fileoff)) - rx_map->avma; + } else { + indirs = ML_(cur_plus)(ML_(cur_from_sli)(msli), dysymcmd.indirectsymoff); + } + + struct MACH_HEADER mh; + ML_(cur_step_get)(&mh, &cmd_cur, sizeof(mh)); + for (Int c = 0; c < mh.ncmds; c++) { + struct load_command cmd; + ML_(cur_read_get)(&cmd, cmd_cur, sizeof(cmd)); + + if (cmd.cmd == LC_SEGMENT_CMD) { + struct SEGMENT_COMMAND seg; + ML_(cur_read_get)(&seg, cmd_cur, sizeof(seg)); + + for (i = 0; i < seg.nsects; i += 1) { + DiCursor sect_cur = ML_(cur_plus)(cmd_cur, sizeof(seg)); + struct SECTION sect; + ML_(cur_read_get)(§, sect_cur, sizeof(sect)); + Int indexOfIndirects = sect.reserved1; + + if ((sect.flags & S_SYMBOL_STUBS) == S_SYMBOL_STUBS) { + Int sizeOfStub = sect.reserved2; + Int amountOfStubs = sect.size / sizeOfStub; + if (indexOfIndirects + amountOfStubs > dysymcmd.nindirectsyms) { + ML_(symerr)(di, False, "Invalid Mach-O file (invalid stub section)."); + goto fail; + } + // add symbols where we have stub assembly + add_indirect_symbols(candSyms, di, + §, sizeOfStub, + ML_(cur_plus)(indirs, indexOfIndirects * sizeof(UInt)), amountOfStubs, + syms, symcmd.nsyms, strs, symcmd.strsize); + } + if ((sect.flags & S_LAZY_SYMBOL_POINTERS) == S_LAZY_SYMBOL_POINTERS) { + Int sizeOfPointer = VG_WORDSIZE; + Int amountOfPointers = sect.size / sizeOfPointer; + if (indexOfIndirects + amountOfPointers > dysymcmd.nindirectsyms) { + ML_(symerr)(di, False, "Invalid Mach-O file (invalid lazy symbol section)."); + goto fail; + } + // add symbols where we have lazy symbol pointers + add_indirect_symbols(candSyms, di, + §, sizeOfPointer, + ML_(cur_plus)(indirs, indexOfIndirects * sizeof(UInt)), amountOfPointers, + syms, symcmd.nsyms, strs, symcmd.strsize); + } + + sect_cur = ML_(cur_plus)(sect_cur, sizeof(sect)); + } + } + + cmd_cur = ML_(cur_plus)(cmd_cur, cmd.cmdsize); + } + } +#endif + } else { + read_symtab(candSyms, + di, + syms, + symcmd.nsyms, strs, symcmd.strsize); + } /* tidy up the cand syms -- trim overlapping ends. May resize candSyms. */ @@ -1027,7 +1283,7 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) if (VG_(clo_verbosity) > 1) VG_(message)(Vg_DebugMsg, " dSYM= %s\n", dsymfilename); - dsli = map_image_aboard( di, dsymfilename ); + dsli = map_image_aboard( di, dsymfilename, NULL ); if (!ML_(sli_is_valid)(dsli)) { ML_(symerr)(di, False, "Connect to debuginfo image failed " "(first attempt)."); @@ -1065,7 +1321,7 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) VG_(message)(Vg_DebugMsg, "%sdSYM directory %s; consider using " "--dsymutil=yes\n", VG_(clo_verbosity) > 1 ? " " : "", - dsymfilename ? "has wrong UUID" : "is missing"); + dsymfilename ? "has wrong UUID" : "is missing"); goto success; } @@ -1073,7 +1329,7 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) { Int r; const HChar* dsymutil = "/usr/bin/dsymutil "; - HChar* cmd = ML_(dinfo_zalloc)( "di.readmacho.tmp1", + HChar* cmd = ML_(dinfo_zalloc)( "di.readmacho.tmp1", VG_(strlen)(dsymutil) + VG_(strlen)(di->fsm.filename) + 32 /* misc */ ); @@ -1097,7 +1353,7 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) if (VG_(clo_verbosity) > 1) VG_(message)(Vg_DebugMsg, " dsyms= %s\n", dsymfilename); - dsli = map_image_aboard( di, dsymfilename ); + dsli = map_image_aboard( di, dsymfilename, NULL ); if (!ML_(sli_is_valid)(dsli)) { ML_(symerr)(di, False, "Connect to debuginfo image failed " "(second attempt)."); @@ -1173,13 +1429,13 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) eh_frame_svma + di->text_bias, True/*is_ehframe*/); } - + if (ML_(sli_is_valid)(debug_info_mscn)) { if (VG_(clo_verbosity) > 1) { if (0) VG_(message)(Vg_DebugMsg, "Reading dwarf3 for %s (%#lx) from %s" - " (%lld %lld %lld %lld %lld %lld)\n", + " (%llu %llu %llu %llu %llu %llu)\n", di->fsm.filename, di->text_avma, dsymfilename, debug_info_mscn.szB, debug_abbv_mscn.szB, debug_line_mscn.szB, debug_str_mscn.szB, diff --git a/coregrind/pub_core_mach.h b/coregrind/pub_core_mach.h index 694bbee37..cbce0309a 100644 --- a/coregrind/pub_core_mach.h +++ b/coregrind/pub_core_mach.h @@ -34,7 +34,7 @@ #define DARWIN_FAKE_MEMORY_PATH "/dev/macos/internals/" //-------------------------------------------------------------------- -// PURPOSE: This module contains the Mach kernel interface, +// PURPOSE: This module contains the Mach kernel interface, // for operating systems like Darwin / Mac OS X that use it. //-------------------------------------------------------------------- @@ -44,6 +44,40 @@ extern void VG_(mach_init)(void); // Record system memory after aspace has been init'd extern void VG_(mach_record_system_memory)(void); +// MACH_DSC_END represent a guess to where the dyld shared cache ends +// there is no way to know for sure and even if we could, +// it would be a pain to carry that value around all of V +// so we just use a guess and hope for the best. +// Why is this value needed? +// We only use it in a single context: when reading the dyld shared cache directly from memory +// we use it as a bound when reading symbols with DebugInfo. +// How is this value calculated? +// - amd64: end of user addressable space, which makes sense as the DSC is mapped at the end of the address space +// - x86: end of user addressable space, note that there should not be any x86 valgrind with DSC support so this is just a placeholder +// - arm64: +// - the DSC is mapped at 0x180000000 + some ASLR slider +// - the size depends on the macOS version but is usually less than 0xFFFFFFFF +// - thus it should be around 0x280000000 but I have seen it reach above +// - thus we use 0x300000000 which is also where we tell V that client memory starts +#if defined(VGP_amd64_darwin) +#define MACH_DSC_END 0x7ffffffff000 +#elif defined(VGP_x86_darwin) +#define MACH_DSC_END 0xfffff000 +#elif defined(VGP_arm64_darwin) +#define MACH_DSC_END 0x300000000 +#else +#error "Unsupported platform" +#endif + +#if DARWIN_VERS >= DARWIN_11_00 +// Dyld shared cache (DSC) parsing, which is required as system libraries are not provided on disk +// starting with macOS 11.0 (Big Sur) +extern void VG_(dyld_cache_init)(const HChar*); +extern int VG_(dyld_cache_might_be_in)(const HChar*); +extern int VG_(dyld_cache_load_library)(const HChar*); +extern Addr VG_(dyld_cache_get_slide)(void); +#endif + #endif // __PUB_CORE_MACH_H #endif // defined(VGO_darwin) From c15bcfe15bd785a528725eebb7d985fcb8a86bed Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 1 Dec 2025 22:26:10 +0100 Subject: [PATCH 121/502] Darwin regtest: DRD filters and more suppressions --- darwin17.supp | 39 ++++++++++++++++++++++++++++++++++++++ drd/tests/filter_stderr.in | 1 + 2 files changed, 40 insertions(+) diff --git a/darwin17.supp b/darwin17.supp index 528a9f139..71d79d844 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -1056,3 +1056,42 @@ fun:xpc_pipe_routine } +{ + OSX1013:drd:__si_module_static_cache_block_invoke + drd:MutexErr + fun:pthread_mutex_init + fun:__si_module_static_cache_block_invoke +} + +{ + OSX1013:drd:setlocale + drd:ConflictingAccess + ... + fun:setlocale +} + +{ + OSX1013:drd:std::__1::__thread_specific_ptr::set_pointer(std::__1::__thread_struct*) + + drd:ConflictingAccess + fun:_ZNSt3__121__thread_specific_ptrINS_15__thread_structEE11set_pointerEPS1_ +} + +{ + OSX1013:drd:std::__1::__thread_local_data + drd:ConflictingAccess + fun:_ZNSt3__119__thread_local_dataEv +} + +{ + OSX1013:drd:get_counter + drd:ConflictingAccess + fun:_ZL11get_counterv +} + +{ + OSX1013:drd:gomp_barier_wait + drd:ConflictingAccess + fun:gomp_barrier_wait + fun:child +} diff --git a/drd/tests/filter_stderr.in b/drd/tests/filter_stderr.in index fea9bcff9..bde4e597a 100644 --- a/drd/tests/filter_stderr.in +++ b/drd/tests/filter_stderr.in @@ -38,6 +38,7 @@ $SED \ -e "s/[A-Za-z_]* (pthread_create.c:[0-9]*)/(within libpthread-?.?.so)/" \ -e "s/[A-Za-z_]* (in [^ ]*libpthread-[0-9.]*\.so)/(within libpthread-?.?.so)/" \ -e "s/... (in \/lib\/libthr.so.3)/start_thread/" \ +-e "s/_pthread_body (in \/...libc...)/start_thread/" \ -e "s:(within /lib[0-9]*/ld-[0-9.]*\.so):(within ld-?.?.so):" \ -e "s/was held during [0-9][0-9]*/was held during .../" \ -e "s: BSS section of [^<]*/: BSS section of :g" \ From fabbec1163e1f5854f5553d6b627525ec614d8b9 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 3 Dec 2025 17:15:42 +0000 Subject: [PATCH 122/502] s390: Remove unused function parameter --- VEX/priv/host_s390_defs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 063ede22a..04b06c4cf 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -10620,8 +10620,7 @@ s390_insn_xassisted_emit(UChar *buf, const s390_insn *insn, The dispatch counter is a 32-bit value. */ static UChar * -s390_insn_evcheck_emit(UChar *buf, const s390_insn *insn, - VexEndness endness_host) +s390_insn_evcheck_emit(UChar *buf, const s390_insn *insn) { s390_amode *amode; UInt b, d; @@ -11060,7 +11059,7 @@ emit_S390Instr(Bool *is_profinc, UChar *buf, Int nbuf, const s390_insn *insn, break; case S390_INSN_EVCHECK: - end = s390_insn_evcheck_emit(buf, insn, endness_host); + end = s390_insn_evcheck_emit(buf, insn); break; case S390_INSN_XDIRECT: From cd9d7d0d2edeef5ef37582c6d6fa55ca3c3bcccd Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 3 Dec 2025 22:26:57 +0000 Subject: [PATCH 123/502] Change the data type of libvex_Backend::emit. Both the s390 and arm insn emitters need to know the host's hardware capabilities. Today, these are provided by means of global variables s390_host_hwcaps and arm_hwcaps. To eliminate that kludge the emit function is changed. Instead of passing VexEndness we now pass a pointer to VexArchInfo which provides both the endianess and hardware capabilities. Those global variables will be removed in a followup patch. --- VEX/priv/host_amd64_defs.c | 2 +- VEX/priv/host_amd64_defs.h | 2 +- VEX/priv/host_arm64_defs.c | 2 +- VEX/priv/host_arm64_defs.h | 2 +- VEX/priv/host_arm_defs.c | 2 +- VEX/priv/host_arm_defs.h | 2 +- VEX/priv/host_mips_defs.c | 2 +- VEX/priv/host_mips_defs.h | 2 +- VEX/priv/host_nanomips_defs.c | 2 +- VEX/priv/host_nanomips_defs.h | 2 +- VEX/priv/host_ppc_defs.c | 3 ++- VEX/priv/host_ppc_defs.h | 2 +- VEX/priv/host_riscv64_defs.c | 2 +- VEX/priv/host_riscv64_defs.h | 2 +- VEX/priv/host_s390_defs.c | 2 +- VEX/priv/host_s390_defs.h | 2 +- VEX/priv/host_x86_defs.c | 2 +- VEX/priv/host_x86_defs.h | 2 +- VEX/priv/main_main.c | 8 ++++---- 19 files changed, 23 insertions(+), 22 deletions(-) diff --git a/VEX/priv/host_amd64_defs.c b/VEX/priv/host_amd64_defs.c index d7d1ab1aa..e834e8253 100644 --- a/VEX/priv/host_amd64_defs.c +++ b/VEX/priv/host_amd64_defs.c @@ -2592,7 +2592,7 @@ static UChar* do_ffree_st ( UChar* p, Int n ) Int emit_AMD64Instr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const AMD64Instr* i, - Bool mode64, VexEndness endness_host, + Bool mode64, const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_amd64_defs.h b/VEX/priv/host_amd64_defs.h index 4c16db17b..731fd2efd 100644 --- a/VEX/priv/host_amd64_defs.h +++ b/VEX/priv/host_amd64_defs.h @@ -836,7 +836,7 @@ extern Int emit_AMD64Instr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const AMD64Instr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_arm64_defs.c b/VEX/priv/host_arm64_defs.c index da52748eb..b00aad94d 100644 --- a/VEX/priv/host_arm64_defs.c +++ b/VEX/priv/host_arm64_defs.c @@ -3627,7 +3627,7 @@ static UInt* do_load_or_store64 ( UInt* p, Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const ARM64Instr* i, - Bool mode64, VexEndness endness_host, + Bool mode64, const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_arm64_defs.h b/VEX/priv/host_arm64_defs.h index 4f5b1bce3..83bb6a286 100644 --- a/VEX/priv/host_arm64_defs.h +++ b/VEX/priv/host_arm64_defs.h @@ -1115,7 +1115,7 @@ extern void mapRegs_ARM64Instr ( HRegRemap*, ARM64Instr*, Bool ); extern Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const ARM64Instr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo *archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_arm_defs.c b/VEX/priv/host_arm_defs.c index 39d89f7e8..a838565a2 100644 --- a/VEX/priv/host_arm_defs.c +++ b/VEX/priv/host_arm_defs.c @@ -3069,7 +3069,7 @@ static UInt* do_load_or_store32 ( UInt* p, Int emit_ARMInstr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const ARMInstr* i, - Bool mode64, VexEndness endness_host, + Bool mode64, const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_arm_defs.h b/VEX/priv/host_arm_defs.h index 904bd0c43..d6dbc4ee2 100644 --- a/VEX/priv/host_arm_defs.h +++ b/VEX/priv/host_arm_defs.h @@ -1057,7 +1057,7 @@ extern void mapRegs_ARMInstr ( HRegRemap*, ARMInstr*, Bool ); extern Int emit_ARMInstr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const ARMInstr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_mips_defs.c b/VEX/priv/host_mips_defs.c index ad92c055c..d018aac84 100644 --- a/VEX/priv/host_mips_defs.c +++ b/VEX/priv/host_mips_defs.c @@ -3768,7 +3768,7 @@ static UChar *mkMoveReg(UChar * p, UInt r_dst, UInt r_src) Int emit_MIPSInstr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const MIPSInstr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_mips_defs.h b/VEX/priv/host_mips_defs.h index 423f68ea0..838368b85 100644 --- a/VEX/priv/host_mips_defs.h +++ b/VEX/priv/host_mips_defs.h @@ -1006,7 +1006,7 @@ extern void mapRegs_MIPSInstr (HRegRemap *, MIPSInstr *, Bool mode64); extern Int emit_MIPSInstr (/*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const MIPSInstr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_nanomips_defs.c b/VEX/priv/host_nanomips_defs.c index 3e91c904f..19b4ee0fa 100644 --- a/VEX/priv/host_nanomips_defs.c +++ b/VEX/priv/host_nanomips_defs.c @@ -1343,7 +1343,7 @@ Int emit_NANOMIPSInstr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const NANOMIPSInstr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_nanomips_defs.h b/VEX/priv/host_nanomips_defs.h index beb808479..aa40b1e14 100644 --- a/VEX/priv/host_nanomips_defs.h +++ b/VEX/priv/host_nanomips_defs.h @@ -393,7 +393,7 @@ extern Int emit_NANOMIPSInstr (/*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const NANOMIPSInstr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_ppc_defs.c b/VEX/priv/host_ppc_defs.c index dfefcb3fd..7dc971457 100644 --- a/VEX/priv/host_ppc_defs.c +++ b/VEX/priv/host_ppc_defs.c @@ -4154,7 +4154,7 @@ static UChar* mkFormVA ( UChar* p, UInt opc1, UInt r1, UInt r2, */ Int emit_PPCInstr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const PPCInstr* i, - Bool mode64, VexEndness endness_host, + Bool mode64, const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, @@ -4167,6 +4167,7 @@ Int emit_PPCInstr ( /*MB_MOD*/Bool* is_profInc, vex_printf("asm ");ppPPCInstr(i, mode64); vex_printf("\n"); } + VexEndness endness_host = archinfo_host->endness; switch (i->tag) { case Pin_LI: diff --git a/VEX/priv/host_ppc_defs.h b/VEX/priv/host_ppc_defs.h index c57afd50b..df376e21c 100644 --- a/VEX/priv/host_ppc_defs.h +++ b/VEX/priv/host_ppc_defs.h @@ -1269,7 +1269,7 @@ extern void mapRegs_PPCInstr ( HRegRemap*, PPCInstr* , Bool mode64); extern Int emit_PPCInstr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const PPCInstr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_riscv64_defs.c b/VEX/priv/host_riscv64_defs.c index 152d4ae92..dcb1a968d 100644 --- a/VEX/priv/host_riscv64_defs.c +++ b/VEX/priv/host_riscv64_defs.c @@ -1774,7 +1774,7 @@ Int emit_RISCV64Instr(/*MB_MOD*/ Bool* is_profInc, Int nbuf, const RISCV64Instr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_riscv64_defs.h b/VEX/priv/host_riscv64_defs.h index 7a97f90ef..97a8420f7 100644 --- a/VEX/priv/host_riscv64_defs.h +++ b/VEX/priv/host_riscv64_defs.h @@ -612,7 +612,7 @@ Int emit_RISCV64Instr(/*MB_MOD*/ Bool* is_profInc, Int nbuf, const RISCV64Instr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 04b06c4cf..3479bbc91 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -10896,7 +10896,7 @@ s390_insn_vec_replicate_emit(UChar *buf, const s390_insn *insn) Int emit_S390Instr(Bool *is_profinc, UChar *buf, Int nbuf, const s390_insn *insn, - Bool mode64, VexEndness endness_host, + Bool mode64, const VexArchInfo *archinfo, const void *disp_cp_chain_me_to_slowEP, const void *disp_cp_chain_me_to_fastEP, const void *disp_cp_xindir, diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index 48ea79f18..a743abb50 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -885,7 +885,7 @@ UInt ppHRegS390(HReg); void getRegUsage_S390Instr( HRegUsage *, const s390_insn *, Bool ); void mapRegs_S390Instr ( HRegRemap *, s390_insn *, Bool ); Int emit_S390Instr ( Bool *, UChar *, Int, const s390_insn *, Bool, - VexEndness, const void *, const void *, + const VexArchInfo *, const void *, const void *, const void *, const void *); const RRegUniverse *getRRegUniverse_S390( void ); void genSpill_S390 ( HInstr **, HInstr **, HReg , Int , Bool ); diff --git a/VEX/priv/host_x86_defs.c b/VEX/priv/host_x86_defs.c index 200c122fd..5b50d8a53 100644 --- a/VEX/priv/host_x86_defs.c +++ b/VEX/priv/host_x86_defs.c @@ -2122,7 +2122,7 @@ static UChar* push_word_from_tags ( UChar* p, UShort tags ) Int emit_X86Instr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const X86Instr* i, - Bool mode64, VexEndness endness_host, + Bool mode64, const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/host_x86_defs.h b/VEX/priv/host_x86_defs.h index ecd74e6a5..65cca18f6 100644 --- a/VEX/priv/host_x86_defs.h +++ b/VEX/priv/host_x86_defs.h @@ -717,7 +717,7 @@ extern void mapRegs_X86Instr ( HRegRemap*, X86Instr*, Bool ); extern Int emit_X86Instr ( /*MB_MOD*/Bool* is_profInc, UChar* buf, Int nbuf, const X86Instr* i, Bool mode64, - VexEndness endness_host, + const VexArchInfo* archinfo_host, const void* disp_cp_chain_me_to_slowEP, const void* disp_cp_chain_me_to_fastEP, const void* disp_cp_xindir, diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 32a78190a..e97995285 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -780,9 +780,9 @@ static void libvex_BackEnd ( const VexTranslateArgs *vta, const VexAbiInfo*, Int, Int, Bool, Bool, Addr ); Int (*emit) ( /*MB_MOD*/Bool*, - UChar*, Int, const HInstr*, Bool, VexEndness, - const void*, const void*, const void*, - const void* ); + UChar*, Int, const HInstr*, Bool, + const VexArchInfo*, const void*, + const void*, const void*, const void* ); Bool (*preciseMemExnsFn) ( Int, Int, VexRegisterUpdates ); const RRegUniverse* rRegUniv = NULL; @@ -1232,7 +1232,7 @@ static void libvex_BackEnd ( const VexTranslateArgs *vta, } j = emit( &hi_isProfInc, insn_bytes, sizeof insn_bytes, hi, - mode64, vta->archinfo_host.endness, + mode64, &vta->archinfo_host, vta->disp_cp_chain_me_to_slowEP, vta->disp_cp_chain_me_to_fastEP, vta->disp_cp_xindir, From 37d9e2085e0ac28a3fa807670c1055bdadb5f773 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Thu, 4 Dec 2025 14:00:59 +0100 Subject: [PATCH 124/502] Add ARG4 checks for quotactl and quotactl_fd syswraps ARG4 can point to different things of varion sizes based on the cmd arg. Handle all the possible options and provide missing checks. https://bugs.kde.org/show_bug.cgi?id=509634 --- NEWS | 1 + coregrind/m_syswrap/syswrap-amd64-linux.c | 4 +- coregrind/m_syswrap/syswrap-arm-linux.c | 4 +- coregrind/m_syswrap/syswrap-arm64-linux.c | 4 +- coregrind/m_syswrap/syswrap-linux.c | 131 ++++++++++++++++++- coregrind/m_syswrap/syswrap-mips32-linux.c | 4 +- coregrind/m_syswrap/syswrap-mips64-linux.c | 8 +- coregrind/m_syswrap/syswrap-nanomips-linux.c | 2 +- coregrind/m_syswrap/syswrap-ppc32-linux.c | 4 +- coregrind/m_syswrap/syswrap-ppc64-linux.c | 4 +- coregrind/m_syswrap/syswrap-riscv64-linux.c | 4 +- coregrind/m_syswrap/syswrap-s390x-linux.c | 4 +- coregrind/m_syswrap/syswrap-x86-linux.c | 4 +- include/vki/vki-linux.h | 51 ++++++++ 14 files changed, 199 insertions(+), 30 deletions(-) diff --git a/NEWS b/NEWS index 6068d611d..0731634f8 100644 --- a/NEWS +++ b/NEWS @@ -256,6 +256,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 509572 s390x: Overhaul BFP testsuite 509590 Run the LTP tests with LTP_QUIET 509567 unhandled amd64-linux syscall: 443 (quotactl_fd) +509634 Add ARG4 checks for quotactl and quotactl_fd syswraps 509642 Add missing ppc64-linux syswraps 509643 Add missing s390x-linux syswraps 510169 Update the LTP version in valgrind testsuite to 20250930 diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 5dccb47b3..a6e76690a 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -684,7 +684,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_delete_module, sys_delete_module), // 176 // (__NR_get_kernel_syms, sys_ni_syscall), // 177 // (__NR_query_module, sys_ni_syscall), // 178 - LINX_(__NR_quotactl, sys_quotactl), // 179 + LINXY(__NR_quotactl, sys_quotactl), // 179 // (__NR_nfsservctl, sys_nfsservctl), // 180 // (__NR_getpmsg, sys_ni_syscall), // 181 @@ -896,7 +896,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index af3ec18dd..b7860710c 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -708,7 +708,7 @@ static SyscallTableEntry syscall_main_table[] = { //zz //zz // Nb: get_kernel_syms() was removed 2.4-->2.6 // GENX_(__NR_get_kernel_syms, sys_ni_syscall), // 130 - LINX_(__NR_quotactl, sys_quotactl), // 131 + LINXY(__NR_quotactl, sys_quotactl), // 131 GENX_(__NR_getpgid, sys_getpgid), // 132 GENX_(__NR_fchdir, sys_fchdir), // 133 //zz // (__NR_bdflush, sys_bdflush), // 134 */Linux @@ -1068,7 +1068,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), // 439 LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c index 05a39ed07..890bb7b8f 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -608,7 +608,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_(__NR_close, sys_close), // 57 LINX_(__NR_vhangup, sys_vhangup), // 58 LINXY(__NR_pipe2, sys_pipe2), // 59 - LINX_(__NR_quotactl, sys_quotactl), // 60 + LINXY(__NR_quotactl, sys_quotactl), // 60 GENXY(__NR_getdents64, sys_getdents64), // 61 LINX_(__NR_lseek, sys_lseek), // 62 GENXY(__NR_read, sys_read), // 63 @@ -847,7 +847,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index e17aff6a4..3bfbef761 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -2655,19 +2655,19 @@ PRE(sys_io_destroy) } static -void common_pre_io_getevents(ThreadId tid, UWord a1, UWord a2, UWord a3, UWord a4, UWord a5, UWord a6, UWord* flags, const HChar* funtion_name) +void common_pre_io_getevents(ThreadId tid, UWord a1, UWord a2, UWord a3, UWord a4, UWord a5, UWord a6, UWord* flags, const HChar* function_name) { HChar buf[25]; *flags |= SfMayBlock; PRINT("sys_%s ( %llu, %lld, %lld, %#" FMT_REGWORD "x, %#" - FMT_REGWORD "x )", funtion_name, + FMT_REGWORD "x )", function_name, (ULong)a1,(Long)a2,(Long)a3,a4,a5); if (a3 > 0) { - VG_(snprintf)(buf, 25, "%s(events)", funtion_name); + VG_(snprintf)(buf, 25, "%s(events)", function_name); PRE_MEM_WRITE( buf, a4, sizeof(struct vki_io_event)*a3 ); } if (a5 != 0) { - VG_(snprintf)(buf, 25, "%s(timeout)", funtion_name); + VG_(snprintf)(buf, 25, "%s(timeout)", function_name); PRE_MEM_READ( buf, a5, sizeof(struct vki_timespec)); } @@ -2688,7 +2688,7 @@ PRE(sys_io_getevents) } static -void common_post_sys_io_events(ThreadId tid, UWord a4, SyscallStatus* status, const HChar* funtion_name) +void common_post_sys_io_events(ThreadId tid, UWord a4, SyscallStatus* status, const HChar* function_name) { Int i; vg_assert(SUCCESS); @@ -2736,7 +2736,7 @@ void common_post_sys_io_events(ThreadId tid, UWord a4, SyscallStatus* status, co default: VG_(message)(Vg_DebugMsg, "Warning: unhandled %s opcode: %u\n", - funtion_name, + function_name, cb->aio_lio_opcode); break; } @@ -4125,14 +4125,124 @@ POST(sys_dup3) ML_(record_fd_open_named)(tid, RES); } +static +void common_pre_quotactl_p4_check(ThreadId tid, Int subop, Int a4, SyscallStatus* status, const HChar* function_name) +{ + HChar buf[25]; + VG_(snprintf)(buf, sizeof(buf), "%s(addr)", function_name); + switch (subop) { + case VKI_Q_QUOTAON: + // The addr argument points to the pathname of a file + // containing the quotas for the filesystem. + PRE_MEM_RASCIIZ( buf, a4 ); + break; + case VKI_Q_QUOTAOFF: + // The addr and id arguments are ignored. + break; + case VKI_Q_GETQUOTA: + // Get disk quota limits and current usage for user or group id. The + // addr argument is a pointer to a dqblk structure defined in + // as follows: + if (a4 != 0) + PRE_MEM_WRITE(buf, a4, sizeof(struct vki_dqblk)); + break; + case VKI_Q_GETNEXTQUOTA: + // The addr argument is a pointer to a nextdqblk structure + // whose fields are as for the dqblk, except for the addition + // of a dqb_id field that is used to return the ID for which + // quota information is being returned: + if (a4 != 0) + PRE_MEM_WRITE(buf, a4, sizeof(struct vki_nextdqblk)); + break; + case VKI_Q_SETQUOTA: + // Set quota information for user or group id, using the + // information supplied in the dqblk structure pointed to by + // addr. + if (a4 != 0) + PRE_MEM_READ(buf, a4, sizeof(struct vki_dqblk)); + break; + case VKI_Q_GETINFO: + // The addr argument should be a pointer to a dqinfo structure. + if (a4 != 0) + PRE_MEM_WRITE(buf, a4, sizeof(struct vki_dqinfo)); + break; + case VKI_Q_SETINFO: + // The addr argument should be a pointer to a dqinfo structure + if (a4 != 0) + PRE_MEM_READ(buf, a4, sizeof(struct vki_dqinfo)); + break; + case VKI_Q_GETFMT: + // The addr argument should be a pointer to a 4-byte buffer where the + // format number will be stored. + if (a4 != 0) + PRE_MEM_WRITE(buf, a4, 4); + break; + case VKI_Q_SYNC: + // The addr and id arguments are ignored. + break; + // case VKI_Q_GETSTATS: was only supported up to Linux 2.4.21 - skipping) + default: + return; + } +} + +static +void common_post_quotactl_p4_check(ThreadId tid, Int subop, Int a4, const HChar* function_name) +{ + switch (subop) { + case VKI_Q_GETQUOTA: + // Get disk quota limits and current usage for user or group id. The + // addr argument is a pointer to a dqblk structure defined in + // as follows: + if (a4 != 0) + POST_MEM_WRITE(a4, sizeof(struct vki_dqblk)); + break; + case VKI_Q_GETNEXTQUOTA: + // The addr argument is a pointer to a nextdqblk structure + // whose fields are as for the dqblk, except for the addition + // of a dqb_id field that is used to return the ID for which + // quota information is being returned: + if (a4 != 0) + POST_MEM_WRITE(a4, sizeof(struct vki_nextdqblk)); + break; + case VKI_Q_GETINFO: + // The addr argument should be a pointer to a dqinfo structure. + if (a4 != 0) + POST_MEM_WRITE(a4, sizeof(struct vki_dqinfo)); + break; + case VKI_Q_GETFMT: + // The addr argument should be a pointer to a 4-byte buffer where the + // format number will be stored. + if (a4 != 0) + POST_MEM_WRITE(a4, 4); + break; + // case VKI_Q_GETSTATS: was only supported up to Linux 2.4.21 - skipping) + default: + return; + } +} + + PRE(sys_quotactl) { + // SYSCALL_DEFINE4(quotactl, + // unsigned int, cmd, + // const char __user *, special, + // qid_t, id, + // void __user *, addr) + Int subop = ARG1 >> VKI_SUBCMDSHIFT; PRINT("sys_quotactl (0x%" FMT_REGWORD "x, %#" FMT_REGWORD "x, 0x%" FMT_REGWORD "x, 0x%" FMT_REGWORD "x )", ARG1, ARG2, ARG3, ARG4); PRE_REG_READ4(long, "quotactl", unsigned int, cmd, const char *, special, vki_qid_t, id, void *, addr); PRE_MEM_RASCIIZ( "quotactl(special)", ARG2 ); + common_pre_quotactl_p4_check(tid, subop, ARG4, status, "quotactl"); +} +POST(sys_quotactl) +{ + Int subop = ARG1 >> VKI_SUBCMDSHIFT; + common_post_quotactl_p4_check(tid, subop, ARG4, "quotactl"); } PRE(sys_quotactl_fd) @@ -4142,13 +4252,20 @@ PRE(sys_quotactl_fd) // unsigned int, cmd, // qid_t, id, // void __user *, addr) - PRINT("sys_quotactl (0x%" FMT_REGWORD "x, 0x%#" FMT_REGWORD "x, 0x%" + Int subop = ARG2 >> VKI_SUBCMDSHIFT; + PRINT("sys_quotactl_fd (0x%" FMT_REGWORD "x, 0x%#" FMT_REGWORD "x, 0x%" FMT_REGWORD "x, 0x%" FMT_REGWORD "x )", ARG1, ARG2, ARG3, ARG4); PRE_REG_READ4(long, "quotactl_fd", unsigned int, fd, unsigned int, cmd, vki_qid_t, id, void *, addr); if (!ML_(fd_allowed)(ARG1, "quotactl_fd", tid, False)) SET_STATUS_Failure( VKI_EBADF ); + common_pre_quotactl_p4_check(tid, subop, ARG4, status, "quotactl_fd"); +} +POST(sys_quotactl_fd) +{ + Int subop = ARG2 >> VKI_SUBCMDSHIFT; + common_post_quotactl_p4_check(tid, subop, ARG4, "quotactl_fd"); } PRE(sys_waitid) diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index 126244925..5541f4c72 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -896,7 +896,7 @@ static SyscallTableEntry syscall_main_table[] = { //.. GENX_(__NR_init_module, sys_init_module), // 128 //.. // (__NR_delete_module, sys_delete_module), // 129 //.. GENX_(__NR_get_kernel_syms, sys_ni_syscall), // 130 - //.. LINX_(__NR_quotactl, sys_quotactl), // 131 + LINXY (__NR_quotactl, sys_quotactl), // 131 GENX_ (__NR_getpgid, sys_getpgid), // 132 GENX_ (__NR_fchdir, sys_fchdir), // 133 //.. // (__NR_bdflush, sys_bdflush), // 134 @@ -1178,7 +1178,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 LINX_(__NR_landlock_restrict_self, sys_landlock_restrict_self), // 446 diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index f39bb58cc..57a522d87 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -644,7 +644,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_ (__NR_delete_module, sys_delete_module), GENX_ (__NR_get_kernel_syms, sys_ni_syscall), GENX_ (__NR_query_module, sys_ni_syscall), - LINX_ (__NR_quotactl, sys_quotactl), + LINXY (__NR_quotactl, sys_quotactl), /* GENX_(__NR_nfsservctl,sys_nfsservctl), */ GENXY (__NR_getpmsg, sys_getpmsg), GENX_ (__NR_putpmsg, sys_putpmsg), @@ -799,9 +799,9 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_listmount, sys_listmount), 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), + LINXY (__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 00bd2e756..ac4d6aa7e 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -592,7 +592,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_ (__NR_close, sys_close), LINX_ (__NR_vhangup, sys_vhangup), LINXY (__NR_pipe2, sys_pipe2), - LINX_ (__NR_quotactl, sys_quotactl), + LINXY (__NR_quotactl, sys_quotactl), GENXY (__NR_getdents64, sys_getdents64), LINXY (__NR__llseek, sys_llseek), GENXY (__NR_read, sys_read), diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 99f71b7a6..d3b84a57d 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -770,7 +770,7 @@ static SyscallTableEntry syscall_table[] = { //.. //.. // Nb: get_kernel_syms() was removed 2.4-->2.6 //.. GENX_(__NR_get_kernel_syms, sys_ni_syscall), // 130 -//.. LINX_(__NR_quotactl, sys_quotactl), // 131 + LINXY(__NR_quotactl, sys_quotactl), // 131 GENX_(__NR_getpgid, sys_getpgid), // 132 GENX_(__NR_fchdir, sys_fchdir), // 133 //.. // (__NR_bdflush, sys_bdflush), // 134 */Linux @@ -1076,7 +1076,7 @@ static SyscallTableEntry syscall_table[] = { LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_ (__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_ (__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY (__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index e8996b6b7..56b16bb8f 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -757,7 +757,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_delete_module, sys_delete_module), // 129 // _____(__NR_get_kernel_syms, sys_get_kernel_syms), // 130 - LINX_(__NR_quotactl, sys_quotactl), // 131 + LINXY(__NR_quotactl, sys_quotactl), // 131 GENX_(__NR_getpgid, sys_getpgid), // 132 GENX_(__NR_fchdir, sys_fchdir), // 133 // _____(__NR_bdflush, sys_bdflush), // 134 @@ -1054,7 +1054,7 @@ static SyscallTableEntry syscall_table[] = { LINXY (__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_ (__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_ (__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY (__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 diff --git a/coregrind/m_syswrap/syswrap-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index 3dbae3cb6..3774c797e 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -368,7 +368,7 @@ static SyscallTableEntry syscall_main_table[] = { GENX_(__NR_close, sys_close), /* 57 */ LINX_(__NR_vhangup, sys_vhangup), /* 58 */ LINXY(__NR_pipe2, sys_pipe2), /* 59 */ - LINX_(__NR_quotactl, sys_quotactl), /* 60 */ + LINXY(__NR_quotactl, sys_quotactl), /* 60 */ GENXY(__NR_getdents64, sys_getdents64), /* 61 */ LINX_(__NR_lseek, sys_lseek), /* 62 */ GENXY(__NR_read, sys_read), /* 63 */ @@ -598,7 +598,7 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_faccessat2, sys_faccessat2), /* 439 */ LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), /* 441 */ LINX_(__NR_mount_setattr, sys_mount_setattr), /* 442 */ - LINX_(__NR_quotactl_fd, sys_quotactl_fd), /* 443 */ + LINXY(__NR_quotactl_fd, sys_quotactl_fd), /* 443 */ LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), /* 444 */ LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), /* 445 */ LINX_(__NR_landlock_restrict_self, sys_landlock_restrict_self), /* 446 */ diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index d96adecde..8d45a55b1 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -568,7 +568,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_delete_module, sys_delete_module), // 129 GENX_(130, sys_ni_syscall), /* unimplemented (by the kernel) */ // 130 - LINX_(__NR_quotactl, sys_quotactl), // 131 + LINXY(__NR_quotactl, sys_quotactl), // 131 GENX_(__NR_getpgid, sys_getpgid), // 132 GENX_(__NR_fchdir, sys_fchdir), // 133 // ?????(__NR_bdflush, ), // 134 @@ -887,7 +887,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index a83c02b04..b6224321f 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1316,7 +1316,7 @@ static SyscallTableEntry syscall_table[] = { //zz //zz // Nb: get_kernel_syms() was removed 2.4-->2.6 GENX_(__NR_get_kernel_syms, sys_ni_syscall), // 130 - LINX_(__NR_quotactl, sys_quotactl), // 131 + LINXY(__NR_quotactl, sys_quotactl), // 131 GENX_(__NR_getpgid, sys_getpgid), // 132 GENX_(__NR_fchdir, sys_fchdir), // 133 //zz // (__NR_bdflush, sys_bdflush), // 134 */Linux @@ -1677,7 +1677,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_epoll_pwait2, sys_epoll_pwait2), // 441 LINX_(__NR_mount_setattr, sys_mount_setattr), // 442 - LINX_(__NR_quotactl_fd, sys_quotactl_fd), // 443 + LINXY(__NR_quotactl_fd, sys_quotactl_fd), // 443 LINXY(__NR_landlock_create_ruleset, sys_landlock_create_ruleset), // 444 LINX_(__NR_landlock_add_rule, sys_landlock_add_rule), // 445 diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index 48aacea22..e0636378c 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -5610,6 +5610,57 @@ struct vki_file_attr { __vki_u32 fa_cowextsize; /* CoW extsize field value (get/set) */ }; +//---------------------------------------------------------------------- +// From uapi/linux/mount.h +//---------------------------------------------------------------------- + +#define VKI_SUBCMDMASK 0x00ff +#define VKI_SUBCMDSHIFT 8 + +#define VKI_Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */ +#define VKI_Q_QUOTAON 0x800002 /* turn quotas on */ +#define VKI_Q_QUOTAOFF 0x800003 /* turn quotas off */ +#define VKI_Q_GETFMT 0x800004 /* get quota format used on given filesystem */ +#define VKI_Q_GETINFO 0x800005 /* get information about quota files */ +#define VKI_Q_SETINFO 0x800006 /* set information about quota files */ +#define VKI_Q_GETQUOTA 0x800007 /* get user quota structure */ +#define VKI_Q_SETQUOTA 0x800008 /* set user quota structure */ +#define VKI_Q_GETNEXTQUOTA 0x800009 /* get disk limits and usage >= ID */ + +struct vki_dqblk + { + __vki_u64 dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */ + __vki_u64 dqb_bsoftlimit; /* preferred limit on disk quota blocks */ + __vki_u64 dqb_curspace; /* current quota block count */ + __vki_u64 dqb_ihardlimit; /* maximum # allocated inodes */ + __vki_u64 dqb_isoftlimit; /* preferred inode limit */ + __vki_u64 dqb_curinodes; /* current # allocated inodes */ + __vki_u64 dqb_btime; /* time limit for excessive disk use */ + __vki_u64 dqb_itime; /* time limit for excessive files */ + __vki_u32 dqb_valid; /* bitmask of QIF_* constants */ + }; + + +struct vki_nextdqblk { + __vki_u64 dqb_bhardlimit; + __vki_u64 dqb_bsoftlimit; + __vki_u64 dqb_curspace; + __vki_u64 dqb_ihardlimit; + __vki_u64 dqb_isoftlimit; + __vki_u64 dqb_curinodes; + __vki_u64 dqb_btime; + __vki_u64 dqb_itime; + __vki_u32 dqb_valid; + __vki_u32 dqb_id; +}; + +struct vki_dqinfo { + __vki_u64 dqi_bgrace; + __vki_u64 dqi_igrace; + __vki_u32 dqi_flags; /* DFQ_* */ + __vki_u32 dqi_valid; +}; + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ From b08a821fc0b6030f49e80be759cf6907f7a62ce0 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 4 Dec 2025 20:38:24 +0000 Subject: [PATCH 125/502] arm: Remove global arm_hwcaps and one FIXME. Followup to cd9d7d0d2edeef5ef37582c6d6fa55ca3c3bcccd --- VEX/priv/host_arm_defs.c | 4 +++- VEX/priv/host_arm_defs.h | 3 --- VEX/priv/host_arm_isel.c | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/VEX/priv/host_arm_defs.c b/VEX/priv/host_arm_defs.c index a838565a2..3ca8b22a5 100644 --- a/VEX/priv/host_arm_defs.c +++ b/VEX/priv/host_arm_defs.c @@ -39,7 +39,7 @@ #include "host_generic_regs.h" #include "host_arm_defs.h" -UInt arm_hwcaps = 0; +static UInt arm_hwcaps; /* --------- Registers. --------- */ @@ -3080,6 +3080,8 @@ Int emit_ARMInstr ( /*MB_MOD*/Bool* is_profInc, vassert(mode64 == False); vassert(0 == (((HWord)buf) & 3)); + arm_hwcaps = archinfo_host->hwcaps; + switch (i->tag) { case ARMin_Alu: { UInt instr, subopc; diff --git a/VEX/priv/host_arm_defs.h b/VEX/priv/host_arm_defs.h index d6dbc4ee2..b8399075d 100644 --- a/VEX/priv/host_arm_defs.h +++ b/VEX/priv/host_arm_defs.h @@ -32,9 +32,6 @@ #include "libvex.h" // VexArch #include "host_generic_regs.h" // HReg -extern UInt arm_hwcaps; - - /* --------- Registers. --------- */ #define ST_IN static inline diff --git a/VEX/priv/host_arm_isel.c b/VEX/priv/host_arm_isel.c index 90bc699fc..71bf871c4 100644 --- a/VEX/priv/host_arm_isel.c +++ b/VEX/priv/host_arm_isel.c @@ -6553,9 +6553,6 @@ HInstrArray* iselSB_ARM ( const IRSB* bb, /* guard against unexpected space regressions */ vassert(sizeof(ARMInstr) <= 28); - /* hwcaps should not change from one ISEL call to another. */ - arm_hwcaps = hwcaps_host; // JRS 2012 Mar 31: FIXME (RM) - /* Make up an initial environment to use. */ env = LibVEX_Alloc_inline(sizeof(ISelEnv)); env->vreg_ctr = 0; From a68eb0348e8ee91411898bd2e3d74205e41fb5b1 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 5 Dec 2025 13:44:41 +0100 Subject: [PATCH 126/502] Darwin: add a couple of missing function prototypes --- coregrind/m_aspacemgr/aspacemgr-linux.c | 55 ++++++++++++++++++++++++- coregrind/m_debuginfo/priv_image.h | 2 + 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c index d5715c444..3bc5cb044 100644 --- a/coregrind/m_aspacemgr/aspacemgr-linux.c +++ b/coregrind/m_aspacemgr/aspacemgr-linux.c @@ -864,6 +864,7 @@ static void sync_check_mapping_callback ( Addr addr, SizeT len, UInt prot, #if defined(VGO_darwin) // GrP fixme kernel info doesn't have dev/inode + // FIXME PJF but now ino is being used for vm tag cmp_devino = False; // GrP fixme V and kernel don't agree on offsets @@ -1473,8 +1474,9 @@ static void add_segment ( const NSegment* seg ) Addr sEnd = seg->end; #if defined(VGO_darwin) - // FIXME: the cast is unfortunate but I don't want to change every callsite to call 2 functions - fill_segment((NSegment*) (Addr) seg); + // FIXME: adding for all segments causes some failures and alignment crashes in leak check + // need to debug more + //fill_segment((NSegment*) (Addr) seg); #endif aspacem_assert(sStart <= sEnd); @@ -1611,6 +1613,10 @@ static void read_maps_callback ( Addr addr, SizeT len, UInt prot, seg.fnIdx = ML_(am_allocate_segname)( filename ); if (0) show_nsegment( 2,0, &seg ); +#if defined(VGO_darwin) + // FIXME this is the one that causes problems with leak checks + //fill_segment( &seg ); +#endif add_segment( &seg ); } @@ -1923,10 +1929,16 @@ Addr VG_(am_startup) ( Addr sp_at_startup ) if (aspacem_cStart > Addr_MIN) { init_resvn(&seg, Addr_MIN, aspacem_cStart-1); +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment(&seg); } if (aspacem_maxAddr < Addr_MAX) { init_resvn(&seg, aspacem_maxAddr+1, Addr_MAX); +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment(&seg); } @@ -1936,6 +1948,9 @@ Addr VG_(am_startup) ( Addr sp_at_startup ) valgrind allocations at the boundary, this is kind of necessary in order to get it to start allocating in the right place. */ init_resvn(&seg, aspacem_vStart, aspacem_vStart + VKI_PAGE_SIZE - 1); +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment(&seg); VG_(am_show_nsegments)(2, "Initial layout"); @@ -2323,6 +2338,9 @@ VG_(am_notify_client_mmap)( Addr a, SizeT len, UInt prot, UInt flags, seg.isFF = (flags & VKI_MAP_FIXED); #endif } +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); AM_SANITY_CHECK; return needDiscard; @@ -2354,6 +2372,9 @@ VG_(am_notify_client_shmat)( Addr a, SizeT len, UInt prot ) seg.hasR = toBool(prot & VKI_PROT_READ); seg.hasW = toBool(prot & VKI_PROT_WRITE); seg.hasX = toBool(prot & VKI_PROT_EXEC); +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); AM_SANITY_CHECK; return needDiscard; @@ -2454,6 +2475,9 @@ Bool VG_(am_notify_munmap)( Addr start, SizeT len ) else seg.kind = SkFree; +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); /* Unmapping could create two adjacent free segments, so a preen is @@ -2565,6 +2589,9 @@ SysRes VG_(am_mmap_named_file_fixed_client_flags) } #if defined(VGO_freebsd) seg.isFF = (flags & VKI_MAP_FIXED); +#endif +#if defined(VGO_darwin) + fill_segment( &seg ); #endif add_segment( &seg ); @@ -2624,6 +2651,9 @@ SysRes VG_(am_mmap_anon_fixed_client) ( Addr start, SizeT length, UInt prot ) seg.hasR = toBool(prot & VKI_PROT_READ); seg.hasW = toBool(prot & VKI_PROT_WRITE); seg.hasX = toBool(prot & VKI_PROT_EXEC); +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); AM_SANITY_CHECK; @@ -2683,6 +2713,9 @@ static SysRes am_mmap_anon_float_client ( SizeT length, Int prot, Bool isCH ) seg.hasW = toBool(prot & VKI_PROT_WRITE); seg.hasX = toBool(prot & VKI_PROT_EXEC); seg.isCH = isCH; +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); AM_SANITY_CHECK; @@ -2785,6 +2818,9 @@ SysRes VG_(am_mmap_anon_float_valgrind)( SizeT length ) seg.hasR = True; seg.hasW = True; seg.hasX = True; +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); AM_SANITY_CHECK; @@ -2877,6 +2913,9 @@ static SysRes VG_(am_mmap_file_float_valgrind_flags) ( SizeT length, UInt prot, } #if defined(VGO_freebsd) seg.isFF = (flags & VKI_MAP_FIXED); +#endif +#if defined(VGO_darwin) + fill_segment( &seg ); #endif add_segment( &seg ); @@ -3099,6 +3138,9 @@ Bool VG_(am_create_reservation) ( Addr start, SizeT length, reservation. */ seg.end = end1; seg.smode = smode; +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); AM_SANITY_CHECK; @@ -3272,6 +3314,9 @@ const NSegment *VG_(am_extend_map_client)( Addr addr, SizeT delta ) NSegment seg_copy = *seg; seg_copy.end += delta; +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg_copy ); if (0) @@ -3345,6 +3390,9 @@ Bool VG_(am_relocate_nooverlap_client)( /*OUT*/Bool* need_discard, } seg.start = new_addr; seg.end = new_addr + new_len - 1; +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); /* Create a free hole in the old location. */ @@ -3360,6 +3408,9 @@ Bool VG_(am_relocate_nooverlap_client)( /*OUT*/Bool* need_discard, else seg.kind = SkFree; +#if defined(VGO_darwin) + fill_segment( &seg ); +#endif add_segment( &seg ); AM_SANITY_CHECK; diff --git a/coregrind/m_debuginfo/priv_image.h b/coregrind/m_debuginfo/priv_image.h index 90de98dfc..56dfbb85d 100644 --- a/coregrind/m_debuginfo/priv_image.h +++ b/coregrind/m_debuginfo/priv_image.h @@ -61,6 +61,8 @@ DiImage* ML_(img_from_local_file)(const HChar* fullpath); DiImage* ML_(img_from_fd)(Int fd, const HChar* fullpath); +DiImage* ML_(img_from_memory)(Addr a, SizeT len, const HChar* fullpath); + /* Create an image by connecting to a Valgrind debuginfo server (auxprogs/valgrind-di-server.c). |filename| contains the object name to ask for; it must be a plain filename, not absolute, not a From 19054d9a8fe14c6b20f989c2c8ff3d7eea8ce40a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 5 Dec 2025 13:47:19 +0100 Subject: [PATCH 127/502] Darwin: no need to turn off alignment assert in leak check Mixed up 2 files with previous commit. This also contains a missing proto and the previous commit fixes issues with badly formed segments. Needs more investigation. --- coregrind/m_debuginfo/priv_readmacho.h | 3 +++ memcheck/mc_main.c | 14 -------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/coregrind/m_debuginfo/priv_readmacho.h b/coregrind/m_debuginfo/priv_readmacho.h index 5ff5d048c..c945d9b18 100644 --- a/coregrind/m_debuginfo/priv_readmacho.h +++ b/coregrind/m_debuginfo/priv_readmacho.h @@ -37,6 +37,9 @@ it. Also count the number of RW segements. */ extern Bool ML_(check_macho_and_get_rw_loads)( Int fd, Int* rw_loads ); +/* Same as above, but reads from memory instead of a file descriptor. */ +extern Bool ML_(check_macho_and_get_rw_loads_from_memory)( const void* buf, SizeT size, Int* rw_loads ); + /* The central function for reading Mach-O debug info. For the object/exe specified by the DebugInfo, find Mach-O sections, then read the symbols, line number info, file name info, CFA (stack-unwind diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index d4ac9fc20..d6c14923c 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -5893,21 +5893,7 @@ Bool MC_(is_within_valid_secondary) ( Addr a ) Bool MC_(is_valid_aligned_word) ( Addr a ) { tl_assert(sizeof(UWord) == 4 || sizeof(UWord) == 8); -#if defined(VGO_darwin) - // on Darwin some of the memcheck/tests/leak-autofreepool-* - // tests are failing here. VALGRIND_MALLOCLIKE_BLOCK is passed - // an address that is not word aligned. But that's also the case - // on other platforms, on FreeBSD leak-autofreepool 0 uses addresses - // that are only 2 aligned. The problem is more likely that Darwin - // should not be looking at this chunk of memory. - if (!VG_IS_WORD_ALIGNED(a) && VG_(clo_verbosity) > 1) - { - VG_(printf)("In %s, invariant violation, pointer %p should be word aligned\n", __func__, (void*)a); - MC_(pp_describe_addr) (VG_(current_DiEpoch)(), a); - } -#else tl_assert(VG_IS_WORD_ALIGNED(a)); -#endif if (get_vabits8_for_aligned_word32 (a) != VA_BITS8_DEFINED) return False; if (sizeof(UWord) == 8) { From 7769d95480ec28e2ebcf475d04a5b495d5502e59 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 5 Dec 2025 21:44:56 +0100 Subject: [PATCH 128/502] FreeBSD: a bit of cleaning of client stack creation Remove some commented out rounding Make stringbase point to a word boundary, not one before --- coregrind/m_initimg/initimg-freebsd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index 09f3dda84..cd127736c 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -473,17 +473,14 @@ static Addr setup_client_stack(const void* init_sp, break; case VKI_AT_CANARYLEN: canarylen = cauxv->u.a_val; - /*VG_ROUNDUP(stringsize, sizeof(Word));*/ stringsize += canarylen; break; case VKI_AT_PAGESIZESLEN: pagesizeslen = cauxv->u.a_val; - /*VG_ROUNDUP(stringsize, sizeof(Word));*/ stringsize += pagesizeslen; break; #if 0 case VKI_AT_TIMEKEEP: - /*VG_ROUNDUP(stringsize, sizeof(Word));*/ stringsize += sizeof(struct vki_vdso_timehands); break; #endif @@ -519,7 +516,7 @@ static Addr setup_client_stack(const void* init_sp, client_SP = VG_ROUNDDN(client_SP, 16); /* make stack 16 byte aligned */ /* base of the string table (aligned) */ - stringbase = strtab = (HChar *)clstack_end + stringbase = strtab = (HChar *)clstack_end + 1 - VG_ROUNDUP(stringsize, sizeof(int)); clstack_start = VG_PGROUNDDN(client_SP); From 46bc7241a79e68663b707b40b1866cc8303924c3 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 5 Dec 2025 21:59:34 +0100 Subject: [PATCH 129/502] Darwin: also clean up client stack creation Make stringbase and strtab be based off clstack_end + 1 rather than clstack_end. clstack_end is the address of the last byte of the stack, not one past the end of the stack. That means that it is not word aligned. Adding 1 makes the calculation word aligned. Depending on the length of the string table with rounding it could happen that the executable_path pointer would overwrite the start of argv[0] in the string table. I think that that there are supposed to be 0-16 bytes between the end of the pointers and the string table (or is that ELF?). --- coregrind/m_initimg/initimg-darwin.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index 3ddc9806c..0befeaef3 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -360,16 +360,8 @@ Addr setup_client_stack( void* init_sp, stringsize += VG_(strlen)(*cpp) + 1; } - // @todo PJF there is a bug in the size calculation or rounding - // somewhere. This should be "+= 2" (one of the pointer to exec - // path and one for the terminating NULL pointer). When I run - // "./tests/vg_regtest none/tests" from a Korn shell script - // then the allexec32/64 tests fail because they print out "argv[0]". - // I think that what happens is that writing to "ptr" overwrites the - // start of strtab resulting in the argv[0] the exe name being a - // string starting with 8 \0s (not tested) - /* Darwin executable_path + NULL */ - auxsize += 3 * sizeof(Word); + /* NULL separator and executable path */ + auxsize += 2 * sizeof(HChar **); if (info->executable_path) { stringsize += 1 + VG_(strlen)(info->executable_path); } @@ -395,7 +387,7 @@ Addr setup_client_stack( void* init_sp, client_SP = VG_ROUNDDN(client_SP, 32); /* make stack 32 byte aligned */ /* base of the string table (aligned) */ - stringbase = strtab = (HChar *)clstack_end + stringbase = strtab = (HChar *)clstack_end + 1 - VG_ROUNDUP(stringsize, sizeof(int)); /* The max stack size */ From 34a1e01deacf1a9b1e99720a1c19149e35581707 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 6 Dec 2025 08:19:36 +0100 Subject: [PATCH 130/502] Darwin configure: updates to SDK checking and not yet suppoorted Darwin versions Merged from Louis Brunner I was just adding support for OSX 10.13 but that is just making more work (avoiding parts of merges that will probably need to be added back later). This should allow me to merge code that uses macros for OSX/macOS versions which don't yet have support in the repo. --- configure.ac | 323 ++++++++++++++++++++------- coregrind/Makefile.am | 12 +- coregrind/m_syswrap/syswrap-darwin.c | 10 + 3 files changed, 261 insertions(+), 84 deletions(-) diff --git a/configure.ac b/configure.ac index 54df9c1e1..82f8e8c3a 100644 --- a/configure.ac +++ b/configure.ac @@ -117,33 +117,15 @@ rm $tmpfile # We don't want gcc < 3.0 AC_MSG_CHECKING([for a supported version of gcc]) -# Obtain the compiler version. -# -# A few examples of how the ${CC} --version output looks like: -# -# ######## gcc variants ######## -# Arch Linux: i686-pc-linux-gnu-gcc (GCC) 4.6.2 -# Debian Linux: gcc (Debian 4.3.2-1.1) 4.3.2 -# openSUSE: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585] -# Exherbo Linux: x86_64-pc-linux-gnu-gcc (Exherbo gcc-4.6.2) 4.6.2 -# MontaVista Linux for ARM: arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q1-203) 4.3.3 -# OS/X 10.6: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) -# OS/X 10.7: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) -# -# ######## clang variants ######## -# Clang: clang version 2.9 (tags/RELEASE_29/final) -# Apple clang: Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) -# FreeBSD clang: FreeBSD clang version 3.1 (branches/release_31 156863) 20120523 -# -# ######## Apple LLVM variants ######## -# Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) -# Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn) -# [ if test "x`${CC} --version | $SED -n -e 's/.*\Apple \(LLVM\) version.*clang.*/\1/p'`" = "xLLVM" ; then is_clang="applellvm" gcc_version=`${CC} --version | $SED -n -e 's/.*LLVM version \([0-9.]*\).*$/\1/p'` +elif test "x`${CC} --version | $SED -n -e 's/.*\Apple \(clang\) version.*clang.*/\1/p'`" = "xclang" ; +then + is_clang="applellvm" + gcc_version=`${CC} --version | $SED -n -e 's/.*clang version \([0-9.]*\).*$/\1/p'` elif test "x`${CC} --version | $SED -n -e 's/.*\(clang\) version.*/\1/p'`" = "xclang" ; then is_clang="clang" @@ -164,6 +146,82 @@ fi AM_CONDITIONAL(COMPILER_IS_CLANG, test $is_clang = clang -o $is_clang = applellvm) AM_CONDITIONAL(COMPILER_IS_ICC, test $is_clang = icc) +AC_CANONICAL_HOST + +# macOS: Detect the Xcode SDK path and inject it in different tools +case $host_os in + *darwin*) + AC_ARG_WITH([darwin-platform], + [ --with-darwin-platform=PLAT Specify which Darwin platform we are compiling for (macOS, iOS, etc)], + [ + # TODO: some kind of case-insensitive check? + if test "x$withval" == "xmacOS"; then + darwin_platform="macosx" + elif test "x$withval" == "xmacos"; then + darwin_platform="macosx" + elif test "x$withval" == "xiOS"; then + darwin_platform="iphoneos" + elif test "x$withval" == "xios"; then + darwin_platform="iphoneos" + else + darwin_platform="$withval" + fi + ], + [ + darwin_platform="macosx" + ]) + + AC_ARG_WITH([darwin-version], + [ --with-darwin-version=VERS Specify which version of Darwin you are targetting (useful for cross-compilation, depends on the darwin-platform)], + [ + darwin_version="$withval" + ], + [ + darwin_version="" + ]) + + AC_ARG_VAR([DEVELOPER_DIR],[Overrides the active developer directory (used in gcc, xcrun, etc)]) + AC_CHECK_PROG([XCRUN], [xcrun], [yes], [no]) + + AC_MSG_CHECKING([for Xcode SDK]) + AC_ARG_WITH([xcode-path], + [ --with-xcode-path=PATH Specify path for Xcode SDK], + [ + # Set defaults in case `xcrun` fails + xcodedir="$withval" + xcodedir_inc="$xcodedir/usr/include" + xcodedir_lib="$xcodedir/usr/lib" + # Defining DEVELOPER_DIR will override which version of gcc, xcrun, etc is being used + export DEVELOPER_DIR="$xcodedir" + ], + [ + # Use system defaults, in case `xcrun` fails + xcodedir="active developer directory" + xcodedir_inc="/usr/include" + xcodedir_lib="/usr/lib" + ]) + + darwin_sdk="$darwin_platform$darwin_version" + if test "x$XCRUN" != "xno"; then + if test "x$darwin_version" != "x"; then + if test x`xcrun --sdk $darwin_sdk --show-sdk-version` != x$darwin_version; then + AC_MSG_ERROR([Couldn't find SDK for $darwin_sdk version $darwin_version (check 'xcodebuild -showsdks' for available ones)]) + fi + fi + + xcrundir=`xcrun --sdk $darwin_sdk --show-sdk-path` + if test ! -z "$xcrundir"; then + xcodedir="$xcrundir" + xcodedir_inc="$xcodedir/usr/include" + xcodedir_lib="$xcodedir/usr/lib" + fi + else + AC_MSG_WARN([Couldn't find xcrun, most Xcode-related autodetection will be disabled and the build might fail]) + fi + AC_MSG_RESULT([$xcodedir]) + ;; +esac + # Note: m4 arguments are quoted with [ and ] so square brackets in shell # statements have to be quoted. case "${is_clang}-${gcc_version}" in @@ -193,8 +251,6 @@ esac # configure-time, and distinguishes them from the VGA_*/VGO_*/VGP_* # variables used when compiling C files. -AC_CANONICAL_HOST - AC_MSG_CHECKING([for a supported CPU]) # ARCH_MAX reflects the most that this CPU can do: for example if it @@ -387,27 +443,67 @@ case "${host_os}" in *darwin*) AC_MSG_RESULT([ok (${host_os})]) VGCONF_OS="darwin" - AC_DEFINE([DARWIN_10_5], 100500, [DARWIN_VERS value for Mac OS X 10.5]) - AC_DEFINE([DARWIN_10_6], 100600, [DARWIN_VERS value for Mac OS X 10.6]) - AC_DEFINE([DARWIN_10_7], 100700, [DARWIN_VERS value for Mac OS X 10.7]) - AC_DEFINE([DARWIN_10_8], 100800, [DARWIN_VERS value for Mac OS X 10.8]) - AC_DEFINE([DARWIN_10_9], 100900, [DARWIN_VERS value for Mac OS X 10.9]) - AC_DEFINE([DARWIN_10_10], 101000, [DARWIN_VERS value for Mac OS X 10.10]) - AC_DEFINE([DARWIN_10_11], 101100, [DARWIN_VERS value for Mac OS X 10.11]) - AC_DEFINE([DARWIN_10_12], 101200, [DARWIN_VERS value for macOS 10.12]) - AC_DEFINE([DARWIN_10_13], 101300, [DARWIN_VERS value for macOS 10.13]) - AC_DEFINE([DARWIN_10_14], 101400, [DARWIN_VERS value for macOS 10.14 / iOS 12]) - AC_DEFINE([DARWIN_10_15], 101500, [DARWIN_VERS value for macOS 10.15 / iOS 13]) - AC_DEFINE([DARWIN_11_00], 110000, [DARWIN_VERS value for macOS 11.0 / iOS 14]) - AC_DEFINE([DARWIN_12_00], 120000, [DARWIN_VERS value for macOS 12.0 / iOS 15]) - AC_DEFINE([DARWIN_13_00], 130000, [DARWIN_VERS value for macOS 13.0 / iOS 16]) - AC_DEFINE([DARWIN_14_00], 140000, [DARWIN_VERS value for macOS 14.0 / iOS 17]) - AC_DEFINE([DARWIN_15_00], 150000, [DARWIN_VERS value for macOS 15.0 / iOS 18]) - AC_DEFINE([DARWIN_15_04], 150400, [DARWIN_VERS value for macOS 15.4]) - AC_DEFINE([DARWIN_26_00], 260000, [DARWIN_VERS value for macOS / iOS 26]) + + AC_DEFUN([AC_ADD_DARWIN_VERS],[ + $1=$2 + AC_DEFINE_UNQUOTED([$1], [$$1], [DARWIN_VERS value for $3]) + AC_SUBST($1) + ]) + AC_ADD_DARWIN_VERS([DARWIN_10_5], 100500, [DARWIN_VERS value for Mac OS X 10.5]) + AC_ADD_DARWIN_VERS([DARWIN_10_6], 100600, [DARWIN_VERS value for Mac OS X 10.6 / iOS 4]) + AC_ADD_DARWIN_VERS([DARWIN_10_7], 100700, [DARWIN_VERS value for Mac OS X 10.7 / iOS 5]) + AC_ADD_DARWIN_VERS([DARWIN_10_8], 100800, [DARWIN_VERS value for Mac OS X 10.8 / iOS 6]) + AC_ADD_DARWIN_VERS([DARWIN_10_9], 100900, [DARWIN_VERS value for Mac OS X 10.9 / iOS 7]) + AC_ADD_DARWIN_VERS([DARWIN_10_10], 101000, [DARWIN_VERS value for Mac OS X 10.10 / iOS 8]) + AC_ADD_DARWIN_VERS([DARWIN_10_11], 101100, [DARWIN_VERS value for Mac OS X 10.11 / iOS 9]) + AC_ADD_DARWIN_VERS([DARWIN_10_12], 101200, [DARWIN_VERS value for macOS 10.12 / iOS 10]) + AC_ADD_DARWIN_VERS([DARWIN_10_13], 101300, [DARWIN_VERS value for macOS 10.13 / iOS 11]) + AC_ADD_DARWIN_VERS([DARWIN_10_14], 101400, [DARWIN_VERS value for macOS 10.14 / iOS 12]) + AC_ADD_DARWIN_VERS([DARWIN_10_15], 101500, [DARWIN_VERS value for macOS 10.15 / iOS 13]) + AC_ADD_DARWIN_VERS([DARWIN_11_00], 110000, [DARWIN_VERS value for macOS 11.0 / iOS 14]) + AC_ADD_DARWIN_VERS([DARWIN_12_00], 120000, [DARWIN_VERS value for macOS 12.0 / iOS 15]) + AC_ADD_DARWIN_VERS([DARWIN_13_00], 130000, [DARWIN_VERS value for macOS 13.0 / iOS 16]) + AC_ADD_DARWIN_VERS([DARWIN_14_00], 140000, [DARWIN_VERS value for macOS 14.0 / iOS 17]) + AC_ADD_DARWIN_VERS([DARWIN_15_00], 150000, [DARWIN_VERS value for macOS 15.0 / iOS 18]) + AC_ADD_DARWIN_VERS([DARWIN_15_04], 150400, [DARWIN_VERS value for macOS 15.4]) + AC_ADD_DARWIN_VERS([DARWIN_26_00], 260000, [DARWIN_VERS value for macOS / iOS 26]) + + AC_DEFINE([SDK_10_XX], 101200, [SDK_VERS value for Xcode SDK earlier than macOS 10.13 / iOS 11]) + AC_DEFINE([SDK_10_13], 101300, [SDK_VERS value for Xcode SDK macOS 10.13 / iOS 11]) + AC_DEFINE([SDK_10_14], 101400, [SDK_VERS value for Xcode SDK macOS 10.14 / iOS 12]) + AC_DEFINE([SDK_10_14_6], 101406, [SDK_VERS value for Xcode SDK macOS 10.14.6 / iOS 12]) + AC_DEFINE([SDK_10_15], 101500, [SDK_VERS value for Xcode SDK macOS 10.15 / iOS 13]) + AC_DEFINE([SDK_11_0], 110000, [SDK_VERS value for Xcode SDK macOS 11.0 / iOS 14]) + AC_DEFINE([SDK_12_0], 120000, [SDK_VERS value for Xcode SDK macOS 12.0 / iOS 15]) + AC_DEFINE([SDK_13_0], 130000, [SDK_VERS value for Xcode SDK macOS 13.0 / iOS 16]) + AC_DEFINE([SDK_14_0], 140000, [SDK_VERS value for Xcode SDK macOS 14.0 / iOS 17]) + AC_DEFINE([SDK_15_0], 150000, [SDK_VERS value for Xcode SDK macOS 15.0 / iOS 18]) + AC_DEFINE([SDK_26_0], 260000, [SDK_VERS value for Xcode SDK macOS / iOS 26]) + + # Substitute the Xcode include path detected earlier + AC_SUBST(SDK_INC_DIR, [$xcodedir_inc]) + AC_SUBST(SDK_LIB_DIR, [$xcodedir_lib]) + + AC_MSG_CHECKING([for the Darwin platform]) + case "${darwin_platform}" in + macosx) + ;; + iphoneos) + ;; + *) + AC_MSG_RESULT([unsupported Darwin platform (${darwin_platform})]) + AC_MSG_ERROR([Valgrind works on macOS (macosx) and iOS (iphoneos)]) + esac + AC_MSG_RESULT([ok (${darwin_platform})]) AC_MSG_CHECKING([for the kernel version]) + kernel=$darwin_version + if test "x$kernel" = "x"; then + if test "${host_cpu}" != "${build_cpu}"; then + AC_MSG_WARN([You are cross-compiling without specifying the target\'s darwin-version, valgrind might not work.]) + fi kernel=`uname -r` + fi # Nb: for Darwin we set DEFAULT_SUPP here. That's because Darwin # has only one relevant version, the OS version. The `uname` check @@ -425,66 +521,162 @@ case "${host_os}" in # time support for 10.5 (the 9.* pattern just below), I'll leave it # in for now, just in case anybody wants to give it a try. But I'm # assuming that 3.7.0 is a Snow Leopard and Lion-only release. + DARWIN_DRD_SUPP="darwin10-drd.supp" case "${kernel}" in 9.*) AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_5 DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" ;; 10.*) AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_6 DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; 11.*) AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_7 DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; 12.*) AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_8 DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; 13.*) AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_9, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_9 DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; 14.*) AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_10, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_10 DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; 15.*) AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_11, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_11 DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; 16.*) AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_12 DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; 17.*) AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_13, [Darwin / Mac OS X version]) + DARWIN_VERS=$DARWIN_10_13 DEFAULT_SUPP="$srcdir/darwin17.supp ${DEFAULT_SUPP}" DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; *) - AC_MSG_RESULT([unsupported (${kernel})]) - AC_MSG_ERROR([Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x and 17.x (Mac OS X 10.6/7/8/9/10/11 and macOS 10.12/13)]) + AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) + AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.6-10.11, macOS 10.12-15.0, iOS 4-18 and macOS/iOS 26)]) ;; esac + + if test -f "$srcdir/darwin${DARWIN_KERNEL_VERS}.supp"; then + DEFAULT_SUPP="$srcdir/darwin${DARWIN_KERNEL_VERS}.supp ${DEFAULT_SUPP}" + fi + + AC_DEFINE_UNQUOTED([DARWIN_VERS], $DARWIN_VERS, [Darwin / Mac OS X / macOS / iOS version]) + AC_SUBST(DARWIN_VERS) + DEFAULT_SUPP="$srcdir/${DARWIN_DRD_SUPP} ${DEFAULT_SUPP}" + + AC_MSG_CHECKING([for the the minimum macOS SDK version]) + case "${darwin_platform}" in + macosx) + DARWIN_MIN_SDK="10.6" + ld_os_min_vers_arg="-macosx_version_min ${DARWIN_MIN_SDK}" + clang_os_min_vers_arg="-mmacosx-version-min=${DARWIN_MIN_SDK}" + if test $DARWIN_VERS -ge $DARWIN_11_00; then + if test $ARCH_MAX = "arm64"; then + # arm64 is only supported on macOS 11.0 and later + # this means that when you use a lower version it automatically caps it to 11.0 + DARWIN_MIN_SDK="11.0" + else + DARWIN_MIN_SDK="10.8" + fi + + # they changed the names around 11.0 + ld_os_min_vers_arg="-macos_version_min ${DARWIN_MIN_SDK}" + clang_os_min_vers_arg="-mmacos-version-min=${DARWIN_MIN_SDK}" + fi + ;; + iphoneos) + IPHONE_MIN_SDK=4 + clang_os_min_vers_arg="-miphoneos-version-min=${IPHONE_MIN_SDK}" + ld_os_min_vers_arg="-miphoneos-version-min=${IPHONE_MIN_SDK}" + ;; + *) + AC_MSG_RESULT([unsupported Darwin platform (${darwin_platform})]) + AC_MSG_ERROR([Valgrind works on macOS (macosx) and iOS (iphoneos)]) + esac + AC_MSG_RESULT([ok (${clang_os_min_vers_arg} ${ld_os_min_vers_arg})]) + + # Ensure clang receive the right minimum version argument + AC_SUBST(CLANG_OS_MIN_VERS_ARG, [$clang_os_min_vers_arg]) + AC_SUBST(LD_OS_MIN_VERS_ARG, [$ld_os_min_vers_arg]) + + AC_MSG_CHECKING([for the Xcode SDK version]) + sdkversion="legacy" + if test "x$XCRUN" != "xno"; then + sdkversion=`xcrun --sdk $darwin_sdk --show-sdk-version` + fi + case "${darwin_platform}-${sdkversion}" in + macosx-10.13*|iphoneos-11.*) + AC_DEFINE([SDK_VERS], SDK_10_13, [SDK version]) + ;; + macosx-10.14.6) + AC_DEFINE([SDK_VERS], SDK_10_14_6, [SDK version]) + ;; + macosx-10.14*|iphoneos-12.*) + AC_DEFINE([SDK_VERS], SDK_10_14, [SDK version]) + ;; + macosx-10.15*|iphoneos-13.*) + AC_DEFINE([SDK_VERS], SDK_10_15, [SDK version]) + ;; + macosx-11.*|iphoneos-14.*) + AC_DEFINE([SDK_VERS], SDK_11_0, [SDK version]) + ;; + macosx-12.*|iphoneos-15.*) + AC_DEFINE([SDK_VERS], SDK_12_0, [SDK version]) + ;; + macosx-13.*|iphoneos-16.*) + AC_DEFINE([SDK_VERS], SDK_13_0, [SDK version]) + ;; + macosx-14.*|iphoneos-17.*) + AC_DEFINE([SDK_VERS], SDK_14_0, [SDK version]) + ;; + macosx-15.*|iphoneos-18.*) + AC_DEFINE([SDK_VERS], SDK_15_0, [SDK version]) + ;; + *-26.*) + AC_DEFINE([SDK_VERS], SDK_26_0, [SDK version]) + ;; + legacy) + AC_DEFINE([SDK_VERS], SDK_10_XX, [SDK version]) + ;; + macosx-10.5*|macosx-10.6*|macosx-10.7*|macosx-10.8*|macosx-10.9*|macosx-10.10*|macosx-10.11*|macosx-10.12*) + AC_DEFINE([SDK_VERS], SDK_10_XX, [SDK version]) + ;; + iphoneos-4.*|iphoneos-5.*|iphoneos-6.*|iphoneos-7.*|iphoneos-8.*|iphoneos-9.*|iphoneos-10.*) + AC_DEFINE([SDK_VERS], SDK_10_XX, [SDK version]) + ;; + *) + AC_MSG_RESULT([unsupported (${sdkversion})]) + AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.6-10.11, macOS 10.12-15.0, iOS 4-18 and macOS/iOS 26)]) + ;; + esac + AC_MSG_RESULT([${sdkversion}]) ;; solaris2.11*) @@ -1126,31 +1318,6 @@ AC_ARG_WITH(tmpdir, AC_DEFINE_UNQUOTED(VG_TMPDIR, "$tmpdir", [Temporary files directory]) AC_SUBST(VG_TMPDIR, [$tmpdir]) -#---------------------------------------------------------------------------- -# Detect xcode path -#---------------------------------------------------------------------------- -AM_COND_IF([VGCONF_OS_IS_DARWIN], -[AC_CHECK_PROG([XCRUN], [xcrun], [yes], [no]) -AC_MSG_CHECKING([for xcode sdk include path]) -AC_ARG_WITH(xcodedir, - [ --with-xcode-path=PATH Specify path for xcode sdk includes], - [xcodedir="$withval"], - [ - if test "x$XCRUN" != "xno" -a ! -d /usr/include; then - xcrundir=`xcrun --sdk macosx --show-sdk-path` - if test -z "$xcrundir"; then - xcodedir="/usr/include" - else - xcodedir="$xcrundir/usr/include" - fi - else - xcodedir="/usr/include" - fi - ]) -AC_MSG_RESULT([$xcodedir]) -AC_DEFINE_UNQUOTED(XCODE_DIR, "$xcodedir", [xcode sdk include directory]) -AC_SUBST(XCODE_DIR, [$xcodedir])]) - #---------------------------------------------------------------------------- # Where to install gdb scripts, defaults to VG_LIBDIR (pkglibexecdir) #---------------------------------------------------------------------------- diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 4ead1542b..65369ebcd 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -167,10 +167,10 @@ mach_hdrs += \ m_mach/thread_act.h \ m_mach/vm_map.h mach_defs += \ - @XCODE_DIR@/mach/mach_vm.defs \ - @XCODE_DIR@/mach/task.defs \ - @XCODE_DIR@/mach/thread_act.defs \ - @XCODE_DIR@/mach/vm_map.defs + @SDK_INC_DIR@/mach/mach_vm.defs \ + @SDK_INC_DIR@/mach/task.defs \ + @SDK_INC_DIR@/mach/thread_act.defs \ + @SDK_INC_DIR@/mach/vm_map.defs endif # Be careful w.r.t. parallel builds. See section 27.9 of the automake info @@ -178,9 +178,9 @@ endif $(abs_builddir)/m_mach: mkdir -p $@ $(mach_user_srcs): $(mach_defs) $(abs_builddir)/m_mach - (cd m_mach && mig $(mach_defs)) + (cd m_mach && mig -I@SDK_INC_DIR@ $(mach_defs)) $(mach_hdrs): $(mach_defs) $(mach_user_srcs) $(abs_builddir)/m_mach - (cd m_mach && mig $(mach_defs)) + (cd m_mach && mig -I@SDK_INC_DIR@ $(mach_defs)) #---------------------------------------------------------------------------- # Headers diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 28ae9b4d5..13ca4eb72 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -972,9 +972,19 @@ void update_syncstats ( CheckHowOften cho, // reorder static UInt reorder_ctr = 0; if (i > 0 && 0 == (1 & reorder_ctr++)) { +#if defined(VGA_amd64) + // Some kind of compiler xmm-based optimization which causes a EXC_I386_GPFLT + // happens on amd64 on later macOS versions (seen on 15.0). + // Instead we do a boring memcpy. + SyncStats tmp; + VG_(memcpy)(&tmp, &syncstats[i-1], sizeof(SyncStats)); + VG_(memcpy)(&syncstats[i-1], &syncstats[i], sizeof(SyncStats)); + VG_(memcpy)(&syncstats[i], &tmp, sizeof(SyncStats)); +#else SyncStats tmp = syncstats[i-1]; syncstats[i-1] = syncstats[i]; syncstats[i] = tmp; +#endif } } From c48791a0db7ee5e69fd061c696608c121bb5b190 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 6 Dec 2025 10:50:38 +0100 Subject: [PATCH 131/502] FreeBSD client stack: add an assert to check the stringtable doesn't get overwritten There's already an assert that the stringsize calculated matches the stringsize writte. This adds a check that the pointer table area does not overwrite the stringtable (that is, that the NULL pointer after the last auxv entry pointer does not overwrite the first string [either the interpreter or argv[0]) --- coregrind/m_initimg/initimg-freebsd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index cd127736c..40f74168c 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -841,6 +841,8 @@ static Addr setup_client_stack(const void* init_sp, vg_assert((strtab-stringbase) == stringsize); + vg_assert((HChar*)auxv < stringbase); + /* client_SP is pointing at client's argc/argv */ if (0) { From ec228db38313830d374edf1519d314c88a51b98e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 6 Dec 2025 11:09:19 +0100 Subject: [PATCH 132/502] Darwin client stack: add an assert to check the stringtable doesn't get overwritten As per the previous change for FreeBSD. --- coregrind/m_initimg/initimg-darwin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index 0befeaef3..d4257c954 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -453,6 +453,8 @@ Addr setup_client_stack( void* init_sp, vg_assert((strtab-stringbase) == stringsize); + vg_assert((HChar*)ptr <= stringbase); + if (VG_(resolved_exename) == NULL) { const HChar *exe_name = VG_(find_executable)(VG_(args_the_exename)); HChar interp_name[VKI_PATH_MAX]; From 55129845cd0e2a8415b945953a035265b417afaf Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 07:54:23 +0100 Subject: [PATCH 133/502] Darwin stacktraces: add a hack to prevent segfault when dereferencing bp Can now turn a couple more helgrind tests back on. Need to get to the bottom of the bp dereferencing issue. There is a test already so it us supposed to be safe. --- coregrind/m_stacktrace.c | 15 ++++++++++++++- helgrind/tests/shared_timed_mutex.vgtest | 2 +- helgrind/tests/tc22_exit_w_lock.vgtest | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index fa2dc0964..5175f79fe 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -691,7 +691,20 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, fact that we are prodding at & ((UWord*)fp)[1] and so need to adjust the limit check accordingly. Omitting this has been observed to cause segfaults on rare occasions. */ - if (fp_min <= uregs.xbp && uregs.xbp <= fp_max - 1 * sizeof(UWord)) { + if (fp_min <= uregs.xbp && uregs.xbp <= fp_max - 1 * sizeof(UWord) +#if defined(VGO_darwin) + // FIXME PJF temporary? workaround for segfaults + // without this extra check there will be some SIGSEGVs which end stuck + // in an infinite loop + + // The faulting address seems to be in a fairly small rw- mapping + // (according to lldb) + // happens in Helgrind multithread apps, error arises in + // sync_signalhandler (called from darwin_signal_demux with signal 11) + + && ML_(safe_to_deref)((void*)uregs.xbp, 2*sizeof(UWord)) +#endif + ) { /* fp looks sane, so use it. */ uregs.xip = (((UWord*)uregs.xbp)[1]); if (0 == uregs.xip || 1 == uregs.xip) break; diff --git a/helgrind/tests/shared_timed_mutex.vgtest b/helgrind/tests/shared_timed_mutex.vgtest index 8903894e6..d3a044379 100644 --- a/helgrind/tests/shared_timed_mutex.vgtest +++ b/helgrind/tests/shared_timed_mutex.vgtest @@ -1,3 +1,3 @@ -prereq: test -e ../../drd/tests/shared_timed_mutex && ! ../../tests/os_test darwin +prereq: test -e ../../drd/tests/shared_timed_mutex vgopts: --read-var-info=yes prog: ../../drd/tests/shared_timed_mutex diff --git a/helgrind/tests/tc22_exit_w_lock.vgtest b/helgrind/tests/tc22_exit_w_lock.vgtest index 8dd7531ec..2e6190a72 100644 --- a/helgrind/tests/tc22_exit_w_lock.vgtest +++ b/helgrind/tests/tc22_exit_w_lock.vgtest @@ -1,3 +1,3 @@ -prereq: test -e tc22_exit_w_lock && ! ../../tests/os_test darwin +prereq: test -e tc22_exit_w_lock prog: tc22_exit_w_lock cleanup: rm -f vgcore.* From a779c501550173dbee98a6713402fafb161e59a7 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 08:50:32 +0100 Subject: [PATCH 134/502] Darwin mach_msg_host: move assign_port_name to post There's a GrP comment saying that assign_port_name should only be called on success. And indeed when it is called in the PRE and it can't find the info for the port then the code will assert. --- coregrind/m_syswrap/syswrap-darwin.c | 32 +++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 13ca4eb72..3bbfb76e6 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -5407,7 +5407,8 @@ PRE(host_request_notification) } // GrP fixme only do this on success - assign_port_name(req->notify_port.name, "host_notify-%p"); + // PJF moved to POST(mach_msg_post) + //assign_port_name(req->notify_port.name, "host_notify-%p"); } @@ -8771,6 +8772,7 @@ PRE(mach_msg) else if (mh->msgh_request_port == vg_host_port) { // message sent to mach_host_self() CALL_PRE(mach_msg_host); + AFTER = POST_FN(mach_msg_host); return; } else if (is_task_port(mh->msgh_request_port)) { @@ -8971,6 +8973,34 @@ POST(mach_msg_unhandled_check) PRINT("mach_msg_unhandled_check tid:%d missed mapping change()", tid); } +POST(mach_msg_host) +{ + mach_msg_header_t *mh = (mach_msg_header_t *)ARG1; + + // FIXME PJF put this in a header rather than have a copy and paste duplicate +#pragma pack(4) + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t notify_port; + /* end of the kernel processed data */ + NDR_record_t NDR; + host_flavor_t notify_type; + } Request; +#pragma pack() + + switch (mh->msgh_id) { + case 217: { + Request *req = (Request *)ARG1; + assign_port_name(req->notify_port.name, "host_notify-%p"); + } + break; + default: + break; + } +} + /* --------------------------------------------------------------------- other Mach traps From 95a1dfad820a6befb122aaab31743aeba3ab5062 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 09:36:20 +0100 Subject: [PATCH 135/502] FreeBSD regtest: minor typo in test error message --- memcheck/tests/freebsd/get_set_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/freebsd/get_set_context.c b/memcheck/tests/freebsd/get_set_context.c index e0b7db63b..e62666084 100644 --- a/memcheck/tests/freebsd/get_set_context.c +++ b/memcheck/tests/freebsd/get_set_context.c @@ -69,7 +69,7 @@ int main(void) if (-1 == swapcontext(ucp2, ucp)) { perror("swapcontext failed: "); } - fprintf(stderr, "should never see swapcontest return\n"); + fprintf(stderr, "should never see swapcontext return\n"); } assert(flag == 5); From 24ee9fc71c3913d2049a95900478901cd59b838d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 09:43:39 +0100 Subject: [PATCH 136/502] Darwin syswrap: remove a couple of duplicate table entries Probably harmless but it was generating a couple of compiler warnings --- coregrind/m_syswrap/syswrap-darwin.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 3bbfb76e6..183598812 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -11106,7 +11106,6 @@ const SyscallTableEntry ML_(syscall_table)[] = { #else _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(178)), // ??? #endif - _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(178)), // ??? _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(179)), // ??? MACX_(__NR_kdebug_trace, kdebug_trace), // 180 GENX_(__NR_setgid, sys_setgid), @@ -11445,7 +11444,6 @@ const SyscallTableEntry ML_(syscall_table)[] = { MACXY(__NR_necp_match_policy, necp_match_policy), // 460 MACXY(__NR_getattrlistbulk, getattrlistbulk), // 461 MACXY(__NR_openat, openat), // 463 - MACX_(__NR_mkdirat, mkdirat), // 475 #if DARWIN_VERS >= DARWIN_10_13 MACXY(__NR_openat_nocancel, openat_nocancel), // 464 #endif From f916877a38e88b935574530a8cc4ca98ccfd1d07 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 09:52:04 +0100 Subject: [PATCH 137/502] Darwin syscall: initial wrapper for mach_voucher_extract_attr_recipe It doesn't do any checking yet. However, with this change running TextEditor with --tool=none gets as far as drawing a white box on the screen. Then it fails because there is a missing mach trap handler for /* 11 */ MACH_TRAP(_kernelrpc_mach_vm_purgable_control_trap, 4, 5, munge_wlww), --- coregrind/m_syswrap/priv_syswrap-darwin.h | 1 + coregrind/m_syswrap/syswrap-darwin.c | 15 ++++++++++++++- include/vki/vki-scnums-darwin.h | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index 1e770d43a..2a8d2809d 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -722,6 +722,7 @@ DECL_TEMPLATE(darwin, mach_msg_bootstrap); DECL_TEMPLATE(darwin, mach_msg_host); DECL_TEMPLATE(darwin, mach_msg_task); DECL_TEMPLATE(darwin, mach_msg_thread); +DECL_TEMPLATE(darwin, mach_voucher_extract_attr_recipe_trap); // MACH 72 // Mach traps #if DARWIN_VERS >= DARWIN_10_8 diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 183598812..b265765bf 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -10689,15 +10689,28 @@ PRE(host_create_mach_voucher_trap) PRINT("host_create_mach_voucher_trap" "(host:%s, recipes:%#lx, recipes_size:%ld, voucher:%#lx)", name_for_port(ARG1), ARG2, ARG3, ARG4); + // FIXME PJF PRE_REG_READ? PRE_MEM_READ( "host_create_mach_voucher_trap(recipes)", ARG2, ARG3 ); PRE_MEM_WRITE( "host_create_mach_voucher_trap(voucher)", ARG4, sizeof(mach_port_name_t) ); } + POST(host_create_mach_voucher_trap) { vg_assert(SUCCESS); POST_MEM_WRITE( ARG4, sizeof(mach_port_name_t) ); } +// MACH 72 +// kern_return_t mach_voucher_extract_attr_recipe(ipc_voucher_t voucher, +// mach_voucher_attr_key_t key, +// mach_voucher_attr_raw_recipe_t raw_recipe, +// mach_voucher_attr_raw_recipe_size_t *in_out_size) +PRE(mach_voucher_extract_attr_recipe_trap) +{ + PRINT("mach_voucher_extract_attr_recipe(voucher:%#lx, key:%lu, raw_recipe:%#lx, in_out_size:%#lx)", ARG1, ARG2, ARG3, ARG4); + // FIXME PJF add MEM READ/WRITE and POST as needed +} + PRE(task_register_dyld_image_infos) { //#pragma pack(4) @@ -11673,7 +11686,7 @@ const SyscallTableEntry ML_(mach_trap_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(70)), #endif _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(71)), - _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(72)), + MACX_(__NR_mach_voucher_extract_attr_recipe_trap, mach_voucher_extract_attr_recipe_trap), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(73)), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(74)), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(75)), diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index f7f3b1105..094852bca 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -213,6 +213,8 @@ #define __NR_host_create_mach_voucher_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(70) #endif +#define __NR_mach_voucher_extract_attr_recipe_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(72) + #define __NR_mach_timebase_info VG_DARWIN_SYSCALL_CONSTRUCT_MACH(89) #define __NR_mach_wait_until VG_DARWIN_SYSCALL_CONSTRUCT_MACH(90) #define __NR_mk_timer_create VG_DARWIN_SYSCALL_CONSTRUCT_MACH(91) From 965d8e484b3653c0ea70a1fd3d1dd28de5184778 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 11:48:51 +0100 Subject: [PATCH 138/502] Darwin syscall: initial wrapper for kernelrpc_mach_vm_purgable_control_trap Need to add verification of regs and read/write mem. --- coregrind/m_syswrap/priv_syswrap-darwin.h | 5 +++-- coregrind/m_syswrap/syswrap-darwin.c | 17 ++++++++++++++++- include/vki/vki-scnums-darwin.h | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index 2a8d2809d..d3fd32458 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -726,8 +726,9 @@ DECL_TEMPLATE(darwin, mach_voucher_extract_attr_recipe_trap); // MACH 72 // Mach traps #if DARWIN_VERS >= DARWIN_10_8 -DECL_TEMPLATE(darwin, kernelrpc_mach_vm_allocate_trap); -DECL_TEMPLATE(darwin, kernelrpc_mach_vm_deallocate_trap); +DECL_TEMPLATE(darwin, kernelrpc_mach_vm_allocate_trap); // MACH 10 +DECL_TEMPLATE(darwin, kernelrpc_mach_vm_purgable_control_trap); // MACH 11 +DECL_TEMPLATE(darwin, kernelrpc_mach_vm_deallocate_trap); // MACH 12 DECL_TEMPLATE(darwin, kernelrpc_mach_vm_protect_trap); DECL_TEMPLATE(darwin, kernelrpc_mach_vm_map_trap); DECL_TEMPLATE(darwin, kernelrpc_mach_port_allocate_trap); diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index b265765bf..67fdd9e26 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -9814,6 +9814,7 @@ PRE(kernelrpc_mach_vm_allocate_trap) PRE_MEM_WRITE("kernelrpc_mach_vm_allocate_trap(address)", a2, sizeof(void*)); } + POST(kernelrpc_mach_vm_allocate_trap) { UWord a1; UWord a2; ULong a3; UWord a4; @@ -9835,6 +9836,20 @@ POST(kernelrpc_mach_vm_allocate_trap) } } +// MACH 11 +// kern_return_t _kernelrpc_mach_vm_purgable_control_trap(mach_port_name_t target, +// mach_vm_offset_t address, +// vm_purgable_t control, +// int *state); +PRE(kernelrpc_mach_vm_purgable_control_trap) +{ + // FIXME PJF munge? + PRINT("kernelrpc_mach_vm_purgable_control_trap" + "(target:%#lx, address:%#lx, control:%ld, state:%#lx)", + ARG1, ARG2, SARG3, ARG4); + // FIXME PJF PRE_REG_READ and READ/WRITE MEM +} + PRE(kernelrpc_mach_vm_deallocate_trap) { UWord a1; ULong a2; ULong a3; @@ -11554,7 +11569,7 @@ const SyscallTableEntry ML_(mach_trap_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(10)), # endif - _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(11)), + MACX_(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(11), kernelrpc_mach_vm_purgable_control_trap), # if DARWIN_VERS >= DARWIN_10_8 MACXY(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(12), kernelrpc_mach_vm_deallocate_trap), diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index 094852bca..ae1618b52 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -141,6 +141,7 @@ // osfmk/mach/syscall_sw.h #define __NR_kernelrpc_mach_vm_allocate_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(10) +#define __NR_kernelrpc_mach_vm_purgable_control_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(11) #define __NR_kernelrpc_mach_vm_deallocate_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(12) From ec89bf448f02f3d727c13a7e4dae1eff90e48544 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 13:30:19 +0100 Subject: [PATCH 139/502] Darwin: fix debug only build Was filing to link. Optimised builds were smart enough to optimise away a call to a function that I haven't merged into the repo yet. --- coregrind/m_debuginfo/readmacho.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index 66fd57e06..2c59d09de 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -215,7 +215,9 @@ static DiSlice map_image_aboard ( DebugInfo* di, /* only for err msgs */ // unfortunately, all the data needed for parsing from the DSC is spread across many places in memory // and there is no way to know for sure the size of the DSC perfectly, so this is the best method at the moment // and it's _very_ unsafe +#if (DARWIN_VERS >= DARWIN_10_15) mimg = ML_(img_from_memory)(rx_map->avma, MACH_DSC_END - rx_map->avma, filename); +#endif } else { mimg = ML_(img_from_local_file)(filename); } From ba56e9dee171b92ef03168c2bb014de1962d1f0e Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Sun, 7 Dec 2025 21:14:20 +0100 Subject: [PATCH 140/502] If valgrind crashes (e.g. on SEGV) and debug log > 0, report aspacemgr status Might help to see what goes wrong in bug 511717 gdbdserver read memory SIGSEGV --- coregrind/m_libcassert.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coregrind/m_libcassert.c b/coregrind/m_libcassert.c index 585991249..35a988c65 100644 --- a/coregrind/m_libcassert.c +++ b/coregrind/m_libcassert.c @@ -27,6 +27,7 @@ */ #include "pub_core_basics.h" +#include "pub_core_debuglog.h" #include "pub_core_vki.h" #include "pub_core_vkiscnums.h" #include "pub_core_threadstate.h" @@ -499,6 +500,10 @@ static void report_and_quit ( const HChar* report, False, // exited_threads startRegsIN); + if (VG_(debugLog_getLevel) > 0) { + VG_(am_show_nsegments) (1, "report_and_quit"); + (void) VG_(am_do_sync_check) ("report_and_quit", __FILE__, __LINE__); + } if (VG_(clo_xml)) // After flushing outputs VG_(printf_xml)("\n"); From 48354b20831bbfe6a44ca8d2d700bd8a279c036c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 21:59:40 +0100 Subject: [PATCH 141/502] FreeBSD and Darwin: clean up fake sigreturn syscall numbers Firstly make them a bit more similar. Secondly, switch Darwin from using __NR_MAXSYSCALL which changes with every Darwin version to using 1000 like FreeBSD. Change NEWS for macOS 10.13, it has now progressed beyond 'preliminary'. --- NEWS | 6 +++--- coregrind/m_signals.c | 4 ++-- coregrind/m_syswrap/priv_syswrap-darwin.h | 2 +- coregrind/m_syswrap/syswrap-darwin.c | 12 ++++++------ coregrind/m_syswrap/syswrap-freebsd.c | 2 +- coregrind/m_trampoline.S | 10 +++++----- include/vki/vki-scnums-darwin.h | 22 +--------------------- include/vki/vki-scnums-freebsd.h | 2 +- 8 files changed, 20 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index 0731634f8..0702dbc94 100644 --- a/NEWS +++ b/NEWS @@ -4,9 +4,9 @@ Release 3.27.0 (?? Apr 2025) This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux, PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, RISCV64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, -X86/Android, X86/Solaris, AMD64/Solaris, AMD64/MacOSX 10.12, X86/FreeBSD, -AMD64/FreeBSD and ARM64/FreeBSD There is also preliminary support for -X86/macOS 10.13, AMD64/macOS 10.13 and nanoMIPS/Linux. +X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. +X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support +for nanoMIPS/Linux. macOS is supported up to version 10.13 High Sierra. * ==================== CORE CHANGES =================== diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index a914cd0c2..1b0200287 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -1041,7 +1041,7 @@ extern void my_sigreturn(void); ".text\n" \ ".globl my_sigreturn\n" \ "my_sigreturn:\n" \ - " movl $" VG_STRINGIFY(__NR_DARWIN_FAKE_SIGRETURN) ",%eax\n" \ + " movl $" VG_STRINGIFY(__NR_darwin_fake_sigreturn) ",%eax\n" \ " int $0x80\n" #elif defined(VGP_amd64_darwin) @@ -1049,7 +1049,7 @@ extern void my_sigreturn(void); ".text\n" \ ".globl my_sigreturn\n" \ "my_sigreturn:\n" \ - " movq $" VG_STRINGIFY(__NR_DARWIN_FAKE_SIGRETURN) ",%rax\n" \ + " movq $" VG_STRINGIFY(__NR_darwin_fake_sigreturn) ",%rax\n" \ " syscall\n" #elif defined(VGP_s390x_linux) diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index d3fd32458..579b3d8c6 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -240,7 +240,7 @@ DECL_TEMPLATE(darwin, kdebug_trace); // 180 DECL_TEMPLATE(darwin, setegid); // 182 DECL_TEMPLATE(darwin, seteuid); // 183 DECL_TEMPLATE(darwin, sigreturn); // 184 -DECL_TEMPLATE(darwin, FAKE_SIGRETURN); +DECL_TEMPLATE(darwin, fake_sigreturn); // 1000 // NYI chud 185 #if DARWIN_VERS >= DARWIN_10_13 // NYI thread_selfcounts // 186 diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 67fdd9e26..0113d388d 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -9358,7 +9358,7 @@ PRE(swtch_pri) } -PRE(FAKE_SIGRETURN) +PRE(fake_sigreturn) { /* See comments on PRE(sys_rt_sigreturn) in syswrap-amd64-linux.c for an explanation of what follows. */ @@ -9366,7 +9366,7 @@ PRE(FAKE_SIGRETURN) sigframe-x86-darwin.c. */ /* See also comments just below on PRE(sigreturn). */ - PRINT("FAKE_SIGRETURN ( )"); + PRINT("fake_sigreturn ( )"); vg_assert(VG_(is_valid_tid)(tid)); vg_assert(tid >= 1 && tid < VG_N_THREADS); @@ -9430,10 +9430,10 @@ PRE(sigreturn) 1. Change the second argument of VG_(sigframe_destroy) from "Bool isRT" to "UInt sysno", so we can pass the syscall number, so it can distinguish this case from the - __NR_DARWIN_FAKE_SIGRETURN case. + __NR_darwin_fake_sigreturn case. 2. In VG_(sigframe_destroy), look at sysno to distinguish the - cases. For __NR_DARWIN_FAKE_SIGRETURN, behave as at present. + cases. For __NR_darwin_fake_sigreturn, behave as at present. For this case, restore the thread's CPU state (or at least the integer regs) from the ucontext in ARG1 (and do all the other "signal-returns" stuff too). @@ -11542,8 +11542,8 @@ const SyscallTableEntry ML_(syscall_table)[] = { // _____(__NR_ntp_gettime), // 528 // _____(__NR_os_fault_with_payload), // 529 #endif -// _____(__NR_MAXSYSCALL) - MACX_(__NR_DARWIN_FAKE_SIGRETURN, FAKE_SIGRETURN) + + MACX_(__NR_darwin_fake_sigreturn, fake_sigreturn) }; diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index c2fd35d2b..e1c1dcc14 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -7941,7 +7941,7 @@ const SyscallTableEntry ML_(syscall_table)[] = { BSDX_(__NR_jail_attach_jd, sys_jail_attach_jd), // 597 BSDX_(__NR_jail_remove_jd, sys_jail_remove_jd), // 598 - BSDX_(__NR_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn + BSDX_(__NR_freebsd_fake_sigreturn, sys_fake_sigreturn), // 1000, fake sigreturn }; diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S index 0746fd0f1..6ba42613e 100644 --- a/coregrind/m_trampoline.S +++ b/coregrind/m_trampoline.S @@ -960,7 +960,7 @@ VG_(x86_freebsd_SUBST_FOR_sigreturn): pushl %eax pushl %eax /* fake return addr */ /* movl 0x44(%eax), %gs ; restore %gs, not done by sigreturn */ - movl $__NR_fake_sigreturn, %eax + movl $__NR_freebsd_fake_sigreturn, %eax int $0x80 ud2 @@ -987,7 +987,7 @@ VG_(amd64_freebsd_SUBST_FOR_sigreturn): /* This is a very specific sequence which GDB uses to recognize signal handler frames. */ - movq $__NR_fake_sigreturn, %rax + movq $__NR_freebsd_fake_sigreturn, %rax /* running the preprocessor on * src/amd64.amd64/lib/libc/sigreturn.S @@ -1046,7 +1046,7 @@ VG_(trampoline_stuff_start): .global VG_(arm64_freebsd_SUBST_FOR_sigreturn) .type VG_(arm64_freebsd_SUBST_FOR_sigreturn),#function VG_(arm64_freebsd_SUBST_FOR_sigreturn): - mov x8, # __NR_fake_sigreturn + mov x8, # __NR_freebsd_fake_sigreturn mov x0, sp svc #0 .long 0xFFFFFFFF /*illegal insn*/ @@ -1082,7 +1082,7 @@ VG_(trampoline_stuff_start): VG_(x86_darwin_SUBST_FOR_sigreturn): /* XXX does this need to have any special form? (cf x86-linux version) */ - movl $ __NR_DARWIN_FAKE_SIGRETURN, %eax + movl $ __NR_darwin_fake_sigreturn, %eax int $0x80 ud2 @@ -1242,7 +1242,7 @@ VG_(trampoline_stuff_start): VG_(amd64_darwin_SUBST_FOR_sigreturn): /* XXX does this need to have any special form? (cf x86-linux version) */ - movq $ __NR_DARWIN_FAKE_SIGRETURN, %rax + movq $ __NR_darwin_fake_sigreturn, %rax syscall ud2 diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index ae1618b52..9e5c86964 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -850,26 +850,6 @@ #define __NR_os_fault_with_payload VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(529) #endif /* DARWIN_VERS >= DARWIN_10_13 */ -#if DARWIN_VERS < DARWIN_10_6 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(427) -#elif DARWIN_VERS < DARWIN_10_7 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430) -#elif DARWIN_VERS < DARWIN_10_9 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(430) -#elif DARWIN_VERS == DARWIN_10_9 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(456) -#elif DARWIN_VERS == DARWIN_10_10 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(490) -#elif DARWIN_VERS == DARWIN_10_11 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(500) -#elif DARWIN_VERS == DARWIN_10_12 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(522) -#elif DARWIN_VERS == DARWIN_10_13 -#define __NR_MAXSYSCALL VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(530) -#else -#error unknown darwin version -#endif - -#define __NR_DARWIN_FAKE_SIGRETURN (1 + __NR_MAXSYSCALL) +#define __NR_darwin_fake_sigreturn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(1000) #endif diff --git a/include/vki/vki-scnums-freebsd.h b/include/vki/vki-scnums-freebsd.h index 83e4430c2..bb6d485b2 100644 --- a/include/vki/vki-scnums-freebsd.h +++ b/include/vki/vki-scnums-freebsd.h @@ -640,6 +640,6 @@ #define __NR_jail_attach_jd 597 #define __NR_jail_remove_jd 598 -#define __NR_fake_sigreturn 1000 +#define __NR_freebsd_fake_sigreturn 1000 #endif /* VKI_UNISTD_FREEBSD_H */ From c9fd2fd76eec900f7c7763cb9b16c0eaeac5dc6b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 7 Dec 2025 22:11:19 +0100 Subject: [PATCH 142/502] Darwin: make fixup_macho_loadcmds.c less version dependent Remove a load of DARWIN_VERS checks. It's a pointless maintenance burden. Add suppport for SDK >= 10.4.6. First step to adding macOS 10.14 Mojave support. --- coregrind/fixup_macho_loadcmds.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/coregrind/fixup_macho_loadcmds.c b/coregrind/fixup_macho_loadcmds.c index 1a5cdf62a..b751829fb 100644 --- a/coregrind/fixup_macho_loadcmds.c +++ b/coregrind/fixup_macho_loadcmds.c @@ -117,14 +117,10 @@ #include #include -/* Get hold of DARWIN_VERS, and check it has a sane value. */ +/* Check that DARWIN_VERS is defined */ #include "config.h" -#if DARWIN_VERS != DARWIN_10_5 && DARWIN_VERS != DARWIN_10_6 \ - && DARWIN_VERS != DARWIN_10_7 && DARWIN_VERS != DARWIN_10_8 \ - && DARWIN_VERS != DARWIN_10_9 && DARWIN_VERS != DARWIN_10_10 \ - && DARWIN_VERS != DARWIN_10_11 && DARWIN_VERS != DARWIN_10_12 \ - && DARWIN_VERS != DARWIN_10_13 -# error "Unknown DARWIN_VERS value. This file only compiles on Darwin." +#if !defined(DARWIN_VERS) +# error "DARWIN_VERS not defind. This file only compiles on Darwin." #endif @@ -519,8 +515,13 @@ void modify_macho_loadcmds ( HChar* filename, fail("has __UNIXSTACK, but wrong ::vmaddr"); if (seg->vmsize != expected_stack_size) fail("has __UNIXSTACK, but wrong ::vmsize"); +#if SDK_VERS >= SDK_10_14_6 + if (seg->maxprot != 3) + fail("has __UNIXSTACK, but wrong ::maxprot (should be 3)"); +#else if (seg->maxprot != 7) fail("has __UNIXSTACK, but wrong ::maxprot (should be 7)"); +#endif if (seg->initprot != 3) fail("has __UNIXSTACK, but wrong ::initprot (should be 3)"); if (seg->nsects != 0) From 3c6633256afa17b4b47e461563f2441d0d262b4b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 8 Dec 2025 08:24:46 +0100 Subject: [PATCH 143/502] Darwin suppressions: start cleaning up the suppression files This commit moves DRD suppressions from darwin17.supp to darwin10-drd.supp. It also removes some pthread lib suppressions. There's an obj suppression at the top level for libsystem_pthread.dylib that should cover all that. I want to avoid having 20+ Darwin suppression files (and rising with every new version). I'd like to have something a bit more like FreeBSD, with one suppression file for memcheck, one for DRD and one for Helgrind. That might be a bit optimistic (especially when DSC support lands). So what I'll do to begin with is to merge all of the Darwin <= 16 memcheck files into one darwin-legacy.supp, split out a new darwin-helgrind.supp file and rename darwin10-drd.supp to just darwin-drd.supp. That leaves darwin9-drd.supp which I'll either rename or merge. --- darwin10-drd.supp | 181 ++++++++++++++++++++++++++++++++++++++------ darwin17.supp | 189 ---------------------------------------------- 2 files changed, 160 insertions(+), 210 deletions(-) diff --git a/darwin10-drd.supp b/darwin10-drd.supp index 6bb8103df..e8cccdaab 100644 --- a/darwin10-drd.supp +++ b/darwin10-drd.supp @@ -103,60 +103,199 @@ fun:mig_dealloc_reply_port } +{ + OSX1013:drd:nanosleep + drd:ConflictingAccess + fun:nanosleep +} + # # pthread library # + +{ + OSX1013:drd:pthread library + drd:ConflictingAccess + obj:/usr/lib/system/libsystem_pthread.dylib +} + +{ + OSX1013:std::timed_mutex::unlock + drd:ConflictingAccess + fun:_ZNSt3__111timed_mutex6unlockEv +} +{ + std::timed_mutex::try_lock_until + drd:ConflictingAccess + fun:_ZNSt3__111timed_mutex14try_lock_untilINS_6chrono12steady_clockENS2_8durationIxNS_5ratio* +} +{ + OSX1013:mach_timebase_info + drd:ConflictingAccess + fun:mach_timebase_info +} +# take care with this, don't want to suppress anything in user +# thread functions +{ + OSX1013:_pthread_body + drd:ConflictingAccess + fun:_pthread_body +} + +# various getaddrinfo suppressions +{ + OSX1013:exit + drd:ConflictingAccess + ... + fun:exit +} + +{ + OSX1013:freeaddrinfo + drd:ConflictingAccess + fun:freeaddrinfo +} + +{ + OSX1013:getaddrinfo + drd:ConflictingAccess + ... + fun:getaddrinfo +} + +{ + OSX1013:drd:si_addrinfo + drd:ConflictingAccess + ... + fun:si_addrinfo +} + +{ + OSX1013:cache_fill + drd:ConflictingAccess + fun:_ZN7cache_t10reallocateEjj + fun:cache_fill +} +{ + OSX1013:os_unfair_lock + drd:ConflictingAccess + ... + fun:*os_unfair_lock* +} +{ + OSX1013:objc_msgSend + drd:ConflictingAccess + fun:objc_msgSend +} +{ + OSX1013:cache_fill + drd:ConflictingAccess + fun:cache_fill +} +{ + OSX1013:_nc_table + drd:ConflictingAccess + fun:_nc_table_* +} + { - thread_start + OSX1013:drd:xpc_dictionary_apply drd:ConflictingAccess - obj:* - fun:thread_start + ... + fun:xpc_dictionary_apply } + { - pthread_create() + OSX1013:drd:getaddrinfo drd:ConflictingAccess ... - fun:pthread_create + fun:getaddrinfo } + { - drd-darwin-pthread-join-1 + OSX1013:drd:xpc_create_from_plist drd:ConflictingAccess ... - fun:pthread_join$UNIX2003 + fun:xpc_create_from_plist } + { - drd-darwin-pthread-join-2 + OSX1013:helgrind:nw_path_copy_interface_with_generation_internal drd:ConflictingAccess ... - fun:pthread_join - fun:pthread_join + fun:nw_path_copy_interface_with_generation_internal +} + +{ + OSX1013:helgrind:sem_trywait + Helgrind:Race + fun:sem_trywait } + { - _pthread_exit() + OSX1013:drd:object_dispose drd:ConflictingAccess ... - fun:_pthread_exit + fun:object_dispose } + { - pthread_detach() + OSX1013:drd:dispatch_once_f drd:ConflictingAccess ... - fun:pthread_detach - fun:pthread_detach + fun:dispatch_once_f } + { - pthread_kill() + OSX1013:drd:objc_destructInstance drd:ConflictingAccess ... - fun:pthread_kill + fun:objc_destructInstance } + { - spin_unlock() + OSX1013:drd:xpc_pipe_routine drd:ConflictingAccess - fun:spin_unlock + ... + fun:xpc_pipe_routine } + +{ + OSX1013:drd:__si_module_static_cache_block_invoke + drd:MutexErr + fun:pthread_mutex_init + fun:__si_module_static_cache_block_invoke +} + +{ + OSX1013:drd:setlocale + drd:ConflictingAccess + ... + fun:setlocale +} + +{ + OSX1013:drd:std::__1::__thread_specific_ptr::set_pointer(std::__1::__thread_struct*) + + drd:ConflictingAccess + fun:_ZNSt3__121__thread_specific_ptrINS_15__thread_structEE11set_pointerEPS1_ +} + +{ + OSX1013:drd:std::__1::__thread_local_data + drd:ConflictingAccess + fun:_ZNSt3__119__thread_local_dataEv +} + +{ + OSX1013:drd:get_counter + drd:ConflictingAccess + fun:_ZL11get_counterv +} + { - _pthread_testcancel() + OSX1013:drd:gomp_barier_wait drd:ConflictingAccess - fun:_pthread_testcancel + fun:gomp_barrier_wait + fun:child } diff --git a/darwin17.supp b/darwin17.supp index 71d79d844..4216421a2 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -873,66 +873,6 @@ fun:nanosleep } -{ - OSX1013:drd:nanosleep - drd:ConflictingAccess - fun:nanosleep -} -{ - OSX1013:drd:pthread library - drd:ConflictingAccess - obj:/usr/lib/system/libsystem_pthread.dylib -} -{ - OSX1013:std::timed_mutex::unlock - drd:ConflictingAccess - fun:_ZNSt3__111timed_mutex6unlockEv -} -{ - std::timed_mutex::try_lock_until - drd:ConflictingAccess - fun:_ZNSt3__111timed_mutex14try_lock_untilINS_6chrono12steady_clockENS2_8durationIxNS_5ratio* -} -{ - OSX1013:mach_timebase_info - drd:ConflictingAccess - fun:mach_timebase_info -} -# take care with this, don't want to suppress anything in user -# thread functions -{ - OSX1013:_pthread_body - drd:ConflictingAccess - fun:_pthread_body -} - -# various getaddrinfo suppressions -{ - OSX1013:exit - drd:ConflictingAccess - ... - fun:exit -} - -{ - OSX1013:freeaddrinfo - drd:ConflictingAccess - fun:freeaddrinfo -} - -{ - OSX1013:getaddrinfo - drd:ConflictingAccess - ... - fun:getaddrinfo -} - -{ - OSX1013:drd:si_etaddrinfo - drd:ConflictingAccess - ... - fun:si_addrinfo -} { OSX1013:helgrind:nw_path_copy_interface_with_generation_internal @@ -941,62 +881,6 @@ fun:nw_path_copy_interface_with_generation_internal } -{ - OSX1013:cache_fill - drd:ConflictingAccess - fun:_ZN7cache_t10reallocateEjj - fun:cache_fill -} -{ - OSX1013:os_unfair_lock - drd:ConflictingAccess - ... - fun:*os_unfair_lock* -} -{ - OSX1013:objc_msgSend - drd:ConflictingAccess - fun:objc_msgSend -} -{ - OSX1013:cache_fill - drd:ConflictingAccess - fun:cache_fill -} -{ - OSX1013:_nc_table - drd:ConflictingAccess - fun:_nc_table_* -} - -{ - OSX1013:drd:xpc_dictionary_apply - drd:ConflictingAccess - ... - fun:xpc_dictionary_apply -} - -{ - OSX1013:drd:getaddrinfo - drd:ConflictingAccess - ... - fun:getaddrinfo -} - -{ - OSX1013:drd:xpc_create_from_plist - drd:ConflictingAccess - ... - fun:xpc_create_from_plist -} - -{ - OSX1013:helgrind:nw_path_copy_interface_with_generation_internal - drd:ConflictingAccess - ... - fun:nw_path_copy_interface_with_generation_internal -} - { OSX1013:helgrind:rwlock_tt::read() @@ -1022,76 +906,3 @@ fun:_os_unfair_lock_lock_slow } -{ - OSX1013:helgrind:sem_trywait - Helgrind:Race - fun:sem_trywait -} - -{ - OSX1013:drd:object_dispose - drd:ConflictingAccess - ... - fun:object_dispose -} - -{ - OSX1013:drd:dispatch_once_f - drd:ConflictingAccess - ... - fun:dispatch_once_f -} - -{ - OSX1013:drd:objc_destructInstance - drd:ConflictingAccess - ... - fun:objc_destructInstance -} - -{ - OSX1013:drd:xpc_pipe_routine - drd:ConflictingAccess - ... - fun:xpc_pipe_routine -} - -{ - OSX1013:drd:__si_module_static_cache_block_invoke - drd:MutexErr - fun:pthread_mutex_init - fun:__si_module_static_cache_block_invoke -} - -{ - OSX1013:drd:setlocale - drd:ConflictingAccess - ... - fun:setlocale -} - -{ - OSX1013:drd:std::__1::__thread_specific_ptr::set_pointer(std::__1::__thread_struct*) - - drd:ConflictingAccess - fun:_ZNSt3__121__thread_specific_ptrINS_15__thread_structEE11set_pointerEPS1_ -} - -{ - OSX1013:drd:std::__1::__thread_local_data - drd:ConflictingAccess - fun:_ZNSt3__119__thread_local_dataEv -} - -{ - OSX1013:drd:get_counter - drd:ConflictingAccess - fun:_ZL11get_counterv -} - -{ - OSX1013:drd:gomp_barier_wait - drd:ConflictingAccess - fun:gomp_barrier_wait - fun:child -} From 4ad2f953c4132140eac15221ac0a7ca2f89b348c Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Mon, 8 Dec 2025 13:20:25 +0100 Subject: [PATCH 144/502] Wrap new lsm_get_self_attr and lsm_set_self_attr syscalls Create a system call lsm_get_self_attr() to provide the security module maintained attributes of the current process. Create a system call lsm_set_self_attr() to set a security module maintained attribute of the current process. Historically these attributes have been exposed to user space via entries in procfs under /proc/self/attr. Declare lsm_get_self_attr and lsm_set_self_attr wrappers in priv_syswrap-linux.h and hook it for {amd64,arm,arm64,mips64,\ ppc32,ppc64,riscv64,s390x,x86}-linux. https://bugs.kde.org/show_bug.cgi?id=510563 --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 2 + 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 | 39 ++++++++++++++++++++ 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, 78 insertions(+) diff --git a/NEWS b/NEWS index 0702dbc94..6583e5807 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 487055 memcheck/tests/x86-linux/scalar fails running in Docker 509562 s390x: Define minimum required machine model 510416 Missing syswraps for file_getattr and file_setattr +510563 Add missing syswraps for lsm_get_self_attr and lsm_set_self_attr 510864 Add SSE4.1 PMAXSD and PMINSD instructions support for 32-bit x86 511329 Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index 2c878c8c5..b02701d27 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -372,6 +372,8 @@ DECL_TEMPLATE(linux, sys_statmount); // Since Linux 6.10 DECL_TEMPLATE(linux, sys_mseal); +DECL_TEMPLATE(linux, sys_lsm_get_self_attr); +DECL_TEMPLATE(linux, sys_lsm_set_self_attr); // Since Linux 6.17-rc1 DECL_TEMPLATE(linux, sys_file_getattr); diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index a6e76690a..0a05d7cb5 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -909,6 +909,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index b7860710c..e923bee9c 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -1079,6 +1079,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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 890bb7b8f..9b6e05dbc 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -860,6 +860,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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 3bfbef761..7186cf0c4 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -4637,6 +4637,45 @@ PRE(sys_file_setattr) PRE_MEM_READ("file_setattr(ufattr)", ARG3, ARG4); } +PRE(sys_lsm_get_self_attr) +{ + // * sys_lsm_get_self_attr - Return current task's security module attributes + // * @attr: which attribute to return + // * @ctx: the user-space destination for the information, or NULL + // * @size: pointer to the size of space available to receive the data + // * @flags: special handling options. LSM_FLAG_SINGLE indicates that only + // * attributes associated with the LSM identified in the passed @ctx be + // * reported. + // SYSCALL_DEFINE4(lsm_get_self_attr, unsigned int, attr, struct lsm_ctx __user *, + // ctx, u32 __user *, size, u32, flags) + PRINT("sys_lsm_get_self_attr ( %#" FMT_REGWORD "x, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %#" FMT_REGWORD "x)", ARG1, ARG2, ARG3, ARG4); + PRE_REG_READ4(long, "lsm_get_self_attr", unsigned int, attr, struct vki_lsm_ctx *, ctx, __vki_u32 *, size, __vki_u32, flags); + if (ML_(safe_to_deref)((__vki_u32 *)ARG3,sizeof(__vki_u32))) { + PRE_MEM_READ("lsm_get_self_attr(size)", ARG3, sizeof(__vki_u32)); + PRE_MEM_READ("lsm_get_self_attr(ctx)", ARG2, *(__vki_u32 *)ARG3); + } +} + +POST(sys_lsm_get_self_attr) +{ + POST_MEM_WRITE((Addr)ARG3, sizeof(__vki_u32)); + POST_MEM_WRITE(ARG2, *(__vki_u32 *)ARG3); +} + +PRE(sys_lsm_set_self_attr) +{ + // * sys_lsm_set_self_attr - Set current task's security module attribute + // * @attr: which attribute to set + // * @ctx: the LSM contexts + // * @size: size of @ctx + // * @flags: reserved for future use + // SYSCALL_DEFINE4(lsm_set_self_attr, unsigned int, attr, struct lsm_ctx __user *, + // ctx, u32, size, u32, flags) + PRINT("sys_lsm_get_self_attr ( %#" FMT_REGWORD "x, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %#" FMT_REGWORD "x)", ARG1, ARG2, ARG3, ARG4); + PRE_REG_READ4(long, "lsm_set_self_attr", unsigned int, attr, struct vki_lsm_ctx *, ctx, __vki_u32 *, size, __vki_u32, flags); + PRE_MEM_READ("lsm_get_self_attr(ctx)", ARG2, ARG3); +} + PRE(sys_syncfs) { *flags |= SfMayBlock; diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index 5541f4c72..43c9b861d 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -1188,6 +1188,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index 57a522d87..d78e59842 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -797,6 +797,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_userfaultfd, sys_userfaultfd), LINXY (__NR_statmount, sys_statmount), LINXY (__NR_listmount, sys_listmount), + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), LINX_ (__NR_mseal, sys_mseal), LINX_ (__NR_futex_waitv, sys_futex_waitv), LINXY (__NR_quotactl_fd, sys_quotactl_fd), diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c index ac4d6aa7e..e5c642572 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -823,6 +823,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), LINXY (__NR_statmount, sys_statmount), LINXY (__NR_listmount, sys_listmount), + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), LINX_ (__NR_mseal, sys_mseal), LINX_ (__NR_futex_waitv, sys_futex_waitv), LINXY (__NR_file_getattr, sys_file_getattr), diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index d3b84a57d..82b67afe3 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -1087,6 +1087,8 @@ static SyscallTableEntry syscall_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index 56b16bb8f..445ee30f3 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1065,6 +1065,8 @@ static SyscallTableEntry syscall_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index 3774c797e..92e279485 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -608,6 +608,8 @@ static SyscallTableEntry syscall_main_table[] = { LINX_(__NR_fchmodat2, sys_fchmodat2), /* 452 */ LINXY(__NR_statmount, sys_statmount), /* 457 */ LINXY(__NR_listmount, sys_listmount), /* 458 */ + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), /* 459 */ + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), /* 460 */ 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-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index 8d45a55b1..0b5d436b0 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -900,6 +900,8 @@ static SyscallTableEntry syscall_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index b6224321f..1165304da 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1690,6 +1690,8 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_fchmodat2, sys_fchmodat2), // 452 LINXY(__NR_statmount, sys_statmount), // 457 LINXY(__NR_listmount, sys_listmount), // 458 + LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 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/include/vki/vki-linux.h b/include/vki/vki-linux.h index e0636378c..bb6b8d72d 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -5661,6 +5661,18 @@ struct vki_dqinfo { __vki_u32 dqi_valid; }; +//---------------------------------------------------------------------- +// From uapi/linux/lsm.h +//---------------------------------------------------------------------- + +struct vki_lsm_ctx { + __vki_u64 id; + __vki_u64 flags; + __vki_u64 len; + __vki_u64 ctx_len; + __vki_u8 ctx[]; /* __counted_by(ctx_len); */ +}; + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff --git a/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h index 704e6378c..231372af4 100644 --- a/include/vki/vki-scnums-shared-linux.h +++ b/include/vki/vki-scnums-shared-linux.h @@ -60,6 +60,8 @@ #define __NR_fchmodat2 452 #define __NR_statmount 457 #define __NR_listmount 458 +#define __NR_lsm_get_self_attr 459 +#define __NR_lsm_set_self_attr 460 #define __NR_mseal 462 #define __NR_file_getattr 468 #define __NR_file_setattr 469 From a6d05e329bcad1348ceaaad1e2582a679b6a595f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 8 Dec 2025 20:26:21 +0100 Subject: [PATCH 145/502] Darwin suppressions: split out a new Helgrind suppression file Rename darwin10-drd.supp to darwin-drd.supp, this will be the basis for all Darwin suppressions. --- Makefile.am | 3 +- configure.ac | 48 +++------- darwin10-drd.supp => darwin-drd.supp | 0 darwin-helgrind.supp | 125 +++++++++++++++++++++++++++ darwin17.supp | 123 -------------------------- 5 files changed, 139 insertions(+), 160 deletions(-) rename darwin10-drd.supp => darwin-drd.supp (100%) create mode 100644 darwin-helgrind.supp diff --git a/Makefile.am b/Makefile.am index 6c5b9f5b6..2bf7c195e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,9 +49,10 @@ SUPP_FILES = \ glibc-2.X-drd.supp \ darwin9.supp darwin9-drd.supp \ freebsd.supp freebsd-helgrind.supp freebsd-drd.supp \ - darwin10.supp darwin10-drd.supp \ + darwin10.supp \ darwin11.supp darwin12.supp darwin13.supp darwin14.supp darwin15.supp \ darwin16.supp darwin17.supp \ + darwin-drd.supp darwin-helgrind.supp \ bionic.supp \ solaris11.supp solaris12.supp \ musl.supp diff --git a/configure.ac b/configure.ac index 82f8e8c3a..4bf92df42 100644 --- a/configure.ac +++ b/configure.ac @@ -505,81 +505,57 @@ case "${host_os}" in kernel=`uname -r` fi - # Nb: for Darwin we set DEFAULT_SUPP here. That's because Darwin - # has only one relevant version, the OS version. The `uname` check - # is a good way to get that version (i.e. "Darwin 9.6.0" is Mac OS - # X 10.5.6, and "Darwin 10.x" is Mac OS X 10.6.x Snow Leopard, - # and possibly "Darwin 11.x" is Mac OS X 10.7.x Lion), - # and we don't know of an macros similar to __GLIBC__ to get that info. - # - # XXX: `uname -r` won't do the right thing for cross-compiles, but - # that's not a problem yet. - # - # jseward 21 Sept 2011: I seriously doubt whether V 3.7.0 will work - # on OS X 10.5.x; I haven't tested yet, and only plan to test 3.7.0 - # on 10.6.8 and 10.7.1. Although tempted to delete the configure - # time support for 10.5 (the 9.* pattern just below), I'll leave it - # in for now, just in case anybody wants to give it a try. But I'm - # assuming that 3.7.0 is a Snow Leopard and Lion-only release. - DARWIN_DRD_SUPP="darwin10-drd.supp" + DARWIN_DRD_SUPP="darwin-drd.supp" case "${kernel}" in 9.*) AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) DARWIN_VERS=$DARWIN_10_5 - DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" + DARWIN_DRD_SUPP="darwin9-drd.supp" ;; 10.*) AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) DARWIN_VERS=$DARWIN_10_6 - DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" ;; 11.*) AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) DARWIN_VERS=$DARWIN_10_7 - DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" ;; 12.*) AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) DARWIN_VERS=$DARWIN_10_8 - DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" ;; 13.*) AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks]) DARWIN_VERS=$DARWIN_10_9 - DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}" ;; 14.*) AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite]) DARWIN_VERS=$DARWIN_10_10 - DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}" ;; 15.*) AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan]) DARWIN_VERS=$DARWIN_10_11 - DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" ;; 16.*) AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) DARWIN_VERS=$DARWIN_10_12 - DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" ;; 17.*) AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra]) DARWIN_VERS=$DARWIN_10_13 DEFAULT_SUPP="$srcdir/darwin17.supp ${DEFAULT_SUPP}" - DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" ;; *) AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) - AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.6-10.11, macOS 10.12-15.0, iOS 4-18 and macOS/iOS 26)]) + AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.6-10.11, macOS 10.12-10.13)]) ;; esac @@ -589,7 +565,7 @@ case "${host_os}" in AC_DEFINE_UNQUOTED([DARWIN_VERS], $DARWIN_VERS, [Darwin / Mac OS X / macOS / iOS version]) AC_SUBST(DARWIN_VERS) - DEFAULT_SUPP="$srcdir/${DARWIN_DRD_SUPP} ${DEFAULT_SUPP}" + DEFAULT_SUPP="$srcdir/${DARWIN_DRD_SUPP} ${DEFAULT_SUPP} $srcdir/darwin-helgrind.supp" AC_MSG_CHECKING([for the the minimum macOS SDK version]) case "${darwin_platform}" in diff --git a/darwin10-drd.supp b/darwin-drd.supp similarity index 100% rename from darwin10-drd.supp rename to darwin-drd.supp diff --git a/darwin-helgrind.supp b/darwin-helgrind.supp new file mode 100644 index 000000000..853731eb2 --- /dev/null +++ b/darwin-helgrind.supp @@ -0,0 +1,125 @@ + +# Helgrind Suppressions for Darwin 17.x / macOS 10.13 High Sierra + +{ + OSX1013:helgrind:pthread library + Helgrind:Race + obj:/usr/lib/system/libsystem_pthread.dylib +} + +# various getaddrinfo suppressions +{ + OSC1013:helgrind:getaddrinfo + Helgrind:Race + ... + fun:getaddrinfo +} + +{ + OSX1013:helgrind:_fwalk + Helgrind:Race + fun:_fwalk +} + +{ + OSX1013:helgrind:exit + Helgrind:Race + fun:exit +} + +{ + OSX1013:helgrind:freeaddrinfo + Helgrind:Race + fun:freeaddrinfo +} + +# some of these have deep callstacks, this might not work +# with low values of --num-callers +{ + OSC1013:helgrind:si_addrinfo + Helgrind:Race + ... + fun:si_addrinfo +} + +{ + OSC1013:helgrind:file_addrinfo + Helgrind:Race + ... + fun:file_addrinfo +} + +{ + OSX1013:helgrind:xpc_dictionary_apply + Helgrind:Race + ... + fun:xpc_dictionary_apply +} + +{ + OSX1013:helgrind:cache_fill + Helgrind:Race + fun:cache_fill +} + +{ + OSX1013:helgrind:objc_destructInstance + Helgrind:Race + ... + fun:objc_destructInstance +} + +{ + OSX1013:helgrind:xpc_create_from_plist + Helgrind:Race + ... + fun:xpc_create_from_plist +} + +{ + OSX1013:helgrind:dispatch_once_f + Helgrind:Race + ... + fun:dispatch_once_f +} + +{ + OSX1013:helgrind:nanosleep + Helgrind:Race + ... + fun:nanosleep +} + + +{ + OSX1013:helgrind:nw_path_copy_interface_with_generation_internal + Helgrind:Race + ... + fun:nw_path_copy_interface_with_generation_internal +} + + +{ + OSX1013:helgrind:rwlock_tt::read() + Helgrind:Race + fun:_ZN9rwlock_ttILb0EE4readEv +} + +{ + OSX1013:helgrind:rwlock_tt::write() + Helgrind:Race + fun:_ZN9rwlock_ttILb0EE5writeEv +} + +{ + OSX1013:helgrind:gomp_barrier_wait + Helgrind:Race + fun:gomp_barrier_wait +} + +{ + OSX1013:helgrind:_os_unfair_lock_lock_slow + Helgrind:Race + fun:_os_unfair_lock_lock_slow +} + diff --git a/darwin17.supp b/darwin17.supp index 4216421a2..af2c3ee69 100644 --- a/darwin17.supp +++ b/darwin17.supp @@ -783,126 +783,3 @@ Memcheck:Cond fun:ccaes_vng_ctr_crypt } - -{ - OSX1013:helgrind:pthread library - Helgrind:Race - obj:/usr/lib/system/libsystem_pthread.dylib -} - -# various getaddrinfo suppressions -{ - OSC1013:helgrind:getaddrinfo - Helgrind:Race - ... - fun:getaddrinfo -} - -{ - OSX1013:helgrind:_fwalk - Helgrind:Race - fun:_fwalk -} - -{ - OSX1013:helgrind:exit - Helgrind:Race - fun:exit -} - -{ - OSX1013:helgrind:freeaddrinfo - Helgrind:Race - fun:freeaddrinfo -} - -# some of these have deep callstacks, this might not work -# with low values of --num-callers -{ - OSC1013:helgrind:si_addrinfo - Helgrind:Race - ... - fun:si_addrinfo -} - -{ - OSC1013:helgrind:file_addrinfo - Helgrind:Race - ... - fun:file_addrinfo -} - -{ - OSX1013:helgrind:xpc_dictionary_apply - Helgrind:Race - ... - fun:xpc_dictionary_apply -} - -{ - OSX1013:helgrind:cache_fill - Helgrind:Race - fun:cache_fill -} - -{ - OSX1013:helgrind:objc_destructInstance - Helgrind:Race - ... - fun:objc_destructInstance -} - -{ - OSX1013:helgrind:xpc_create_from_plist - Helgrind:Race - ... - fun:xpc_create_from_plist -} - -{ - OSX1013:helgrind:dispatch_once_f - Helgrind:Race - ... - fun:dispatch_once_f -} - -{ - OSX1013:helgrind:nanosleep - Helgrind:Race - ... - fun:nanosleep -} - - -{ - OSX1013:helgrind:nw_path_copy_interface_with_generation_internal - Helgrind:Race - ... - fun:nw_path_copy_interface_with_generation_internal -} - - -{ - OSX1013:helgrind:rwlock_tt::read() - Helgrind:Race - fun:_ZN9rwlock_ttILb0EE4readEv -} - -{ - OSX1013:helgrind:rwlock_tt::write() - Helgrind:Race - fun:_ZN9rwlock_ttILb0EE5writeEv -} - -{ - OSX1013:helgrind:gomp_barrier_wait - Helgrind:Race - fun:gomp_barrier_wait -} - -{ - OSX1013:helgrind:_os_unfair_lock_lock_slow - Helgrind:Race - fun:_os_unfair_lock_lock_slow -} - From 7610a45ac2ca470540c3b92611b078f91fd3abbe Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 8 Dec 2025 20:35:17 +0100 Subject: [PATCH 146/502] Darwin suppressions: add suppressions for shared_timed_mutex testcase The test still fails with 12 errors (should be 0). There are a load of errors that I've never seen before, Like Thread #2: Bug in libpthread: write lock granted on mutex/rwlock which is currently wr-held by a different thread and Thread #1 unlocked lock at 0x100005228 currently held by thread #3 There are some serious problems there. --- darwin-helgrind.supp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/darwin-helgrind.supp b/darwin-helgrind.supp index 853731eb2..7588c1d06 100644 --- a/darwin-helgrind.supp +++ b/darwin-helgrind.supp @@ -123,3 +123,21 @@ fun:_os_unfair_lock_lock_slow } +{ + OSX1013:helgrind:mach_timebase_info + Helgrind:Race + fun:mach_timebase_info +} + +{ + OSX1013:helgrind:std::__1::__thread_specific_ptr::set_pointer(std::__1::__thread_struct*) + Helgrind:Race + fun:_ZNSt3__121__thread_specific_ptrINS_15__thread_structEE11set_pointerEPS1_ +} + +{ + OSX1013:helgrind:std::__1::__thread_local_data() + Helgrind:Race + fun:_ZNSt3__119__thread_local_dataEv +} + From 9d46e3648f315b96ccc383f677448623c9236191 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 9 Dec 2025 07:33:49 +0100 Subject: [PATCH 147/502] Darwin suppressions: merge old suppression files to darwin-legacy.supp Merge files for Darwin 10 to 16 into a legacy file. Rename the Darwin 17 file as just darwin.supp. I'll add suppressions to that file, at least for 10.14 and 10.15. When I get to Darwin 20 and the dyld shared cache we'll see, that might need a new set of suppression files. Remove freebsd-helgrind-dbgrtld.supp. I thought that it would be useful but it wasn't. When I merged the Darwin suppression files I wrote a little duplication detection tool (only for exact duplicates). This found one duplicate in solaris12.supp that I've removed. --- Makefile.am | 4 +- configure.ac | 39 +- darwin16.supp => darwin-legacy.supp | 809 ++++++++++++++++++++++------ darwin17.supp => darwin.supp | 0 darwin10.supp | 67 --- darwin11.supp | 245 --------- darwin12.supp | 448 --------------- darwin13.supp | 278 ---------- darwin14.supp | 674 ----------------------- darwin15.supp | 730 ------------------------- freebsd-helgrind-dbgrtld.supp | 90 ---- solaris12.supp | 6 - 12 files changed, 657 insertions(+), 2733 deletions(-) rename darwin16.supp => darwin-legacy.supp (50%) rename darwin17.supp => darwin.supp (100%) delete mode 100644 darwin10.supp delete mode 100644 darwin11.supp delete mode 100644 darwin12.supp delete mode 100644 darwin13.supp delete mode 100644 darwin14.supp delete mode 100644 darwin15.supp delete mode 100644 freebsd-helgrind-dbgrtld.supp diff --git a/Makefile.am b/Makefile.am index 2bf7c195e..4a62915bb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,9 +49,7 @@ SUPP_FILES = \ glibc-2.X-drd.supp \ darwin9.supp darwin9-drd.supp \ freebsd.supp freebsd-helgrind.supp freebsd-drd.supp \ - darwin10.supp \ - darwin11.supp darwin12.supp darwin13.supp darwin14.supp darwin15.supp \ - darwin16.supp darwin17.supp \ + darwin-legacy.supp darwin.supp \ darwin-drd.supp darwin-helgrind.supp \ bionic.supp \ solaris11.supp solaris12.supp \ diff --git a/configure.ac b/configure.ac index 4bf92df42..8b7799ee3 100644 --- a/configure.ac +++ b/configure.ac @@ -496,73 +496,74 @@ case "${host_os}" in esac AC_MSG_RESULT([ok (${darwin_platform})]) - AC_MSG_CHECKING([for the kernel version]) + AC_MSG_CHECKING([for the kernel version]) kernel=$darwin_version if test "x$kernel" = "x"; then if test "${host_cpu}" != "${build_cpu}"; then AC_MSG_WARN([You are cross-compiling without specifying the target\'s darwin-version, valgrind might not work.]) fi - kernel=`uname -r` + kernel=`uname -r` fi DARWIN_DRD_SUPP="darwin-drd.supp" + + case "${kernel}" in + 9.*) + DARWIN_DRD_SUPP="darwin9-drd.supp" + DEFAULT_SUPP="$srcdir/darwin-legacy.supp ${DEFAULT_SUPP}" + ;; + 1[0-6].*) + DEFAULT_SUPP="$srcdir/darwin-legacy.supp ${DEFAULT_SUPP}" + ;; + *) + DEFAULT_SUPP="$srcdir/darwin.supp ${DEFAULT_SUPP}" + ;; + esac + + case "${kernel}" in 9.*) AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) DARWIN_VERS=$DARWIN_10_5 - DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" - DARWIN_DRD_SUPP="darwin9-drd.supp" ;; 10.*) AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) DARWIN_VERS=$DARWIN_10_6 - DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" ;; 11.*) AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) DARWIN_VERS=$DARWIN_10_7 - DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" ;; 12.*) AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) DARWIN_VERS=$DARWIN_10_8 - DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" ;; 13.*) AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks]) DARWIN_VERS=$DARWIN_10_9 - DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}" ;; 14.*) AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite]) DARWIN_VERS=$DARWIN_10_10 - DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}" ;; 15.*) AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan]) DARWIN_VERS=$DARWIN_10_11 - DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" ;; 16.*) AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) DARWIN_VERS=$DARWIN_10_12 - DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" ;; 17.*) AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra]) DARWIN_VERS=$DARWIN_10_13 - DEFAULT_SUPP="$srcdir/darwin17.supp ${DEFAULT_SUPP}" ;; - *) - AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) - AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.6-10.11, macOS 10.12-10.13)]) + *) + AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) + AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.6-10.11, macOS 10.12-10.13)]) ;; esac - if test -f "$srcdir/darwin${DARWIN_KERNEL_VERS}.supp"; then - DEFAULT_SUPP="$srcdir/darwin${DARWIN_KERNEL_VERS}.supp ${DEFAULT_SUPP}" - fi - AC_DEFINE_UNQUOTED([DARWIN_VERS], $DARWIN_VERS, [Darwin / Mac OS X / macOS / iOS version]) AC_SUBST(DARWIN_VERS) DEFAULT_SUPP="$srcdir/${DARWIN_DRD_SUPP} ${DEFAULT_SUPP} $srcdir/darwin-helgrind.supp" diff --git a/darwin16.supp b/darwin-legacy.supp similarity index 50% rename from darwin16.supp rename to darwin-legacy.supp index ae31a97a9..84487bf63 100644 --- a/darwin16.supp +++ b/darwin-legacy.supp @@ -1,49 +1,515 @@ -# Suppressions for Darwin 16.x / macOS 10.12 Sierra +# Suppressions for legacy versions of Darwin +# Darwin 16.x / macOS 10.12 Sierra and earlier -############################################ -## Leaks. For other stuff see below. +# Suppressions for Darwin 11.x / Mac OS X 10.7 Lion + +# Dunno where this is a real bug, or due to borked 10.7-specific syscall +# wrappers. 64-bit mode; not sure if occurs in 32-bit mode. +# Anyway, for the tine being: +# +# Conditional jump or move depends on uninitialised value(s) +# at 0x1973E6: __mtx_droplock (in /usr/lib/system/libsystem_c.dylib) +# by 0x1976AA: pthread_mutex_unlock (in /usr/lib/system/libsystem_c.dylib) +# by 0x100B3D: unlock_node (in /usr/lib/system/libkeymgr.dylib) { - OSX1012:1-Leak + OSX107:__mtx_droplock + Memcheck:Cond + fun:__mtx_droplock + fun:pthread_mutex_unlock + fun:unlock_node +} + +# Conditional jump or move depends on uninitialised value(s) +# at 0x2EB883: ??? (in /usr/lib/system/libxpc.dylib) +# by 0x237C6: ??? (in /usr/lib/libSystem.B.dylib) +# by 0x8FE1115A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld) +{ + + Memcheck:Cond + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/libSystem.B.dylib + fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE +} + +# ZLib stuff. How come this wasn't necessary in 10.6 ? +{ + OSX107:zlib-C + Memcheck:Cond + obj:/usr/lib/libz.*dylib + obj:/usr/lib/libz.*dylib +} + +{ + OSX107:zlib-8 + Memcheck:Value8 + obj:/usr/lib/libz.*dylib + obj:/usr/lib/libz.*dylib +} + +# Really a bug? I don't know. +# Conditional jump or move depends on uninitialised value(s) +# at 0x3A322FE: __mtx_droplock (in /usr/lib/system/libsystem_c.dylib) +# by 0x3A326AA: pthread_mutex_unlock (in /usr/lib/system/libsystem_c.dylib) +# by 0x26382: load_images (in /usr/lib/libobjc.A.dylib) +{ + OSX107:blah + Memcheck:Cond + fun:__mtx_droplock + fun:pthread_mutex_unlock +} + +{ + OSX107:blah + Memcheck:Cond + fun:pthread_mutex_lock +} + +{ + OSX107:10-Leak Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc + match-leak-kinds: reachable + fun:?alloc ... - fun:_read_images + fun:libSystem_initializer } +################ +# More OSX 10.7.2 supps from startup of Firefox, for reports +# that look like they are in the OSX system libraries + +# Conditional jump or move depends on uninitialised value(s) +# at 0x65ADC41: TParsingContext::BuildMacEncTable() +# by 0x65AD98B: TParsingContext::GetEncHash(char const*) +# Uninitialised value was created by a heap allocation +# at 0xC743: malloc (vg_replace_malloc.c:266) +# by 0x65ADADA: TParsingContext::BuildMacEncTable() { - OSX1012:2-Leak + OSX107:more1 + Memcheck:Cond + fun:*TParsingContext16BuildMacEncTable* + fun:*TParsingContext10GetEncHash* +} + +# Conditional jump or move depends on uninitialised value(s) +# at 0x49ABC48: CGColorSpaceAdjustColor +# by 0x4A9AEE8: CGGradientCreateWithColorComponents +# Uninitialised value was created by a heap allocation +# at 0xC743: malloc (vg_replace_malloc.c:266) +# by 0x4A9AEC4: CGGradientCreateWithColorComponents +# by 0x4A9AC49: CGGradientCreateWithColors +{ + OSX107:more2 + Memcheck:Cond + fun:CGColorSpaceAdjustColor + fun:CGGradientCreateWithColorComponents +} + + +# Conditional jump or move depends on uninitialised value(s) +# at 0x2119CCA8: BitSetNextSetBit +# by 0x211A4BA5: BuildInterferenceSets +# Uninitialised value was created by a heap allocation +# at 0xC743: malloc (vg_replace_malloc.c:266) +# by 0x2119CB98: BitSetNew +# by 0x2119D06F: BuildGenKill +{ + OSX107:more3 + Memcheck:Cond + fun:BitSetNextSetBit + fun:BuildInterferenceSets +} + +# and similar +{ + OSX107:more4 + Memcheck:Cond + fun:BitSetNextSetBit + fun:RegistersReInterfere +} + + +# Conditional jump or move depends on uninitialised value(s) +# at 0x33E4160: CUIRenderer::CreateImage +# by 0x33C14A4: CUIRenderer::DrawMenuBar +# Uninitialised value was created by a stack allocation +# at 0x33C12FC: CUIRenderer::DrawMenuBar +{ + OSX107:more5 + Memcheck:Cond + fun:*CUIRenderer*CreateImage* + fun:*CUIRenderer*DrawMenu* +} + +# and similar +{ + OSX107:more6 + Memcheck:Cond + fun:floor$fenv_access_off + fun:*CUIRenderer*CreateImage* + fun:*CUIRenderer*DrawMenu* +} + +# This appears a lot, and the origins seem either missing or +# from system libs. +# Use of uninitialised value of size 8 +# at 0x39CC164: aes_encrypt_xmm_no_save +{ + OSX107:more7 + Memcheck:Value8 + fun:aes_encrypt_xmm_no_save +} + + +# Conditional jump or move depends on uninitialised value(s) +# at 0xD6D193: -[NSPersistentUIManager writeWindowSnapshot:length:... +# by 0xD71A03: __-[NSPersistentUIManager _updateSnapshotForWindowN... +{ + OSX107:more8 + Memcheck:Cond + fun:-[NSPersistentUIManager?writeWindowSnapshot* + fun:__-[NSPersistentUIManager?_updateSnapshotForWindowNumber* +} + + +# Suppressions for Darwin 12.x / Mac OS X 10.8 Mountain Lion + +############################ +## Possibly all to do with borked/incomplete 10.8 syscall wrappers +## Consider all of these as a temporary kludge. It would be much +## better to fix the wrappers correctly (iow, actually implement them). + +{ + OSX108:CoreFoundation-1 + Memcheck:Value8 + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*CoreFoundation.framework/Versions/A/CoreFoundation +} + +{ + OSX108:CoreFoundation-2 + Memcheck:Cond + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*CoreFoundation.framework/Versions/A/CoreFoundation +} + +{ + OSX108:CoreGraphics-1 + Memcheck:Cond + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics +} + +{ + OSX108:dyld-1 + Memcheck:Value8 + obj:/usr/lib/dyld + obj:/usr/lib/dyld + obj:/usr/lib/dyld +} + +{ + OSX108:dyld-2 + Memcheck:Cond + obj:/usr/lib/dyld + obj:/usr/lib/dyld + obj:/usr/lib/dyld +} + +{ + OSX108:libxpc-1 + Memcheck:Cond + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib +} + +{ + OSX108:libxpc-2 + Memcheck:Value8 + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib +} + +{ + OSX108:libxpc-3 + Memcheck:Cond + fun:malloc + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib + obj:/usr/lib/system/libxpc.dylib +} + +{ + OSX108:libdispatch-1 + Memcheck:Value8 + obj:/usr/lib/system/libdispatch.dylib + obj:/usr/lib/system/libdispatch.dylib + obj:/usr/lib/system/libdispatch.dylib + obj:/usr/lib/system/libdispatch.dylib +} + +{ + OSX108:ColorSync-1 + Memcheck:Cond + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync +} + +{ + OSX108:ColorSync-2 + Memcheck:Value8 + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync + obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync +} + +{ + OSX108:mach_msg/mach_msg_trap + Memcheck:Param + mach_msg("rcv_name") + fun:mach_msg_trap +} + +{ + OSX108:my_io_execute_passive_block/libdispatch + Memcheck:Cond + fun:my_io_execute_passive_block + obj:/usr/lib/system/libdispatch.dylib + obj:/usr/lib/system/libdispatch.dylib +} + +{ + OSX108:CFRunLoopAddSource/AppKit + Memcheck:Cond + fun:CFRunLoopAddSource + obj:*Frameworks/AppKit.framework/Versions/C/AppKit + obj:*Frameworks/AppKit.framework/Versions/C/AppKit +} + +{ + OSX108:CoreFoundation/HIToolbox/HIToolbox + Memcheck:Cond + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*HIToolbox.framework/Versions/A/HIToolbox + obj:*HIToolbox.framework/Versions/A/HIToolbox +} + +{ + OSX108:libsystem_kernel/CoreGraphics-1 + Memcheck:Cond + obj:/usr/lib/system/libsystem_kernel.dylib + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics +} + +{ + OSX108:libsystem_kernel/CoreGraphics-2 + Memcheck:Param + msg->desc.port.name + obj:/usr/lib/system/libsystem_kernel.dylib + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics +} + +{ + OSX108:libsystem_kernel/CoreFoundation/CoreFoundation/LaunchServices + Memcheck:Cond + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*LaunchServices.framework/Versions/A/LaunchServices +} + +{ + OSX108:CoreFoundation/AE/AE + Memcheck:Cond + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*AE.framework/Versions/A/AE + obj:*AE.framework/Versions/A/AE +} + +{ + OSX108:CoreGraphics/CoreGraphics/CoreGraphics + Memcheck:Param + msg->desc.port.name + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics + obj:*CoreGraphics.framework/Versions/A/CoreGraphics +} + +{ + OSX108:CoreFoundation/Foundation/AppKit + Memcheck:Cond + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*Foundation.framework/Versions/C/Foundation + obj:*Frameworks/AppKit.framework/Versions/C/AppKit +} + +{ + OSX108:CoreFoundation/CoreFoundation/HIToolbox + Memcheck:Cond + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*CoreFoundation.framework/Versions/A/CoreFoundation + obj:*HIToolbox.framework/Versions/A/HIToolbox +} + +{ + OSX108:HIServices/HIToolbox/HIToolbox + Memcheck:Cond + obj:*HIServices.framework/Versions/A/HIServices + obj:*HIToolbox.framework/Versions/A/HIToolbox + obj:*HIToolbox.framework/Versions/A/HIToolbox +} + +{ + OSX108:AppKit-1 + Memcheck:Cond + obj:*AppKit.framework/Versions/C/AppKit + obj:*AppKit.framework/Versions/C/AppKit + obj:*AppKit.framework/Versions/C/AppKit +} + +{ + OSX108:32bit:_libxpc_initializer + Memcheck:Cond + fun:_libxpc_initializer + fun:libSystem_initializer + fun:*ImageLoaderMachO*doModInitFunctions* +} + +# See https://bugs.kde.org/show_bug.cgi?id=196528 +{ + macos-__pthread_rwlock_init-see-our-bug-196528 + Memcheck:Cond + fun:pthread_rwlock_init +} + +{ + OSX108:leak-1 Memcheck:Leak match-leak-kinds: definite - fun:malloc_zone_?alloc - ... - fun:_read_images + fun:malloc_zone_malloc + fun:_ZN4objc8DenseMapIP11objc_objectmL* + fun:arr_init } { - OSX1012:3-Leak + OSX108:leak-2 Memcheck:Leak - match-leak-kinds: definite - fun:malloc_zone_?alloc + fun:malloc_zone_malloc + fun:*NX*Map* + fun:*NX*Map* +} + +{ + OSX108:leak-3 + Memcheck:Leak + fun:malloc_zone_malloc + fun:*NX*Map* + fun:*image* +} + +{ + OSX108:leak-4 + Memcheck:Leak + fun:malloc_zone_malloc + fun:*NX*Map* + fun:*remap* +} + +{ + OSX108:leak-5 + Memcheck:Leak + fun:malloc_zone_malloc + fun:*NX*Map* + fun:*future* +} + +{ + OSX108:leak-6 + Memcheck:Leak + fun:malloc_zone_malloc + fun:*strdup* + fun:*NX*Map* +} + +{ + OSX108:leak-7 + Memcheck:Leak + fun:malloc_zone_malloc + fun:*NX*Map* + fun:*attached* +} + +{ + OSX108:leak-8 + Memcheck:Leak + fun:malloc_zone_malloc + fun:*NX*Map* + fun:dlopen +} + +{ + OSX108:leak-9 + Memcheck:Leak + fun:malloc + fun:*PerThread* + fun:dlopen +} + +{ + OSX108:leak-10 + Memcheck:Leak + fun:malloc_zone_calloc + fun:*NX*Hash* +} + +{ + OSX108:leak-11 + Memcheck:Leak + fun:malloc_zone_calloc + fun:*map* + fun:*map* +} + +{ + OSX108:leak-12 + Memcheck:Leak + fun:malloc_zone_calloc + fun:*fetch_pthread_data* +} + +{ + OSX108:leak-13 + Memcheck:Leak + fun:malloc_zone_malloc fun:recursive_mutex_init - ... - fun:_os_object_init - fun:libdispatch_init - fun:libSystem_initializer + fun:_objc_init } { - OSX1012:4-Leak + OSX108:leak-14 Memcheck:Leak + match-leak-kinds: reachable fun:malloc_zone_?alloc ... fun:dyld_register_image_state_change_handler } { - OSX1012:5-Leak + OSX108:leak-15 Memcheck:Leak match-leak-kinds: reachable fun:?alloc @@ -52,36 +518,45 @@ } { - OSX1012:6-Leak + OSX108:leak-16 Memcheck:Leak match-leak-kinds: reachable fun:malloc_zone_?alloc ... fun:map_images_nolock - fun:map_2_images + fun:map_images } { - OSX1012:7-Leak + OSX108:leak-17 Memcheck:Leak match-leak-kinds: possible fun:malloc_zone_?alloc ... fun:map_images_nolock - fun:map_2_images + fun:map_images } { - OSX1012:8-Leak + OSX108:leak-18 Memcheck:Leak - match-leak-kinds: definite + match-leak-kinds: indirect + fun:malloc_zone_?alloc + ... + fun:libSystem_initializer +} + +{ + OSX108:leak-19 + Memcheck:Leak + match-leak-kinds: indirect fun:?alloc ... fun:libSystem_initializer } { - OSX1012:9-Leak + OSX108:leak-20 Memcheck:Leak match-leak-kinds: reachable fun:malloc_zone_?alloc @@ -90,30 +565,142 @@ } { - OSX1012:10-Leak + OSX108:leak-22 Memcheck:Leak match-leak-kinds: reachable fun:?alloc ... + fun:_libxpc_initializer +} + +{ + OSX108:leak-23 + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:realloc + fun:new_sem_from_pool +} + +# afaict this is legit. Might be caused by setenv("VAR=") +# where the value string is empty (not sure) +{ + macos-Cond-7 + Memcheck:Cond + fun:__setenv +} + +# See https://bugs.kde.org/show_bug.cgi?id=188572 about this; it's +# unavoidable due to BSD setenv() semantics. +{ + macos-__setenv-leak-see-our-bug-188572 + Memcheck:Leak + fun:malloc_zone_malloc + fun:__setenv +} + +# From Gary Kwong +{ + macos-malloc_set_zone_name-see-our-bug-307557 + Memcheck:Leak + fun:malloc_zone_malloc + ... + fun:malloc_set_zone_name + ... + fun:init__zone0 +} + +{ + OSX109:2-Leak + Memcheck:Leak + match-leak-kinds: definite + fun:?alloc + ... + fun:_ZN4dyld24initializeMainExecutableEv +} + +{ + OSX109:QuartzCore-1 + Memcheck:Cond + obj:*QuartzCore.framework*QuartzCore + obj:*QuartzCore.framework*QuartzCore + obj:*QuartzCore.framework*QuartzCore +} + +{ + OSX109:vImage-1 + Memcheck:Cond + obj:*vImage.framework*vImage* + obj:*vImage.framework*vImage* + obj:*CoreGraphics.framework*CoreGraphics* +} + +{ + OSX1012:1-Leak + Memcheck:Leak + match-leak-kinds: possible + fun:malloc_zone_?alloc + ... + fun:_read_images +} + +{ + OSX1012:2-Leak + Memcheck:Leak + match-leak-kinds: definite + fun:malloc_zone_?alloc + ... + fun:_read_images +} + +{ + OSX1012:3-Leak + Memcheck:Leak + match-leak-kinds: definite + fun:malloc_zone_?alloc + fun:recursive_mutex_init + ... + fun:_os_object_init + fun:libdispatch_init fun:libSystem_initializer } -#{ -# OSX1012:11-Leak -# Memcheck:Leak -# match-leak-kinds: definite -# fun:malloc -# fun:currentlocale -#} -# -#{ -# OSX1012:12-Leak -# Memcheck:Leak -# match-leak-kinds: possible -# fun:malloc -# fun:tzsetwall_basic -# fun:_st_tzset_basic -#} +{ + OSX1012:4-Leak + Memcheck:Leak + fun:malloc_zone_?alloc + ... + fun:dyld_register_image_state_change_handler +} + +{ + OSX1012:6-Leak + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc_zone_?alloc + ... + fun:map_images_nolock + fun:map_2_images +} + +{ + OSX1012:7-Leak + Memcheck:Leak + match-leak-kinds: possible + fun:malloc_zone_?alloc + ... + fun:map_images_nolock + fun:map_2_images +} + +{ + OSX1012:8-Leak + Memcheck:Leak + match-leak-kinds: definite + fun:?alloc + ... + fun:libSystem_initializer +} { OSX1012:13-Leak @@ -180,15 +767,6 @@ fun:*NX*Map* } -{ - OSX1012:20-Leak - Memcheck:Leak - match-leak-kinds: indirect - fun:?alloc - ... - fun:libSystem_initializer -} - { OSX1012:21-Leak Memcheck:Leak @@ -198,18 +776,6 @@ fun:_ZN4dyld24initializeMainExecutableEv } - -############################################ -## Non-leak errors - -##{ -## OSX1012:CoreFoundation-1 -## Memcheck:Cond -## obj:*CoreFoundation.framework*CoreFoundation* -## obj:*CoreFoundation.framework*CoreFoundation* -## obj:*CoreFoundation.framework*CoreFoundation* -##} - { OSX1012:CoreFoundation-2 Memcheck:Cond @@ -321,22 +887,6 @@ obj:*libdispatch.dylib* } -#{ -# OSX1012:AppKit-3 -# Memcheck:Cond -# obj:*AppKit.framework*AppKit* -# obj:*libdispatch.dylib* -# obj:*libdispatch.dylib* -#} - -##{ -## OSX1012:AppKit-4 -## Memcheck:Cond -## obj:*AppKit.framework*AppKit* -## obj:*AppKit.framework*AppKit* -## obj:*CoreFoundation.framework*CoreFoundation* -##} - { OSX1012:AppKit-5 Memcheck:Cond @@ -377,14 +927,6 @@ obj:*ColorSync.framework*ColorSync* } -#{ -# OSX1012:ColorSync-2 -# Memcheck:Value8 -# obj:*ColorSync.framework*ColorSync* -# obj:*ColorSync.framework*ColorSync* -# obj:*ColorSync.framework*ColorSync* -#} - { OSX1012:CoreGraphics-1 Memcheck:Cond @@ -392,14 +934,6 @@ obj:*CoreGraphics.framework*CoreGraphics* } -#{ -# OSX1012:CoreGraphics-2 -# Memcheck:Value8 -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -#} - { OSX1012:CoreGraphics-3 Memcheck:Cond @@ -408,14 +942,6 @@ obj:*CoreGraphics.framework*libRIP* } -#{ -# OSX1012:CoreGraphics-4 -# Memcheck:Cond -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*libRIP* -#} - { OSX1012:CoreGraphics-5 Memcheck:Cond @@ -424,14 +950,6 @@ obj:*libdispatch.dylib* } -#{ -# OSX1012:CoreGraphics-6 -# Memcheck:Cond -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*HIToolbox.framework*HIToolbox* -#} - { OSX1012:HIServices-1 Memcheck:Cond @@ -456,36 +974,6 @@ obj:*libdispatch.dylib* } -{ - OSX1012:QuartzCore-1 - Memcheck:Cond - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore -} - -#{ -# OSX1012:vImage-1 -# Memcheck:Cond -# obj:*vImage.framework*vImage* -# obj:*vImage.framework*vImage* -# obj:*CoreGraphics.framework*CoreGraphics* -#} - -{ - OSX1012:zlib-C - Memcheck:Cond - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -{ - OSX1012:zlib-8 - Memcheck:Value8 - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - { OSX1012:32bit:_libxpc_initializer Memcheck:Cond @@ -574,14 +1062,6 @@ obj:*CoreServices.framework*LaunchServices* } -##{ -## OSX1012:libsystem_pthread-1 -## Memcheck:Cond -## obj:*libsystem_pthread*dylib* -## obj:*ImageIO.framework*ImageIO* -## obj:*ImageIO.framework*ImageIO* -##} - { OSX1012:ApplicationServices-1 Memcheck:Cond @@ -606,22 +1086,6 @@ obj:*libdispatch.dylib* } -##{ -## OSX1012:CoreImage-1 -## Memcheck:Cond -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -##} - -##{ -## OSX1012:strncpy-1 -## Memcheck:Cond -## fun:strncpy -## obj:*CoreServicesInternal.framework*CoreServicesInternal -## obj:*CoreServicesInternal.framework*CoreServicesInternal -##} - { OSX1012:pthread_rwlock_init Memcheck:Cond @@ -644,6 +1108,7 @@ obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* } + { OSX1012:AppleIntelHD4000GraphicsGLDriver-1-Addr8 Memcheck:Addr4 @@ -659,6 +1124,7 @@ obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* } + { OSX1012:AppleIntelHD4000GraphicsGLDriver-2-Addr2 Memcheck:Addr2 @@ -674,6 +1140,7 @@ obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* obj:*GLEngine.bundle*GLEngine* } + { OSX1012:AppleIntelHD4000GraphicsGLDriver-3-Addr2 Memcheck:Addr2 @@ -681,6 +1148,7 @@ obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* obj:*GLEngine.bundle*GLEngine* } + { OSX1012:AppleIntelHD4000GraphicsGLDriver-3-Addr1 Memcheck:Addr1 @@ -704,6 +1172,7 @@ obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* obj:*GLEngine.bundle*GLEngine* } + { OSX1012:AppleIntelHD4000GraphicsGLDriver-6-Addr4 Memcheck:Addr4 @@ -745,9 +1214,3 @@ fun:setenv } -# See https://bugs.kde.org/show_bug.cgi?id=196528 -{ -macos-__pthread_rwlock_init-see-our-bug-196528 -Memcheck:Cond -fun:pthread_rwlock_init -} diff --git a/darwin17.supp b/darwin.supp similarity index 100% rename from darwin17.supp rename to darwin.supp diff --git a/darwin10.supp b/darwin10.supp deleted file mode 100644 index 505305d8c..000000000 --- a/darwin10.supp +++ /dev/null @@ -1,67 +0,0 @@ - -# Suppressions for Darwin 10.x / Mac OS X 10.6 Snow Leopard - -##----------------------------------------------------------------------## -# Memcheck -##----------------------------------------------------------------------## - -# afaict this is legit. Might be caused by setenv("VAR=") -# where the value string is empty (not sure) -{ - macos-Cond-7 - Memcheck:Cond - fun:__setenv -} - -# From Jesse Ruderman. -{ - Mac OS X 10.6.4. rdar://8145289. "new[]" paired with "delete" in the DesktopServicesPriv framework. - Memcheck:Free - fun:_ZdlPv - fun:_ZN5TChar18RemovePtrReferenceEv - } - -# From Jesse Ruderman. -{ - Mac OS X 10.6.4. rdar://8145318. Uninitialized memory from HIMenuBarView::MeasureAppMenus is used in HIMenuBarView::SetAdjustTextTitleBoundsAtIndex. - Memcheck:Cond - fun:_ZN13HIMenuBarView31SetAdjustTextTitleBoundsAtIndexEih - fun:_ZN13HIMenuBarView15MeasureAppMenusEv -} - -{ - TFontFeatures::TFontFeatures(CGFont*) (in CoreText.framework) - Memcheck:Cond - fun:_ZN13TFontFeaturesC2EP6CGFont - fun:_ZNK9TBaseFont12CopyFeaturesEv -} - -# See https://bugs.kde.org/show_bug.cgi?id=188572 about this; it's -# unavoidable due to BSD setenv() semantics. -{ - macos-__setenv-leak-see-our-bug-188572 - Memcheck:Leak - fun:malloc_zone_malloc - fun:__setenv -} - -{ - libSystem-keymgr-leak-at-exit - Memcheck:Leak - fun:malloc - fun:get_or_create_key_element - fun:_keymgr_get_and_lock_processwide_ptr_2 - fun:__keymgr_initializer - fun:libSystem_initializer -} - -{ - darwin-still-reachable-1 - Memcheck:Leak - ... - fun:dwarf2_unwind_dyld_add_image_hook - fun:_ZN4dyld19registerAddCallbackEPFvPK11mach_headerlE - fun:_dyld_register_func_for_add_image - fun:__keymgr_initializer - fun:libSystem_initializer -} diff --git a/darwin11.supp b/darwin11.supp deleted file mode 100644 index 7f8739976..000000000 --- a/darwin11.supp +++ /dev/null @@ -1,245 +0,0 @@ - -# Suppressions for Darwin 11.x / Mac OS X 10.7 Lion - -##----------------------------------------------------------------------## -# Memcheck -##----------------------------------------------------------------------## - -# Dunno where this is a real bug, or due to borked 10.7-specific syscall -# wrappers. 64-bit mode; not sure if occurs in 32-bit mode. -# Anyway, for the tine being: -# -# Conditional jump or move depends on uninitialised value(s) -# at 0x1973E6: __mtx_droplock (in /usr/lib/system/libsystem_c.dylib) -# by 0x1976AA: pthread_mutex_unlock (in /usr/lib/system/libsystem_c.dylib) -# by 0x100B3D: unlock_node (in /usr/lib/system/libkeymgr.dylib) -{ - OSX107:__mtx_droplock - Memcheck:Cond - fun:__mtx_droplock - fun:pthread_mutex_unlock - fun:unlock_node -} - -# Conditional jump or move depends on uninitialised value(s) -# at 0x2EB883: ??? (in /usr/lib/system/libxpc.dylib) -# by 0x237C6: ??? (in /usr/lib/libSystem.B.dylib) -# by 0x8FE1115A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld) -{ - - Memcheck:Cond - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/libSystem.B.dylib - fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE -} - -# ZLib stuff. How come this wasn't necessary in 10.6 ? -{ - OSX107:zlib-C - Memcheck:Cond - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} -{ - OSX107:zlib-8 - Memcheck:Value8 - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -# Really a bug? I don't know. -# Conditional jump or move depends on uninitialised value(s) -# at 0x3A322FE: __mtx_droplock (in /usr/lib/system/libsystem_c.dylib) -# by 0x3A326AA: pthread_mutex_unlock (in /usr/lib/system/libsystem_c.dylib) -# by 0x26382: load_images (in /usr/lib/libobjc.A.dylib) -{ - OSX107:blah - Memcheck:Cond - fun:__mtx_droplock - fun:pthread_mutex_unlock -} - -{ - OSX107:blah - Memcheck:Cond - fun:pthread_mutex_lock -} - -{ - OSX107:10-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:libSystem_initializer -} - -################ -# More OSX 10.7.2 supps from startup of Firefox, for reports -# that look like they are in the OSX system libraries - -# Conditional jump or move depends on uninitialised value(s) -# at 0x65ADC41: TParsingContext::BuildMacEncTable() -# by 0x65AD98B: TParsingContext::GetEncHash(char const*) -# Uninitialised value was created by a heap allocation -# at 0xC743: malloc (vg_replace_malloc.c:266) -# by 0x65ADADA: TParsingContext::BuildMacEncTable() -{ - OSX107:more1 - Memcheck:Cond - fun:*TParsingContext16BuildMacEncTable* - fun:*TParsingContext10GetEncHash* -} - -# Conditional jump or move depends on uninitialised value(s) -# at 0x49ABC48: CGColorSpaceAdjustColor -# by 0x4A9AEE8: CGGradientCreateWithColorComponents -# Uninitialised value was created by a heap allocation -# at 0xC743: malloc (vg_replace_malloc.c:266) -# by 0x4A9AEC4: CGGradientCreateWithColorComponents -# by 0x4A9AC49: CGGradientCreateWithColors -{ - OSX107:more2 - Memcheck:Cond - fun:CGColorSpaceAdjustColor - fun:CGGradientCreateWithColorComponents -} - - -# Conditional jump or move depends on uninitialised value(s) -# at 0x2119CCA8: BitSetNextSetBit -# by 0x211A4BA5: BuildInterferenceSets -# Uninitialised value was created by a heap allocation -# at 0xC743: malloc (vg_replace_malloc.c:266) -# by 0x2119CB98: BitSetNew -# by 0x2119D06F: BuildGenKill -{ - OSX107:more3 - Memcheck:Cond - fun:BitSetNextSetBit - fun:BuildInterferenceSets -} - -# and similar -{ - OSX107:more4 - Memcheck:Cond - fun:BitSetNextSetBit - fun:RegistersReInterfere -} - - -# Conditional jump or move depends on uninitialised value(s) -# at 0x33E4160: CUIRenderer::CreateImage -# by 0x33C14A4: CUIRenderer::DrawMenuBar -# Uninitialised value was created by a stack allocation -# at 0x33C12FC: CUIRenderer::DrawMenuBar -{ - OSX107:more5 - Memcheck:Cond - fun:*CUIRenderer*CreateImage* - fun:*CUIRenderer*DrawMenu* -} - -# and similar -{ - OSX107:more6 - Memcheck:Cond - fun:floor$fenv_access_off - fun:*CUIRenderer*CreateImage* - fun:*CUIRenderer*DrawMenu* -} - -# This appears a lot, and the origins seem either missing or -# from system libs. -# Use of uninitialised value of size 8 -# at 0x39CC164: aes_encrypt_xmm_no_save -{ - OSX107:more7 - Memcheck:Value8 - fun:aes_encrypt_xmm_no_save -} - - -# Conditional jump or move depends on uninitialised value(s) -# at 0xD6D193: -[NSPersistentUIManager writeWindowSnapshot:length:... -# by 0xD71A03: __-[NSPersistentUIManager _updateSnapshotForWindowN... -{ - OSX107:more8 - Memcheck:Cond - fun:-[NSPersistentUIManager?writeWindowSnapshot* - fun:__-[NSPersistentUIManager?_updateSnapshotForWindowNumber* -} - - -########################################################################## -### The ones below are from darwin10.supp (for Snow Leopard). I don't -### know whether they are still necessary. - -# afaict this is legit. Might be caused by setenv("VAR=") -# where the value string is empty (not sure) -{ - macos-Cond-7 - Memcheck:Cond - fun:__setenv -} - -# From Jesse Ruderman. -#{ -# Mac OS X 10.6.4. rdar://8145289. "new[]" paired with "delete" in the DesktopServicesPriv framework. -# Memcheck:Free -# fun:_ZdlPv -# fun:_ZN5TChar18RemovePtrReferenceEv -# } - -# From Jesse Ruderman. -#{ -# Mac OS X 10.6.4. rdar://8145318. Uninitialized memory from HIMenuBarView::MeasureAppMenus is used in HIMenuBarView::SetAdjustTextTitleBoundsAtIndex. -# Memcheck:Cond -# fun:_ZN13HIMenuBarView31SetAdjustTextTitleBoundsAtIndexEih -# fun:_ZN13HIMenuBarView15MeasureAppMenusEv -#} - -#{ -# TFontFeatures::TFontFeatures(CGFont*) (in CoreText.framework) -# Memcheck:Cond -# fun:_ZN13TFontFeaturesC2EP6CGFont -# fun:_ZNK9TBaseFont12CopyFeaturesEv -#} - -# See https://bugs.kde.org/show_bug.cgi?id=188572 about this; it's -# unavoidable due to BSD setenv() semantics. -{ - macos-__setenv-leak-see-our-bug-188572 - Memcheck:Leak - fun:malloc_zone_malloc - fun:__setenv -} - -# See https://bugs.kde.org/show_bug.cgi?id=196528 -{ - macos-__pthread_rwlock_init-see-our-bug-196528 - Memcheck:Cond - fun:pthread_rwlock_init -} - -#{ -# libSystem-keymgr-leak-at-exit -# Memcheck:Leak -# fun:malloc -# fun:get_or_create_key_element -# fun:_keymgr_get_and_lock_processwide_ptr_2 -# fun:__keymgr_initializer -# fun:libSystem_initializer -#} - -# From Gary Kwong -{ - macos-malloc_set_zone_name-see-our-bug-307557 - Memcheck:Leak - fun:malloc_zone_malloc - ... - fun:malloc_set_zone_name - ... - fun:init__zone0 -} diff --git a/darwin12.supp b/darwin12.supp deleted file mode 100644 index c3f47c15b..000000000 --- a/darwin12.supp +++ /dev/null @@ -1,448 +0,0 @@ - -# Suppressions for Darwin 12.x / Mac OS X 10.8 Mountain Lion - -# ZLib stuff. How come this wasn't necessary in 10.6 ? -{ - OSX108:zlib-C - Memcheck:Cond - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} -{ - OSX108:zlib-8 - Memcheck:Value8 - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -############################ -## Possibly all to do with borked/incomplete 10.8 syscall wrappers -## Consider all of these as a temporary kludge. It would be much -## better to fix the wrappers correctly (iow, actually implement them). - -{ - OSX108:CoreFoundation-1 - Memcheck:Value8 - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*CoreFoundation.framework/Versions/A/CoreFoundation -} - -{ - OSX108:CoreFoundation-2 - Memcheck:Cond - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*CoreFoundation.framework/Versions/A/CoreFoundation -} - -{ - OSX108:CoreGraphics-1 - Memcheck:Cond - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics -} - -# Use of uninitialised value of size 8 -# at 0x39CC164: aes_encrypt_xmm_no_save -{ - OSX108:aes_encrypt_xmm_no_save - Memcheck:Value8 - fun:aes_encrypt_xmm_no_save -} - -{ - OSX108:dyld-1 - Memcheck:Value8 - obj:/usr/lib/dyld - obj:/usr/lib/dyld - obj:/usr/lib/dyld -} - -{ - OSX108:dyld-2 - Memcheck:Cond - obj:/usr/lib/dyld - obj:/usr/lib/dyld - obj:/usr/lib/dyld -} - -{ - OSX108:libxpc-1 - Memcheck:Cond - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib -} - -{ - OSX108:libxpc-2 - Memcheck:Value8 - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib -} - -{ - OSX108:libxpc-3 - Memcheck:Cond - fun:malloc - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib - obj:/usr/lib/system/libxpc.dylib -} - -{ - OSX108:libdispatch-1 - Memcheck:Value8 - obj:/usr/lib/system/libdispatch.dylib - obj:/usr/lib/system/libdispatch.dylib - obj:/usr/lib/system/libdispatch.dylib - obj:/usr/lib/system/libdispatch.dylib -} - -{ - OSX108:ColorSync-1 - Memcheck:Cond - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync -} - -{ - OSX108:ColorSync-2 - Memcheck:Value8 - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync - obj:*Frameworks/ColorSync.framework/Versions/A/ColorSync -} - -{ - OSX108:mach_msg/mach_msg_trap - Memcheck:Param - mach_msg("rcv_name") - fun:mach_msg_trap -} - -{ - OSX108:my_io_execute_passive_block/libdispatch - Memcheck:Cond - fun:my_io_execute_passive_block - obj:/usr/lib/system/libdispatch.dylib - obj:/usr/lib/system/libdispatch.dylib -} - -{ - OSX108:CFRunLoopAddSource/AppKit - Memcheck:Cond - fun:CFRunLoopAddSource - obj:*Frameworks/AppKit.framework/Versions/C/AppKit - obj:*Frameworks/AppKit.framework/Versions/C/AppKit -} - -{ - OSX108:CoreFoundation/HIToolbox/HIToolbox - Memcheck:Cond - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*HIToolbox.framework/Versions/A/HIToolbox - obj:*HIToolbox.framework/Versions/A/HIToolbox -} - -{ - OSX108:libsystem_kernel/CoreGraphics-1 - Memcheck:Cond - obj:/usr/lib/system/libsystem_kernel.dylib - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics -} - -{ - OSX108:libsystem_kernel/CoreGraphics-2 - Memcheck:Param - msg->desc.port.name - obj:/usr/lib/system/libsystem_kernel.dylib - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics -} - -{ - OSX108:libsystem_kernel/CoreFoundation/CoreFoundation/LaunchServices - Memcheck:Cond - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*LaunchServices.framework/Versions/A/LaunchServices -} - -{ - OSX108:CoreFoundation/AE/AE - Memcheck:Cond - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*AE.framework/Versions/A/AE - obj:*AE.framework/Versions/A/AE -} - -{ - OSX108:CoreGraphics/CoreGraphics/CoreGraphics - Memcheck:Param - msg->desc.port.name - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics - obj:*CoreGraphics.framework/Versions/A/CoreGraphics -} - -{ - OSX108:CoreFoundation/Foundation/AppKit - Memcheck:Cond - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*Foundation.framework/Versions/C/Foundation - obj:*Frameworks/AppKit.framework/Versions/C/AppKit -} - -{ - OSX108:CoreFoundation/CoreFoundation/HIToolbox - Memcheck:Cond - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*CoreFoundation.framework/Versions/A/CoreFoundation - obj:*HIToolbox.framework/Versions/A/HIToolbox -} - -{ - OSX108:HIServices/HIToolbox/HIToolbox - Memcheck:Cond - obj:*HIServices.framework/Versions/A/HIServices - obj:*HIToolbox.framework/Versions/A/HIToolbox - obj:*HIToolbox.framework/Versions/A/HIToolbox -} - -{ - OSX108:AppKit-1 - Memcheck:Cond - obj:*AppKit.framework/Versions/C/AppKit - obj:*AppKit.framework/Versions/C/AppKit - obj:*AppKit.framework/Versions/C/AppKit -} - -{ - OSX108:32bit:_libxpc_initializer - Memcheck:Cond - fun:_libxpc_initializer - fun:libSystem_initializer - fun:*ImageLoaderMachO*doModInitFunctions* -} - -# See https://bugs.kde.org/show_bug.cgi?id=196528 -{ - macos-__pthread_rwlock_init-see-our-bug-196528 - Memcheck:Cond - fun:pthread_rwlock_init -} - -######################################################### -## Leaks (apparently) in even hello-world style programs - -{ - OSX108:leak-1 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc_zone_malloc - fun:_ZN4objc8DenseMapIP11objc_objectmL* - fun:arr_init -} - -{ - OSX108:leak-2 - Memcheck:Leak - fun:malloc_zone_malloc - fun:*NX*Map* - fun:*NX*Map* -} - -{ - OSX108:leak-3 - Memcheck:Leak - fun:malloc_zone_malloc - fun:*NX*Map* - fun:*image* -} - -{ - OSX108:leak-4 - Memcheck:Leak - fun:malloc_zone_malloc - fun:*NX*Map* - fun:*remap* -} - -{ - OSX108:leak-5 - Memcheck:Leak - fun:malloc_zone_malloc - fun:*NX*Map* - fun:*future* -} - -{ - OSX108:leak-6 - Memcheck:Leak - fun:malloc_zone_malloc - fun:*strdup* - fun:*NX*Map* -} - -{ - OSX108:leak-7 - Memcheck:Leak - fun:malloc_zone_malloc - fun:*NX*Map* - fun:*attached* -} - -{ - OSX108:leak-8 - Memcheck:Leak - fun:malloc_zone_malloc - fun:*NX*Map* - fun:dlopen -} - -{ - OSX108:leak-9 - Memcheck:Leak - fun:malloc - fun:*PerThread* - fun:dlopen -} - -{ - OSX108:leak-10 - Memcheck:Leak - fun:malloc_zone_calloc - fun:*NX*Hash* -} - -{ - OSX108:leak-11 - Memcheck:Leak - fun:malloc_zone_calloc - fun:*map* - fun:*map* -} - -{ - OSX108:leak-12 - Memcheck:Leak - fun:malloc_zone_calloc - fun:*fetch_pthread_data* -} - -{ - OSX108:leak-13 - Memcheck:Leak - fun:malloc_zone_malloc - fun:recursive_mutex_init - fun:_objc_init -} - -{ - OSX108:leak-14 - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:dyld_register_image_state_change_handler -} - -{ - OSX108:leak-15 - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:dyld_register_image_state_change_handler -} - -{ - OSX108:leak-16 - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_images -} - -{ - OSX108:leak-17 - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_images -} - -{ - OSX108:leak-18 - Memcheck:Leak - match-leak-kinds: indirect - fun:malloc_zone_?alloc - ... - fun:libSystem_initializer -} - -{ - OSX108:leak-19 - Memcheck:Leak - match-leak-kinds: indirect - fun:?alloc - ... - fun:libSystem_initializer -} - -{ - OSX108:leak-20 - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:libSystem_initializer -} - -{ - OSX108:leak-21 - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:libSystem_initializer -} - -{ - OSX108:leak-22 - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:_libxpc_initializer -} - -{ - OSX108:leak-23 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:realloc - fun:new_sem_from_pool -} - -##----------------------------------------------------------------------## -# Memcheck -##----------------------------------------------------------------------## - diff --git a/darwin13.supp b/darwin13.supp deleted file mode 100644 index 41478738f..000000000 --- a/darwin13.supp +++ /dev/null @@ -1,278 +0,0 @@ - -# Suppressions for Darwin 13.x / Mac OS X 10.9 Mavericks - -############################################ -## Leaks. For other stuff see below. - -{ - OSX109:1-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:_read_images -} - -{ - OSX109:2-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:?alloc - ... - fun:_ZN4dyld24initializeMainExecutableEv -} - -{ - OSX109:3-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:malloc_zone_?alloc - fun:recursive_mutex_init - fun:_objc_init - fun:_os_object_init - fun:libSystem_initializer -} - -{ - OSX109:4-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:dyld_register_image_state_change_handler -} - -{ - OSX109:5-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:dyld_register_image_state_change_handler -} - -{ - OSX109:6-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_images -} - -{ - OSX109:7-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_images -} - -{ - OSX109:8-Leak - Memcheck:Leak - match-leak-kinds: indirect - fun:?alloc - ... - fun:libSystem_initializer -} - -{ - OSX109:9-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:libSystem_initializer -} - -{ - OSX109:10-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:libSystem_initializer -} - -{ - OSX109:11-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:currentlocale -} - -{ - OSX109:12-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc - fun:tzsetwall_basic - fun:_st_tzset_basic -} - -# See https://bugs.kde.org/show_bug.cgi?id=188572 about this; it's -# unavoidable due to BSD setenv() semantics. -{ - macos-__setenv-leak-see-our-bug-188572 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:_owned_ptr_alloc - fun:setenv -} - -# See https://bugs.kde.org/show_bug.cgi?id=196528 -{ - macos-__pthread_rwlock_init-see-our-bug-196528 - Memcheck:Cond - fun:pthread_rwlock_init -} - -############################################ -## Non-leak errors - -{ - OSX109:AppKit-1 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* -} - -{ - OSX109:AppKit-2 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*libdispatch.dylib* -} - -{ - OSX109:AppKit-3 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX109:ColorSync-1 - Memcheck:Cond - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* -} - -{ - OSX109:ColorSync-2 - Memcheck:Value8 - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* -} - -{ - OSX109:CoreGraphics-1 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*CoreGraphics* -} - -{ - OSX109:CoreGraphics-2 - Memcheck:Value8 - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*CoreGraphics* -} - -{ - OSX109:CoreGraphics-3 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*libRIP* - obj:*CoreGraphics.framework*libRIP* -} - -{ - OSX109:CoreGraphics-4 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*libRIP* -} - -{ - OSX109:CoreGraphics-5 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX109:dyld-2 - Memcheck:Cond - obj:/usr/lib/dyld - obj:/usr/lib/dyld - obj:/usr/lib/dyld -} - -{ - OSX109:HIServices-1 - Memcheck:Cond - obj:*HIServices.framework*HIServices* - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX109:LaunchServices-1 - Memcheck:Cond - obj:*LaunchServices.framework*LaunchServices* - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* -} - -{ - OSX109:QuartzCore-1 - Memcheck:Cond - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore -} - -{ - OSX109:vImage-1 - Memcheck:Cond - obj:*vImage.framework*vImage* - obj:*vImage.framework*vImage* - obj:*CoreGraphics.framework*CoreGraphics* -} - -{ - OSX109:zlib-C - Memcheck:Cond - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} -{ - OSX109:zlib-8 - Memcheck:Value8 - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -{ - OSX109:32bit:_libxpc_initializer - Memcheck:Cond - fun:_libxpc_initializer - fun:libSystem_initializer - fun:*ImageLoaderMachO*doModInitFunctions* -} diff --git a/darwin14.supp b/darwin14.supp deleted file mode 100644 index 8ba4e9d71..000000000 --- a/darwin14.supp +++ /dev/null @@ -1,674 +0,0 @@ - -# Suppressions for Darwin 14.x / Mac OS X 10.10 Yosemite - -############################################ -## Leaks. For other stuff see below. - -{ - OSX1010:1-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:_read_images -} - -#{ -# OSX1010:2-Leak -# Memcheck:Leak -# match-leak-kinds: definite -# fun:?alloc -# ... -# fun:_ZN4dyld24initializeMainExecutableEv -#} - -{ - OSX1010:3-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:malloc_zone_?alloc - fun:recursive_mutex_init - ... - fun:_os_object_init - fun:libdispatch_init - fun:libSystem_initializer -} - -#{ -# OSX1010:4-Leak -# Memcheck:Leak -# match-leak-kinds: reachable -# fun:malloc_zone_?alloc -# ... -# fun:dyld_register_image_state_change_handler -# ... -#} - -{ - OSX1010:5-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:dyld_register_image_state_change_handler -} - -{ - OSX1010:6-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_images -} - -{ - OSX1010:7-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_images -} - -{ - OSX1010:8-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:?alloc - ... - fun:libSystem_initializer -} - -{ - OSX1010:9-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:libSystem_initializer -} - -{ - OSX1010:10-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:libSystem_initializer -} - -#{ -# OSX1010:11-Leak -# Memcheck:Leak -# match-leak-kinds: definite -# fun:malloc -# fun:currentlocale -#} -# -#{ -# OSX1010:12-Leak -# Memcheck:Leak -# match-leak-kinds: possible -# fun:malloc -# fun:tzsetwall_basic -# fun:_st_tzset_basic -#} - -{ - OSX1010:13-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_memalign - ... - fun:_ZN4dyld24initializeMainExecutableEv -} - -{ - OSX1010:14-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:libSystem_atfork_child -} - -{ - OSX1010:15-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc - fun:__smakebuf - ... - fun:printf -} - -############################################ -## Non-leak errors - -##{ -## OSX1010:CoreFoundation-1 -## Memcheck:Cond -## obj:*CoreFoundation.framework*CoreFoundation* -## obj:*CoreFoundation.framework*CoreFoundation* -## obj:*CoreFoundation.framework*CoreFoundation* -##} - -{ - OSX1010:CoreFoundation-2 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX1010:CoreFoundation-3 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*Foundation.framework*Foundation* -} - -{ - OSX1010:CoreFoundation-4 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*SystemConfiguration.framework*SystemConfiguration* -} - -{ - OSX1010:CoreFoundation-5 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*HIServices.framework*HIServices* -} - -{ - OSX1010:CoreFoundation-6 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*SystemConfiguration.framework*SystemConfiguration* - obj:*SystemConfiguration.framework*SystemConfiguration* -} - -{ - OSX1010:CoreFoundation-7 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*SystemConfiguration.framework*SystemConfiguration* - obj:*CoreFoundation.framework*CoreFoundation* -} - -{ - OSX1010:CoreFoundation-8 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*IOKit.framework*IOKit* -} - -{ - OSX1010:CoreFoundation-9 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*Foundation.framework*Foundation* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1010:CoreFoundation-10 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1010:CoreFoundation-11 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*AE.framework*AE* - obj:*AE.framework*AE* -} - -{ - OSX1010:CoreFoundation-12 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1010:CoreFoundation-13 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*AE.framework*AE* -} - -{ - OSX1010:AppKit-1 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1010:AppKit-2 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*libdispatch.dylib* -} - -#{ -# OSX1010:AppKit-3 -# Memcheck:Cond -# obj:*AppKit.framework*AppKit* -# obj:*libdispatch.dylib* -# obj:*libdispatch.dylib* -#} - -##{ -## OSX1010:AppKit-4 -## Memcheck:Cond -## obj:*AppKit.framework*AppKit* -## obj:*AppKit.framework*AppKit* -## obj:*CoreFoundation.framework*CoreFoundation* -##} - -{ - OSX1010:AppKit-5 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*Foundation.framework*Foundation* -} - -{ - OSX1010:AppKit-6 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*Foundation.framework*Foundation* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1010:AppKit-7 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX1010:AppKit-8 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*Foundation.framework*Foundation* - obj:*Foundation.framework*Foundation* -} - -{ - OSX1010:ColorSync-1 - Memcheck:Cond - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* -} - -#{ -# OSX1010:ColorSync-2 -# Memcheck:Value8 -# obj:*ColorSync.framework*ColorSync* -# obj:*ColorSync.framework*ColorSync* -# obj:*ColorSync.framework*ColorSync* -#} - -{ - OSX1010:CoreGraphics-1 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*CoreGraphics* -} - -#{ -# OSX1010:CoreGraphics-2 -# Memcheck:Value8 -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -#} - -{ - OSX1010:CoreGraphics-3 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*libRIP* - obj:*CoreGraphics.framework*libRIP* -} - -#{ -# OSX1010:CoreGraphics-4 -# Memcheck:Cond -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*libRIP* -#} - -{ - OSX1010:CoreGraphics-5 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -#{ -# OSX1010:CoreGraphics-6 -# Memcheck:Cond -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*HIToolbox.framework*HIToolbox* -#} - -{ - OSX1010:HIServices-1 - Memcheck:Cond - obj:*HIServices.framework*HIServices* - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1010:LaunchServices-1 - Memcheck:Cond - obj:*LaunchServices.framework*LaunchServices* - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1010:LaunchServices-2 - Memcheck:Cond - obj:*LaunchServices.framework*LaunchServices* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX1010:QuartzCore-1 - Memcheck:Cond - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore -} - -#{ -# OSX1010:vImage-1 -# Memcheck:Cond -# obj:*vImage.framework*vImage* -# obj:*vImage.framework*vImage* -# obj:*CoreGraphics.framework*CoreGraphics* -#} - -{ - OSX1010:zlib-C - Memcheck:Cond - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -{ - OSX1010:zlib-8 - Memcheck:Value8 - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -#{ -# OSX1010:32bit:_libxpc_initializer -# Memcheck:Cond -# fun:_libxpc_initializer -# fun:libSystem_initializer -# fun:*ImageLoaderMachO*doModInitFunctions* -#} - -{ - OSX1010:dyld-1 - Memcheck:Cond - fun:*ImageLoader*weakBind* - fun:*ImageLoader*link* - fun:*dyld*link* -} - -{ - OSX1010:dyld-2 - Memcheck:Cond - fun:exit - obj:*libdyld*dylib* -} - -{ - OSX1010:libsystem_kernel-1 - Memcheck:Cond - obj:*libsystem_kernel*dylib* - obj:*libsystem_kernel*dylib* - obj:*CoreFoundation.framework*CoreFoundation* -} - -{ - OSX1010:CoreServicesInternal-1 - Memcheck:Cond - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServices.framework*LaunchServices* - obj:*CoreServices.framework*LaunchServices* -} - -{ - OSX1010:CoreServicesInternal-2 - Memcheck:Cond - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServicesInternal.framework*CoreServicesInternal* -} - -{ - OSX1010:CoreServicesInternal-3 - Memcheck:Cond - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreFoundation.framework*CoreFoundation* -} - -{ - OSX1010:CoreServices-1 - Memcheck:Cond - obj:*CoreServices.framework*LaunchServices* - obj:*CoreServices.framework*LaunchServices* - obj:*CoreServices.framework*LaunchServices* -} - -##{ -## OSX1010:libsystem_pthread-1 -## Memcheck:Cond -## obj:*libsystem_pthread*dylib* -## obj:*ImageIO.framework*ImageIO* -## obj:*ImageIO.framework*ImageIO* -##} - -{ - OSX1010:ApplicationServices-1 - Memcheck:Cond - obj:*ApplicationServices.framework*ATS* - obj:*libsystem_pthread*dylib* - obj:*libsystem_platform*dylib* -} - -{ - OSX1010:HIToolbox-1 - Memcheck:Cond - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1010:RawCamera-1 - Memcheck:Cond - obj:*RawCamera.bundle*RawCamera* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -##{ -## OSX1010:CoreImage-1 -## Memcheck:Cond -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -##} - -##{ -## OSX1010:strncpy-1 -## Memcheck:Cond -## fun:strncpy -## obj:*CoreServicesInternal.framework*CoreServicesInternal -## obj:*CoreServicesInternal.framework*CoreServicesInternal -##} - -{ - OSX1010:pthread_rwlock_init - Memcheck:Cond - fun:pthread_rwlock_init - obj:*ImageIO.framework*ImageIO* - obj:*ImageIO.framework*ImageIO* -} - -{ - OSX1010:CFBasicHash - Memcheck:Value8 - fun:*CFBasicHash* - fun:*CF* -} - -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-1-Addr8 - Memcheck:Addr8 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-1-Addr8 - Memcheck:Addr4 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} - -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-2-Addr8 - Memcheck:Addr8 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-2-Addr2 - Memcheck:Addr2 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} - -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-3-Addr8 - Memcheck:Addr8 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-3-Addr2 - Memcheck:Addr2 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-3-Addr1 - Memcheck:Addr1 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} - -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-4 - Memcheck:Addr8 - fun:*platform_bzero* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} - -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-6-Addr8 - Memcheck:Addr8 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-6-Addr4 - Memcheck:Addr4 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} - -{ - OSX1010:AppleIntelHD4000GraphicsGLDriver-7 - Memcheck:Addr4 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} - -{ - OSX1010:OSAtomicAdd32 - Memcheck:Addr4 - fun:*OSAtomicAdd32* - obj:*IOAccelerator.framework*IOAccelerator* - obj:*GPUSupport.framework*GPUSupportMercury* -} - -{ - OSX1010:IOAccelerator-1 - Memcheck:Addr4 - obj:*IOAccelerator.framework*IOAccelerator* - obj:*GPUSupport.framework*GPUSupportMercury* -} - -# See https://bugs.kde.org/show_bug.cgi?id=188572 about this; it's -# unavoidable due to BSD setenv() semantics. -{ - macos-__setenv-leak-see-our-bug-188572 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:_owned_ptr_alloc - fun:setenv -} - -# See https://bugs.kde.org/show_bug.cgi?id=196528 -{ -macos-__pthread_rwlock_init-see-our-bug-196528 -Memcheck:Cond -fun:pthread_rwlock_init -} diff --git a/darwin15.supp b/darwin15.supp deleted file mode 100644 index 159e7f66c..000000000 --- a/darwin15.supp +++ /dev/null @@ -1,730 +0,0 @@ - -# Suppressions for Darwin 15.x / Mac OS X 10.11 El Capitan - -############################################ -## Leaks. For other stuff see below. - -{ - OSX1011:1-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:_read_images -} - -{ - OSX1011:2-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:malloc_zone_?alloc - ... - fun:_read_images -} - -{ - OSX1011:3-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:malloc_zone_?alloc - fun:recursive_mutex_init - ... - fun:_os_object_init - fun:libdispatch_init - fun:libSystem_initializer -} - -{ - OSX1011:4-Leak - Memcheck:Leak - fun:malloc_zone_?alloc - ... - fun:dyld_register_image_state_change_handler -} - -{ - OSX1011:5-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:dyld_register_image_state_change_handler -} - -{ - OSX1011:6-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_2_images -} - -{ - OSX1011:7-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_2_images -} - -{ - OSX1011:8-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:?alloc - ... - fun:libSystem_initializer -} - -{ - OSX1011:9-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:libSystem_initializer -} - -{ - OSX1011:10-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:libSystem_initializer -} - -#{ -# OSX1011:11-Leak -# Memcheck:Leak -# match-leak-kinds: definite -# fun:malloc -# fun:currentlocale -#} -# -#{ -# OSX1011:12-Leak -# Memcheck:Leak -# match-leak-kinds: possible -# fun:malloc -# fun:tzsetwall_basic -# fun:_st_tzset_basic -#} - -{ - OSX1011:13-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_memalign - ... - fun:_ZN4dyld24initializeMainExecutableEv -} - -{ - OSX1011:14-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:libSystem_atfork_child -} - -{ - OSX1011:15-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc - fun:__smakebuf - ... - fun:printf -} - -{ - OSX1011:16-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:?alloc - ... - fun:_read_images -} - -{ - OSX1011:17-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:?alloc - ... - fun:_read_images -} - -{ - OSX1011:18-Leak - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:_read_images -} - -{ - OSX1011:19-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc - ... - fun:*NX*Map* - fun:*NX*Map* -} - -{ - OSX1011:20-Leak - Memcheck:Leak - match-leak-kinds: indirect - fun:?alloc - ... - fun:libSystem_initializer -} - -{ - OSX1011:21-Leak - Memcheck:Leak - match-leak-kinds: definite - fun:malloc_zone_memalign - ... - fun:_ZN4dyld24initializeMainExecutableEv -} - - -############################################ -## Non-leak errors - -##{ -## OSX1011:CoreFoundation-1 -## Memcheck:Cond -## obj:*CoreFoundation.framework*CoreFoundation* -## obj:*CoreFoundation.framework*CoreFoundation* -## obj:*CoreFoundation.framework*CoreFoundation* -##} - -{ - OSX1011:CoreFoundation-2 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX1011:CoreFoundation-3 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*Foundation.framework*Foundation* -} - -{ - OSX1011:CoreFoundation-4 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*SystemConfiguration.framework*SystemConfiguration* -} - -{ - OSX1011:CoreFoundation-5 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*HIServices.framework*HIServices* -} - -{ - OSX1011:CoreFoundation-6 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*SystemConfiguration.framework*SystemConfiguration* - obj:*SystemConfiguration.framework*SystemConfiguration* -} - -{ - OSX1011:CoreFoundation-7 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*SystemConfiguration.framework*SystemConfiguration* - obj:*CoreFoundation.framework*CoreFoundation* -} - -{ - OSX1011:CoreFoundation-8 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*IOKit.framework*IOKit* -} - -{ - OSX1011:CoreFoundation-9 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*Foundation.framework*Foundation* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1011:CoreFoundation-10 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1011:CoreFoundation-11 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*AE.framework*AE* - obj:*AE.framework*AE* -} - -{ - OSX1011:CoreFoundation-12 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1011:CoreFoundation-13 - Memcheck:Cond - obj:*CoreFoundation.framework*CoreFoundation* - obj:*CoreFoundation.framework*CoreFoundation* - obj:*AE.framework*AE* -} - -{ - OSX1011:AppKit-1 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1011:AppKit-2 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*libdispatch.dylib* -} - -#{ -# OSX1011:AppKit-3 -# Memcheck:Cond -# obj:*AppKit.framework*AppKit* -# obj:*libdispatch.dylib* -# obj:*libdispatch.dylib* -#} - -##{ -## OSX1011:AppKit-4 -## Memcheck:Cond -## obj:*AppKit.framework*AppKit* -## obj:*AppKit.framework*AppKit* -## obj:*CoreFoundation.framework*CoreFoundation* -##} - -{ - OSX1011:AppKit-5 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* - obj:*Foundation.framework*Foundation* -} - -{ - OSX1011:AppKit-6 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*Foundation.framework*Foundation* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1011:AppKit-7 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX1011:AppKit-8 - Memcheck:Cond - obj:*AppKit.framework*AppKit* - obj:*Foundation.framework*Foundation* - obj:*Foundation.framework*Foundation* -} - -{ - OSX1011:ColorSync-1 - Memcheck:Cond - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* - obj:*ColorSync.framework*ColorSync* -} - -#{ -# OSX1011:ColorSync-2 -# Memcheck:Value8 -# obj:*ColorSync.framework*ColorSync* -# obj:*ColorSync.framework*ColorSync* -# obj:*ColorSync.framework*ColorSync* -#} - -{ - OSX1011:CoreGraphics-1 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*CoreGraphics* -} - -#{ -# OSX1011:CoreGraphics-2 -# Memcheck:Value8 -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -#} - -{ - OSX1011:CoreGraphics-3 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*CoreGraphics.framework*libRIP* - obj:*CoreGraphics.framework*libRIP* -} - -#{ -# OSX1011:CoreGraphics-4 -# Memcheck:Cond -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*libRIP* -#} - -{ - OSX1011:CoreGraphics-5 - Memcheck:Cond - obj:*CoreGraphics.framework*CoreGraphics* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -#{ -# OSX1011:CoreGraphics-6 -# Memcheck:Cond -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*CoreGraphics.framework*CoreGraphics* -# obj:*HIToolbox.framework*HIToolbox* -#} - -{ - OSX1011:HIServices-1 - Memcheck:Cond - obj:*HIServices.framework*HIServices* - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1011:LaunchServices-1 - Memcheck:Cond - obj:*LaunchServices.framework*LaunchServices* - obj:*AppKit.framework*AppKit* - obj:*AppKit.framework*AppKit* -} - -{ - OSX1011:LaunchServices-2 - Memcheck:Cond - obj:*LaunchServices.framework*LaunchServices* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -{ - OSX1011:QuartzCore-1 - Memcheck:Cond - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore - obj:*QuartzCore.framework*QuartzCore -} - -#{ -# OSX1011:vImage-1 -# Memcheck:Cond -# obj:*vImage.framework*vImage* -# obj:*vImage.framework*vImage* -# obj:*CoreGraphics.framework*CoreGraphics* -#} - -{ - OSX1011:zlib-C - Memcheck:Cond - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -{ - OSX1011:zlib-8 - Memcheck:Value8 - obj:/usr/lib/libz.*dylib - obj:/usr/lib/libz.*dylib -} - -{ - OSX1011:32bit:_libxpc_initializer - Memcheck:Cond - obj:/usr/lib/system/libsystem_c.dylib - obj:/usr/lib/system/libsystem_c.dylib - fun:_libxpc_initializer - obj:/usr/lib/libSystem.B.dylib - fun:*ImageLoaderMachO*doModInitFunctions* -} - -{ - OSX1011:dyld-1 - Memcheck:Cond - fun:*ImageLoader*weakBind* - fun:*ImageLoader*link* - fun:*dyld*link* -} - -{ - OSX1011:dyld-2 - Memcheck:Cond - fun:exit - obj:*libdyld*dylib* -} - -{ - OSX1011:libsystem_kernel-1 - Memcheck:Cond - obj:*libsystem_kernel*dylib* - obj:*libsystem_kernel*dylib* - obj:*CoreFoundation.framework*CoreFoundation* -} - -{ - OSX1011:CoreServicesInternal-1 - Memcheck:Cond - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServices.framework*LaunchServices* - obj:*CoreServices.framework*LaunchServices* -} - -{ - OSX1011:CoreServicesInternal-2 - Memcheck:Cond - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServicesInternal.framework*CoreServicesInternal* -} - -{ - OSX1011:CoreServicesInternal-3 - Memcheck:Cond - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreServicesInternal.framework*CoreServicesInternal* - obj:*CoreFoundation.framework*CoreFoundation* -} - -{ - OSX1011:CoreServices-1 - Memcheck:Cond - obj:*CoreServices.framework*LaunchServices* - obj:*CoreServices.framework*LaunchServices* - obj:*CoreServices.framework*LaunchServices* -} - -##{ -## OSX1011:libsystem_pthread-1 -## Memcheck:Cond -## obj:*libsystem_pthread*dylib* -## obj:*ImageIO.framework*ImageIO* -## obj:*ImageIO.framework*ImageIO* -##} - -{ - OSX1011:ApplicationServices-1 - Memcheck:Cond - obj:*ApplicationServices.framework*ATS* - obj:*libsystem_pthread*dylib* - obj:*libsystem_platform*dylib* -} - -{ - OSX1011:HIToolbox-1 - Memcheck:Cond - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* - obj:*HIToolbox.framework*HIToolbox* -} - -{ - OSX1011:RawCamera-1 - Memcheck:Cond - obj:*RawCamera.bundle*RawCamera* - obj:*libdispatch.dylib* - obj:*libdispatch.dylib* -} - -##{ -## OSX1011:CoreImage-1 -## Memcheck:Cond -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -## obj:*CoreImage.framework*CoreImage* -##} - -##{ -## OSX1011:strncpy-1 -## Memcheck:Cond -## fun:strncpy -## obj:*CoreServicesInternal.framework*CoreServicesInternal -## obj:*CoreServicesInternal.framework*CoreServicesInternal -##} - -{ - OSX1011:pthread_rwlock_init - Memcheck:Cond - fun:pthread_rwlock_init - obj:*ImageIO.framework*ImageIO* - obj:*ImageIO.framework*ImageIO* -} - -{ - OSX1011:CFBasicHash - Memcheck:Value8 - fun:*CFBasicHash* - fun:*CF* -} - -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-1-Addr8 - Memcheck:Addr8 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-1-Addr8 - Memcheck:Addr4 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} - -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-2-Addr8 - Memcheck:Addr8 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-2-Addr2 - Memcheck:Addr2 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} - -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-3-Addr8 - Memcheck:Addr8 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-3-Addr2 - Memcheck:Addr2 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-3-Addr1 - Memcheck:Addr1 - fun:*platform_memmove* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} - -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-4 - Memcheck:Addr8 - fun:*platform_bzero* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* -} - -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-6-Addr8 - Memcheck:Addr8 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-6-Addr4 - Memcheck:Addr4 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} - -{ - OSX1011:AppleIntelHD4000GraphicsGLDriver-7 - Memcheck:Addr4 - obj:*AppleIntelHD4000GraphicsGLDriver.bundle*AppleIntelHD4000GraphicsGLDriver* - obj:*GLEngine.bundle*GLEngine* -} - -{ - OSX1011:OSAtomicAdd32 - Memcheck:Addr4 - fun:*OSAtomicAdd32* - obj:*IOAccelerator.framework*IOAccelerator* - obj:*GPUSupport.framework*GPUSupportMercury* -} - -{ - OSX1011:IOAccelerator-1 - Memcheck:Addr4 - obj:*IOAccelerator.framework*IOAccelerator* - obj:*GPUSupport.framework*GPUSupportMercury* -} - -# See https://bugs.kde.org/show_bug.cgi?id=188572 about this; it's -# unavoidable due to BSD setenv() semantics. -{ - macos-__setenv-leak-see-our-bug-188572 - Memcheck:Leak - match-leak-kinds: definite - fun:malloc - fun:_owned_ptr_alloc - fun:setenv -} - -# See https://bugs.kde.org/show_bug.cgi?id=196528 -{ -macos-__pthread_rwlock_init-see-our-bug-196528 -Memcheck:Cond -fun:pthread_rwlock_init -} diff --git a/freebsd-helgrind-dbgrtld.supp b/freebsd-helgrind-dbgrtld.supp deleted file mode 100644 index ed16159c0..000000000 --- a/freebsd-helgrind-dbgrtld.supp +++ /dev/null @@ -1,90 +0,0 @@ -{ - HELGRIND-LIB-RTLD2 - Helgrind:Race - fun:allocate_tls -} -{ - HELGRIND-LIB-RTLD3 - Helgrind:Race - fun:symlook_obj -} -{ - HELGRIND-LIB-RTLD4 - Helgrind:Race - fun:objlist_call_fini -} -{ - HELGRIND-LIB-RTLD5 - Helgrind:Race - fun:_rtld_error -} -{ - HELGRIND-LIB-RTLD6 - Helgrind:Race - fun:errmsg_save -} -{ - HELGRIND-LIB-RTLD7 - Helgrind:Race - fun:rtld_vsnprintf -} -{ - HELGRIND-LIB-RTLD8 - Helgrind:Race - fun:snprintf_func -} -{ - HELGRIND-LIB-RTLD9 - Helgrind:Race - fun:strlen -} -{ - HELGRIND-LIB-RTLD10 - Helgrind:Race - fun:symlook_default -} -{ - HELGRIND-LIB-RTLD11 - Helgrind:Race - ... - fun:dl_iterate_phdr -} -{ - HELGRIND-LIB-RTLD12 - Helgrind:Race - fun:morecore -} -{ - HELGRIND-LIB-RTLD13 - Helgrind:Race - fun:__crt_malloc -} -{ - HELGRIND-LIB-RTLD14 - Helgrind:Race - fun:globallist_curr -} -{ - HELGRIND-LIB-RTLD15 - Helgrind:Race - fun:tls_get_addr_common -} -{ - HELGRIND-LIB-RTLD16 - Helgrind:Race - fun:memset - ... - fun:allocate_tls -} -{ - HELGRIND-LIB-RTLD17 - Helgrind:Race - fun:__crt_free -} -{ - HELGRIND-LIB-RTLD18 - Helgrind:Race - ... - fun:free_tls -} - diff --git a/solaris12.supp b/solaris12.supp index 29f808661..c4bc4c318 100644 --- a/solaris12.supp +++ b/solaris12.supp @@ -219,12 +219,6 @@ fun:thr_keycreate_once } -{ - Solaris:_nsc_proc_is_cache - Helgrind:Race - fun:_nsc_proc_is_cache -} - { Solaris:nss_dbop_search Helgrind:Race From eca0ea6e9aa5914847f3f229c633b812ed5e1da8 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 9 Dec 2025 08:58:46 +0100 Subject: [PATCH 148/502] Darwin: add most of the missing bits for Darwin 18 support Code merged from Louis Brunner. Also add a but of doc about the oldest OSX that we support. Unfortunately I don't know which version that is. --- coregrind/m_syswrap/priv_syswrap-darwin.h | 8 +++++ coregrind/m_syswrap/syswrap-darwin.c | 41 ++++++++++++++++++++++- coregrind/m_syswrap/syswrap-x86-darwin.c | 3 +- docs/internals/Darwin-notes.txt | 14 ++++++++ include/vki/vki-darwin.h | 3 ++ include/vki/vki-scnums-darwin.h | 9 +++++ shared/vg_replace_strmem.c | 1 - 7 files changed, 75 insertions(+), 4 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index 579b3d8c6..a96ce36b4 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -646,6 +646,10 @@ DECL_TEMPLATE(darwin, abort_with_payload); // 521 // NYI ntp_gettime // 528 // NYI os_fault_with_payload // 529 #endif /* DARWIN_VERS >= DARWIN_10_13 */ +#if DARWIN_VERS >= DARWIN_10_14 +// NYI kqueue_workloop_ctl // 530 +// NYI __mach_bridge_remote_time // 531 +#endif /* DARWIN_VERS >= DARWIN_10_14 */ // Mach message helpers DECL_TEMPLATE(darwin, mach_port_set_context); @@ -786,6 +790,10 @@ DECL_TEMPLATE(darwin, iokit_user_client_trap); DECL_TEMPLATE(darwin, swtch); DECL_TEMPLATE(darwin, swtch_pri); +#if DARWIN_VERS >= DARWIN_10_14 +DECL_TEMPLATE(darwin, kernelrpc_mach_port_get_attributes_trap); +#endif /* DARWIN_VERS >= DARWIN_10_14 */ + // Machine-dependent traps DECL_TEMPLATE(darwin, thread_fast_set_cthread_self); diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 0113d388d..80bd013f3 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -1776,6 +1776,9 @@ static const HChar *name_for_fcntl(UWord cmd) { F(F_ADDFILESIGS_FOR_DYLD_SIM); F(F_BARRIERFSYNC); F(F_ADDFILESIGS_RETURN); +# endif +# if DARWIN_VERS >= DARWIN_10_14 + F(F_CHECK_LV); # endif default: return "UNKNOWN"; @@ -1975,6 +1978,13 @@ PRE(fcntl) break; # endif +# if DARWIN_VERS >= DARWIN_10_14 + case VKI_F_CHECK_LV: /* Check if Library Validation allows this Mach-O file to be + mapped into the calling process */ + // FIXME: Dejan + break; +# endif + default: PRINT("fcntl ( %lu, %lu [??] )", ARG1, ARG2); log_decaying("UNKNOWN fcntl %lu!", ARG2); @@ -10916,9 +10926,29 @@ POST(thread_get_special_reply_port) record_named_port(tid, RES, MACH_PORT_RIGHT_RECEIVE, "special-reply-%p"); PRINT("special reply port %s", name_for_port(RES)); } - #endif /* DARWIN_VERS >= DARWIN_10_13 */ + +/* --------------------------------------------------------------------- + Added for macOS 10.14 (Mojave) + ------------------------------------------------------------------ */ + +#if DARWIN_VERS >= DARWIN_10_14 +PRE(kernelrpc_mach_port_get_attributes_trap) +{ + PRINT("kernelrpc_mach_port_get_attributes_trap( %s, %s, %ld, %#lx, %#lx )", + name_for_port(ARG1), name_for_port(ARG2), SARG3, ARG4, ARG5); + PRE_REG_READ5(kern_return_t, "kernelrpc_mach_port_get_attributes_trap", + mach_port_name_t, target, mach_port_name_t, name, mach_port_flavor_t, flavor, + mach_port_info_t, port_info_out, mach_msg_type_number_t*, port_info_outCnt); + PRE_MEM_READ( "kernelrpc_mach_port_get_attributes_trap(port_info_outCnt)", ARG5, sizeof(mach_msg_type_number_t)); + PRE_MEM_WRITE( "kernelrpc_mach_port_get_attributes_trap(port_info_outCnt)", ARG5, sizeof(mach_msg_type_number_t)); + mach_msg_type_number_t count = *(mach_msg_type_number_t*)ARG5; + if (count > 0) { + PRE_MEM_WRITE( "kernelrpc_mach_port_get_attributes_trap(port_info_out)", ARG4, count * sizeof(integer_t)); + } +} +#endif /* DARWIN_VERS >= DARWIN_10_14 */ /* --------------------------------------------------------------------- syscall tables ------------------------------------------------------------------ */ @@ -11541,6 +11571,10 @@ const SyscallTableEntry ML_(syscall_table)[] = { // _____(__NR_ntp_adjtime), // 527 // _____(__NR_ntp_gettime), // 528 // _____(__NR_os_fault_with_payload), // 529 +#endif +#if DARWIN_VERS >= DARWIN_10_14 +// _____(__NR_kqueue_workloop_ctl), // 530 +// _____(__NR___mach_bridge_remote_time), // 531 #endif MACX_(__NR_darwin_fake_sigreturn, fake_sigreturn) @@ -11634,7 +11668,12 @@ const SyscallTableEntry ML_(mach_trap_table)[] = { MACX_(__NR_semaphore_wait_signal_trap, semaphore_wait_signal), MACX_(__NR_semaphore_timedwait_trap, semaphore_timedwait), MACX_(__NR_semaphore_timedwait_signal_trap, semaphore_timedwait_signal), + +# if DARWIN_VERS >= DARWIN_10_14 + MACX_(__NR_kernelrpc_mach_port_get_attributes_trap, kernelrpc_mach_port_get_attributes_trap), +# else _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(40)), // -40 +# endif # if DARWIN_VERS >= DARWIN_10_9 MACX_(__NR_kernelrpc_mach_port_guard_trap, kernelrpc_mach_port_guard_trap), diff --git a/coregrind/m_syswrap/syswrap-x86-darwin.c b/coregrind/m_syswrap/syswrap-x86-darwin.c index a0bc1a1e7..76416b06d 100644 --- a/coregrind/m_syswrap/syswrap-x86-darwin.c +++ b/coregrind/m_syswrap/syswrap-x86-darwin.c @@ -430,8 +430,7 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, || DARWIN_VERS == DARWIN_10_10 \ || DARWIN_VERS == DARWIN_10_11 \ || DARWIN_VERS == DARWIN_10_12 \ - || DARWIN_VERS == DARWIN_10_13 \ - || DARWIN_VERS == DARWIN_10_14 + || DARWIN_VERS == DARWIN_10_13 UWord magic_delta = 0xB0; # else # error "magic_delta: to be computed on new OS version" diff --git a/docs/internals/Darwin-notes.txt b/docs/internals/Darwin-notes.txt index 61d1931ad..0cedd1698 100644 --- a/docs/internals/Darwin-notes.txt +++ b/docs/internals/Darwin-notes.txt @@ -58,6 +58,20 @@ storage.c to choose between symbol table names vs. Dwarf3 names. So this machinery was removed in r10155. +Mac OS X / macOS supported platforms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Since January 2025 (and thus Valgrind 3.25) we have required a compiler +that supports C11. See 42eb19c0da3bb280de88b7f8fc9b7caaa44aedfem for +details. We also need an xcrun that supports --show-sdk-path (since +December 2025). I'm not sure when both of those became supported. +Definitely neither are on Mac OS 10.7 with XCode 4.6.3. And equally +definitely both are supported on macOS 10.13 with XCode 10.1. That +means that I don't know which is the oldest version of macOS that +will build Valgrind (as of December 2025). Somewhere between 10.8 (Darwin 12) +and 10.12 (Darwin 16). + + Valgrind-developer notes, todos re the MacOSX port ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/include/vki/vki-darwin.h b/include/vki/vki-darwin.h index e89888e65..056bd9e89 100644 --- a/include/vki/vki-darwin.h +++ b/include/vki/vki-darwin.h @@ -408,6 +408,9 @@ typedef uint32_t vki_u32; # define VKI_F_BARRIERFSYNC F_BARRIERFSYNC # define VKI_F_ADDFILESIGS_RETURN F_ADDFILESIGS_RETURN #endif +#if DARWIN_VERS >= DARWIN_10_14 +# define VKI_F_CHECK_LV F_CHECK_LV +#endif #define VKI_F_FULLFSYNC F_FULLFSYNC #define VKI_F_PATHPKG_CHECK F_PATHPKG_CHECK #define VKI_F_FREEZE_FS F_FREEZE_FS diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index 9e5c86964..70b110e81 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -174,6 +174,10 @@ #define __NR_semaphore_timedwait_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(38) #define __NR_semaphore_timedwait_signal_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(39) +#if DARWIN_VERS >= DARWIN_10_14 +#define __NR_kernelrpc_mach_port_get_attributes_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(40) +#endif + #if DARWIN_VERS >= DARWIN_10_9 #define __NR_kernelrpc_mach_port_guard_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(41) #define __NR_kernelrpc_mach_port_unguard_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(42) @@ -850,6 +854,11 @@ #define __NR_os_fault_with_payload VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(529) #endif /* DARWIN_VERS >= DARWIN_10_13 */ +#if DARWIN_VERS >= DARWIN_10_14 +#define __NR_kqueue_workloop_ctl VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(530) +#define __NR___mach_bridge_remote_time VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(531) +#endif /* DARWIN_VERS >= DARWIN_10_14 */ + #define __NR_darwin_fake_sigreturn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(1000) #endif diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index d9de90b41..aed02d151 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -388,7 +388,6 @@ static inline void my_exit ( int x ) #elif defined(VGO_darwin) STRNCAT(VG_Z_LIBSYSTEM_C_SONAME, strncat) STRNCAT(VG_Z_LIBSYSTEM_C_SONAME, __strncat_chk) - //STRNCAT(VG_Z_DYLD, strncat) #elif defined(VGO_solaris) STRNCAT(VG_Z_LIBC_SONAME, strncat) From 47e1fa5d26f4128eb3564d78ec317dd8a0d54118 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 9 Dec 2025 09:41:01 +0100 Subject: [PATCH 149/502] Darwin: remove support for old systems Valgrind no longer builds on Darwin 11 / Mac OS X 10.7. So remove support for Darwin 9 to Darwin 11 inclusive. --- Makefile.am | 1 - configure.ac | 20 +- darwin9-drd.supp | 469 ----------------------------------------------- darwin9.supp | 297 ------------------------------ 4 files changed, 2 insertions(+), 785 deletions(-) delete mode 100644 darwin9-drd.supp delete mode 100644 darwin9.supp diff --git a/Makefile.am b/Makefile.am index 4a62915bb..abac4d203 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,7 +47,6 @@ SUPP_FILES = \ glibc-2.X-helgrind.supp \ glibc-2.2-LinuxThreads-helgrind.supp \ glibc-2.X-drd.supp \ - darwin9.supp darwin9-drd.supp \ freebsd.supp freebsd-helgrind.supp freebsd-drd.supp \ darwin-legacy.supp darwin.supp \ darwin-drd.supp darwin-helgrind.supp \ diff --git a/configure.ac b/configure.ac index 8b7799ee3..e251d795d 100644 --- a/configure.ac +++ b/configure.ac @@ -508,11 +508,7 @@ case "${host_os}" in DARWIN_DRD_SUPP="darwin-drd.supp" case "${kernel}" in - 9.*) - DARWIN_DRD_SUPP="darwin9-drd.supp" - DEFAULT_SUPP="$srcdir/darwin-legacy.supp ${DEFAULT_SUPP}" - ;; - 1[0-6].*) + 1[2-6].*) DEFAULT_SUPP="$srcdir/darwin-legacy.supp ${DEFAULT_SUPP}" ;; *) @@ -522,18 +518,6 @@ case "${host_os}" in case "${kernel}" in - 9.*) - AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) - DARWIN_VERS=$DARWIN_10_5 - ;; - 10.*) - AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) - DARWIN_VERS=$DARWIN_10_6 - ;; - 11.*) - AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) - DARWIN_VERS=$DARWIN_10_7 - ;; 12.*) AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) DARWIN_VERS=$DARWIN_10_8 @@ -560,7 +544,7 @@ case "${host_os}" in ;; *) AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) - AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.6-10.11, macOS 10.12-10.13)]) + AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.8-10.11, macOS 10.12-10.13)]) ;; esac diff --git a/darwin9-drd.supp b/darwin9-drd.supp deleted file mode 100644 index ea301431b..000000000 --- a/darwin9-drd.supp +++ /dev/null @@ -1,469 +0,0 @@ - -# DRD suppressions for Darwin 9.x / Mac OS X 10.5 Leopard - -# -# Suppression patterns for dyld, the dynamic loader. -# - -{ - drd-darwin-dyld-register-func-for-add-image - drd:MutexErr - fun:pthread_mutex_unlock - fun:_dyld_register_func_for_add_image - fun:__keymgr_initializer - fun:libSystem_initializer -} -{ - drd-darwin-dyld-register-func-for-remove-image - drd:MutexErr - fun:pthread_mutex_unlock - fun:_dyld_register_func_for_remove_image - fun:__keymgr_initializer - fun:libSystem_initializer -} -{ - drd-darwin-dyld-GlobalLockInitialize - drd:MutexErr - fun:pthread_mutex_init - fun:_Z24dyldGlobalLockInitializev - fun:_dyld_initializer -} -{ - drd-darwin-dyld-bindLazySymbol - drd:ConflictingAccess - ... - fun:_ZN4dyld14bindLazySymbolEPK11mach_headerPm - fun:stub_binding_helper_interface2 -} -{ - drd-darwin-dyld-addImage - drd:ConflictingAccess - fun:_ZN4dyld8addImageEP11ImageLoader -} -{ - dyld-ImageLoader::link - drd:ConflictingAccess - ... - fun:_ZN4dyld18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoE - fun:_ZN11ImageLoader4linkERKNS_11LinkContextEbbRKNS_10RPathChainE - fun:_ZN4dyld4linkEP11ImageLoaderbRKNS0_10RPathChainE -} -{ - drd-darwin-dyld-ImageLoaderMachO::resolveUndefined - drd:ConflictingAccess - ... - fun:_ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPKS0_ -} -{ - drd-darwin-dyld-ImageLoaderMachO::findExportedSymbol - drd:ConflictingAccess - fun:_ZNK16ImageLoaderMachO18findExportedSymbolEPKcPKvbPPK11ImageLoader - fun:_ZNK11ImageLoader41findExportedSymbolInDependentImagesExceptEPKcPPKS_RS4_S4_S4_ - fun:_ZNK11ImageLoader42findExportedSymbolInImageOrDependentImagesEPKcRKNS_11LinkContextEPPKS_ - fun:dlsym -} - - -# -# Suppression patterns for libc, Darwin's C library. -# - -{ - drd-darwin-libc-cerror - drd:ConflictingAccess - ... - fun:cerror -} -{ - drd-darwin-libc-rand - drd:ConflictingAccess - fun:do_rand -} -{ - drd-darwin-libc-vfprintf-1 - drd:ConflictingAccess - fun:vfprintf_l -} -{ - drd-darwin-libc-vfprintf-2 - drd:ConflictingAccess - fun:__vfprintf -} -{ - drd-darwin-libc-localeconv - drd:ConflictingAccess - fun:localeconv_l -} -{ - drd-darwin-libc-fwrite - drd:ConflictingAccess - ... - fun:fwrite$UNIX2003 -} -{ - drd-darwin-cxa-guard-acquire - drd:ConflictingAccess - obj:* - fun:__cxa_current_exception_type - fun:__cxa_guard_acquire -} -{ - drd-darwin-cxa-guard-release - drd:ConflictingAccess - fun:__cxa_guard_release -} -{ - drd-darwin-cxa-finalize - drd:MutexErr - fun:pthread_mutex_destroy - fun:__tcf_115 - fun:__cxa_finalize - fun:exit -} -{ - drd-darwin-atexit-register - drd:ConflictingAccess - fun:atexit_register -} -{ - drd-darwin-opendir - drd:ConflictingAccess - fun:telldir$UNIX2003 - fun:__opendir2$UNIX2003 - fun:opendir$UNIX2003 -} -{ - drd-darwin-readdir - drd:ConflictingAccess - fun:readdir -} -{ - drd-darwin-closedir - drd:ConflictingAccess - fun:closedir$UNIX2003 -} -{ - drd:darwin-ptrace - drd:ConflictingAccess - fun:ptrace -} - - -# -# Suppression patterns for libpthread, Darwin's POSIX threads implementation. -# - -{ - drd-darwin-pthread-create-1 - drd:ConflictingAccess - obj:* - fun:thread_start -} -{ - drd-darwin-pthread-create-2 - drd:ConflictingAccess - ... - fun:pthread_create* -} -{ - drd-darwin-pthread-join-1 - drd:ConflictingAccess - ... - fun:pthread_join$UNIX2003 -} -{ - drd-darwin-pthread-exit - drd:ConflictingAccess - ... - fun:_pthread_exit -} -{ - drd-darwin-pthread-find-thread - drd:ConflictingAccess - fun:_pthread_find_thread -} -{ - drd-darwin-pthread-spin-unlock - drd:ConflictingAccess - fun:spin_unlock -} -{ - drd-darwin-pthread-testcancel - drd:ConflictingAccess - fun:_pthread_testcancel -} -{ - drd-darwin-pthread-detach - drd:ConflictingAccess - ... - fun:pthread_detach -} -{ - drd-darwin-pthread-detach - drd:CondRaceErr - ... - fun:pthread_detach -} -{ - drd-darwin-pthread-kill - drd:ConflictingAccess - ... - fun:pthread_kill -} -{ - drd-darwin-pthread-free-pthread-onstack - drd:ConflictingAccess - fun:mig_dealloc_reply_port - fun:_pthread_free_pthread_onstack -} -{ - drd-darwin-pthread-mach-thread-np - drd:ConflictingAccess - ... - fun:pthread_mach_thread_np -} -{ - drd-darwin-pthread-key-create - drd:ConflictingAccess - fun:pthread_key_create -} - - -# -# Suppression patterns for libobjc. -# - -# It looks like the implementation of objc_msgSend uses another means than the -# POSIX threads library for locking. More information about messaging and -# objc_msgSend can be found here: -# http://devworld.apple.com/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtHowMessagingWorks.html -# - -{ - drd-darwin-objc-msgSend - drd:ConflictingAccess - ... - fun:objc_msgSend -} -{ - drd-darwin-objc-msgSend - drd:ConflictingAccess - ... - fun:objc_sync_enter -} - - -# -# Suppression patterns for CoreFoundation.framework. -# - -# Suppressions for NSObject methods. For more information about the NSObject -# class, see also -# http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html -{ - drd-darwin-NSObject-release - drd:ConflictingAccess - ... - fun:-[NSObject release] -} -{ - drd-darwin-NSObject-autorelease-1 - drd:ConflictingAccess - ... - fun:-[NSObject(NSObject) autorelease] -} -{ - drd-darwin-NSObject-autorelease-2 - drd:ConflictingAccess - fun:__NSAutoreleaseObject -} -{ - drd-darwin-NSObject-NSDeallocateObject - drd:ConflictingAccess - fun:_internal_object_dispose - fun:NSDeallocateObject -} -{ - drd-darwin-NSObject-retain - drd:ConflictingAccess - ... - fun:-[NSObject retain] -} -{ - drd-darwin-NSObject-retainCount - drd:ConflictingAccess - ... - fun:-[NSObject retainCount] -} -{ - drd-darwin-NSObject-NSDelayedPerforming-1 - drd:ConflictingAccess - ... - fun:+[NSObject(NSDelayedPerforming) cancelPreviousPerformRequestsWithTarget:selector:object:] -} -{ - drd-darwin-NSObject-NSDelayedPerforming-2 - drd:ConflictingAccess - ... - fun:-[NSObject(NSDelayedPerforming) performSelector:withObject:afterDelay:] -} -{ - drd-darwin-NSObject-NSDelayedPerforming-3 - drd:ConflictingAccess - ... - fun:-[NSObject(NSDelayedPerforming) performSelector:withObject:afterDelay:inModes:] -} -{ - drd-darwin-NSObject-NSDelayedPerforming-4 - drd:ConflictingAccess - ... - fun:-[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] -} -{ - drd-darwin-NSObject-NSDelayedPerforming-5 - drd:ConflictingAccess - ... - fun:-[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] -} - -# Suppressions for methods of the NSThread class. -{ - drd-NSThread-nq - drd:ConflictingAccess - ... - fun:-[NSThread _nq:] -} - -# Suppressions for methods of the NSLock class. See also -# http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSLock_Class/Reference/Reference.html -{ - drd-darwin-NSLock-lock - drd:ConflictingAccess - fun:-[NSLock lock] -} -{ - drd-darwin-NSLock-unlock - drd:ConflictingAccess - fun:-[NSLock unlock] -} -# Suppressions for NSCondition methods. -{ - drd-darwin-NSConditionLock-lock - drd:ConflictingAccess - fun:-[NSCondition lock] -} -# Suppressions for NSConditionLock methods. -{ - drd-darwin-NSConditionLock-lockWhenCondition:beforeDate: - drd:ConflictingAccess - fun:-[NSConditionLock lockWhenCondition:beforeDate:] -} - - -# NSExtraRefCount returns the specified object's reference count, and -# NSDecrementExtraRefCountWasZero decrements the specified object's reference -# count. -# See also http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html -{ - drd-darwin-NSExtraRefCount - drd:ConflictingAccess - ... - fun:NSExtraRefCount -} -{ - drd-darwin-NSDecrementExtraRefCountWasZero - drd:ConflictingAccess - ... - fun:NSDecrementExtraRefCountWasZero -} -# For more information about key-value observing, see also the NSKeyValueObserving Protocol Reference: -# http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueObserving_Protocol/Reference/Reference.html -{ - drd-darwin-NSKVONotify - drd:ConflictingAccess - ... - fun:NSKVONotify -} -{ - drd-darwin-NSKVONotifyingEnableForInfoAndKey - drd:ConflictingAccess - ... - fun:_NSKVONotifyingEnableForInfoAndKey -} -# From the NSRunLoop class reference: -# Warning: The NSRunLoop class is generally not considered to be thread-safe -# and its methods should only be called within the context of the current -# thread. You should never try to call the methods of an NSRunLoop object -# running in a different thread, as doing so might cause unexpected results. -# See also the NSRunLoop Class Reference: -# http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSRunLoop_Class/Reference/Reference.html -# { -# drd-darwin-CFRunLoop* -# drd:ConflictingAccess -# ... -# fun:CFRunLoop* -# } -# See also the CFBag reference: -# http://developer.apple.com/documentation/CoreFoundation/Reference/CFBagRef/Reference/reference.html -# { -# drd-darwin-CFBag* -# drd:ConflictingAccess -# fun:CFBag* -# } - -# Suppression patterns for the memory allocation functions in WTF. -{ - drd-WTF::fastCalloc - drd:ConflictingAccess - ... - fun:_ZN3WTF10fastCallocEmm -} -{ - drd-WTF::fastMalloc - drd:ConflictingAccess - ... - fun:_ZN3WTF10fastMallocEm -} -{ - drd-WTF::fastFree - drd:ConflictingAccess - ... - fun:_ZN3WTF8fastFreeEPv -} - -# Suppression patterns for the string manipulation functions in WebCore. -{ - drd-WebCore::StringImpl::init - drd:ConflictingAccess - ... - fun:_ZN7WebCore10StringImpl4initEPKcj -} -{ - drd-WebCore::StringImpl::append - drd:ConflictingAccess - ... - fun:_ZN7WebCore10StringImpl6appendEPKtj -} -{ - drd-WebCore::CString::init - drd:ConflictingAccess - ... - fun:_ZN7WebCore7CString4initEPKcj -} - -# Suppression patterns for the text encoding functions in WebCore. -{ - drd-WebCore::WebCore::TextCodec::~TextCodec() - drd:ConflictingAccess - fun:_ZN7WebCore9TextCodecD2Ev -} -{ - drd-WebCore::TextCodecICU::TextCodecICU - drd:ConflictingAccess - fun:_ZN7WebCore12TextCodecICUC2ERKNS_12TextEncodingE -} -{ - drd-WebCore::TextCodecICU::~TextCodecICU - drd:ConflictingAccess - fun:_ZN7WebCore12TextCodecICUD0Ev -} diff --git a/darwin9.supp b/darwin9.supp deleted file mode 100644 index f7769c7c5..000000000 --- a/darwin9.supp +++ /dev/null @@ -1,297 +0,0 @@ - -# Suppressions for Darwin 9.x / Mac OS X 10.5 Leopard - -##----------------------------------------------------------------------## -# Memcheck -##----------------------------------------------------------------------## - -{ - mach_msg_trap-1 - Memcheck:Param - mach_msg(msg.msgh_remote_port) - fun:mach_msg_trap - obj:/System/Library/Frameworks/CoreFoundation* - obj:/System/Library/Frameworks/ApplicationServices* -} - -{ - mach_msg_trap-2 - Memcheck:Param - mach_msg(msg.msgh_remote_port) - fun:mach_msg_trap - obj:/System/Library/Frameworks/CoreFoundation* - obj:/System/Library/Frameworks/CoreServices* -} - -{ - mach_msg_trap-3 - Memcheck:Param - mach_msg(msg.msgh_remote_port) - fun:mach_msg_trap - obj:/System/Library/Frameworks/CoreFoundation* - obj:/System/Library/Frameworks/Carbon* -} - -{ - mach_msg_trap-4 - Memcheck:Param - mach_msg(msg.msgh_remote_port) - fun:mach_msg_trap - obj:/System/Library/Frameworks/CoreFoundation* - obj:/System/Library/Frameworks/CoreFoundation* -} - -{ - mach_msg_trap-5 - Memcheck:Param - mach_msg(msg.msgh_remote_port) - fun:mach_msg_trap - obj:/System/Library/Frameworks/CoreFoundation* - obj:/System/Library/Frameworks/AppKit* -} - -{ - macos-Cond-1 - Memcheck:Cond - fun:GetVariationInfoFromName - obj:/System/Library/Frameworks/ApplicationServices* - obj:/System/Library/Frameworks/ApplicationServices* -} - -{ - macos-Cond-2 - Memcheck:Cond - fun:*PMMutex*Lock* - obj:/System/Library/Frameworks/ApplicationServices* - obj:/System/Library/Frameworks/ApplicationServices* -} - -{ - macos-Cond-3 - Memcheck:Cond - fun:sseCGSBlendXXXX8888 - obj:/System/Library/Frameworks/ApplicationServices* - obj:/System/Library/Frameworks/ApplicationServices* -} - -{ - macos-Cond-4 - Memcheck:Cond - fun:*CASettingsStorage*RefreshSettings* - obj:/System/Library/Frameworks/CoreAudio* - obj:/System/Library/Frameworks/CoreAudio* -} - -{ - macos-Cond-5 - Memcheck:Cond - fun:gle* - obj:/System/Library/Frameworks/OpenGL* - obj:/System/Library/Frameworks/OpenGL* -} - -{ - macos-Cond-6 - Memcheck:Cond - fun:pthread_rwlock_init$UNIX2003 - fun:main -} - -# afaict this is legit. Might be caused by setenv("VAR=") -# where the value string is empty (not sure) -{ - macos-Cond-7 - Memcheck:Cond - fun:__setenv - fun:putenv* -} - -{ - macos-futimes-1 - Memcheck:Param - futimes(tvp[1]) - fun:futimes - obj:/usr/lib/libSystem* - obj:/usr/lib/libSystem* -} - -{ - macos-vsyslog-hole - Memcheck:Param - socketcall.sendto(msg) - fun:sendto$NOCANCEL$UNIX2003 - fun:vsyslog -} - -# Still-reachable memory. - -# I chopped this one off at libSystem_initializer, there were more frames. -{ - darwin-still-reachable-1 - Memcheck:Leak - fun:calloc - fun:dwarf2_unwind_dyld_add_image_hook - fun:_ZN4dyld19registerAddCallbackEPFvPK11mach_headerlE - fun:_dyld_register_func_for_add_image - fun:__keymgr_initializer - fun:libSystem_initializer -} - -# I chopped this one off at libSystem_initializer, there were more frames. -{ - darwin-still-reachable-2 - Memcheck:Leak - fun:malloc - fun:get_or_create_key_element - fun:_keymgr_get_and_lock_processwide_ptr_2 - fun:dwarf2_unwind_dyld_add_image_hook - fun:_ZN4dyld19registerAddCallbackEPFvPK11mach_headerlE - fun:_dyld_register_func_for_add_image - fun:__keymgr_initializer - fun:libSystem_initializer -} - -{ - darwin-still-reachable-3 - Memcheck:Leak - fun:malloc - fun:__smakebuf - fun:__swsetup - fun:__sfvwrite - fun:puts -} - -# Genuine leaks. -# See https://bugs.kde.org/show_bug.cgi?id=188572 about this; it's -# unavoidable due to BSD setenv() semantics. -{ - macos-__setenv-leak-see-our-bug-188572 - Memcheck:Leak - fun:malloc_zone_malloc - fun:__setenv - fun:setenv$UNIX2003 -} -{ - macos-localeconv-leak - Memcheck:Leak - fun:malloc - fun:localeconv_l - fun:__vfprintf - fun:vsnprintf -} - -{ - macos-TFontFeatures::TFontFeatures(unsigned long)-uninitialised-stack-val - Memcheck:Cond - fun:_ZN13TFontFeaturesC2Em - fun:_ZNK9TBaseFont12CopyFeaturesEv -} - -# Conditional jump or move depends on uninitialised value(s) -# at 0x4E5CD59: _DPSNextEvent (in /System/Library/Frameworks -# /AppKit.framework/Versions/C/AppKit) -# by 0x4E5BF87: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] -# (in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit) -# by 0x4E54F9E: -[NSApplication run] (in /System/Library/Frameworks -# /AppKit.framework/Versions/C/AppKit) -# Uninitialised value was created by a stack allocation -# at 0x4E5C450: _DPSNextEvent (in /System/Library/Frameworks -# /AppKit.framework/Versions/C/AppKit) -{ - macos-_DPSNextEvent-stack-allocated-uninit - Memcheck:Cond - fun:_DPSNextEvent -} - - -##----------------------------------------------------------------------## -# Helgrind -##----------------------------------------------------------------------## - -# These ones were necessary to give no errors on a tiny non-threaded -# program. I don't know if they're real problems or false positives (njn). - -# keymgr seems to deliberately do some bogus actions, and if they are bogus, -# it passes the error codes back to the caller. -{ - __keymgr_initializer lock failed - Helgrind:PthAPIerror - fun:pthread_mutex_lock - fun:_dyld_register_func_for_*_image - fun:__keymgr_initializer - fun:libSystem_initializer -} -{ - __keymgr_initializer unlock failed - Helgrind:PthAPIerror - fun:pthread_mutex_unlock - fun:_dyld_register_func_for_*_image - fun:__keymgr_initializer - fun:libSystem_initializer -} -{ - __keymgr_initializer bogus unlock - Helgrind:UnlockBogus - fun:pthread_mutex_unlock - fun:_dyld_register_func_for_*_image - fun:__keymgr_initializer - fun:libSystem_initializer -} - -# These ones were necessary to give no errors on a tiny threaded program. -# I don't know if they're real problems or false positives (njn). - -#{ -# helgrind-darwinlibc-nuke-everything-in-dyld -# Helgrind:Race -# obj:/usr/lib/dyld -#} - -{ - helgrind-darwinlibc-nuke-everything-in-libSystem.B.dylib - Helgrind:Race - obj:/usr/lib/libSystem.B.dylib -} - -# This would be better as "fun:\?\?\?" but string matching doesn't seem to -# allow escaping meta-chars. -# -# This is very bad .. not only will it hide races in any -# un-identified piece of code, the ??? also matches any 3-char -# function name. -{ - helgrind-darwinlibc-nuke-everything-in-???-(unknown-code) - Helgrind:Race - fun:??? -} - -{ - helgrind-darwinlibc--mythread_wrapper-*thread*start* - Helgrind:Race - fun:mythread_wrapper - fun:*thread*start* -} - -{ - helgrind-darwinlibc--pthread_create_WRK-pthread_create - Helgrind:Race - fun:pthread_create_WRK - fun:pthread_create -} - - -# Thread #9: Bug in libpthread: recursive write lock granted on -# mutex/wrlock which does not support recursion -# at 0x18696: pthread_cond_wait* (hg_intercepts.c:655) -# by 0x2300B8: pthread_rwlock_wrlock$UNIX2003 (in /usr/lib/libSystem.B.dylib) -# by 0x18F41: pthread_rwlock_wrlock* (hg_intercepts.c:1177) -# -# no idea what this is about -# -{ - helgrind-darwin9--pthread-rwlock-kludgery - Helgrind:Misc - fun:pthread_cond_wait* - fun:pthread_rwlock_*lock* - fun:pthread_rwlock_*lock* -} From de840f1459832b878fa1f572cec12ae5d315e583 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 9 Dec 2025 09:47:45 +0100 Subject: [PATCH 150/502] Darwin: fix warning for hack to prevent crashes during stacktrace generation --- coregrind/m_stacktrace.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index 5175f79fe..b9cf0e62d 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -46,6 +46,11 @@ #include "pub_core_trampoline.h" #include "config.h" +#if defined(VGO_darwin) +// FIXME PJF this is bad (it's a syswrap private function) +// but the alternative for the moment is crashes when trying to produce stack traces +extern Bool ML_(safe_to_deref) ( const void *start, SizeT size ); +#endif /*------------------------------------------------------------*/ /*--- ---*/ From fb25ce838c953c010883e6bc309fc672a78073e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Tue, 2 Dec 2025 11:06:58 -0500 Subject: [PATCH 151/502] Add SSE4.1 min/max instructions for x86 32 bit Support pmaxsb, pminsb, pmaxuw, pminuw, pmaxud and pminud instructions in guest_x86_toIR.c and host_x86_isel.c. Move test functions from amd64/sse4-64.c to sse4-common.h and update none/tests/x86/sse4-x86.c and sse4-x86.stdout.exp to test all min/max instructions. BZ: https://bugs.kde.org/show_bug.cgi?id=512873 --- NEWS | 1 + VEX/priv/guest_x86_toIR.c | 54 ++++++++ VEX/priv/host_x86_isel.c | 18 +++ none/tests/amd64/sse4-64.c | 65 ---------- none/tests/sse4-common.h | 66 ++++++++++ none/tests/x86/sse4-x86.c | 6 + none/tests/x86/sse4-x86.stdout.exp | 200 +++++++++++++++++++++++------ 7 files changed, 305 insertions(+), 105 deletions(-) diff --git a/NEWS b/NEWS index 6583e5807..723b716b5 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 510416 Missing syswraps for file_getattr and file_setattr 510563 Add missing syswraps for lsm_get_self_attr and lsm_set_self_attr 510864 Add SSE4.1 PMAXSD and PMINSD instructions support for 32-bit x86 +512873 Add SSE4.1 min/max instructions for x86 32 bit 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/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c index a91551f56..af4edf21e 100644 --- a/VEX/priv/guest_x86_toIR.c +++ b/VEX/priv/guest_x86_toIR.c @@ -12995,6 +12995,24 @@ DisResult disInstr_X86_WRK ( goto decode_success; } + /* 66 0F 38 38 /r - PMINSB xmm1, xmm2/m128 + 66 0F 38 3C /r - PMAXSB xmm1, xmm2/m128 + Minimum/Maximum of Packed Signed Byte Integers (XMM) + */ + if (sz == 2 + && insn[0] == 0x0F && insn[1] == 0x38 + && (insn[2] == 0x38 || insn[2] == 0x3C)) { + /* FIXME: this needs an alignment check */ + Bool isMAX = insn[2] == 0x3C; + delta = dis_SSEint_E_to_G( + sorb, delta+3, + isMAX ? "pmaxsb" : "pminsb", + isMAX ? Iop_Max8Sx16 : Iop_Min8Sx16, + False + ); + 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) @@ -13015,6 +13033,42 @@ DisResult disInstr_X86_WRK ( goto decode_success; } + /* 66 0F 38 3A /r - PMINUW xmm1, xmm2/m128 + 66 0F 38 3E /r - PMAXUW xmm1, xmm2/m128 + Minimum/Maximum of Packed Unsigned Word Integers (XMM) + */ + if (sz == 2 + && insn[0] == 0x0F && insn[1] == 0x38 + && (insn[2] == 0x3A || insn[2] == 0x3E)) { + /* FIXME: this needs an alignment check */ + Bool isMAX = insn[2] == 0x3E; + delta = dis_SSEint_E_to_G( + sorb, delta+3, + isMAX ? "pmaxuw" : "pminuw", + isMAX ? Iop_Max16Ux8 : Iop_Min16Ux8, + False + ); + goto decode_success; + } + + /* 66 0F 38 3B /r - PMINUD xmm1, xmm2/m128 + 66 0F 38 3F /r - PMAXUD xmm1, xmm2/m128 + Minimum/Maximum of Packed Unsigned Doubleword Integers (XMM) + */ + if (sz == 2 + && insn[0] == 0x0F && insn[1] == 0x38 + && (insn[2] == 0x3B || insn[2] == 0x3F)) { + /* FIXME: this needs an alignment check */ + Bool isMAX = insn[2] == 0x3F; + delta = dis_SSEint_E_to_G( + sorb, delta+3, + isMAX ? "pmaxud" : "pminud", + isMAX ? Iop_Max32Ux4 : Iop_Min32Ux4, + 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.) diff --git a/VEX/priv/host_x86_isel.c b/VEX/priv/host_x86_isel.c index 0dbd0fb8a..72d6b4684 100644 --- a/VEX/priv/host_x86_isel.c +++ b/VEX/priv/host_x86_isel.c @@ -3867,12 +3867,30 @@ static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e ) case Iop_NarrowBin16to8x16: fn = (HWord)h_generic_calc_NarrowBin16to8x16; goto do_SseAssistedBinary; + case Iop_Max8Sx16: + fn = (HWord)h_generic_calc_Max8Sx16; + goto do_SseAssistedBinary; + case Iop_Min8Sx16: + fn = (HWord)h_generic_calc_Min8Sx16; + goto do_SseAssistedBinary; + case Iop_Max16Ux8: + fn = (HWord)h_generic_calc_Max16Ux8; + goto do_SseAssistedBinary; + case Iop_Min16Ux8: + fn = (HWord)h_generic_calc_Min16Ux8; + 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; + case Iop_Max32Ux4: + fn = (HWord)h_generic_calc_Max32Ux4; + goto do_SseAssistedBinary; + case Iop_Min32Ux4: + fn = (HWord)h_generic_calc_Min32Ux4; + 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 fc3096344..f4207b858 100644 --- a/none/tests/amd64/sse4-64.c +++ b/none/tests/amd64/sse4-64.c @@ -1492,71 +1492,6 @@ void test_PHMINPOSUW ( void ) DO_mandr_r("phminposuw", src, dst); } -void test_PMAXSB ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pmaxsb", src, dst); - } -} - -void test_PMAXUD ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pmaxud", src, dst); - } -} - -void test_PMAXUW ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pmaxuw", src, dst); - } -} - -void test_PMINSB ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pminsb", src, dst); - } -} - -void test_PMINUD ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pminud", src, dst); - } -} - -void test_PMINUW ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pminuw", src, dst); - } -} void test_PMOVSXBW ( void ) { diff --git a/none/tests/sse4-common.h b/none/tests/sse4-common.h index e3341186b..1191d4bb0 100644 --- a/none/tests/sse4-common.h +++ b/none/tests/sse4-common.h @@ -274,4 +274,70 @@ static inline void test_PMINSD ( void ) } } +static inline void test_PMAXSB ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pmaxsb", src, dst); + } +} + +static inline void test_PMAXUD ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pmaxud", src, dst); + } +} + +static inline void test_PMAXUW ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pmaxuw", src, dst); + } +} + +static inline void test_PMINSB ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pminsb", src, dst); + } +} + +static inline void test_PMINUD ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pminud", src, dst); + } +} + +static inline void test_PMINUW ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pminuw", src, dst); + } +} + #endif /* __SSE4_COMMON_H */ diff --git a/none/tests/x86/sse4-x86.c b/none/tests/x86/sse4-x86.c index f47f185bf..664235775 100644 --- a/none/tests/x86/sse4-x86.c +++ b/none/tests/x86/sse4-x86.c @@ -104,8 +104,14 @@ int main(void) { // ------ SSE 4.1 ------ test_PINSRD(); + test_PMAXSB(); test_PMAXSD(); + test_PMAXUD(); + test_PMAXUW(); + test_PMINSB(); test_PMINSD(); + test_PMINUD(); + test_PMINUW(); return 0; } diff --git a/none/tests/x86/sse4-x86.stdout.exp b/none/tests/x86/sse4-x86.stdout.exp index 99822c46c..515c22766 100644 --- a/none/tests/x86/sse4-x86.stdout.exp +++ b/none/tests/x86/sse4-x86.stdout.exp @@ -6,43 +6,163 @@ 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 +r pmaxsb 60b160857d45c48447b8d8c0eeef1e50 b6d2fb5aa7bc5127fe9915e556a044b2 60d2605a7d45512747b815e556ef4450 +m pmaxsb 60b160857d45c48447b8d8c0eeef1e50 b6d2fb5aa7bc5127fe9915e556a044b2 60d2605a7d45512747b815e556ef4450 +r pmaxsb 19a348215c3a67fd399182c2dbcc2d38 065d77195d623e6b842adc6450659e17 195d77215d62676b392adc6450652d38 +m pmaxsb 19a348215c3a67fd399182c2dbcc2d38 065d77195d623e6b842adc6450659e17 195d77215d62676b392adc6450652d38 +r pmaxsb d89998df5035ed364a4bc43968bc40e5 cb509970b8136c85d740b80eb7839b97 d850997050356c364a4bc43968bc40e5 +m pmaxsb d89998df5035ed364a4bc43968bc40e5 cb509970b8136c85d740b80eb7839b97 d850997050356c364a4bc43968bc40e5 +r pmaxsb f9dd4a29f8c093db56b01a12b0ca1583 5ff85bc9535c191fd3a727d1a705f65d 5ff85b29535c191f56b02712b005155d +m pmaxsb f9dd4a29f8c093db56b01a12b0ca1583 5ff85bc9535c191fd3a727d1a705f65d 5ff85b29535c191f56b02712b005155d +r pmaxsb d8bc5c6dee699597398e0039cf03663d 20a1bb92cbc97fe8542da4983df76c96 20bc5c6dee697fe8542d00393d036c3d +m pmaxsb d8bc5c6dee699597398e0039cf03663d 20a1bb92cbc97fe8542da4983df76c96 20bc5c6dee697fe8542d00393d036c3d +r pmaxsb d182c916cebc2e17cfaff39be272ef40 6897b536bbe4da8a369dab4f9465b86e 6897c936cee42e1736aff34fe272ef6e +m pmaxsb d182c916cebc2e17cfaff39be272ef40 6897b536bbe4da8a369dab4f9465b86e 6897c936cee42e1736aff34fe272ef6e +r pmaxsb 407b8d9035449b06f4e06e2205236eb7 95264321bf3b68b255c2b9e2c95c9810 407b43213544680655e06e22055c6e10 +m pmaxsb 407b8d9035449b06f4e06e2205236eb7 95264321bf3b68b255c2b9e2c95c9810 407b43213544680655e06e22055c6e10 +r pmaxsb 81f2a547be8d181184ededbc53239dcf 019963bf7459630b8d69483df7e8c6a9 01f26347745963118d69483d5323c6cf +m pmaxsb 81f2a547be8d181184ededbc53239dcf 019963bf7459630b8d69483df7e8c6a9 01f26347745963118d69483d5323c6cf +r pmaxsb f0350ca70523e0e45ba1ec54e87d39b3 0a3e0f7c75cb0842b95ed64d3b13ff64 0a3e0f7c752308425b5eec543b7d3964 +m pmaxsb f0350ca70523e0e45ba1ec54e87d39b3 0a3e0f7c75cb0842b95ed64d3b13ff64 0a3e0f7c752308425b5eec543b7d3964 +r pmaxsb e98ebd1ca893312a54cae7d5e13dfe91 0a5f45c55f1c9202b76ddefcb0ebfe6e 0a5f451c5f1c312a546de7fce13dfe6e +m pmaxsb e98ebd1ca893312a54cae7d5e13dfe91 0a5f45c55f1c9202b76ddefcb0ebfe6e 0a5f451c5f1c312a546de7fce13dfe6e +r pmaxsd c84ab713406845904d325b2d5a70a792 5f490104ced83ff86262dd37727c80f3 5f490104406845906262dd37727c80f3 +m pmaxsd c84ab713406845904d325b2d5a70a792 5f490104ced83ff86262dd37727c80f3 5f490104406845906262dd37727c80f3 +r pmaxsd e9b5f3f66b2e58c121a6c3476d21f1e5 63483da65c8c49d096084deb9ed0411e 63483da66b2e58c121a6c3476d21f1e5 +m pmaxsd e9b5f3f66b2e58c121a6c3476d21f1e5 63483da65c8c49d096084deb9ed0411e 63483da66b2e58c121a6c3476d21f1e5 +r pmaxsd a81b6e33c572a86aacf29b0f395c98b4 73a8f718a8c3ec352e2dac0350f6fd1c 73a8f718c572a86a2e2dac0350f6fd1c +m pmaxsd a81b6e33c572a86aacf29b0f395c98b4 73a8f718a8c3ec352e2dac0350f6fd1c 73a8f718c572a86a2e2dac0350f6fd1c +r pmaxsd 61c82534e9bf6f37c9e25f72d82e582b ecb42ac54b0966d4089b756aa3f77018 61c825344b0966d4089b756ad82e582b +m pmaxsd 61c82534e9bf6f37c9e25f72d82e582b ecb42ac54b0966d4089b756aa3f77018 61c825344b0966d4089b756ad82e582b +r pmaxsd 6f07136773a2ead356428c5a66a2ec77 28bad218e4ebf159ff1f240eb3e1553f 6f07136773a2ead356428c5a66a2ec77 +m pmaxsd 6f07136773a2ead356428c5a66a2ec77 28bad218e4ebf159ff1f240eb3e1553f 6f07136773a2ead356428c5a66a2ec77 +r pmaxsd 3026343700a654eb2ddd9db4ffc411c4 8404eb7f0cf4ca6fee8536da9dbf68bc 302634370cf4ca6f2ddd9db4ffc411c4 +m pmaxsd 3026343700a654eb2ddd9db4ffc411c4 8404eb7f0cf4ca6fee8536da9dbf68bc 302634370cf4ca6f2ddd9db4ffc411c4 +r pmaxsd ff6f850f2c57ea2a2c810e6dc1a1833d 5cdf726562b02dc2b39925ba7d9d67bc 5cdf726562b02dc22c810e6d7d9d67bc +m pmaxsd ff6f850f2c57ea2a2c810e6dc1a1833d 5cdf726562b02dc2b39925ba7d9d67bc 5cdf726562b02dc22c810e6d7d9d67bc +r pmaxsd 372f015d9242e83d2ef85b6fc544fd0f 0c9761367fac55ff28276f9a6e880c6b 372f015d7fac55ff2ef85b6f6e880c6b +m pmaxsd 372f015d9242e83d2ef85b6fc544fd0f 0c9761367fac55ff28276f9a6e880c6b 372f015d7fac55ff2ef85b6f6e880c6b +r pmaxsd 36b2a38dcef18acf0e0f01a829ba3c66 f078b65e01737fd22bfa8f668c8b14f4 36b2a38d01737fd22bfa8f6629ba3c66 +m pmaxsd 36b2a38dcef18acf0e0f01a829ba3c66 f078b65e01737fd22bfa8f668c8b14f4 36b2a38d01737fd22bfa8f6629ba3c66 +r pmaxsd 57436a097df30b8daa927a03090dfc6d 65ce6d498492e7e796df010bf4b23b84 65ce6d497df30b8daa927a03090dfc6d +m pmaxsd 57436a097df30b8daa927a03090dfc6d 65ce6d498492e7e796df010bf4b23b84 65ce6d497df30b8daa927a03090dfc6d +r pmaxud f5304f3e3ad1a923dc4c446c804bf950 c5e48064a393c8e947a34273c10a3c47 f5304f3ea393c8e9dc4c446cc10a3c47 +m pmaxud f5304f3e3ad1a923dc4c446c804bf950 c5e48064a393c8e947a34273c10a3c47 f5304f3ea393c8e9dc4c446cc10a3c47 +r pmaxud 6ec34f98a2199d3c810bdacfab80ee3d 6d08ed19fa045f841810cd8c109ed568 6ec34f98fa045f84810bdacfab80ee3d +m pmaxud 6ec34f98a2199d3c810bdacfab80ee3d 6d08ed19fa045f841810cd8c109ed568 6ec34f98fa045f84810bdacfab80ee3d +r pmaxud 1c4a678450562685769ab818a5b7985e b984aed62671e865e6f21d40fc7bc013 b984aed650562685e6f21d40fc7bc013 +m pmaxud 1c4a678450562685769ab818a5b7985e b984aed62671e865e6f21d40fc7bc013 b984aed650562685e6f21d40fc7bc013 +r pmaxud 5d0f926ce1157eaa95c45b338afcb3df 05a5c205c3659f388e17b17da2acb976 5d0f926ce1157eaa95c45b33a2acb976 +m pmaxud 5d0f926ce1157eaa95c45b338afcb3df 05a5c205c3659f388e17b17da2acb976 5d0f926ce1157eaa95c45b33a2acb976 +r pmaxud 8b5fccbef0e1e256bc563e0c775bfaed acb722146c6cbfa9ea4a022e1d3d7dbb acb72214f0e1e256ea4a022e775bfaed +m pmaxud 8b5fccbef0e1e256bc563e0c775bfaed acb722146c6cbfa9ea4a022e1d3d7dbb acb72214f0e1e256ea4a022e775bfaed +r pmaxud 048612e51a468e36c51cdd8f87e12ab4 0c05cb6ebd128663d7568e3e8a3ac80e 0c05cb6ebd128663d7568e3e8a3ac80e +m pmaxud 048612e51a468e36c51cdd8f87e12ab4 0c05cb6ebd128663d7568e3e8a3ac80e 0c05cb6ebd128663d7568e3e8a3ac80e +r pmaxud 22cf5e4cfad1bdf58de2b4a9d799ff5f 80ddba7e53e42d123208cf9b04b0569c 80ddba7efad1bdf58de2b4a9d799ff5f +m pmaxud 22cf5e4cfad1bdf58de2b4a9d799ff5f 80ddba7e53e42d123208cf9b04b0569c 80ddba7efad1bdf58de2b4a9d799ff5f +r pmaxud 4288ae612c0dad40f0733f448390351b 6489eab2c96df363d52c4330a7aae391 6489eab2c96df363f0733f44a7aae391 +m pmaxud 4288ae612c0dad40f0733f448390351b 6489eab2c96df363d52c4330a7aae391 6489eab2c96df363f0733f44a7aae391 +r pmaxud c1fbfd8f4d8698c2cb9dfb4ea5d18713 14575775bc3a12029d8e66ea90352a18 c1fbfd8fbc3a1202cb9dfb4ea5d18713 +m pmaxud c1fbfd8f4d8698c2cb9dfb4ea5d18713 14575775bc3a12029d8e66ea90352a18 c1fbfd8fbc3a1202cb9dfb4ea5d18713 +r pmaxud f9754842f9c9ba28f82a63b15c68b274 ec91fe34c7d6c79a66fab2b3db5ce85e f9754842f9c9ba28f82a63b1db5ce85e +m pmaxud f9754842f9c9ba28f82a63b15c68b274 ec91fe34c7d6c79a66fab2b3db5ce85e f9754842f9c9ba28f82a63b1db5ce85e +r pmaxuw 474289e7cb61501e54e7f35bc162726a 4784d95987cd4ed80c3ca578a32bd88e 4784d959cb61501e54e7f35bc162d88e +m pmaxuw 474289e7cb61501e54e7f35bc162726a 4784d95987cd4ed80c3ca578a32bd88e 4784d959cb61501e54e7f35bc162d88e +r pmaxuw 08aebee85fda964fbba02737f3c98220 837be65197abe2686b1fba2604afb8d5 837be65197abe268bba0ba26f3c9b8d5 +m pmaxuw 08aebee85fda964fbba02737f3c98220 837be65197abe2686b1fba2604afb8d5 837be65197abe268bba0ba26f3c9b8d5 +r pmaxuw 9605e2b252c1c86809217c310baca0c3 fbc4208894fdc0f55f706da71bf2425f fbc4e2b294fdc8685f707c311bf2a0c3 +m pmaxuw 9605e2b252c1c86809217c310baca0c3 fbc4208894fdc0f55f706da71bf2425f fbc4e2b294fdc8685f707c311bf2a0c3 +r pmaxuw 4e92f1b240a122141a366d352714867e 0aaa836b194e242cc5fc3ae904033357 4e92f1b240a1242cc5fc6d352714867e +m pmaxuw 4e92f1b240a122141a366d352714867e 0aaa836b194e242cc5fc3ae904033357 4e92f1b240a1242cc5fc6d352714867e +r pmaxuw 8ca3e752c306df00caab752f630ff07e 0e780c65c22b4ab8778d9ed6d9eb46ea 8ca3e752c306df00caab9ed6d9ebf07e +m pmaxuw 8ca3e752c306df00caab752f630ff07e 0e780c65c22b4ab8778d9ed6d9eb46ea 8ca3e752c306df00caab9ed6d9ebf07e +r pmaxuw ac82c1007a7d3cd8f54b130cdaa89cef 627bb6e12d1f6d4651ef145cb9b83843 ac82c1007a7d6d46f54b145cdaa89cef +m pmaxuw ac82c1007a7d3cd8f54b130cdaa89cef 627bb6e12d1f6d4651ef145cb9b83843 ac82c1007a7d6d46f54b145cdaa89cef +r pmaxuw 0a7c7a27fe91744777e3c0b6a9ec44fc 61ff7d4df3b6ca8131f01866bd76c58f 61ff7d4dfe91ca8177e3c0b6bd76c58f +m pmaxuw 0a7c7a27fe91744777e3c0b6a9ec44fc 61ff7d4df3b6ca8131f01866bd76c58f 61ff7d4dfe91ca8177e3c0b6bd76c58f +r pmaxuw 02dd0e32eecfc5fa2c3ffa1aebe6a4d2 69505d14b27d9d16f25b26e0042fa9fa 69505d14eecfc5faf25bfa1aebe6a9fa +m pmaxuw 02dd0e32eecfc5fa2c3ffa1aebe6a4d2 69505d14b27d9d16f25b26e0042fa9fa 69505d14eecfc5faf25bfa1aebe6a9fa +r pmaxuw f0f1798fe3c1699cf02b3b25bca27a9c d4ba52a206ff21b170fbbab6a7f19faf f0f1798fe3c1699cf02bbab6bca29faf +m pmaxuw f0f1798fe3c1699cf02b3b25bca27a9c d4ba52a206ff21b170fbbab6a7f19faf f0f1798fe3c1699cf02bbab6bca29faf +r pmaxuw 3004b7a97cf69dda9f7301c1392d8087 0088596389c893fd879d51d4c5c764db 3004b7a989c89dda9f7351d4c5c78087 +m pmaxuw 3004b7a97cf69dda9f7301c1392d8087 0088596389c893fd879d51d4c5c764db 3004b7a989c89dda9f7351d4c5c78087 +r pminsb 1e61c5ec52f79c6015e3c8dc7e9273bf 47086cc3da642fa7130d662777beb4a9 1e08c5c3daf79ca713e3c8dc7792b4a9 +m pminsb 1e61c5ec52f79c6015e3c8dc7e9273bf 47086cc3da642fa7130d662777beb4a9 1e08c5c3daf79ca713e3c8dc7792b4a9 +r pminsb 16559ec50352a3d92d460a61a5dd0f6f 0784892e9360315bf0177599dbe14b46 078489c59352a3d9f0170a99a5dd0f46 +m pminsb 16559ec50352a3d92d460a61a5dd0f6f 0784892e9360315bf0177599dbe14b46 078489c59352a3d9f0170a99a5dd0f46 +r pminsb 742c3e9e2b92eef2c569453ccd1b0fc4 9a49ac115048d4c4f987fa170d3ce4dd 9a2cac9e2b92d4c4c587fa17cd1be4c4 +m pminsb 742c3e9e2b92eef2c569453ccd1b0fc4 9a49ac115048d4c4f987fa170d3ce4dd 9a2cac9e2b92d4c4c587fa17cd1be4c4 +r pminsb 9432a2e46543b956b819f459105730e9 5da3cfd6aea6558e0c28728e28dc3c9c 94a3a2d6aea6b98eb819f48e10dc309c +m pminsb 9432a2e46543b956b819f459105730e9 5da3cfd6aea6558e0c28728e28dc3c9c 94a3a2d6aea6b98eb819f48e10dc309c +r pminsb d2b3c4044ef23fb2e22093a48a9d2e0b adddf0eb4808f06704c857e949cc0fac adb3c4eb48f2f0b2e2c893a48a9d0fac +m pminsb d2b3c4044ef23fb2e22093a48a9d2e0b adddf0eb4808f06704c857e949cc0fac adb3c4eb48f2f0b2e2c893a48a9d0fac +r pminsb 89fba268812abdb21e4a9e0958fac555 e4450ababbfae0f9bc3127138b19183c 89fba2ba81fabdb2bc319e098bfac53c +m pminsb 89fba268812abdb21e4a9e0958fac555 e4450ababbfae0f9bc3127138b19183c 89fba2ba81fabdb2bc319e098bfac53c +r pminsb 1755377e9a786f014a6592749579b0f4 5f2619b1a20662f012305efa0acd1475 172619b19a0662f0123092fa95cdb0f4 +m pminsb 1755377e9a786f014a6592749579b0f4 5f2619b1a20662f012305efa0acd1475 172619b19a0662f0123092fa95cdb0f4 +r pminsb d70f7fb13667914c413cead25e27ac14 7acb193b9abab2f9e1917689e3f6bf86 d7cb19b19aba91f9e191ea89e3f6ac86 +m pminsb d70f7fb13667914c413cead25e27ac14 7acb193b9abab2f9e1917689e3f6bf86 d7cb19b19aba91f9e191ea89e3f6ac86 +r pminsb 2573776df1835e3ede9a220dce0e75e0 918107c43ea20cc00420edac31a0d599 918107c4f1830cc0de9aedaccea0d599 +m pminsb 2573776df1835e3ede9a220dce0e75e0 918107c43ea20cc00420edac31a0d599 918107c4f1830cc0de9aedaccea0d599 +r pminsb 5cce191e65591384ff4cb613013cc685 0194ddb82b49abf059a93d4f11d611db 0194ddb82b49ab84ffa9b61301d6c685 +m pminsb 5cce191e65591384ff4cb613013cc685 0194ddb82b49abf059a93d4f11d611db 0194ddb82b49ab84ffa9b61301d6c685 +r pminsd da6c63303173ecc97e1e22cf15bd5c2f 24509983fc3bcc36baf7e45e9fa43077 da6c6330fc3bcc36baf7e45e9fa43077 +m pminsd da6c63303173ecc97e1e22cf15bd5c2f 24509983fc3bcc36baf7e45e9fa43077 da6c6330fc3bcc36baf7e45e9fa43077 +r pminsd fa99500fef6024ba39dce32c239cf309 570037914d04ab3d05d75ec6f616ee9a fa99500fef6024ba05d75ec6f616ee9a +m pminsd fa99500fef6024ba39dce32c239cf309 570037914d04ab3d05d75ec6f616ee9a fa99500fef6024ba05d75ec6f616ee9a +r pminsd 17a0dc273ba9f8030a52741849e54740 f6f2b14fbb3184b2141625713239066f f6f2b14fbb3184b20a5274183239066f +m pminsd 17a0dc273ba9f8030a52741849e54740 f6f2b14fbb3184b2141625713239066f f6f2b14fbb3184b20a5274183239066f +r pminsd 8fcf04e5b2dca44fcf4c517ea3a413ff 5d700527e24d9241c57eb74d70183523 8fcf04e5b2dca44fc57eb74da3a413ff +m pminsd 8fcf04e5b2dca44fcf4c517ea3a413ff 5d700527e24d9241c57eb74d70183523 8fcf04e5b2dca44fc57eb74da3a413ff +r pminsd bc70c3b3ef84644b6295f64a4ce61473 e8c72e865de41295f2db8f44cbbf37e2 bc70c3b3ef84644bf2db8f44cbbf37e2 +m pminsd bc70c3b3ef84644b6295f64a4ce61473 e8c72e865de41295f2db8f44cbbf37e2 bc70c3b3ef84644bf2db8f44cbbf37e2 +r pminsd fcd015ff8f2e73a3a0fae06860b606c7 f34428d9c8833f5b78fb29445f3bc8d7 f34428d98f2e73a3a0fae0685f3bc8d7 +m pminsd fcd015ff8f2e73a3a0fae06860b606c7 f34428d9c8833f5b78fb29445f3bc8d7 f34428d98f2e73a3a0fae0685f3bc8d7 +r pminsd a93bf6332d650e0266478ac4fc21a428 da30ef8bc0b5573e34a901384a97a32f a93bf633c0b5573e34a90138fc21a428 +m pminsd a93bf6332d650e0266478ac4fc21a428 da30ef8bc0b5573e34a901384a97a32f a93bf633c0b5573e34a90138fc21a428 +r pminsd 20fd62bd65b571158e48704b3c31abc2 f9da7f07e00794eb00b0940ba5e08516 f9da7f07e00794eb8e48704ba5e08516 +m pminsd 20fd62bd65b571158e48704b3c31abc2 f9da7f07e00794eb00b0940ba5e08516 f9da7f07e00794eb8e48704ba5e08516 +r pminsd be625608d5abd787f5c90ee73af5d7c0 ac8dd5bbc503330eb9dd5dab8e212ab7 ac8dd5bbc503330eb9dd5dab8e212ab7 +m pminsd be625608d5abd787f5c90ee73af5d7c0 ac8dd5bbc503330eb9dd5dab8e212ab7 ac8dd5bbc503330eb9dd5dab8e212ab7 +r pminsd ddb5cd8016d27d057796e0861576e44f 4e94ec120b386f523bfcd80321664d3e ddb5cd800b386f523bfcd8031576e44f +m pminsd ddb5cd8016d27d057796e0861576e44f 4e94ec120b386f523bfcd80321664d3e ddb5cd800b386f523bfcd8031576e44f +r pminud db43c391c6b69f3af17a6312e7c28d9a 3d3cc0784c2f856363d9810079bbabd9 3d3cc0784c2f856363d9810079bbabd9 +m pminud db43c391c6b69f3af17a6312e7c28d9a 3d3cc0784c2f856363d9810079bbabd9 3d3cc0784c2f856363d9810079bbabd9 +r pminud 125934a781e479d33d431279cce48fce d4d14e592776b1ef0b40d58cb22d00b1 125934a72776b1ef0b40d58cb22d00b1 +m pminud 125934a781e479d33d431279cce48fce d4d14e592776b1ef0b40d58cb22d00b1 125934a72776b1ef0b40d58cb22d00b1 +r pminud df411d2ee2e7467c38bb69a6e1e9a617 6f9f902235982fa010fd4e94e9c808f5 6f9f902235982fa010fd4e94e1e9a617 +m pminud df411d2ee2e7467c38bb69a6e1e9a617 6f9f902235982fa010fd4e94e9c808f5 6f9f902235982fa010fd4e94e1e9a617 +r pminud 9e477892854b43e0beafe48541dc8da0 69f2843d15223a224edb6a053a967ecf 69f2843d15223a224edb6a053a967ecf +m pminud 9e477892854b43e0beafe48541dc8da0 69f2843d15223a224edb6a053a967ecf 69f2843d15223a224edb6a053a967ecf +r pminud acb9433f079dacacabeb000208c90296 20162517609f0f22a1a7a4c9c0a51f6b 20162517079dacaca1a7a4c908c90296 +m pminud acb9433f079dacacabeb000208c90296 20162517609f0f22a1a7a4c9c0a51f6b 20162517079dacaca1a7a4c908c90296 +r pminud 63e279a20368bc8bdb3b370954bcbf24 ef56701db49bea4ce52e79ce9700a7f7 63e279a20368bc8bdb3b370954bcbf24 +m pminud 63e279a20368bc8bdb3b370954bcbf24 ef56701db49bea4ce52e79ce9700a7f7 63e279a20368bc8bdb3b370954bcbf24 +r pminud 200d17261638b12a2a6a07863ec28077 31005fb9ada2074bf63a63fedcb4d29c 200d17261638b12a2a6a07863ec28077 +m pminud 200d17261638b12a2a6a07863ec28077 31005fb9ada2074bf63a63fedcb4d29c 200d17261638b12a2a6a07863ec28077 +r pminud 3f871736dc9ac5357446eb65e4e703bb 445ef059e641a1ccb097e047aacc5b89 3f871736dc9ac5357446eb65aacc5b89 +m pminud 3f871736dc9ac5357446eb65e4e703bb 445ef059e641a1ccb097e047aacc5b89 3f871736dc9ac5357446eb65aacc5b89 +r pminud 1c9c7740ef193457959960926235021b 83bd1e68fb03f57bef136b941e54ffe8 1c9c7740ef193457959960921e54ffe8 +m pminud 1c9c7740ef193457959960926235021b 83bd1e68fb03f57bef136b941e54ffe8 1c9c7740ef193457959960921e54ffe8 +r pminud 139832afee423c3d6930e0fad3ba39c4 4969e55289753f038f7980d1535979e5 139832af89753f036930e0fa535979e5 +m pminud 139832afee423c3d6930e0fad3ba39c4 4969e55289753f038f7980d1535979e5 139832af89753f036930e0fa535979e5 +r pminuw 80c745ef729f1792ccd7e987538166e1 f4ad41832c22ba116c949cea66e687ae 80c741832c2217926c949cea538166e1 +m pminuw 80c745ef729f1792ccd7e987538166e1 f4ad41832c22ba116c949cea66e687ae 80c741832c2217926c949cea538166e1 +r pminuw bf75aa6c1abe01039a5af627ff97439f ded72f677f96a350623139cb7207e36c bf752f671abe0103623139cb7207439f +m pminuw bf75aa6c1abe01039a5af627ff97439f ded72f677f96a350623139cb7207e36c bf752f671abe0103623139cb7207439f +r pminuw 2ced5f927f2b383caf8484c5f3078d2a 6431aa6a1e5e366d4c1cd56194c94a4e 2ced5f921e5e366d4c1c84c594c94a4e +m pminuw 2ced5f927f2b383caf8484c5f3078d2a 6431aa6a1e5e366d4c1cd56194c94a4e 2ced5f921e5e366d4c1c84c594c94a4e +r pminuw 237d5fcd3f71f6e8e6230d4d4add00ad e309aef8a605af130821eb96e737777e 237d5fcd3f71af1308210d4d4add00ad +m pminuw 237d5fcd3f71f6e8e6230d4d4add00ad e309aef8a605af130821eb96e737777e 237d5fcd3f71af1308210d4d4add00ad +r pminuw 006fa689f61c78b41d010fab20265755 b5a9377eb31749ef710cf757885d2728 006f377eb31749ef1d010fab20262728 +m pminuw 006fa689f61c78b41d010fab20265755 b5a9377eb31749ef710cf757885d2728 006f377eb31749ef1d010fab20262728 +r pminuw 1f1030333fb8fa4b2feb05cb92ed4f4d 385e4166df2141ad63a8769192481679 1f1030333fb841ad2feb05cb92481679 +m pminuw 1f1030333fb8fa4b2feb05cb92ed4f4d 385e4166df2141ad63a8769192481679 1f1030333fb841ad2feb05cb92481679 +r pminuw dbacfa35b7d2b75af8ad6b99bb3fa4c2 c673c91ec9aed3f8b9c3e32f2103009d c673c91eb7d2b75ab9c36b992103009d +m pminuw dbacfa35b7d2b75af8ad6b99bb3fa4c2 c673c91ec9aed3f8b9c3e32f2103009d c673c91eb7d2b75ab9c36b992103009d +r pminuw 928efefdf9f5ec8d5313bd01b82612e0 bc36ca100a4a3a7d5127ba1c529aa0bf 928eca100a4a3a7d5127ba1c529a12e0 +m pminuw 928efefdf9f5ec8d5313bd01b82612e0 bc36ca100a4a3a7d5127ba1c529aa0bf 928eca100a4a3a7d5127ba1c529a12e0 +r pminuw 9f043af6a1aed58f1ee978efa4b054d2 76f140aa4182b4e706a17746411ab40c 76f13af64182b4e706a17746411a54d2 +m pminuw 9f043af6a1aed58f1ee978efa4b054d2 76f140aa4182b4e706a17746411ab40c 76f13af64182b4e706a17746411a54d2 +r pminuw 5e58aa8b4c88ae0d34fa174f9ce927c4 51f2275707e17ae4b3fd9698098ef5b0 51f2275707e17ae434fa174f098e27c4 +m pminuw 5e58aa8b4c88ae0d34fa174f9ce927c4 51f2275707e17ae4b3fd9698098ef5b0 51f2275707e17ae434fa174f098e27c4 From d74347eb4d36c94bb621e0e9fc23e547ad032bdb Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 9 Dec 2025 14:06:06 +0100 Subject: [PATCH 152/502] Darwin: add macOS 10.14 support == 714 tests, 77 stderr failures, 5 stdout failures, 0 stderrB failures, 0 stdoutB failures, 33 post failures == x86 tests are all failing due to unsupported instructions I need to go through the Massif tests to filter out all of the new macOS leaks. Otherwise fairly similar to trhe results on macOS 10.13 --- Makefile.all.am | 6 ++- NEWS | 4 +- configure.ac | 4 ++ coregrind/m_syswrap/syswrap-x86-darwin.c | 3 +- darwin-drd.supp | 68 ++++++++++++++++++++++++ darwin-helgrind.supp | 43 +++++++++++++++ darwin.supp | 24 +++++++++ 7 files changed, 148 insertions(+), 4 deletions(-) diff --git a/Makefile.all.am b/Makefile.all.am index d4f6b3fb7..df7896016 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -257,7 +257,8 @@ AM_CCASFLAGS_ARM64_FREEBSD = @FLAG_M64@ -g AM_FLAG_M3264_X86_DARWIN = -arch i386 AM_CFLAGS_X86_DARWIN = $(WERROR) -arch i386 $(AM_CFLAGS_BASE) \ - -mmacosx-version-min=10.6 \ + -I@SDK_INC_DIR@ \ + @CLANG_OS_MIN_VERS_ARG@ \ -fno-pic -fno-PIC AM_CFLAGS_PSO_X86_DARWIN = $(AM_CFLAGS_X86_DARWIN) $(AM_CFLAGS_PSO_BASE) @@ -265,7 +266,8 @@ AM_CCASFLAGS_X86_DARWIN = -arch i386 -g AM_FLAG_M3264_AMD64_DARWIN = -arch x86_64 AM_CFLAGS_AMD64_DARWIN = $(WERROR) -arch x86_64 $(AM_CFLAGS_BASE) \ - -mmacosx-version-min=10.6 + -I@SDK_INC_DIR@ \ + @CLANG_OS_MIN_VERS_ARG@ AM_CFLAGS_PSO_AMD64_DARWIN = $(AM_CFLAGS_AMD64_DARWIN) $(AM_CFLAGS_PSO_BASE) AM_CCASFLAGS_AMD64_DARWIN = -arch x86_64 -g diff --git a/NEWS b/NEWS index 723b716b5..51ba3e940 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,7 @@ PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, RISCV64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support -for nanoMIPS/Linux. macOS is supported up to version 10.13 High Sierra. +for nanoMIPS/Linux. macOS is supported up to version 10.14 Mojave. * ==================== CORE CHANGES =================== @@ -14,6 +14,8 @@ for nanoMIPS/Linux. macOS is supported up to version 10.13 High Sierra. s390x: Machine models older than z196 are no longer supported. +Initial support for macOS 10.14 Mojave has been added. + * ==================== TOOL CHANGES =================== diff --git a/configure.ac b/configure.ac index e251d795d..40330fdc3 100644 --- a/configure.ac +++ b/configure.ac @@ -542,6 +542,10 @@ case "${host_os}" in AC_MSG_RESULT([Darwin 17.x (${kernel}) / macOS 10.13 High Sierra]) DARWIN_VERS=$DARWIN_10_13 ;; + 18.*) + AC_MSG_RESULT([Darwin 18.x (${kernel}) / macOS 10.14 Mojave]) + DARWIN_VERS=$DARWIN_10_14 + ;; *) AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.8-10.11, macOS 10.12-10.13)]) diff --git a/coregrind/m_syswrap/syswrap-x86-darwin.c b/coregrind/m_syswrap/syswrap-x86-darwin.c index 76416b06d..a0bc1a1e7 100644 --- a/coregrind/m_syswrap/syswrap-x86-darwin.c +++ b/coregrind/m_syswrap/syswrap-x86-darwin.c @@ -430,7 +430,8 @@ void wqthread_hijack(Addr self, Addr kport, Addr stackaddr, Addr workitem, || DARWIN_VERS == DARWIN_10_10 \ || DARWIN_VERS == DARWIN_10_11 \ || DARWIN_VERS == DARWIN_10_12 \ - || DARWIN_VERS == DARWIN_10_13 + || DARWIN_VERS == DARWIN_10_13 \ + || DARWIN_VERS == DARWIN_10_14 UWord magic_delta = 0xB0; # else # error "magic_delta: to be computed on new OS version" diff --git a/darwin-drd.supp b/darwin-drd.supp index e8cccdaab..76bdd8636 100644 --- a/darwin-drd.supp +++ b/darwin-drd.supp @@ -299,3 +299,71 @@ fun:gomp_barrier_wait fun:child } + +# DRD suppressions for Darwin 18 / macOS 10.14 Mohave + +{ + macOS1014:pthread_mutex_destroy + drd:MutexErr + fun:pthread_mutex_destroy +} + +{ + macOS1014:_xpc_dictionary_look_up_table + drd:ConflictingAccess + ... + fun:_xpc_dictionary_look_up_table +} + +{ + macOS1014:objc_msgSendSuper2 + drd:ConflictingAccess + fun:objc_msgSendSuper2 +} + +{ + mac1014:nw_path_copy_interface_with_generation + drd:ConflictingAccess + ... + fun:nw_path_copy_interface_with_generation +} + +{ + mac1014:__setenv_locked + drd:ConflictingAccess + fun:__setenv_locked +} + +{ + mac1014:dlopen_internal + drd:ConflictingAccess + ... + fun:dlopen_internal +} + +{ + mac1014:getpwuid_r + drd:ConflictingAccess + fun:si_search + fun:getpwuid_r +} + +{ + mac1014:_pthread_tsd_cleanup + drd:ConflictingAccess + ... + fun:_pthread_tsd_cleanup +} + +{ + macOS1014:dyld::findMappedRange(unsigned long) + drd:ConflictingAccess + fun:_ZN4dyld15findMappedRangeEm +} + +{ + macOS1014:dyld::addImage(ImageLoader*) + drd:ConflictingAccess + ... + fun:_ZN4dyldL8addImageEP11ImageLoader +} diff --git a/darwin-helgrind.supp b/darwin-helgrind.supp index 7588c1d06..db923303a 100644 --- a/darwin-helgrind.supp +++ b/darwin-helgrind.supp @@ -141,3 +141,46 @@ fun:_ZNSt3__119__thread_local_dataEv } +# Helgrind Suppressions for Darwin 18.x / macOS 10.14 Mojave + +{ + macOS1014:_xpc_dictionary_look_up_tab + Helgrind:Race + fun:_platform_strcmp + fun:_xpc_dictionary_look_up_table +} + +{ + macOS1014:_pthread_tsd_cleanup + Helgrind:Race + ... + fun:_pthread_tsd_cleanup +} + +{ + macOS1014:nw_path_copy_interface_with_generation + Helgrind:Race + ... + fun:nw_path_copy_interface_with_generation +} + +{ + macOS1014:__setenv_locked + Helgrind:Race + fun:__setenv_locked +} + +{ + macOS1014:_pthread_once_handler + Helgrind:Race + ... + fun:__pthread_once_handler +} + +{ + macOS1014:getpwuid_r + Helgrind:Race + fun:si_search + fun:getpwuid_r +} + diff --git a/darwin.supp b/darwin.supp index af2c3ee69..1fd194811 100644 --- a/darwin.supp +++ b/darwin.supp @@ -783,3 +783,27 @@ Memcheck:Cond fun:ccaes_vng_ctr_crypt } + +# Suppressions for Darwin 18.x / macOS 10.14 Mojave + +{ + macOS1014:_dyld_start + Memcheck:Cond + ... + fun:_dyld_start +} + +{ + macOS1014:libSystem_initializer + Memcheck:Addr16 + ... + fun:libSystem_initializer +} + +{ + macOS1014:_NXHashRehashToCapacity + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc_zone_calloc + fun:_NXHashRehashToCapacity +} From 720d388d91e88571e3618b87b2f2192b23222719 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 10 Dec 2025 08:58:25 +0100 Subject: [PATCH 153/502] Darwin regtest: numerous bits of Darwin 18 cleanup Add a few more ignore-fn options to the massif tests for the extra leaks that are in Darwin 18. Add some suppressions to a couple of memcheck tests that use num-callers of 2 or 3. The shorter callsteack means some of the many Darwin default suppressions don't match which was causing these tests to fail. Add more DRD suppressions for getaddrinfo. There seems to be a never ending amount of conflicts in dyld. --- darwin-drd.supp | 53 ++++++++++++++++++++++++++++ massif/tests/alloc-fns-A.vgtest | 2 ++ massif/tests/alloc-fns-B.vgtest | 2 ++ massif/tests/basic.vgtest | 2 ++ massif/tests/basic2.vgtest | 2 ++ massif/tests/big-alloc.vgtest | 2 ++ massif/tests/bug469146.vgtest | 2 ++ massif/tests/culling1.stderr.exp | 3 ++ massif/tests/culling1.vgtest | 2 ++ massif/tests/culling2.stderr.exp | 3 ++ massif/tests/culling2.vgtest | 2 ++ massif/tests/custom_alloc.vgtest | 2 ++ massif/tests/deep-A.vgtest | 2 ++ massif/tests/deep-B.stderr.exp | 3 ++ massif/tests/deep-B.vgtest | 2 ++ massif/tests/deep-C.stderr.exp | 3 ++ massif/tests/deep-C.vgtest | 2 ++ massif/tests/deep-D.vgtest | 2 ++ massif/tests/ignored.vgtest | 2 ++ massif/tests/ignoring.vgtest | 2 ++ massif/tests/inlinfomalloc.vgtest | 2 ++ massif/tests/insig.vgtest | 2 ++ massif/tests/long-names.vgtest | 2 ++ massif/tests/long-time.vgtest | 2 ++ massif/tests/new-cpp.vgtest | 2 ++ massif/tests/null.vgtest | 2 ++ massif/tests/one.vgtest | 2 ++ massif/tests/overloaded-new.vgtest | 2 ++ massif/tests/peak.vgtest | 2 ++ massif/tests/peak2.stderr.exp | 3 ++ massif/tests/peak2.vgtest | 2 ++ massif/tests/realloc.stderr.exp | 3 ++ massif/tests/realloc.vgtest | 2 ++ massif/tests/thresholds_0_0.vgtest | 2 ++ massif/tests/thresholds_0_10.vgtest | 2 ++ massif/tests/thresholds_10_0.vgtest | 2 ++ massif/tests/thresholds_10_10.vgtest | 2 ++ massif/tests/thresholds_5_0.vgtest | 2 ++ massif/tests/thresholds_5_10.vgtest | 2 ++ massif/tests/zero1.vgtest | 2 ++ massif/tests/zero2.vgtest | 2 ++ memcheck/tests/Makefile.am | 1 + memcheck/tests/badfree-2trace.vgtest | 2 +- memcheck/tests/darwin.supp | 34 ++++++++++++++++++ memcheck/tests/err_disable4.vgtest | 2 +- 45 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 memcheck/tests/darwin.supp diff --git a/darwin-drd.supp b/darwin-drd.supp index 76bdd8636..39f9b9b63 100644 --- a/darwin-drd.supp +++ b/darwin-drd.supp @@ -367,3 +367,56 @@ ... fun:_ZN4dyldL8addImageEP11ImageLoader } + +{ + macOS1014:isKnownClass(objc_class*) + drd:ConflictingAccess + fun:_ZL12isKnownClassP10objc_class +} + +{ + macOS1014:ImageLoader::ImageLoader(char const*, unsigned int) + drd:ConflictingAccess + fun:_ZN11ImageLoaderC2EPKcj +} + +{ + macOS1014:_os_once_callout + drd:ConflictingAccess + ... + fun:_os_once_callout +} + +{ + macOS1014:ImageLoaderMachO::ImageLoaderMachO(macho_header const*, char const*, unsigned int, unsigned int*, unsigned int) + drd:ConflictingAccess + fun:_ZN16ImageLoaderMachOC2EPK12macho_headerPKcjPjj +} + +{ + macOS1014:_fsi_get_validation + drd:ConflictingAccess + ... + fun:_fsi_get_validation +} + +{ + macOS1014:__nw_context_copy_implicit_context_block_invoke + drd:ConflictingAccess + ... + fun:__nw_context_copy_implicit_context_block_invoke +} + +{ + macOS1014:_objc_msgSend_uncached + drd:ConflictingAccess + ... + fun:_objc_msgSend_uncached +} + +{ + macOS1014:dyld::load(char const*, dyld::LoadContext const&, unsigned int&) + drd:ConflictingAccess + ... + fun:_ZN4dyld4loadEPKcRKNS_11LoadContextERj +} diff --git a/massif/tests/alloc-fns-A.vgtest b/massif/tests/alloc-fns-A.vgtest index a605a9b31..c9163223d 100644 --- a/massif/tests/alloc-fns-A.vgtest +++ b/massif/tests/alloc-fns-A.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" 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.vgtest b/massif/tests/alloc-fns-B.vgtest index 24da5ad02..e7329a378 100644 --- a/massif/tests/alloc-fns-B.vgtest +++ b/massif/tests/alloc-fns-B.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic.vgtest b/massif/tests/basic.vgtest index 6a67f8a60..87c3a6444 100644 --- a/massif/tests/basic.vgtest +++ b/massif/tests/basic.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic2.vgtest b/massif/tests/basic2.vgtest index 36e311869..1dce7706f 100644 --- a/massif/tests/basic2.vgtest +++ b/massif/tests/basic2.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/big-alloc.vgtest b/massif/tests/big-alloc.vgtest index d7242de19..7f9149d91 100644 --- a/massif/tests/big-alloc.vgtest +++ b/massif/tests/big-alloc.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/bug469146.vgtest b/massif/tests/bug469146.vgtest index 60847a185..3bf1b60c1 100644 --- a/massif/tests/bug469146.vgtest +++ b/massif/tests/bug469146.vgtest @@ -6,5 +6,7 @@ vgopts: --ignore-fn=call_init --ignore-fn=pool vgopts: --ignore-fn=filter_function1 --ignore-fn="filter_function2(int)" --ignore-fn=filter_function3 # macOS allocations vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_nolock --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInser --ignore-fn=add_class_to_loadable_list --ignore-fn=NXHashInsert --ignore-fn=class_createInstance --ignore-fn=_xpc_malloc --ignore-fn=strdup --ignore-fn=_xpc_calloc +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" 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/culling1.stderr.exp b/massif/tests/culling1.stderr.exp index 812113d86..e277dc60e 100644 --- a/massif/tests/culling1.stderr.exp +++ b/massif/tests/culling1.stderr.exp @@ -36,6 +36,9 @@ Massif: 12: add_class_to_loadable_list Massif: 13: class_createInstance Massif: 14: xpc_string_create Massif: 15: xpc_array_create +Massif: 16: _NXMapRehash(_NXMapTable*) +Massif: 17: arc4_init +Massif: 18: realizeClassWithoutSwift(objc_class*) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:32, hp:16, ex:16, st:0) Massif: alloc S. 2 (t:64, hp:32, ex:32, st:0) diff --git a/massif/tests/culling1.vgtest b/massif/tests/culling1.vgtest index 91f605612..5247e1b71 100644 --- a/massif/tests/culling1.vgtest +++ b/massif/tests/culling1.vgtest @@ -3,5 +3,7 @@ vgopts: -v -v --stats=yes --stacks=no --time-unit=B --heap-admin=16 --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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose cleanup: rm massif.out diff --git a/massif/tests/culling2.stderr.exp b/massif/tests/culling2.stderr.exp index 07a14e645..599d0f0aa 100644 --- a/massif/tests/culling2.stderr.exp +++ b/massif/tests/culling2.stderr.exp @@ -36,6 +36,9 @@ Massif: 12: add_class_to_loadable_list Massif: 13: class_createInstance Massif: 14: xpc_string_create Massif: 15: xpc_array_create +Massif: 16: _NXMapRehash(_NXMapTable*) +Massif: 17: arc4_init +Massif: 18: realizeClassWithoutSwift(objc_class*) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:16, hp:0, ex:16, st:0) Massif: alloc S. 2 (t:432, hp:400, ex:32, st:0) diff --git a/massif/tests/culling2.vgtest b/massif/tests/culling2.vgtest index 186a41729..847010e1e 100644 --- a/massif/tests/culling2.vgtest +++ b/massif/tests/culling2.vgtest @@ -3,5 +3,7 @@ vgopts: -v -v --stats=yes --stacks=no --time-unit=B --heap-admin=16 --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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose cleanup: rm massif.out diff --git a/massif/tests/custom_alloc.vgtest b/massif/tests/custom_alloc.vgtest index 58e68c67f..c651534da 100644 --- a/massif/tests/custom_alloc.vgtest +++ b/massif/tests/custom_alloc.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-A.vgtest b/massif/tests/deep-A.vgtest index 01139e0f7..77fc9d0e3 100644 --- a/massif/tests/deep-A.vgtest +++ b/massif/tests/deep-A.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-B.stderr.exp b/massif/tests/deep-B.stderr.exp index 526f6225c..7f7c332b9 100644 --- a/massif/tests/deep-B.stderr.exp +++ b/massif/tests/deep-B.stderr.exp @@ -43,6 +43,9 @@ Massif: 12: add_class_to_loadable_list Massif: 13: class_createInstance Massif: 14: xpc_string_create Massif: 15: xpc_array_create +Massif: 16: _NXMapRehash(_NXMapTable*) +Massif: 17: arc4_init +Massif: 18: realizeClassWithoutSwift(objc_class*) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0) Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0) diff --git a/massif/tests/deep-B.vgtest b/massif/tests/deep-B.vgtest index 75e9f10f0..0328353b3 100644 --- a/massif/tests/deep-B.vgtest +++ b/massif/tests/deep-B.vgtest @@ -3,6 +3,8 @@ vgopts: --stats=yes --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --allo 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-C.stderr.exp b/massif/tests/deep-C.stderr.exp index 53dfc700a..39b35f139 100644 --- a/massif/tests/deep-C.stderr.exp +++ b/massif/tests/deep-C.stderr.exp @@ -46,6 +46,9 @@ Massif: 12: add_class_to_loadable_list Massif: 13: class_createInstance Massif: 14: xpc_string_create Massif: 15: xpc_array_create +Massif: 16: _NXMapRehash(_NXMapTable*) +Massif: 17: arc4_init +Massif: 18: realizeClassWithoutSwift(objc_class*) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0) Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0) diff --git a/massif/tests/deep-C.vgtest b/massif/tests/deep-C.vgtest index aa592c557..b21e5df8b 100644 --- a/massif/tests/deep-C.vgtest +++ b/massif/tests/deep-C.vgtest @@ -3,6 +3,8 @@ vgopts: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-D.vgtest b/massif/tests/deep-D.vgtest index 2259b309f..374f2afc2 100644 --- a/massif/tests/deep-D.vgtest +++ b/massif/tests/deep-D.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" 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.vgtest b/massif/tests/ignored.vgtest index acd67b87a..7f9448156 100644 --- a/massif/tests/ignored.vgtest +++ b/massif/tests/ignored.vgtest @@ -4,5 +4,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/ignoring.vgtest b/massif/tests/ignoring.vgtest index bcaf7a8ec..7181f3435 100644 --- a/massif/tests/ignoring.vgtest +++ b/massif/tests/ignoring.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/inlinfomalloc.vgtest b/massif/tests/inlinfomalloc.vgtest index 4b410b6ad..8f5c401e4 100644 --- a/massif/tests/inlinfomalloc.vgtest +++ b/massif/tests/inlinfomalloc.vgtest @@ -3,6 +3,8 @@ vgopts: --stacks=no --heap-admin=0 --time-unit=B --threshold=0 --detailed-freq=6 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 # macOS allocations vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClass(objc_class*)" --ignore-fn=map_images_nolock --ignore-fn=NXCreateHashTableFromZone --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInsert --ignore-fn=add_class_to_loadable_list --ignore-fn=class_createInstance --ignore-fn=_xpc_malloc --ignore-fn=strdup --ignore-fn=_xpc_calloc +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose 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.vgtest b/massif/tests/insig.vgtest index a23eedb0e..a2994b524 100644 --- a/massif/tests/insig.vgtest +++ b/massif/tests/insig.vgtest @@ -4,5 +4,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-names.vgtest b/massif/tests/long-names.vgtest index eff405574..562778dee 100644 --- a/massif/tests/long-names.vgtest +++ b/massif/tests/long-names.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-time.vgtest b/massif/tests/long-time.vgtest index 3d038d353..16d0af0fa 100644 --- a/massif/tests/long-time.vgtest +++ b/massif/tests/long-time.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/new-cpp.vgtest b/massif/tests/new-cpp.vgtest index 19ea0db35..aa966243d 100644 --- a/massif/tests/new-cpp.vgtest +++ b/massif/tests/new-cpp.vgtest @@ -5,5 +5,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" 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/null.vgtest b/massif/tests/null.vgtest index 89a3152fc..bab26da37 100644 --- a/massif/tests/null.vgtest +++ b/massif/tests/null.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/one.vgtest b/massif/tests/one.vgtest index a51f019b9..aa867395e 100644 --- a/massif/tests/one.vgtest +++ b/massif/tests/one.vgtest @@ -3,5 +3,7 @@ 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index 292b6cc73..cf41ad2a7 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -6,5 +6,7 @@ vgopts: --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_allo vgopts: --ignore-fn=call_init --ignore-fn=pool # macOS allocations vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_nolock --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_malloc +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ./filter_new_aligned | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/peak.vgtest b/massif/tests/peak.vgtest index 044e6c70b..fd2ccbe1e 100644 --- a/massif/tests/peak.vgtest +++ b/massif/tests/peak.vgtest @@ -3,5 +3,7 @@ vgopts: --stacks=no --time-unit=B --peak-inaccuracy=0 --heap-admin=128 --massif- 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/peak2.stderr.exp b/massif/tests/peak2.stderr.exp index 45ea90f76..0bbf60f5e 100644 --- a/massif/tests/peak2.stderr.exp +++ b/massif/tests/peak2.stderr.exp @@ -36,6 +36,9 @@ Massif: 12: add_class_to_loadable_list Massif: 13: class_createInstance Massif: 14: xpc_string_create Massif: 15: xpc_array_create +Massif: 16: _NXMapRehash(_NXMapTable*) +Massif: 17: arc4_init +Massif: 18: realizeClassWithoutSwift(objc_class*) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:1728, hp:1600, ex:128, st:0) Massif: alloc S. 2 (t:1872, hp:1616, ex:256, st:0) diff --git a/massif/tests/peak2.vgtest b/massif/tests/peak2.vgtest index b11005803..2c253566a 100644 --- a/massif/tests/peak2.vgtest +++ b/massif/tests/peak2.vgtest @@ -3,6 +3,8 @@ vgopts: --stacks=no --time-unit=B -v -v --stats=yes --peak-inaccuracy=10.0 --hea 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/realloc.stderr.exp b/massif/tests/realloc.stderr.exp index 19e076f51..585a9ee7e 100644 --- a/massif/tests/realloc.stderr.exp +++ b/massif/tests/realloc.stderr.exp @@ -36,6 +36,9 @@ Massif: 12: add_class_to_loadable_list Massif: 13: class_createInstance Massif: 14: xpc_string_create Massif: 15: xpc_array_create +Massif: 16: _NXMapRehash(_NXMapTable*) +Massif: 17: arc4_init +Massif: 18: realizeClassWithoutSwift(objc_class*) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:800, hp:800, ex:0, st:0) Massif: realloc S. 2 (t:800, hp:800, ex:0, st:0) diff --git a/massif/tests/realloc.vgtest b/massif/tests/realloc.vgtest index 7d2b5c9ab..07207cecf 100644 --- a/massif/tests/realloc.vgtest +++ b/massif/tests/realloc.vgtest @@ -4,6 +4,8 @@ vgopts: -v -v --stats=yes --stacks=no --heap-admin=0 --time-unit=B --threshold=0 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_0_0.vgtest b/massif/tests/thresholds_0_0.vgtest index 8965fb3b5..46024cc3f 100644 --- a/massif/tests/thresholds_0_0.vgtest +++ b/massif/tests/thresholds_0_0.vgtest @@ -3,5 +3,7 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_0_10.vgtest b/massif/tests/thresholds_0_10.vgtest index 647b28533..8c750b083 100644 --- a/massif/tests/thresholds_0_10.vgtest +++ b/massif/tests/thresholds_0_10.vgtest @@ -3,5 +3,7 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=0 --massif-out-file 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_0.vgtest b/massif/tests/thresholds_10_0.vgtest index 5a026cf71..d4e2f376c 100644 --- a/massif/tests/thresholds_10_0.vgtest +++ b/massif/tests/thresholds_10_0.vgtest @@ -3,5 +3,7 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-fil 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_10.vgtest b/massif/tests/thresholds_10_10.vgtest index 4b64764d5..478e5099f 100644 --- a/massif/tests/thresholds_10_10.vgtest +++ b/massif/tests/thresholds_10_10.vgtest @@ -3,6 +3,8 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=10 --massif-out-fil 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_0.vgtest b/massif/tests/thresholds_5_0.vgtest index 7b4fa5993..791a4fceb 100644 --- a/massif/tests/thresholds_5_0.vgtest +++ b/massif/tests/thresholds_5_0.vgtest @@ -3,6 +3,8 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_10.vgtest b/massif/tests/thresholds_5_10.vgtest index 2343a2cd9..4cb99429e 100644 --- a/massif/tests/thresholds_5_10.vgtest +++ b/massif/tests/thresholds_5_10.vgtest @@ -3,6 +3,8 @@ vgopts: --stacks=no --time-unit=B --heap-admin=0 --threshold=5 --massif-out-file 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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/zero1.vgtest b/massif/tests/zero1.vgtest index b5f10f25d..fb8dfe26a 100644 --- a/massif/tests/zero1.vgtest +++ b/massif/tests/zero1.vgtest @@ -3,6 +3,8 @@ vgopts: --stacks=no --heap-admin=0 --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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/zero2.vgtest b/massif/tests/zero2.vgtest index 44de552f3..3c3612295 100644 --- a/massif/tests/zero2.vgtest +++ b/massif/tests/zero2.vgtest @@ -3,5 +3,7 @@ vgopts: --stacks=no --heap-admin=0 --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 +# Darwin ignore functions, for macOS 10.14 +vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 39974c18d..d49c6e34f 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -167,6 +167,7 @@ EXTRA_DIST = \ cxx17_aligned_new.stderr.exp cxx17_aligned_new.vgtest \ cxx17_aligned_new.stderr.exp_32 \ cxx17_aligned_new.stdout.exp \ + darwin.supp \ duplicate_align_size_errors.stderr.exp \ duplicate_align_size_errors.stderr.exp-memalign \ duplicate_align_size_errors.stderr.exp-darwin \ diff --git a/memcheck/tests/badfree-2trace.vgtest b/memcheck/tests/badfree-2trace.vgtest index a89be10ff..a58020529 100644 --- a/memcheck/tests/badfree-2trace.vgtest +++ b/memcheck/tests/badfree-2trace.vgtest @@ -1,3 +1,3 @@ -vgopts: --num-callers=2 -q +vgopts: --num-callers=2 -q --suppressions=darwin.supp prog: badfree stderr_filter_args: badfree.c diff --git a/memcheck/tests/darwin.supp b/memcheck/tests/darwin.supp new file mode 100644 index 000000000..2f9c530b6 --- /dev/null +++ b/memcheck/tests/darwin.supp @@ -0,0 +1,34 @@ +# macOS needs lots of suppressions for memory faults +# and leaks. This testcase restricts the recorded callstack to +# a depth of 2 which means several of the default suppressions +# with a depth of 3 or more no longer match + +# so this file puts back a load of 2-deep suppressions +{ + macOS dyld 1 + Memcheck:Cond + ... + fun:_ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_Pm +} + +{ + macOS dyld 2 + Memcheck:Cond + ... + fun:_ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_Pm +} + +{ + macOS dyld 3 + Memcheck:Cond + ... + fun:_ZN4dyldL25checkEnvironmentVariablesEPPKc +} + +{ + macOS dyld 4 + Memcheck:Cond + ... + fun:_ZN4dyldL10loadPhase1EPKcS1_RKNS_11LoadContextERjPNSt3__16vectorIS1_NS6_9allocatorIS1_EEEE +} + diff --git a/memcheck/tests/err_disable4.vgtest b/memcheck/tests/err_disable4.vgtest index dc5831a7a..e407a88d0 100644 --- a/memcheck/tests/err_disable4.vgtest +++ b/memcheck/tests/err_disable4.vgtest @@ -1,5 +1,5 @@ prog: err_disable4 -vgopts: -q --num-callers=3 --valgrind-stacksize=131072 +vgopts: -q --num-callers=3 --valgrind-stacksize=131072 --suppressions=darwin.supp ## 131072 is the minimum value needed on ppc64 (2 pages of 64K) stderr_filter: ../../helgrind/tests/filter_stderr ## This is so as to get rid of the "Thread #" lines, which From 2e773335b768d9e0ec67bcc0a0d6c6424c2cfd5a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 10 Dec 2025 13:16:54 +0100 Subject: [PATCH 154/502] Regtest: fix and x86 test unused function warning --- none/tests/x86/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/none/tests/x86/Makefile.am b/none/tests/x86/Makefile.am index 18e707cba..b95631a21 100644 --- a/none/tests/x86/Makefile.am +++ b/none/tests/x86/Makefile.am @@ -183,6 +183,7 @@ insn_sse3_SOURCES = insn_sse3.def insn_sse3_LDADD = -lm insn_ssse3_SOURCES = insn_ssse3.def insn_ssse3_LDADD = -lm +sse4_x86_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNUSED_FUNCTION@ x86locked_CFLAGS = $(AM_CFLAGS) -O yield_LDADD = -lpthread From 8b901a6ca28b80e5ebaef33bc36f95163ae58dc1 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 10 Dec 2025 13:35:49 +0100 Subject: [PATCH 155/502] Darwin warnings: add options to turn off warnings from system headers Darwin 18 / clang 11 are quite noisy with nullability and expansion to defined warnings in the system headers. --- Makefile.all.am | 1 + configure.ac | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile.all.am b/Makefile.all.am index df7896016..154585dce 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -151,6 +151,7 @@ if VGCONF_OS_IS_DARWIN AM_CFLAGS_PSO_BASE = -dynamic \ -O -g -fno-omit-frame-pointer -fno-strict-aliasing \ -fpic -fPIC -fno-builtin @FLAG_FNO_IPA_ICF@ +AM_CFLAGS_BASE += @FLAG_W_NO_EXPANSION_TO_DEFINED@ @FLAG_W_NO_NULLABILITY_COMPLETENESS@ else if VGCONF_OS_IS_FREEBSD AM_CFLAGS_PSO_BASE = -O -g -fno-omit-frame-pointer -fno-strict-aliasing \ diff --git a/configure.ac b/configure.ac index 40330fdc3..5deb338fa 100644 --- a/configure.ac +++ b/configure.ac @@ -2749,6 +2749,7 @@ AC_GCC_WARNING_SUBST_NO([deprecated], [FLAG_W_NO_DEPRECATED]) # OK for 32 and 64 bit AC_GCC_WARNING_SUBST_NO([alloc-size], [FLAG_W_NO_ALLOC_SIZE]) AC_GCC_WARNING_SUBST_NO([deprecated-declarations], [FLAG_W_NO_DEPRECATED_DECLARATIONS]) +AC_GCC_WARNING_SUBST_NO([nullability-completeness], [FLAG_W_NO_NULLABILITY_COMPLETENESS]) AC_GCC_WARNING_SUBST([write-strings], [FLAG_W_WRITE_STRINGS]) AC_GCC_WARNING_SUBST([empty-body], [FLAG_W_EMPTY_BODY]) From 38fbc300b38aeb7b337abe0526eaa7f738b305dc Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 11 Dec 2025 08:03:46 +0100 Subject: [PATCH 156/502] Darwin DRD: add a bodge for LLVM DWARF that our reader does not like Longer term, need to understand Apple DWARF quirks and adapt to them as necessary. --- coregrind/m_debuginfo/readdwarf3.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c index 374237498..b67e41b7c 100644 --- a/coregrind/m_debuginfo/readdwarf3.c +++ b/coregrind/m_debuginfo/readdwarf3.c @@ -2977,6 +2977,14 @@ static void parse_var_DIE ( if (level == 0) setup_cu_svma(cc, have_lo, ip_lo, td3); +#if defined(VGO_darwin) + // FIXME PJF Darwin LLVM generates this (non-standard?) combination + // it only seems to affect DRD + if (have_lo && have_range && !have_hi1) { + have_lo = False; + } +#endif + /* Do we have something that looks sane? */ if (have_lo && have_hi1 && (!have_range)) { if (ip_lo < ip_hi1) From ef6b8d841b6fe79ba1d8475d2798e22540e8e7b9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 11 Dec 2025 09:03:08 +0100 Subject: [PATCH 157/502] Darwin libcproc: fix for VG_(read_millisecond_timer) This function had some peculiar workaround for how the result was handled. That peculiarity seems to have gone away (some time before Darwin 17). Now use 'normal' handling for the result for Darwin 17+. This was causing some DRD timed mutex testcases to fail. Code copied from Louis Brunner. --- coregrind/m_libcproc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coregrind/m_libcproc.c b/coregrind/m_libcproc.c index 7c4d6acc9..4c4b96eef 100644 --- a/coregrind/m_libcproc.c +++ b/coregrind/m_libcproc.c @@ -1052,7 +1052,15 @@ UInt VG_(read_millisecond_timer) ( void ) struct vki_timeval tv_now = { 0, 0 }; res = VG_(do_syscall2)(__NR_gettimeofday, (UWord)&tv_now, (UWord)NULL); vg_assert(! sr_isError(res)); +# if DARWIN_VERS >= DARWIN_10_13 + now = tv_now.tv_sec * 1000000ULL + tv_now.tv_usec; +# else + // Weird: it seems that gettimeofday() doesn't fill in the timeval, but + // rather returns the tv_sec as the low 32 bits of the result and the + // tv_usec as the high 32 bits of the result. (But the timeval cannot be + // NULL!) See bug 200990. now = sr_Res(res) * 1000000ULL + sr_ResHI(res); +#endif } # else From 68bc32225cc83f6c2df79c03ad8ef4d1d4447d15 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 11 Dec 2025 09:06:38 +0100 Subject: [PATCH 158/502] Darwin regtest: update a few expecteds One predated correct redirection of the C++ library operator new One has a few line number changes plus I removed an assert that is firing (asserts firing in tests is never a good thing). And the last one is just line number changes. --- .../annotate_smart_pointer2.stderr.exp-darwin | 4 +- drd/tests/pth_detached3.stderr.exp1 | 4 +- ...c23_bogus_condwait.stderr.exp-darwin-amd64 | 40 ++++++++----------- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/drd/tests/annotate_smart_pointer2.stderr.exp-darwin b/drd/tests/annotate_smart_pointer2.stderr.exp-darwin index 54fa41e12..e3e33c5c5 100644 --- a/drd/tests/annotate_smart_pointer2.stderr.exp-darwin +++ b/drd/tests/annotate_smart_pointer2.stderr.exp-darwin @@ -1,12 +1,12 @@ Conflicting store by thread x at 0x........ size 4 at 0x........: counter::~counter() (annotate_smart_pointer.cpp:?) + by 0x........: counter::~counter() (annotate_smart_pointer.cpp:?) by 0x........: smart_ptr::set(counter*, AtomicInt32*) (annotate_smart_pointer.cpp:?) by 0x........: smart_ptr::operator=(counter*) (annotate_smart_pointer.cpp:?) by 0x........: main (annotate_smart_pointer.cpp:?) Address 0x........ is at offset ... from 0x......... Allocation context: - at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: operator new(unsigned long) (in /usr/lib/libstdc++.6.0.9.dylib) + at 0x........: ...operator new... (vg_replace_malloc.c:...) by 0x........: main (annotate_smart_pointer.cpp:?) Done. diff --git a/drd/tests/pth_detached3.stderr.exp1 b/drd/tests/pth_detached3.stderr.exp1 index 8dd58ba0f..683d634b0 100644 --- a/drd/tests/pth_detached3.stderr.exp1 +++ b/drd/tests/pth_detached3.stderr.exp1 @@ -1,11 +1,11 @@ pthread_detach(): invalid thread ID 0x........ at 0x........: pthread_detach (drd_pthread_intercepts.c:?) - by 0x........: main (pth_detached3.c:22) + by 0x........: main (pth_detached3.c:26) pthread_detach(): invalid thread ID 0x........ at 0x........: pthread_detach (drd_pthread_intercepts.c:?) - by 0x........: main (pth_detached3.c:25) + by 0x........: main (pth_detached3.c:32) Finished. diff --git a/drd/tests/tc23_bogus_condwait.stderr.exp-darwin-amd64 b/drd/tests/tc23_bogus_condwait.stderr.exp-darwin-amd64 index 331039000..9fc4b77d7 100644 --- a/drd/tests/tc23_bogus_condwait.stderr.exp-darwin-amd64 +++ b/drd/tests/tc23_bogus_condwait.stderr.exp-darwin-amd64 @@ -1,76 +1,70 @@ The object at address 0x........ is not a mutex. at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:69) + by 0x........: main (tc23_bogus_condwait.c:75) Mutex not locked: mutex 0x........, recursion count 0, owner 0. at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:72) + by 0x........: main (tc23_bogus_condwait.c:79) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:54) + by 0x........: main (tc23_bogus_condwait.c:59) Thread 3: Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?) - by 0x........: rescue_me (tc23_bogus_condwait.c:20) + by 0x........: rescue_me (tc23_bogus_condwait.c:24) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:56) + by 0x........: main (tc23_bogus_condwait.c:61) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:54) + by 0x........: main (tc23_bogus_condwait.c:59) Thread 1: The object at address 0x........ is not a mutex. at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:75) + by 0x........: main (tc23_bogus_condwait.c:82) rwlock 0x........ was first observed at: at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:57) + by 0x........: main (tc23_bogus_condwait.c:62) Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 2. at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:78) + by 0x........: main (tc23_bogus_condwait.c:85) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:53) + by 0x........: main (tc23_bogus_condwait.c:58) Thread 3: Probably a race condition: condition variable 0x........ has been signaled but the associated mutex 0x........ is not locked by the signalling thread. at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?) - by 0x........: rescue_me (tc23_bogus_condwait.c:24) + by 0x........: rescue_me (tc23_bogus_condwait.c:29) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:56) + by 0x........: main (tc23_bogus_condwait.c:61) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:53) + by 0x........: main (tc23_bogus_condwait.c:58) Thread 1: The impossible happened: mutex is locked simultaneously by two threads: mutex 0x........, recursion count 1, owner 2. at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:78) + by 0x........: main (tc23_bogus_condwait.c:85) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:53) + by 0x........: main (tc23_bogus_condwait.c:58) Thread 2: Mutex not locked by calling thread: mutex 0x........, recursion count 2, owner 1. at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?) - by 0x........: grab_the_lock (tc23_bogus_condwait.c:42) + by 0x........: grab_the_lock (tc23_bogus_condwait.c:47) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) - by 0x........: main (tc23_bogus_condwait.c:53) - -Assertion failed: (!r), function main, file tc23_bogus_condwait.c, line 86. + by 0x........: main (tc23_bogus_condwait.c:58) -Process terminating with default action of signal 6 (SIGABRT) - at 0x........: __kill (in /...libc...) - by 0x........: __assert_rtn (in /...libc...) - by 0x........: main (tc23_bogus_condwait.c:86) ERROR SUMMARY: 10 errors from 8 contexts (suppressed: 0 from 0) From b811351450b3b4637457849b720cc922e503a5bf Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Fri, 5 Dec 2025 18:01:22 +0100 Subject: [PATCH 159/502] s390x: Simplify single multiplications So far the single-multiplication instructions are implemented by taking the low half of a widening multiply. This pattern is then recognized by the instruction selector, which combines it to a single multiplication again. This is unnecessarily complicated, since single-multiply operations can be expressed directly by Iop_Mul32 and Iop_Mul64 instead. So do this, simplifying the code generation. Also, since Iop_Mul32 and Iop_Mul64 haven't really been used before, the instruction selector generates sub-optimal code for them. Fix that. --- VEX/priv/guest_s390_toIR.c | 106 +++++++------------------------------ VEX/priv/host_s390_isel.c | 21 ++++---- 2 files changed, 30 insertions(+), 97 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 8f42c844d..9e850b78f 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -9015,14 +9015,7 @@ s390_irgen_MLG(UChar r1, IRTemp op2addr) static const HChar * s390_irgen_MSR(UChar r1, UChar r2) { - IRTemp op1 = newTemp(Ity_I32); - IRTemp op2 = newTemp(Ity_I32); - IRTemp result = newTemp(Ity_I64); - - assign(op1, get_gpr_w1(r1)); - assign(op2, get_gpr_w1(r2)); - assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2))); - put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); + put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), get_gpr_w1(r2))); return "msr"; } @@ -9030,14 +9023,7 @@ s390_irgen_MSR(UChar r1, UChar r2) static const HChar * s390_irgen_MSGR(UChar r1, UChar r2) { - IRTemp op1 = newTemp(Ity_I64); - IRTemp op2 = newTemp(Ity_I64); - IRTemp result = newTemp(Ity_I128); - - assign(op1, get_gpr_dw0(r1)); - assign(op2, get_gpr_dw0(r2)); - assign(result, binop(Iop_MullS64, mkexpr(op1), mkexpr(op2))); - put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); + put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), get_gpr_dw0(r2))); return "msgr"; } @@ -9045,15 +9031,8 @@ s390_irgen_MSGR(UChar r1, UChar r2) static const HChar * s390_irgen_MSGFR(UChar r1, UChar r2) { - IRTemp op1 = newTemp(Ity_I64); - IRTemp op2 = newTemp(Ity_I32); - IRTemp result = newTemp(Ity_I128); - - assign(op1, get_gpr_dw0(r1)); - assign(op2, get_gpr_w1(r2)); - assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_32Sto64, mkexpr(op2)) - )); - put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); + put_gpr_dw0( + r1, binop(Iop_Mul64, get_gpr_dw0(r1), unop(Iop_32Sto64, get_gpr_w1(r2)))); return "msgfr"; } @@ -9061,14 +9040,8 @@ s390_irgen_MSGFR(UChar r1, UChar r2) static const HChar * s390_irgen_MS(UChar r1, IRTemp op2addr) { - IRTemp op1 = newTemp(Ity_I32); - IRTemp op2 = newTemp(Ity_I32); - IRTemp result = newTemp(Ity_I64); - - assign(op1, get_gpr_w1(r1)); - assign(op2, load(Ity_I32, mkexpr(op2addr))); - assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2))); - put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); + put_gpr_w1(r1, + binop(Iop_Mul32, get_gpr_w1(r1), load(Ity_I32, mkexpr(op2addr)))); return "ms"; } @@ -9078,13 +9051,11 @@ s390_irgen_MSC(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); - IRTemp result = newTemp(Ity_I64); assign(op1, get_gpr_w1(r1)); assign(op2, load(Ity_I32, mkexpr(op2addr))); - assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_MUL_32, op1, op2); - put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); + put_gpr_w1(r1, binop(Iop_Mul32, mkexpr(op1), mkexpr(op2))); return "msc"; } @@ -9094,13 +9065,11 @@ s390_irgen_MSRKC(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); IRTemp op3 = newTemp(Ity_I32); - IRTemp result = newTemp(Ity_I64); assign(op2, get_gpr_w1(r2)); assign(op3, get_gpr_w1(r3)); - assign(result, binop(Iop_MullS32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_MUL_32, op2, op3); - put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); + put_gpr_w1(r1, binop(Iop_Mul32, mkexpr(op2), mkexpr(op3))); return "msrkc"; } @@ -9108,14 +9077,8 @@ s390_irgen_MSRKC(UChar r3, UChar r1, UChar r2) static const HChar * s390_irgen_MSY(UChar r1, IRTemp op2addr) { - IRTemp op1 = newTemp(Ity_I32); - IRTemp op2 = newTemp(Ity_I32); - IRTemp result = newTemp(Ity_I64); - - assign(op1, get_gpr_w1(r1)); - assign(op2, load(Ity_I32, mkexpr(op2addr))); - assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2))); - put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); + put_gpr_w1(r1, + binop(Iop_Mul32, get_gpr_w1(r1), load(Ity_I32, mkexpr(op2addr)))); return "msy"; } @@ -9123,14 +9086,8 @@ s390_irgen_MSY(UChar r1, IRTemp op2addr) static const HChar * s390_irgen_MSG(UChar r1, IRTemp op2addr) { - IRTemp op1 = newTemp(Ity_I64); - IRTemp op2 = newTemp(Ity_I64); - IRTemp result = newTemp(Ity_I128); - - assign(op1, get_gpr_dw0(r1)); - assign(op2, load(Ity_I64, mkexpr(op2addr))); - assign(result, binop(Iop_MullS64, mkexpr(op1), mkexpr(op2))); - put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); + put_gpr_dw0(r1, + binop(Iop_Mul64, get_gpr_dw0(r1), load(Ity_I64, mkexpr(op2addr)))); return "msg"; } @@ -9140,13 +9097,11 @@ s390_irgen_MSGC(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); IRTemp op2 = newTemp(Ity_I64); - IRTemp result = newTemp(Ity_I128); assign(op1, get_gpr_dw0(r1)); assign(op2, load(Ity_I64, mkexpr(op2addr))); - assign(result, binop(Iop_MullS64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_MUL_64, op1, op2); - put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); + put_gpr_dw0(r1, binop(Iop_Mul64, mkexpr(op1), mkexpr(op2))); return "msgc"; } @@ -9154,15 +9109,8 @@ s390_irgen_MSGC(UChar r1, IRTemp op2addr) static const HChar * s390_irgen_MSGF(UChar r1, IRTemp op2addr) { - IRTemp op1 = newTemp(Ity_I64); - IRTemp op2 = newTemp(Ity_I32); - IRTemp result = newTemp(Ity_I128); - - assign(op1, get_gpr_dw0(r1)); - assign(op2, load(Ity_I32, mkexpr(op2addr))); - assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_32Sto64, mkexpr(op2)) - )); - put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); + put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), + unop(Iop_32Sto64, load(Ity_I32, mkexpr(op2addr))))); return "msgf"; } @@ -9170,14 +9118,7 @@ s390_irgen_MSGF(UChar r1, IRTemp op2addr) static const HChar * s390_irgen_MSFI(UChar r1, UInt i2) { - IRTemp op1 = newTemp(Ity_I32); - Int op2; - IRTemp result = newTemp(Ity_I64); - - assign(op1, get_gpr_w1(r1)); - op2 = (Int)i2; - assign(result, binop(Iop_MullS32, mkexpr(op1), mkU32((UInt)op2))); - put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); + put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), mkU32(i2))); return "msfi"; } @@ -9185,15 +9126,8 @@ s390_irgen_MSFI(UChar r1, UInt i2) static const HChar * s390_irgen_MSGFI(UChar r1, UInt i2) { - IRTemp op1 = newTemp(Ity_I64); - Int op2; - IRTemp result = newTemp(Ity_I128); - - assign(op1, get_gpr_dw0(r1)); - op2 = (Int)i2; - assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_32Sto64, mkU32((UInt) - op2)))); - put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); + ULong op2 = (ULong)i2 - (((ULong)i2 & (1 << 31)) << 1); + put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), mkU64(op2))); return "msgfi"; } @@ -9203,13 +9137,11 @@ s390_irgen_MSGRKC(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); IRTemp op3 = newTemp(Ity_I64); - IRTemp result = newTemp(Ity_I128); assign(op2, get_gpr_dw0(r2)); assign(op3, get_gpr_dw0(r3)); - assign(result, binop(Iop_MullS64, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_MUL_64, op2, op3); - put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); + put_gpr_dw0(r1, binop(Iop_Mul64, mkexpr(op2), mkexpr(op3))); return "msgrkc"; } diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c index 9cb9b65d3..ffe8a82a2 100644 --- a/VEX/priv/host_s390_isel.c +++ b/VEX/priv/host_s390_isel.c @@ -1277,13 +1277,21 @@ s390_isel_int_expr_wrk(ISelEnv *env, IRExpr *expr) goto do_multiply; do_multiply: { - HReg r10, r11; - UInt arg_size = is_single_multiply ? size : size / 2; - order_commutative_operands(arg1, arg2); h1 = s390_isel_int_expr(env, arg1); /* Process 1st operand */ op2 = s390_isel_int_expr_RMI(env, arg2); /* Process 2nd operand */ + res = newVRegI(env); + + if (is_single_multiply) { + /* No register pair needed */ + addInstr(env, s390_insn_move(size, res, h1)); + addInstr(env, s390_insn_alu(size, S390_ALU_MUL, res, op2)); + return res; + } + + HReg r10, r11; + UInt arg_size = size / 2; /* We use non-virtual registers r10 and r11 as pair */ r10 = make_gpr(10); @@ -1295,7 +1303,6 @@ s390_isel_int_expr_wrk(ISelEnv *env, IRExpr *expr) /* Multiply */ addInstr(env, s390_insn_mul(arg_size, r10, r11, op2, is_signed_multiply)); - res = newVRegI(env); if (arg_size == 1 || arg_size == 2) { /* For 8-bit and 16-bit multiplication the result is in r11[32:63] */ @@ -1303,12 +1310,6 @@ s390_isel_int_expr_wrk(ISelEnv *env, IRExpr *expr) return res; } - /* For Iop_Mul64 the result is in r11[0:63] */ - if (expr->Iex.Binop.op == Iop_Mul64) { - addInstr(env, s390_insn_move(size, res, r11)); - return res; - } - /* The result is in registers r10 and r11. Combine them into a SIZE-bit value into the destination register. */ addInstr(env, s390_insn_move(arg_size, res, r10)); From 4a5f1eb1f5c2353aec851507cbb45d188ff52f6e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 12 Dec 2025 13:47:54 +0100 Subject: [PATCH 160/502] Darwin suppression: another Helgrind suppression for getaddrinfo in 10.14 --- darwin-helgrind.supp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/darwin-helgrind.supp b/darwin-helgrind.supp index db923303a..e4f628997 100644 --- a/darwin-helgrind.supp +++ b/darwin-helgrind.supp @@ -184,3 +184,9 @@ fun:getpwuid_r } +{ + macOS1014:_objc_msgSend_uncached + Helgrind:Race + ... + fun:_objc_msgSend_uncached +} From 5992b26427872876d1ab979448e070f037731fc2 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 12 Dec 2025 20:43:55 +0000 Subject: [PATCH 161/502] vex: change ISelEnv allocation No need for dynamic memory allocation. Local variable will do just fine. Saves roughly 136 bytes per IRSB on s390. --- VEX/priv/host_amd64_isel.c | 4 ++-- VEX/priv/host_arm64_isel.c | 4 ++-- VEX/priv/host_arm_isel.c | 4 ++-- VEX/priv/host_mips_isel.c | 4 ++-- VEX/priv/host_nanomips_isel.c | 4 ++-- VEX/priv/host_ppc_isel.c | 4 ++-- VEX/priv/host_riscv64_isel.c | 4 ++-- VEX/priv/host_s390_isel.c | 4 ++-- VEX/priv/host_x86_isel.c | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/VEX/priv/host_amd64_isel.c b/VEX/priv/host_amd64_isel.c index 6de40bccf..3b0c459c4 100644 --- a/VEX/priv/host_amd64_isel.c +++ b/VEX/priv/host_amd64_isel.c @@ -5405,7 +5405,7 @@ HInstrArray* iselSB_AMD64 ( const IRSB* bb, { Int i, j; HReg hreg, hregHI; - ISelEnv* env; + ISelEnv *env, envmem; UInt hwcaps_host = archinfo_host->hwcaps; AMD64AMode *amCounter, *amFailAddr; @@ -5430,7 +5430,7 @@ HInstrArray* iselSB_AMD64 ( const IRSB* bb, vassert(archinfo_host->endness == VexEndnessLE); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Set up output code array. */ diff --git a/VEX/priv/host_arm64_isel.c b/VEX/priv/host_arm64_isel.c index 55d688531..0c072d583 100644 --- a/VEX/priv/host_arm64_isel.c +++ b/VEX/priv/host_arm64_isel.c @@ -4641,7 +4641,7 @@ HInstrArray* iselSB_ARM64 ( const IRSB* bb, { Int i, j; HReg hreg, hregHI; - ISelEnv* env; + ISelEnv *env, envmem; UInt hwcaps_host = archinfo_host->hwcaps; ARM64AMode *amCounter, *amFailAddr; @@ -4655,7 +4655,7 @@ HInstrArray* iselSB_ARM64 ( const IRSB* bb, vassert(sizeof(ARM64Instr) <= 32); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Set up output code array. */ diff --git a/VEX/priv/host_arm_isel.c b/VEX/priv/host_arm_isel.c index 71bf871c4..75041b63b 100644 --- a/VEX/priv/host_arm_isel.c +++ b/VEX/priv/host_arm_isel.c @@ -6540,7 +6540,7 @@ HInstrArray* iselSB_ARM ( const IRSB* bb, { Int i, j; HReg hreg, hregHI; - ISelEnv* env; + ISelEnv *env, envmem; UInt hwcaps_host = archinfo_host->hwcaps; ARMAMode1 *amCounter, *amFailAddr; @@ -6554,7 +6554,7 @@ HInstrArray* iselSB_ARM ( const IRSB* bb, vassert(sizeof(ARMInstr) <= 28); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Set up output code array. */ diff --git a/VEX/priv/host_mips_isel.c b/VEX/priv/host_mips_isel.c index 7d57078ba..19c761b00 100644 --- a/VEX/priv/host_mips_isel.c +++ b/VEX/priv/host_mips_isel.c @@ -7410,7 +7410,7 @@ HInstrArray *iselSB_MIPS ( const IRSB* bb, { Int i, j; HReg hreg, hregHI; - ISelEnv* env; + ISelEnv *env, envmem; MIPSAMode *amCounter, *amFailAddr; hwcaps_host = archinfo_host->hwcaps; @@ -7433,7 +7433,7 @@ HInstrArray *iselSB_MIPS ( const IRSB* bb, has_msa = VEX_MIPS_PROC_MSA(archinfo_host->hwcaps); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; env->mode64 = mode64; env->fp_mode64 = fp_mode64; diff --git a/VEX/priv/host_nanomips_isel.c b/VEX/priv/host_nanomips_isel.c index 65998fd8a..c14dfbc10 100644 --- a/VEX/priv/host_nanomips_isel.c +++ b/VEX/priv/host_nanomips_isel.c @@ -1515,7 +1515,7 @@ HInstrArray *iselSB_NANOMIPS(const IRSB * bb, { Int i, j; HReg hreg, hregHI; - ISelEnv *env; + ISelEnv *env, envmem; hwcaps_host = archinfo_host->hwcaps; /* sanity ... */ vassert(arch_host == VexArchNANOMIPS); @@ -1523,7 +1523,7 @@ HInstrArray *iselSB_NANOMIPS(const IRSB * bb, vassert(archinfo_host->endness == VexEndnessLE || archinfo_host->endness == VexEndnessBE); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Set up output code array. */ env->code = newHInstrArray(); diff --git a/VEX/priv/host_ppc_isel.c b/VEX/priv/host_ppc_isel.c index ea7ff89a9..daac1ed16 100644 --- a/VEX/priv/host_ppc_isel.c +++ b/VEX/priv/host_ppc_isel.c @@ -7259,7 +7259,7 @@ HInstrArray* iselSB_PPC ( const IRSB* bb, { Int i, j; HReg hregLo, hregMedLo, hregMedHi, hregHi; - ISelEnv* env; + ISelEnv *env, envmem; UInt hwcaps_host = archinfo_host->hwcaps; Bool mode64 = False; UInt mask32, mask64; @@ -7297,7 +7297,7 @@ HInstrArray* iselSB_PPC ( const IRSB* bb, IEndianess = Iend_LE; /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Are we being ppc32 or ppc64? */ diff --git a/VEX/priv/host_riscv64_isel.c b/VEX/priv/host_riscv64_isel.c index b174d260d..ca1b8babe 100644 --- a/VEX/priv/host_riscv64_isel.c +++ b/VEX/priv/host_riscv64_isel.c @@ -2014,7 +2014,7 @@ HInstrArray* iselSB_RISCV64(const IRSB* bb, { Int i, j; HReg hreg, hregHI; - ISelEnv* env; + ISelEnv *env, envmem; /* Do some sanity checks. */ vassert(arch_host == VexArchRISCV64); @@ -2026,7 +2026,7 @@ HInstrArray* iselSB_RISCV64(const IRSB* bb, vassert(sizeof(RISCV64Instr) <= 32); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Set up output code array. */ diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c index ffe8a82a2..d128f6eeb 100644 --- a/VEX/priv/host_s390_isel.c +++ b/VEX/priv/host_s390_isel.c @@ -5497,7 +5497,7 @@ iselSB_S390(const IRSB *bb, VexArch arch_host, const VexArchInfo *archinfo_host, { UInt i, j; HReg hreg, hregHI; - ISelEnv *env; + ISelEnv *env, envmem; UInt hwcaps_host = archinfo_host->hwcaps; /* Do some sanity checks */ @@ -5507,7 +5507,7 @@ iselSB_S390(const IRSB *bb, VexArch arch_host, const VexArchInfo *archinfo_host, vassert(archinfo_host->endness == VexEndnessBE); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Set up output code array. */ diff --git a/VEX/priv/host_x86_isel.c b/VEX/priv/host_x86_isel.c index 72d6b4684..22a5702c0 100644 --- a/VEX/priv/host_x86_isel.c +++ b/VEX/priv/host_x86_isel.c @@ -4586,7 +4586,7 @@ HInstrArray* iselSB_X86 ( const IRSB* bb, { Int i, j; HReg hreg, hregHI; - ISelEnv* env; + ISelEnv *env, envmem; UInt hwcaps_host = archinfo_host->hwcaps; X86AMode *amCounter, *amFailAddr; @@ -4603,7 +4603,7 @@ HInstrArray* iselSB_X86 ( const IRSB* bb, vassert(archinfo_host->endness == VexEndnessLE); /* Make up an initial environment to use. */ - env = LibVEX_Alloc_inline(sizeof(ISelEnv)); + env = &envmem; env->vreg_ctr = 0; /* Set up output code array. */ From 778fe51a69eb099bc6cbfa616986310560a8b828 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 13 Dec 2025 18:37:27 +0000 Subject: [PATCH 162/502] testsuite: Tidy. Remove empty .stdout.exp files As per tests/vg_regtest: Expected stdout (filtered) is kept in .stdout.exp* (can be more than one expected output). It can be missing if it would be empty. --- dhat/tests/Makefile.am | 3 +- dhat/tests/user_histo1.stdout.exp | 0 drd/tests/Makefile.am | 3 - drd/tests/pth_detached.stdout.exp | 0 drd/tests/pth_detached2.stdout.exp | 0 drd/tests/pth_detached_sem.stdout.exp | 0 helgrind/tests/Makefile.am | 101 ++++++++---------- helgrind/tests/annotate_hbefore.stdout.exp | 0 helgrind/tests/annotate_rwlock.stdout.exp | 0 .../tests/annotate_smart_pointer.stdout.exp | 0 helgrind/tests/bar_bad.stdout.exp | 0 .../tests/cond_timedwait_invalid.stdout.exp | 0 helgrind/tests/cond_timedwait_test.stdout.exp | 0 helgrind/tests/free_is_write.stdout.exp | 0 helgrind/tests/hg01_all_ok.stdout.exp | 0 helgrind/tests/hg02_deadlock.stdout.exp | 0 helgrind/tests/hg03_inherit.stdout.exp | 0 helgrind/tests/hg04_race.stdout.exp | 0 helgrind/tests/hg04_race_h9.stdout.exp | 0 helgrind/tests/hg05_race2.stdout.exp | 0 helgrind/tests/hg06_readshared.stdout.exp | 0 .../tests/locked_vs_unlocked1_fwd.stdout.exp | 0 .../tests/locked_vs_unlocked1_rev.stdout.exp | 0 helgrind/tests/locked_vs_unlocked2.stdout.exp | 0 helgrind/tests/locked_vs_unlocked3.stdout.exp | 0 helgrind/tests/pth_barrier1.stdout.exp | 0 helgrind/tests/pth_barrier2.stdout.exp | 0 helgrind/tests/pth_barrier3.stdout.exp | 0 helgrind/tests/pth_spinlock.stdout.exp | 0 helgrind/tests/rwlock_race.stdout.exp | 0 helgrind/tests/rwlock_test.stdout.exp | 0 helgrind/tests/shmem_abits.stdout.exp | 0 helgrind/tests/stackteardown.stdout.exp | 0 helgrind/tests/tc01_simple_race.stdout.exp | 0 helgrind/tests/tc02_simple_tls.stdout.exp | 0 helgrind/tests/tc03_re_excl.stdout.exp | 0 helgrind/tests/tc04_free_lock.stdout.exp | 0 helgrind/tests/tc05_simple_race.stdout.exp | 0 helgrind/tests/tc06_two_races.stdout.exp | 0 helgrind/tests/tc06_two_races_xml.stdout.exp | 0 helgrind/tests/tc09_bad_unlock.stdout.exp | 0 helgrind/tests/tc10_rec_lock.stdout.exp | 0 helgrind/tests/tc12_rwl_trivial.stdout.exp | 0 helgrind/tests/tc13_laog1.stdout.exp | 0 helgrind/tests/tc14_laog_dinphils.stdout.exp | 0 helgrind/tests/tc15_laog_lockdel.stdout.exp | 0 helgrind/tests/tc16_byterace.stdout.exp | 0 helgrind/tests/tc17_sembar.stdout.exp | 0 helgrind/tests/tc18_semabuse.stdout.exp | 0 helgrind/tests/tc19_shadowmem.stdout.exp | 0 helgrind/tests/tc20_verifywrap.stdout.exp | 0 helgrind/tests/tc22_exit_w_lock.stdout.exp | 0 helgrind/tests/tc23_bogus_condwait.stdout.exp | 0 helgrind/tests/tc24_nonzero_sem.stdout.exp | 0 helgrind/tests/tls_threads.stdout.exp | 0 memcheck/tests/Makefile.am | 60 +++++------ memcheck/tests/amd64-linux/Makefile.am | 6 +- .../amd64-linux/access_below_sp_1.stdout.exp | 0 .../amd64-linux/access_below_sp_2.stdout.exp | 0 memcheck/tests/amd64-solaris/Makefile.am | 4 +- .../amd64-solaris/context_rflags2.stdout.exp | 0 .../tests/amd64-solaris/scalar.stdout.exp | 0 memcheck/tests/amd64/Makefile.am | 9 +- .../amd64/sh-mem-vec128-plo-no.stdout.exp | 0 .../amd64/sh-mem-vec128-plo-yes.stdout.exp | 0 .../amd64/sh-mem-vec256-plo-no.stdout.exp | 0 .../amd64/sh-mem-vec256-plo-yes.stdout.exp | 0 memcheck/tests/amd64/xsave-avx.stdout.exp | 0 memcheck/tests/cond_ld.stdout.exp | 0 memcheck/tests/cond_st.stdout.exp | 0 memcheck/tests/cxx17_aligned_new.stdout.exp | 0 memcheck/tests/darwin/Makefile.am | 2 +- .../tests/darwin/pth-undocumented.stdout.exp | 0 memcheck/tests/dw4.stdout.exp | 0 memcheck/tests/freebsd/Makefile.am | 1 - memcheck/tests/freebsd/sctp2.stdout.exp | 0 .../tests/holey_buffer_too_small.stdout.exp | 0 memcheck/tests/inlinfo.stdout.exp | 0 memcheck/tests/inlinfosupp.stdout.exp | 0 memcheck/tests/inlinfosuppobj.stdout.exp | 0 memcheck/tests/inltemplate.stdout.exp | 0 memcheck/tests/linux/Makefile.am | 12 +-- .../linux/dlclose_leak-no-keep.stdout.exp | 0 memcheck/tests/linux/dlclose_leak.stdout.exp | 0 memcheck/tests/linux/lsframe1.stdout.exp | 0 memcheck/tests/linux/lsframe2.stdout.exp | 0 memcheck/tests/linux/sys-openat.stdout.exp | 0 memcheck/tests/lks.stdout.exp | 0 memcheck/tests/mips32/Makefile.am | 2 +- memcheck/tests/mips32/fadvise64.stdout.exp | 0 memcheck/tests/mips64/Makefile.am | 2 +- memcheck/tests/mips64/fadvise64.stdout.exp | 0 memcheck/tests/noisy_child.stdout.exp | 0 memcheck/tests/origin1-yes.stdout.exp | 0 memcheck/tests/origin2-not-quite.stdout.exp | 0 memcheck/tests/origin3-no.stdout.exp | 0 memcheck/tests/origin4-many.stdout.exp | 0 memcheck/tests/origin6-fp.stdout.exp | 0 .../realloc_size_zero_again_no.stdout.exp | 0 .../realloc_size_zero_again_yes.stdout.exp | 0 memcheck/tests/s390x/Makefile.am | 4 +- memcheck/tests/s390x/cdsg.stdout.exp | 0 memcheck/tests/s390x/cli.stdout.exp | 0 memcheck/tests/s390x/cu21.stdout.exp | 0 memcheck/tests/s390x/cu42.stdout.exp | 0 memcheck/tests/s390x/ltgjhe.stdout.exp | 0 memcheck/tests/s390x/vfae.stdout.exp | 0 memcheck/tests/s390x/vistr.stdout.exp | 0 memcheck/tests/s390x/vme.stdout.exp | 0 memcheck/tests/s390x/vstrc.stdout.exp | 0 memcheck/tests/s390x/vstrs.stdout.exp | 0 memcheck/tests/solaris/Makefile.am | 50 ++++----- memcheck/tests/solaris/brk.stdout.exp | 0 .../solaris/context_stack_die.stdout.exp | 0 memcheck/tests/solaris/ioctl.stdout.exp | 0 memcheck/tests/solaris/ldynsym.stdout.exp | 0 memcheck/tests/solaris/pkcs11.stdout.exp | 0 memcheck/tests/solaris/scalar.stdout.exp | 0 .../solaris/scalar_auditon_stat.stdout.exp | 0 .../solaris/scalar_frealpathat.stdout.exp | 0 .../tests/solaris/scalar_getrandom.stdout.exp | 0 .../tests/solaris/scalar_ioctl.stdout.exp | 0 .../tests/solaris/scalar_lwp_kill.stdout.exp | 0 .../tests/solaris/scalar_lwp_name.stdout.exp | 0 .../solaris/scalar_lwp_sigqueue.stdout.exp | 0 .../solaris/scalar_modctl_modnvl.stdout.exp | 0 .../tests/solaris/scalar_obsolete.stdout.exp | 0 .../tests/solaris/scalar_shm_new.stdout.exp | 0 .../tests/solaris/scalar_spawn.stdout.exp | 0 .../solaris/scalar_system_stats.stdout.exp | 0 .../tests/solaris/scalar_utimensat.stdout.exp | 0 .../tests/solaris/scalar_utimesys.stdout.exp | 0 .../tests/solaris/scalar_uuidsys.stdout.exp | 0 .../solaris/scalar_zone_defunct.stdout.exp | 0 memcheck/tests/solaris/strlcpy.stdout.exp | 0 memcheck/tests/solaris/syscall_at.stdout.exp | 0 .../thr_daemon_exit_standalone.stdout.exp | 0 memcheck/tests/stpncpy.stdout.exp | 0 memcheck/tests/suppsrc_lineno.stdout.exp | 0 memcheck/tests/suppsrc_sanlineno.stdout.exp | 0 memcheck/tests/test-plo-no.stdout.exp | 0 memcheck/tests/test-plo-yes.stdout.exp | 0 memcheck/tests/varinfo1.stdout.exp | 0 memcheck/tests/varinfo2.stdout.exp | 0 memcheck/tests/varinfo3.stdout.exp | 0 memcheck/tests/varinfo5.stdout.exp | 0 memcheck/tests/wcs.stdout.exp | 0 memcheck/tests/x86-solaris/Makefile.am | 6 +- .../x86-solaris/context_eflags2.stdout.exp | 0 memcheck/tests/x86-solaris/scalar.stdout.exp | 0 .../x86-solaris/scalar_obsolete.stdout.exp | 0 memcheck/tests/x86/Makefile.am | 4 +- memcheck/tests/x86/bug152022.stdout.exp | 0 .../tests/x86/sh-mem-vec128-plo-no.stdout.exp | 0 .../x86/sh-mem-vec128-plo-yes.stdout.exp | 0 none/tests/Makefile.am | 29 +++-- none/tests/amd64-solaris/Makefile.am | 4 +- .../coredump_single_thread.stdout.exp | 0 .../coredump_single_thread_sse.stdout.exp | 0 none/tests/amd64/Makefile.am | 7 +- none/tests/amd64/asorep.stdout.exp | 0 none/tests/amd64/mpx.stdout.exp | 0 none/tests/amd64/ssse3_misaligned.stdout.exp | 0 none/tests/execve.stdout.exp | 0 none/tests/fcntl_setown.stdout.exp | 0 none/tests/linux/Makefile.am | 3 +- none/tests/linux/mremap.stdout.exp | 0 none/tests/mmap_fcntl_bug.stdout.exp | 0 none/tests/ppc32/Makefile.am | 4 +- none/tests/ppc32/power6_bcmp.stdout.exp | 0 none/tests/ppc32/test_touch_tm.stdout.exp | 0 none/tests/ppc64/Makefile.am | 4 +- none/tests/ppc64/power6_bcmp.stdout.exp | 0 none/tests/ppc64/test_touch_tm.stdout.exp | 0 none/tests/ppoll_alarm.stdout.exp | 0 none/tests/pselect_alarm.stdout.exp | 0 none/tests/pselect_sigmask_null.stdout.exp | 0 none/tests/rlimit64_nofile.stdout.exp | 0 none/tests/rlimit_nofile.stdout.exp | 0 none/tests/s390x/Makefile.am | 6 +- none/tests/s390x/cksm.stdout.exp | 0 none/tests/s390x/flogr.stdout.exp | 0 none/tests/sem.stdout.exp | 0 none/tests/semlimit.stdout.exp | 0 none/tests/solaris/Makefile.am | 18 ++-- none/tests/solaris/context_link2.stdout.exp | 0 none/tests/solaris/context_null.stdout.exp | 0 none/tests/solaris/context_stack.stdout.exp | 0 none/tests/solaris/posix_spawn.stdout.exp | 0 none/tests/solaris/proc_auxv.stdout.exp | 0 .../solaris/proc_auxv_multiple.stdout.exp | 0 none/tests/solaris/stack_prot.stdout.exp | 0 none/tests/solaris/threads_exitall.stdout.exp | 0 none/tests/syscall-restart1.stdout.exp | 0 none/tests/syscall-restart2.stdout.exp | 0 none/tests/track_new.stdout.exp | 0 none/tests/x86-solaris/Makefile.am | 7 +- .../coredump_single_thread.stdout.exp | 0 .../coredump_single_thread_sse.stdout.exp | 0 none/tests/x86-solaris/syscalls.stdout.exp | 0 none/tests/x86/Makefile.am | 4 +- none/tests/x86/int.stdout.exp | 0 none/tests/x86/ssse3_misaligned.stdout.exp | 0 203 files changed, 157 insertions(+), 198 deletions(-) delete mode 100644 dhat/tests/user_histo1.stdout.exp delete mode 100644 drd/tests/pth_detached.stdout.exp delete mode 100644 drd/tests/pth_detached2.stdout.exp delete mode 100644 drd/tests/pth_detached_sem.stdout.exp delete mode 100644 helgrind/tests/annotate_hbefore.stdout.exp delete mode 100644 helgrind/tests/annotate_rwlock.stdout.exp delete mode 100644 helgrind/tests/annotate_smart_pointer.stdout.exp delete mode 100644 helgrind/tests/bar_bad.stdout.exp delete mode 100644 helgrind/tests/cond_timedwait_invalid.stdout.exp delete mode 100644 helgrind/tests/cond_timedwait_test.stdout.exp delete mode 100644 helgrind/tests/free_is_write.stdout.exp delete mode 100644 helgrind/tests/hg01_all_ok.stdout.exp delete mode 100644 helgrind/tests/hg02_deadlock.stdout.exp delete mode 100644 helgrind/tests/hg03_inherit.stdout.exp delete mode 100644 helgrind/tests/hg04_race.stdout.exp delete mode 100644 helgrind/tests/hg04_race_h9.stdout.exp delete mode 100644 helgrind/tests/hg05_race2.stdout.exp delete mode 100644 helgrind/tests/hg06_readshared.stdout.exp delete mode 100644 helgrind/tests/locked_vs_unlocked1_fwd.stdout.exp delete mode 100644 helgrind/tests/locked_vs_unlocked1_rev.stdout.exp delete mode 100644 helgrind/tests/locked_vs_unlocked2.stdout.exp delete mode 100644 helgrind/tests/locked_vs_unlocked3.stdout.exp delete mode 100644 helgrind/tests/pth_barrier1.stdout.exp delete mode 100644 helgrind/tests/pth_barrier2.stdout.exp delete mode 100644 helgrind/tests/pth_barrier3.stdout.exp delete mode 100644 helgrind/tests/pth_spinlock.stdout.exp delete mode 100644 helgrind/tests/rwlock_race.stdout.exp delete mode 100644 helgrind/tests/rwlock_test.stdout.exp delete mode 100644 helgrind/tests/shmem_abits.stdout.exp delete mode 100644 helgrind/tests/stackteardown.stdout.exp delete mode 100644 helgrind/tests/tc01_simple_race.stdout.exp delete mode 100644 helgrind/tests/tc02_simple_tls.stdout.exp delete mode 100644 helgrind/tests/tc03_re_excl.stdout.exp delete mode 100644 helgrind/tests/tc04_free_lock.stdout.exp delete mode 100644 helgrind/tests/tc05_simple_race.stdout.exp delete mode 100644 helgrind/tests/tc06_two_races.stdout.exp delete mode 100644 helgrind/tests/tc06_two_races_xml.stdout.exp delete mode 100644 helgrind/tests/tc09_bad_unlock.stdout.exp delete mode 100644 helgrind/tests/tc10_rec_lock.stdout.exp delete mode 100644 helgrind/tests/tc12_rwl_trivial.stdout.exp delete mode 100644 helgrind/tests/tc13_laog1.stdout.exp delete mode 100644 helgrind/tests/tc14_laog_dinphils.stdout.exp delete mode 100644 helgrind/tests/tc15_laog_lockdel.stdout.exp delete mode 100644 helgrind/tests/tc16_byterace.stdout.exp delete mode 100644 helgrind/tests/tc17_sembar.stdout.exp delete mode 100644 helgrind/tests/tc18_semabuse.stdout.exp delete mode 100644 helgrind/tests/tc19_shadowmem.stdout.exp delete mode 100644 helgrind/tests/tc20_verifywrap.stdout.exp delete mode 100644 helgrind/tests/tc22_exit_w_lock.stdout.exp delete mode 100644 helgrind/tests/tc23_bogus_condwait.stdout.exp delete mode 100644 helgrind/tests/tc24_nonzero_sem.stdout.exp delete mode 100644 helgrind/tests/tls_threads.stdout.exp delete mode 100644 memcheck/tests/amd64-linux/access_below_sp_1.stdout.exp delete mode 100644 memcheck/tests/amd64-linux/access_below_sp_2.stdout.exp delete mode 100644 memcheck/tests/amd64-solaris/context_rflags2.stdout.exp delete mode 100644 memcheck/tests/amd64-solaris/scalar.stdout.exp delete mode 100644 memcheck/tests/amd64/sh-mem-vec128-plo-no.stdout.exp delete mode 100644 memcheck/tests/amd64/sh-mem-vec128-plo-yes.stdout.exp delete mode 100644 memcheck/tests/amd64/sh-mem-vec256-plo-no.stdout.exp delete mode 100644 memcheck/tests/amd64/sh-mem-vec256-plo-yes.stdout.exp delete mode 100644 memcheck/tests/amd64/xsave-avx.stdout.exp delete mode 100644 memcheck/tests/cond_ld.stdout.exp delete mode 100644 memcheck/tests/cond_st.stdout.exp delete mode 100644 memcheck/tests/cxx17_aligned_new.stdout.exp delete mode 100644 memcheck/tests/darwin/pth-undocumented.stdout.exp delete mode 100644 memcheck/tests/dw4.stdout.exp delete mode 100644 memcheck/tests/freebsd/sctp2.stdout.exp delete mode 100644 memcheck/tests/holey_buffer_too_small.stdout.exp delete mode 100644 memcheck/tests/inlinfo.stdout.exp delete mode 100644 memcheck/tests/inlinfosupp.stdout.exp delete mode 100644 memcheck/tests/inlinfosuppobj.stdout.exp delete mode 100644 memcheck/tests/inltemplate.stdout.exp delete mode 100644 memcheck/tests/linux/dlclose_leak-no-keep.stdout.exp delete mode 100644 memcheck/tests/linux/dlclose_leak.stdout.exp delete mode 100644 memcheck/tests/linux/lsframe1.stdout.exp delete mode 100644 memcheck/tests/linux/lsframe2.stdout.exp delete mode 100644 memcheck/tests/linux/sys-openat.stdout.exp delete mode 100644 memcheck/tests/lks.stdout.exp delete mode 100644 memcheck/tests/mips32/fadvise64.stdout.exp delete mode 100644 memcheck/tests/mips64/fadvise64.stdout.exp delete mode 100644 memcheck/tests/noisy_child.stdout.exp delete mode 100644 memcheck/tests/origin1-yes.stdout.exp delete mode 100644 memcheck/tests/origin2-not-quite.stdout.exp delete mode 100644 memcheck/tests/origin3-no.stdout.exp delete mode 100644 memcheck/tests/origin4-many.stdout.exp delete mode 100644 memcheck/tests/origin6-fp.stdout.exp delete mode 100644 memcheck/tests/realloc_size_zero_again_no.stdout.exp delete mode 100644 memcheck/tests/realloc_size_zero_again_yes.stdout.exp delete mode 100644 memcheck/tests/s390x/cdsg.stdout.exp delete mode 100644 memcheck/tests/s390x/cli.stdout.exp delete mode 100644 memcheck/tests/s390x/cu21.stdout.exp delete mode 100644 memcheck/tests/s390x/cu42.stdout.exp delete mode 100644 memcheck/tests/s390x/ltgjhe.stdout.exp delete mode 100644 memcheck/tests/s390x/vfae.stdout.exp delete mode 100644 memcheck/tests/s390x/vistr.stdout.exp delete mode 100644 memcheck/tests/s390x/vme.stdout.exp delete mode 100644 memcheck/tests/s390x/vstrc.stdout.exp delete mode 100644 memcheck/tests/s390x/vstrs.stdout.exp delete mode 100644 memcheck/tests/solaris/brk.stdout.exp delete mode 100644 memcheck/tests/solaris/context_stack_die.stdout.exp delete mode 100644 memcheck/tests/solaris/ioctl.stdout.exp delete mode 100644 memcheck/tests/solaris/ldynsym.stdout.exp delete mode 100644 memcheck/tests/solaris/pkcs11.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_auditon_stat.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_frealpathat.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_getrandom.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_ioctl.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_lwp_kill.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_lwp_name.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_lwp_sigqueue.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_modctl_modnvl.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_obsolete.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_shm_new.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_spawn.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_system_stats.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_utimensat.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_utimesys.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_uuidsys.stdout.exp delete mode 100644 memcheck/tests/solaris/scalar_zone_defunct.stdout.exp delete mode 100644 memcheck/tests/solaris/strlcpy.stdout.exp delete mode 100644 memcheck/tests/solaris/syscall_at.stdout.exp delete mode 100644 memcheck/tests/solaris/thr_daemon_exit_standalone.stdout.exp delete mode 100644 memcheck/tests/stpncpy.stdout.exp delete mode 100644 memcheck/tests/suppsrc_lineno.stdout.exp delete mode 100644 memcheck/tests/suppsrc_sanlineno.stdout.exp delete mode 100644 memcheck/tests/test-plo-no.stdout.exp delete mode 100644 memcheck/tests/test-plo-yes.stdout.exp delete mode 100644 memcheck/tests/varinfo1.stdout.exp delete mode 100644 memcheck/tests/varinfo2.stdout.exp delete mode 100644 memcheck/tests/varinfo3.stdout.exp delete mode 100644 memcheck/tests/varinfo5.stdout.exp delete mode 100644 memcheck/tests/wcs.stdout.exp delete mode 100644 memcheck/tests/x86-solaris/context_eflags2.stdout.exp delete mode 100644 memcheck/tests/x86-solaris/scalar.stdout.exp delete mode 100644 memcheck/tests/x86-solaris/scalar_obsolete.stdout.exp delete mode 100644 memcheck/tests/x86/bug152022.stdout.exp delete mode 100644 memcheck/tests/x86/sh-mem-vec128-plo-no.stdout.exp delete mode 100644 memcheck/tests/x86/sh-mem-vec128-plo-yes.stdout.exp delete mode 100644 none/tests/amd64-solaris/coredump_single_thread.stdout.exp delete mode 100644 none/tests/amd64-solaris/coredump_single_thread_sse.stdout.exp delete mode 100644 none/tests/amd64/asorep.stdout.exp delete mode 100644 none/tests/amd64/mpx.stdout.exp delete mode 100644 none/tests/amd64/ssse3_misaligned.stdout.exp delete mode 100644 none/tests/execve.stdout.exp delete mode 100644 none/tests/fcntl_setown.stdout.exp delete mode 100644 none/tests/linux/mremap.stdout.exp delete mode 100644 none/tests/mmap_fcntl_bug.stdout.exp delete mode 100644 none/tests/ppc32/power6_bcmp.stdout.exp delete mode 100644 none/tests/ppc32/test_touch_tm.stdout.exp delete mode 100644 none/tests/ppc64/power6_bcmp.stdout.exp delete mode 100644 none/tests/ppc64/test_touch_tm.stdout.exp delete mode 100644 none/tests/ppoll_alarm.stdout.exp delete mode 100644 none/tests/pselect_alarm.stdout.exp delete mode 100644 none/tests/pselect_sigmask_null.stdout.exp delete mode 100644 none/tests/rlimit64_nofile.stdout.exp delete mode 100644 none/tests/rlimit_nofile.stdout.exp delete mode 100644 none/tests/s390x/cksm.stdout.exp delete mode 100644 none/tests/s390x/flogr.stdout.exp delete mode 100644 none/tests/sem.stdout.exp delete mode 100644 none/tests/semlimit.stdout.exp delete mode 100644 none/tests/solaris/context_link2.stdout.exp delete mode 100644 none/tests/solaris/context_null.stdout.exp delete mode 100644 none/tests/solaris/context_stack.stdout.exp delete mode 100644 none/tests/solaris/posix_spawn.stdout.exp delete mode 100644 none/tests/solaris/proc_auxv.stdout.exp delete mode 100644 none/tests/solaris/proc_auxv_multiple.stdout.exp delete mode 100644 none/tests/solaris/stack_prot.stdout.exp delete mode 100644 none/tests/solaris/threads_exitall.stdout.exp delete mode 100644 none/tests/syscall-restart1.stdout.exp delete mode 100644 none/tests/syscall-restart2.stdout.exp delete mode 100644 none/tests/track_new.stdout.exp delete mode 100644 none/tests/x86-solaris/coredump_single_thread.stdout.exp delete mode 100644 none/tests/x86-solaris/coredump_single_thread_sse.stdout.exp delete mode 100644 none/tests/x86-solaris/syscalls.stdout.exp delete mode 100644 none/tests/x86/int.stdout.exp delete mode 100644 none/tests/x86/ssse3_misaligned.stdout.exp diff --git a/dhat/tests/Makefile.am b/dhat/tests/Makefile.am index aba7f06fd..2b183782c 100644 --- a/dhat/tests/Makefile.am +++ b/dhat/tests/Makefile.am @@ -12,8 +12,7 @@ EXTRA_DIST = \ empty.stderr.exp empty.vgtest \ sig.stderr.exp sig.vgtest \ single.stderr.exp single.vgtest \ - user_histo1.stderr.exp user_histo1.vgtest \ - user_histo1.stdout.exp + user_histo1.stderr.exp user_histo1.vgtest check_PROGRAMS = \ acc \ diff --git a/dhat/tests/user_histo1.stdout.exp b/dhat/tests/user_histo1.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 40985c539..f076ce18a 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -220,17 +220,14 @@ EXTRA_DIST = \ pth_create_glibc_2_0.stderr.exp \ pth_create_glibc_2_0.vgtest \ pth_detached.stderr.exp \ - pth_detached.stdout.exp \ pth_detached.vgtest \ pth_detached2.stderr.exp \ - pth_detached2.stdout.exp \ pth_detached2.vgtest \ pth_detached3.stderr.exp1 \ pth_detached3.stderr.exp2 \ pth_detached3.stderr.exp-freebsd \ pth_detached3.vgtest \ pth_detached_sem.stderr.exp \ - pth_detached_sem.stdout.exp \ pth_detached_sem.vgtest \ pth_inconsistent_cond_wait.stderr.exp1 \ pth_inconsistent_cond_wait.stderr.exp2 \ diff --git a/drd/tests/pth_detached.stdout.exp b/drd/tests/pth_detached.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/drd/tests/pth_detached2.stdout.exp b/drd/tests/pth_detached2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/drd/tests/pth_detached_sem.stdout.exp b/drd/tests/pth_detached_sem.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 5b6c581ed..cc6698ea0 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -14,12 +14,9 @@ noinst_SCRIPTS = \ filter_stderr EXTRA_DIST = \ - annotate_hbefore.vgtest annotate_hbefore.stdout.exp \ - annotate_hbefore.stderr.exp \ - annotate_rwlock.vgtest annotate_rwlock.stdout.exp \ - annotate_rwlock.stderr.exp \ - annotate_smart_pointer.vgtest annotate_smart_pointer.stdout.exp \ - annotate_smart_pointer.stderr.exp \ + annotate_hbefore.vgtest annotate_hbefore.stderr.exp \ + annotate_rwlock.vgtest annotate_rwlock.stderr.exp \ + annotate_smart_pointer.vgtest annotate_smart_pointer.stderr.exp \ bug322621.vgtest bug322621.stderr.exp \ bug327548.vgtest bug327548.stderr.exp \ bug392331.vgtest bug392331.stdout.exp bug392331.stderr.exp \ @@ -27,43 +24,35 @@ EXTRA_DIST = \ bug392331.supp \ bug484480.vgtest bug484480.stderr.exp bug484480.stdout.exp \ cond_init_destroy.vgtest cond_init_destroy.stderr.exp \ - cond_timedwait_invalid.vgtest cond_timedwait_invalid.stdout.exp \ - cond_timedwait_invalid.stderr.exp \ - cond_timedwait_test.vgtest cond_timedwait_test.stdout.exp \ - cond_timedwait_test.stderr.exp \ - bar_bad.vgtest bar_bad.stdout.exp bar_bad.stderr.exp \ + cond_timedwait_invalid.vgtest cond_timedwait_invalid.stderr.exp \ + cond_timedwait_test.vgtest cond_timedwait_test.stderr.exp \ + bar_bad.vgtest bar_bad.stderr.exp \ bar_bad.stderr.exp-destroy-hang \ bar_bad.stderr.exp-freebsd \ bar_bad.stderr.exp-illumos \ bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \ - free_is_write.vgtest free_is_write.stdout.exp \ - free_is_write.stderr.exp \ + free_is_write.vgtest free_is_write.stderr.exp \ getaddrinfo.vgtest getaddrinfo.stderr.exp \ - hg01_all_ok.vgtest hg01_all_ok.stdout.exp hg01_all_ok.stderr.exp \ - hg02_deadlock.vgtest hg02_deadlock.stdout.exp hg02_deadlock.stderr.exp \ - hg03_inherit.vgtest hg03_inherit.stdout.exp hg03_inherit.stderr.exp \ - hg04_race.vgtest hg04_race.stdout.exp hg04_race.stderr.exp \ - hg04_race_h9.vgtest hg04_race_h9.stdout.exp hg04_race_h9.stderr.exp \ - hg05_race2.vgtest hg05_race2.stdout.exp hg05_race2.stderr.exp \ - hg06_readshared.vgtest hg06_readshared.stdout.exp \ - hg06_readshared.stderr.exp \ + hg01_all_ok.vgtest hg01_all_ok.stderr.exp \ + hg02_deadlock.vgtest hg02_deadlock.stderr.exp \ + hg03_inherit.vgtest hg03_inherit.stderr.exp \ + hg04_race.vgtest hg04_race.stderr.exp \ + hg04_race_h9.vgtest hg04_race_h9.stderr.exp \ + hg05_race2.vgtest hg05_race2.stderr.exp \ + hg06_readshared.vgtest hg06_readshared.stderr.exp \ locked_vs_unlocked1_fwd.vgtest \ locked_vs_unlocked1_fwd.stderr.exp \ - locked_vs_unlocked1_fwd.stdout.exp \ locked_vs_unlocked1_rev.vgtest \ locked_vs_unlocked1_rev.stderr.exp \ - locked_vs_unlocked1_rev.stdout.exp \ locked_vs_unlocked2.vgtest \ locked_vs_unlocked2.stderr.exp \ - locked_vs_unlocked2.stdout.exp \ locked_vs_unlocked2.stderr.exp-freebsd \ locked_vs_unlocked3.vgtest \ locked_vs_unlocked3.stderr.exp \ - locked_vs_unlocked3.stdout.exp \ locked_vs_unlocked3.stderr.exp-freebsd \ - pth_barrier1.vgtest pth_barrier1.stdout.exp pth_barrier1.stderr.exp \ - pth_barrier2.vgtest pth_barrier2.stdout.exp pth_barrier2.stderr.exp \ - pth_barrier3.vgtest pth_barrier3.stdout.exp pth_barrier3.stderr.exp \ + pth_barrier1.vgtest pth_barrier1.stderr.exp \ + pth_barrier2.vgtest pth_barrier2.stderr.exp \ + pth_barrier3.vgtest pth_barrier3.stderr.exp \ pth_destroy_cond.vgtest \ pth_destroy_cond.stdout.exp pth_destroy_cond.stderr.exp \ pth_cond_destroy_busy.vgtest pth_cond_destroy_busy.stderr.exp \ @@ -71,63 +60,63 @@ EXTRA_DIST = \ pth_cond_destroy_busy.stderr.exp-solaris \ pth_cond_destroy_busy.stderr.exp-freebsd \ pth_mempcpy_false_races.vgtest pth_mempcpy_false_races.stderr.exp \ - pth_spinlock.vgtest pth_spinlock.stdout.exp pth_spinlock.stderr.exp \ - rwlock_race.vgtest rwlock_race.stdout.exp rwlock_race.stderr.exp \ - rwlock_test.vgtest rwlock_test.stdout.exp rwlock_test.stderr.exp \ + pth_spinlock.vgtest pth_spinlock.stderr.exp \ + rwlock_race.vgtest rwlock_race.stderr.exp \ + rwlock_test.vgtest rwlock_test.stderr.exp \ sem_clockwait_np.vgtest sem_clockwait_np.stdout.exp \ sem_clockwait_np.stderr.exp \ sem_timedwait.vgtest sem_timedwait.stdout.exp sem_timedwait.stderr.exp \ shared_timed_mutex.vgtest shared_timed_mutex.stderr.exp \ - shmem_abits.vgtest shmem_abits.stdout.exp shmem_abits.stderr.exp \ - stackteardown.vgtest stackteardown.stdout.exp stackteardown.stderr.exp \ + shmem_abits.vgtest shmem_abits.stderr.exp \ + stackteardown.vgtest stackteardown.stderr.exp \ t2t_laog.vgtest t2t_laog.stdout.exp t2t_laog.stderr.exp \ - tc01_simple_race.vgtest tc01_simple_race.stdout.exp \ + tc01_simple_race.vgtest \ tc01_simple_race.stderr.exp \ - tc02_simple_tls.vgtest tc02_simple_tls.stdout.exp \ + tc02_simple_tls.vgtest \ tc02_simple_tls.stderr.exp \ - tc03_re_excl.vgtest tc03_re_excl.stdout.exp \ + tc03_re_excl.vgtest \ tc03_re_excl.stderr.exp \ - tc04_free_lock.vgtest tc04_free_lock.stdout.exp \ + tc04_free_lock.vgtest \ tc04_free_lock.stderr.exp \ tc04_free_lock.stderr.exp-freebsd \ - tc05_simple_race.vgtest tc05_simple_race.stdout.exp \ + tc05_simple_race.vgtest \ tc05_simple_race.stderr.exp \ - tc06_two_races.vgtest tc06_two_races.stdout.exp \ + tc06_two_races.vgtest \ tc06_two_races.stderr.exp \ - tc06_two_races_xml.vgtest tc06_two_races_xml.stdout.exp \ + tc06_two_races_xml.vgtest \ tc06_two_races_xml.stderr.exp \ tc06_two_races_xml.stderr.exp-freebsd \ tc07_hbl1.vgtest tc07_hbl1.stdout.exp tc07_hbl1.stderr.exp \ tc08_hbl2.vgtest tc08_hbl2.stdout.exp tc08_hbl2.stderr.exp \ - tc09_bad_unlock.vgtest tc09_bad_unlock.stdout.exp \ + tc09_bad_unlock.vgtest \ tc09_bad_unlock.stderr.exp tc09_bad_unlock.stderr.exp-solaris \ tc09_bad_unlock.stderr.exp-freebsd \ - tc10_rec_lock.vgtest tc10_rec_lock.stdout.exp tc10_rec_lock.stderr.exp \ + tc10_rec_lock.vgtest tc10_rec_lock.stderr.exp \ tc11_XCHG.vgtest tc11_XCHG.stdout.exp tc11_XCHG.stderr.exp \ - tc12_rwl_trivial.vgtest tc12_rwl_trivial.stdout.exp \ + tc12_rwl_trivial.vgtest \ tc12_rwl_trivial.stderr.exp \ tc12_rwl_trivial.stderr.exp-darwin970 \ tc12_rwl_trivial.stderr.exp-solaris \ tc12_rwl_trivial.stderr.exp-freebsd \ - tc13_laog1.vgtest tc13_laog1.stdout.exp tc13_laog1.stderr.exp \ - tc14_laog_dinphils.vgtest tc14_laog_dinphils.stdout.exp \ + tc13_laog1.vgtest tc13_laog1.stderr.exp \ + tc14_laog_dinphils.vgtest \ tc14_laog_dinphils.stderr.exp \ - tc15_laog_lockdel.vgtest tc15_laog_lockdel.stdout.exp \ + tc15_laog_lockdel.vgtest \ tc15_laog_lockdel.stderr.exp \ - tc16_byterace.vgtest tc16_byterace.stdout.exp \ + tc16_byterace.vgtest \ tc16_byterace.stderr.exp \ - tc17_sembar.vgtest tc17_sembar.stdout.exp \ + tc17_sembar.vgtest \ tc17_sembar.stderr.exp \ - tc18_semabuse.vgtest tc18_semabuse.stdout.exp \ + tc18_semabuse.vgtest \ tc18_semabuse.stderr.exp \ tc18_semabuse.stderr.exp-linux-mips32 \ tc18_semabuse.stderr.exp-linux-mips32-b \ tc18_semabuse.stderr.exp-solaris \ tc18_semabuse.stderr.exp-freebsd \ - tc19_shadowmem.vgtest tc19_shadowmem.stdout.exp \ + tc19_shadowmem.vgtest \ tc19_shadowmem.stderr.exp tc19_shadowmem.stderr.exp-mips32 \ tc19_shadowmem.stderr.exp-mips32-BE \ - tc20_verifywrap.vgtest tc20_verifywrap.stdout.exp \ + tc20_verifywrap.vgtest \ tc20_verifywrap.stderr.exp \ tc20_verifywrap.stderr.exp-glibc-2.18 \ tc20_verifywrap.stderr.exp-glibc-2.21 \ @@ -136,19 +125,17 @@ EXTRA_DIST = \ tc20_verifywrap.stderr.exp-s390x \ tc20_verifywrap.stderr.exp-solaris \ tc21_pthonce.vgtest tc21_pthonce.stdout.exp tc21_pthonce.stderr.exp \ - tc22_exit_w_lock.vgtest tc22_exit_w_lock.stdout.exp \ + tc22_exit_w_lock.vgtest \ tc22_exit_w_lock.stderr.exp \ tc22_exit_w_lock.stderr.exp-kfail-x86 \ tc22_exit_w_lock.stderr.exp-solaris \ tc22_exit_w_lock.stderr.exp-freebsd15 \ - tc23_bogus_condwait.vgtest tc23_bogus_condwait.stdout.exp \ + tc23_bogus_condwait.vgtest \ tc23_bogus_condwait.stderr.exp \ tc23_bogus_condwait.stderr.exp-mips32 \ tc23_bogus_condwait.stderr.exp-freebsd \ - tc24_nonzero_sem.vgtest tc24_nonzero_sem.stdout.exp \ - tc24_nonzero_sem.stderr.exp \ - tls_threads.vgtest tls_threads.stdout.exp \ - tls_threads.stderr.exp \ + tc24_nonzero_sem.vgtest tc24_nonzero_sem.stderr.exp \ + tls_threads.vgtest tls_threads.stderr.exp \ tls_threads2.vgtest tls_threads2.stderr.exp \ trylock.vgtest trylock.stderr.exp diff --git a/helgrind/tests/annotate_hbefore.stdout.exp b/helgrind/tests/annotate_hbefore.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/annotate_rwlock.stdout.exp b/helgrind/tests/annotate_rwlock.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/annotate_smart_pointer.stdout.exp b/helgrind/tests/annotate_smart_pointer.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/bar_bad.stdout.exp b/helgrind/tests/bar_bad.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/cond_timedwait_invalid.stdout.exp b/helgrind/tests/cond_timedwait_invalid.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/cond_timedwait_test.stdout.exp b/helgrind/tests/cond_timedwait_test.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/free_is_write.stdout.exp b/helgrind/tests/free_is_write.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/hg01_all_ok.stdout.exp b/helgrind/tests/hg01_all_ok.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/hg02_deadlock.stdout.exp b/helgrind/tests/hg02_deadlock.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/hg03_inherit.stdout.exp b/helgrind/tests/hg03_inherit.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/hg04_race.stdout.exp b/helgrind/tests/hg04_race.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/hg04_race_h9.stdout.exp b/helgrind/tests/hg04_race_h9.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/hg05_race2.stdout.exp b/helgrind/tests/hg05_race2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/hg06_readshared.stdout.exp b/helgrind/tests/hg06_readshared.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/locked_vs_unlocked1_fwd.stdout.exp b/helgrind/tests/locked_vs_unlocked1_fwd.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/locked_vs_unlocked1_rev.stdout.exp b/helgrind/tests/locked_vs_unlocked1_rev.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/locked_vs_unlocked2.stdout.exp b/helgrind/tests/locked_vs_unlocked2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/locked_vs_unlocked3.stdout.exp b/helgrind/tests/locked_vs_unlocked3.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/pth_barrier1.stdout.exp b/helgrind/tests/pth_barrier1.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/pth_barrier2.stdout.exp b/helgrind/tests/pth_barrier2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/pth_barrier3.stdout.exp b/helgrind/tests/pth_barrier3.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/pth_spinlock.stdout.exp b/helgrind/tests/pth_spinlock.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/rwlock_race.stdout.exp b/helgrind/tests/rwlock_race.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/rwlock_test.stdout.exp b/helgrind/tests/rwlock_test.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/shmem_abits.stdout.exp b/helgrind/tests/shmem_abits.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/stackteardown.stdout.exp b/helgrind/tests/stackteardown.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc01_simple_race.stdout.exp b/helgrind/tests/tc01_simple_race.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc02_simple_tls.stdout.exp b/helgrind/tests/tc02_simple_tls.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc03_re_excl.stdout.exp b/helgrind/tests/tc03_re_excl.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc04_free_lock.stdout.exp b/helgrind/tests/tc04_free_lock.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc05_simple_race.stdout.exp b/helgrind/tests/tc05_simple_race.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc06_two_races.stdout.exp b/helgrind/tests/tc06_two_races.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc06_two_races_xml.stdout.exp b/helgrind/tests/tc06_two_races_xml.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc09_bad_unlock.stdout.exp b/helgrind/tests/tc09_bad_unlock.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc10_rec_lock.stdout.exp b/helgrind/tests/tc10_rec_lock.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc12_rwl_trivial.stdout.exp b/helgrind/tests/tc12_rwl_trivial.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc13_laog1.stdout.exp b/helgrind/tests/tc13_laog1.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc14_laog_dinphils.stdout.exp b/helgrind/tests/tc14_laog_dinphils.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc15_laog_lockdel.stdout.exp b/helgrind/tests/tc15_laog_lockdel.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc16_byterace.stdout.exp b/helgrind/tests/tc16_byterace.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc17_sembar.stdout.exp b/helgrind/tests/tc17_sembar.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc18_semabuse.stdout.exp b/helgrind/tests/tc18_semabuse.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc19_shadowmem.stdout.exp b/helgrind/tests/tc19_shadowmem.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc20_verifywrap.stdout.exp b/helgrind/tests/tc20_verifywrap.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc22_exit_w_lock.stdout.exp b/helgrind/tests/tc22_exit_w_lock.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc23_bogus_condwait.stdout.exp b/helgrind/tests/tc23_bogus_condwait.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tc24_nonzero_sem.stdout.exp b/helgrind/tests/tc24_nonzero_sem.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/tls_threads.stdout.exp b/helgrind/tests/tls_threads.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index d49c6e34f..51055e57b 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -152,10 +152,10 @@ EXTRA_DIST = \ clo_redzone_default.stderr.exp clo_redzone_128.stderr.exp \ close_range.vgtest close_range.stderr.exp \ close_range.stderr.exp.linux \ - cond_ld.vgtest cond_ld.stdout.exp cond_ld.stderr.exp-arm \ + cond_ld.vgtest cond_ld.stderr.exp-arm \ cond_ld.stderr.exp-64bit-non-arm \ cond_ld.stderr.exp-32bit-non-arm \ - cond_st.vgtest cond_st.stdout.exp cond_st.stderr.exp-arm \ + cond_st.vgtest cond_st.stderr.exp-arm \ cond_st.stderr.exp-64bit-non-arm \ cond_st.stderr.exp-32bit-non-arm \ leak_cpp_interior.stderr.exp leak_cpp_interior.stderr.exp-64bit leak_cpp_interior.vgtest libstdc++.supp \ @@ -166,7 +166,6 @@ EXTRA_DIST = \ custom-overlap.stderr.exp custom-overlap.vgtest \ cxx17_aligned_new.stderr.exp cxx17_aligned_new.vgtest \ cxx17_aligned_new.stderr.exp_32 \ - cxx17_aligned_new.stdout.exp \ darwin.supp \ duplicate_align_size_errors.stderr.exp \ duplicate_align_size_errors.stderr.exp-memalign \ @@ -212,7 +211,7 @@ EXTRA_DIST = \ describe-block.stderr.exp describe-block.vgtest \ descr_belowsp.vgtest descr_belowsp.stderr.exp \ doublefree.stderr.exp doublefree.vgtest \ - dw4.vgtest dw4.stderr.exp dw4.stderr.exp-solaris dw4.stdout.exp \ + dw4.vgtest dw4.stderr.exp dw4.stderr.exp-solaris \ err_disable1.vgtest err_disable1.stderr.exp \ err_disable2.vgtest err_disable2.stderr.exp \ err_disable3.vgtest err_disable3.stderr.exp \ @@ -235,15 +234,13 @@ EXTRA_DIST = \ fwrite.stderr.exp fwrite.vgtest fwrite.stderr.exp-kfail \ gone_abrt_xml.vgtest gone_abrt_xml.stderr.exp gone_abrt_xml.stderr.exp-solaris \ gone_abrt_xml.stderr.exp-freebsd \ - holey_buffer_too_small.vgtest holey_buffer_too_small.stdout.exp \ - holey_buffer_too_small.stderr.exp \ + holey_buffer_too_small.vgtest holey_buffer_too_small.stderr.exp \ inits.stderr.exp inits.vgtest \ inline.stderr.exp inline.stdout.exp inline.vgtest \ - inlinfo.stderr.exp inlinfo.stdout.exp inlinfo.vgtest \ - inlinfosupp.stderr.exp inlinfosupp.stdout.exp inlinfosupp.supp inlinfosupp.vgtest \ - inlinfosuppobj.stderr.exp inlinfosuppobj.stdout.exp inlinfosuppobj.supp inlinfosuppobj.vgtest \ - inltemplate.stderr.exp inltemplate.stdout.exp inltemplate.vgtest \ - inltemplate.stderr.exp-old-gcc \ + inlinfo.stderr.exp inlinfo.vgtest \ + inlinfosupp.stderr.exp inlinfosupp.supp inlinfosupp.vgtest \ + inlinfosuppobj.stderr.exp inlinfosuppobj.supp inlinfosuppobj.vgtest \ + inltemplate.vgtest inltemplate.stderr.exp inltemplate.stderr.exp-old-gcc \ leak-0.vgtest leak-0.stderr.exp \ leak-cases-exit-on-definite.vgtest leak-cases-exit-on-definite.stderr.exp \ leak-cases-full.vgtest leak-cases-full.stderr.exp \ @@ -266,7 +263,7 @@ EXTRA_DIST = \ leak-autofreepool-5.stderr.exp-freebsd \ leak-tree.vgtest leak-tree.stderr.exp \ leak-segv-jmp.vgtest leak-segv-jmp.stderr.exp \ - lks.vgtest lks.stdout.exp lks.supp lks.stderr.exp \ + lks.vgtest lks.supp lks.stderr.exp \ long_namespace_xml.vgtest long_namespace_xml.stdout.exp \ long_namespace_xml.stderr.exp long_namespace_xml.stderr.exp-freebsd \ long-supps.vgtest long-supps.stderr.exp long-supps.supp \ @@ -310,18 +307,15 @@ EXTRA_DIST = \ nanoleak2.stderr.exp nanoleak2.vgtest \ new_nothrow.stderr.exp new_nothrow.vgtest \ new_override.stderr.exp new_override.stdout.exp new_override.vgtest \ - noisy_child.vgtest noisy_child.stderr.exp noisy_child.stdout.exp \ + noisy_child.vgtest noisy_child.stderr.exp \ null_socket.stderr.exp null_socket.vgtest \ - origin1-yes.vgtest origin1-yes.stdout.exp origin1-yes.stderr.exp \ + origin1-yes.vgtest origin1-yes.stderr.exp \ origin1-yes.stderr.exp-freebsd \ - origin2-not-quite.vgtest origin2-not-quite.stdout.exp \ - origin2-not-quite.stderr.exp \ + origin2-not-quite.vgtest origin2-not-quite.stderr.exp \ origin2-not-quite.stderr.exp-freebsd \ - origin3-no.vgtest origin3-no.stdout.exp \ + origin3-no.vgtest origin3-no.stderr.exp \ origin3-no.stderr.exp-freebsd \ - origin3-no.stderr.exp \ - origin4-many.vgtest origin4-many.stdout.exp \ - origin4-many.stderr.exp \ + origin4-many.vgtest origin4-many.stderr.exp \ origin5-bz2.vgtest origin5-bz2.stdout.exp \ origin5-bz2.stderr.exp-glibc25-x86 \ origin5-bz2.stderr.exp-glibc25-amd64 \ @@ -332,7 +326,7 @@ EXTRA_DIST = \ origin5-bz2.stderr.exp-glibc234-s390x \ origin5-bz2.stderr.exp-glibc218-mips32 \ origin5-bz2.stderr.exp-glibc236-arm \ - origin6-fp.vgtest origin6-fp.stdout.exp \ + origin6-fp.vgtest \ origin6-fp.stderr.exp-glibc25-amd64 \ origin6-fp.stderr.exp-glibc27-ppc64 \ overlap.stderr.exp overlap.stdout.exp overlap.vgtest \ @@ -373,12 +367,10 @@ EXTRA_DIST = \ realloc_size_zero_yes.stderr.exp realloc_size_zero_yes.stdout.exp \ realloc_size_zero_yes.vgtest \ realloc_size_zero_again_yes.stderr.exp \ - realloc_size_zero_again_yes.stdout.exp \ realloc_size_zero_again_yes.vgtest \ realloc_size_zero_no.stderr.exp realloc_size_zero_no.stdout.exp \ realloc_size_zero_no.vgtest \ realloc_size_zero_again_no.stderr.exp \ - realloc_size_zero_again_no.stdout.exp \ realloc_size_zero_again_no.vgtest \ realloc_size_zero_off.stderr.exp realloc_size_zero_off.stdout.exp \ realloc_size_zero_off.vgtest \ @@ -409,7 +401,7 @@ EXTRA_DIST = \ sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ sized_delete.stderr.exp sized_delete.stderr.exp-x86 sized_delete.vgtest \ static_malloc.stderr.exp static_malloc.vgtest \ - stpncpy.vgtest stpncpy.stderr.exp stpncpy.stdout.exp \ + stpncpy.vgtest stpncpy.stderr.exp \ strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp3 strchr.vgtest \ str_tester.stderr.exp str_tester.vgtest \ supp-dir.vgtest supp-dir.stderr.exp \ @@ -421,15 +413,15 @@ EXTRA_DIST = \ suppfree.stderr.exp suppfree.supp suppfree.vgtest \ suppfreecollision.stderr.exp suppfreecollision.supp suppfreecollision.vgtest \ supponlyobj.stderr.exp supponlyobj.supp supponlyobj.vgtest \ - suppsrc_lineno.stderr.exp suppsrc_lineno.stdout.exp suppsrc_lineno.vgtest \ + suppsrc_lineno.stderr.exp suppsrc_lineno.vgtest \ suppsrc_lineno.supp \ - suppsrc_sanlineno.stderr.exp suppsrc_sanlineno.stdout.exp suppsrc_sanlineno.vgtest \ + suppsrc_sanlineno.stderr.exp suppsrc_sanlineno.vgtest \ suppsrc_sanlineno.supp \ suppvarinfo5.stderr.exp suppvarinfo5.supp suppvarinfo5.vgtest \ - test-plo-no.vgtest test-plo-no.stdout.exp \ + test-plo-no.vgtest \ test-plo-no.stderr.exp-le64 test-plo-no.stderr.exp-le32 \ test-plo-no.stderr.exp-le32-freebsd test-plo-no.stderr.exp-le64-freebsd \ - test-plo-yes.vgtest test-plo-yes.stdout.exp \ + test-plo-yes.vgtest \ test-plo-yes.stderr.exp-le64 test-plo-yes.stderr.exp-le32 \ test-plo-no.stderr.exp-s390x-mvc \ thread_alloca.stderr.exp thread_alloca.vgtest \ @@ -439,18 +431,18 @@ EXTRA_DIST = \ undef_malloc_args.stderr.exp undef_malloc_args.vgtest \ unit_libcbase.stderr.exp unit_libcbase.vgtest \ unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \ - varinfo1.vgtest varinfo1.stdout.exp varinfo1.stderr.exp \ + varinfo1.vgtest varinfo1.stderr.exp \ varinfo1.stderr.exp-ppc64 \ varinfo1.stderr.exp-freebsd \ - varinfo2.vgtest varinfo2.stdout.exp varinfo2.stderr.exp \ + varinfo2.vgtest varinfo2.stderr.exp \ varinfo2.stderr.exp-ppc64 \ - varinfo3.vgtest varinfo3.stdout.exp varinfo3.stderr.exp \ + varinfo3.vgtest varinfo3.stderr.exp \ varinfo3.stderr.exp-ppc64 \ varinfo3.stderr.exp-freebsd \ varinfo4.vgtest varinfo4.stdout.exp varinfo4.stderr.exp \ varinfo4.stderr.exp-ppc64 \ varinfo4.stderr.exp-freebsd \ - varinfo5.vgtest varinfo5.stdout.exp varinfo5.stderr.exp \ + varinfo5.vgtest varinfo5.stderr.exp \ varinfo5.stderr.exp-ppc64 \ varinfo5.stderr.exp-freebsd \ varinfo5.stderr.exp-freebsd2 \ @@ -464,7 +456,7 @@ EXTRA_DIST = \ vcpu_fnfns.stdout.exp-illumos \ vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \ wcpncpy1.stderr.exp wcpncpy1.vgtest \ - wcs.vgtest wcs.stderr.exp wcs.stdout.exp \ + wcs.vgtest wcs.stderr.exp \ wcscat.vgtest wcscat.stderr.exp wcscat.stdout.exp \ wcsncpy.vgtest wcsncpy.stderr.exp \ wmemcmp.vgtest wmemcmp.stderr.exp \ @@ -497,7 +489,7 @@ check_PROGRAMS = \ bug287260 \ bug340392 \ bug401284 \ - bug445235_ada_demangle \ + bug445235_ada_demangle \ bug464969_d_demangle \ bug472219 \ calloc-overflow \ diff --git a/memcheck/tests/amd64-linux/Makefile.am b/memcheck/tests/amd64-linux/Makefile.am index bd12337fe..70738a0de 100644 --- a/memcheck/tests/amd64-linux/Makefile.am +++ b/memcheck/tests/amd64-linux/Makefile.am @@ -7,10 +7,8 @@ dist_noinst_SCRIPTS = \ noinst_HEADERS = scalar.h EXTRA_DIST = \ - access_below_sp_1.vgtest \ - access_below_sp_1.stderr.exp access_below_sp_1.stdout.exp \ - access_below_sp_2.vgtest \ - access_below_sp_2.stderr.exp access_below_sp_2.stdout.exp \ + access_below_sp_1.vgtest access_below_sp_1.stderr.exp \ + access_below_sp_2.vgtest access_below_sp_2.stderr.exp \ defcfaexpr.vgtest defcfaexpr.stderr.exp \ int3-amd64.vgtest int3-amd64.stderr.exp int3-amd64.stdout.exp \ scalar.stderr.exp scalar.vgtest \ diff --git a/memcheck/tests/amd64-linux/access_below_sp_1.stdout.exp b/memcheck/tests/amd64-linux/access_below_sp_1.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64-linux/access_below_sp_2.stdout.exp b/memcheck/tests/amd64-linux/access_below_sp_2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64-solaris/Makefile.am b/memcheck/tests/amd64-solaris/Makefile.am index 940706e22..587d8eab5 100644 --- a/memcheck/tests/amd64-solaris/Makefile.am +++ b/memcheck/tests/amd64-solaris/Makefile.am @@ -7,10 +7,10 @@ EXTRA_DIST = \ context_fpu.stderr.exp context_fpu.stdout.exp context_fpu.vgtest \ context_gpr.stderr.exp context_gpr.stdout.exp context_gpr.vgtest \ context_rflags.stderr.exp context_rflags.stdout.exp context_rflags.vgtest \ - context_rflags2.stderr.exp context_rflags2.stdout.exp context_rflags2.vgtest \ + context_rflags2.stderr.exp context_rflags2.vgtest \ context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest \ ldsoexec.stderr.exp ldsoexec.vgtest \ - scalar.stderr.exp scalar.stdout.exp scalar.vgtest + scalar.stderr.exp scalar.vgtest check_PROGRAMS = \ context_fpu \ diff --git a/memcheck/tests/amd64-solaris/context_rflags2.stdout.exp b/memcheck/tests/amd64-solaris/context_rflags2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64-solaris/scalar.stdout.exp b/memcheck/tests/amd64-solaris/scalar.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/Makefile.am b/memcheck/tests/amd64/Makefile.am index 4b25e1dcf..7c5553be5 100644 --- a/memcheck/tests/amd64/Makefile.am +++ b/memcheck/tests/amd64/Makefile.am @@ -28,21 +28,17 @@ EXTRA_DIST = \ rh2257546_256.stderr.exp rh2257546_256.stdout.exp \ sh-mem-vec128-plo-no.vgtest \ sh-mem-vec128-plo-no.stderr.exp \ - sh-mem-vec128-plo-no.stdout.exp \ sh-mem-vec128-plo-yes.vgtest \ sh-mem-vec128-plo-yes.stderr.exp \ - sh-mem-vec128-plo-yes.stdout.exp \ sh-mem-vec256-plo-no.vgtest \ sh-mem-vec256-plo-no.stderr.exp \ - sh-mem-vec256-plo-no.stdout.exp \ sh-mem-vec256-plo-yes.vgtest \ sh-mem-vec256-plo-yes.stderr.exp \ - sh-mem-vec256-plo-yes.stdout.exp \ shr_edx.stderr.exp shr_edx.stdout.exp shr_edx.vgtest \ sse_memory.stderr.exp sse_memory.stdout.exp sse_memory.vgtest \ xor-undef-amd64.stderr.exp xor-undef-amd64.stdout.exp \ xor-undef-amd64.stderr.exp-freebsd xor-undef-amd64.vgtest \ - xsave-avx.vgtest xsave-avx.stdout.exp xsave-avx.stderr.exp + xsave-avx.vgtest xsave-avx.stderr.exp check_PROGRAMS = \ bt_everything \ @@ -65,8 +61,7 @@ if HAVE_ASM_CONSTRAINT_P endif # clang 3.5.0 barfs about -mfancy-math-387 if !COMPILER_IS_CLANG - check_PROGRAMS += \ - more_x87_fp + check_PROGRAMS += more_x87_fp endif # initially this was a "not clang" test diff --git a/memcheck/tests/amd64/sh-mem-vec128-plo-no.stdout.exp b/memcheck/tests/amd64/sh-mem-vec128-plo-no.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/sh-mem-vec128-plo-yes.stdout.exp b/memcheck/tests/amd64/sh-mem-vec128-plo-yes.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-no.stdout.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stdout.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/xsave-avx.stdout.exp b/memcheck/tests/amd64/xsave-avx.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/cond_ld.stdout.exp b/memcheck/tests/cond_ld.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/cond_st.stdout.exp b/memcheck/tests/cond_st.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/cxx17_aligned_new.stdout.exp b/memcheck/tests/cxx17_aligned_new.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/Makefile.am b/memcheck/tests/darwin/Makefile.am index e43d4af79..650b7a640 100644 --- a/memcheck/tests/darwin/Makefile.am +++ b/memcheck/tests/darwin/Makefile.am @@ -13,7 +13,7 @@ EXTRA_DIST = \ env.stderr.exp env.vgtest \ ioctl-tiocsbrk.stderr.exp ioctl-tiocsbrk.vgtest \ pth-supp.stderr.exp pth-supp.vgtest \ - pth-undocumented.stderr.exp pth-undocumented.stdout.exp pth-undocumented.vgtest \ + pth-undocumented.stderr.exp pth-undocumented.vgtest \ mkfifo.stderr.exp mkfifo.vgtest \ scalar.stderr.exp scalar.vgtest \ scalar_fork.stderr.exp scalar_fork.vgtest \ diff --git a/memcheck/tests/darwin/pth-undocumented.stdout.exp b/memcheck/tests/darwin/pth-undocumented.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/dw4.stdout.exp b/memcheck/tests/dw4.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index 6a77a262d..90f74f9c3 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -115,7 +115,6 @@ EXTRA_DIST = \ sctp.stdout.exp \ sctp2.vgtest \ sctp2.stderr.exp \ - sctp2.stdout.exp \ setcred.vgtest \ setcred.stderr.exp \ setproctitle.vgtest \ diff --git a/memcheck/tests/freebsd/sctp2.stdout.exp b/memcheck/tests/freebsd/sctp2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/holey_buffer_too_small.stdout.exp b/memcheck/tests/holey_buffer_too_small.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/inlinfo.stdout.exp b/memcheck/tests/inlinfo.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/inlinfosupp.stdout.exp b/memcheck/tests/inlinfosupp.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/inlinfosuppobj.stdout.exp b/memcheck/tests/inlinfosuppobj.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/inltemplate.stdout.exp b/memcheck/tests/inltemplate.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index b9f273be8..367af9913 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -16,16 +16,14 @@ EXTRA_DIST = \ capget.stderr.exp4 \ debuginfod-check.stderr.exp debuginfod-check.vgtest.in \ debuginfod-check.pl \ - dlclose_leak-no-keep.stderr.exp dlclose_leak-no-keep.stdout.exp \ - dlclose_leak-no-keep.vgtest \ - dlclose_leak.stderr.exp dlclose_leak.stdout.exp \ - dlclose_leak.vgtest \ + dlclose_leak-no-keep.stderr.exp dlclose_leak-no-keep.vgtest \ + dlclose_leak.stderr.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 \ + lsframe1.vgtest lsframe1.stderr.exp \ + lsframe2.vgtest lsframe2.stderr.exp \ memfd_create.vgtest memfd_create.stderr.exp \ memfd_create.stderr.exp-fcntl64 \ rfcomm.vgtest rfcomm.stderr.exp \ @@ -36,7 +34,7 @@ EXTRA_DIST = \ syscalls-2007.vgtest syscalls-2007.stderr.exp \ syslog-syscall.vgtest syslog-syscall.stderr.exp \ sys-copy_file_range.vgtest sys-copy_file_range.stderr.exp \ - sys-openat.vgtest sys-openat.stderr.exp sys-openat.stdout.exp \ + sys-openat.vgtest sys-openat.stderr.exp \ sys-statx.vgtest sys-statx.stderr.exp \ timerfd-syscall.vgtest timerfd-syscall.stderr.exp \ with-space.stderr.exp with-space.stdout.exp with-space.vgtest \ diff --git a/memcheck/tests/linux/dlclose_leak-no-keep.stdout.exp b/memcheck/tests/linux/dlclose_leak-no-keep.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/dlclose_leak.stdout.exp b/memcheck/tests/linux/dlclose_leak.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/lsframe1.stdout.exp b/memcheck/tests/linux/lsframe1.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/lsframe2.stdout.exp b/memcheck/tests/linux/lsframe2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/sys-openat.stdout.exp b/memcheck/tests/linux/sys-openat.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/lks.stdout.exp b/memcheck/tests/lks.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/mips32/Makefile.am b/memcheck/tests/mips32/Makefile.am index 6f91d7262..0dcb995d0 100644 --- a/memcheck/tests/mips32/Makefile.am +++ b/memcheck/tests/mips32/Makefile.am @@ -7,7 +7,7 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = $(noinst_SCRIPTS) \ bad_sioc.stderr.exp bad_sioc.stdout.exp bad_sioc.vgtest \ fadvise64.stderr.exp fadvise64.stderr.exp-BE \ - fadvise64.stdout.exp fadvise64.vgtest + fadvise64.vgtest check_PROGRAMS = \ diff --git a/memcheck/tests/mips32/fadvise64.stdout.exp b/memcheck/tests/mips32/fadvise64.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/mips64/Makefile.am b/memcheck/tests/mips64/Makefile.am index f1c72a04e..9c9590152 100644 --- a/memcheck/tests/mips64/Makefile.am +++ b/memcheck/tests/mips64/Makefile.am @@ -6,7 +6,7 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = $(noinst_SCRIPTS) \ bad_sioc.stderr.exp bad_sioc.stdout.exp bad_sioc.vgtest \ - fadvise64.stderr.exp fadvise64.stdout.exp fadvise64.vgtest + fadvise64.stderr.exp fadvise64.vgtest check_PROGRAMS = \ bad_sioc \ diff --git a/memcheck/tests/mips64/fadvise64.stdout.exp b/memcheck/tests/mips64/fadvise64.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/noisy_child.stdout.exp b/memcheck/tests/noisy_child.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/origin1-yes.stdout.exp b/memcheck/tests/origin1-yes.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/origin2-not-quite.stdout.exp b/memcheck/tests/origin2-not-quite.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/origin3-no.stdout.exp b/memcheck/tests/origin3-no.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/origin4-many.stdout.exp b/memcheck/tests/origin4-many.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/origin6-fp.stdout.exp b/memcheck/tests/origin6-fp.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/realloc_size_zero_again_no.stdout.exp b/memcheck/tests/realloc_size_zero_again_no.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/realloc_size_zero_again_yes.stdout.exp b/memcheck/tests/realloc_size_zero_again_yes.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/Makefile.am b/memcheck/tests/s390x/Makefile.am index 580fc1ee9..abeb97136 100644 --- a/memcheck/tests/s390x/Makefile.am +++ b/memcheck/tests/s390x/Makefile.am @@ -8,8 +8,8 @@ check_PROGRAMS = $(INSN_TESTS) EXTRA_DIST = \ $(addsuffix .stderr.exp,$(INSN_TESTS)) \ - $(addsuffix .stdout.exp,$(INSN_TESTS)) \ - $(addsuffix .vgtest,$(INSN_TESTS)) + $(addsuffix .vgtest,$(INSN_TESTS)) \ + tmxx.stdout.exp AM_CFLAGS += @FLAG_M64@ AM_CXXFLAGS += @FLAG_M64@ diff --git a/memcheck/tests/s390x/cdsg.stdout.exp b/memcheck/tests/s390x/cdsg.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/cli.stdout.exp b/memcheck/tests/s390x/cli.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/cu21.stdout.exp b/memcheck/tests/s390x/cu21.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/cu42.stdout.exp b/memcheck/tests/s390x/cu42.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/ltgjhe.stdout.exp b/memcheck/tests/s390x/ltgjhe.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/vfae.stdout.exp b/memcheck/tests/s390x/vfae.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/vistr.stdout.exp b/memcheck/tests/s390x/vistr.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/vme.stdout.exp b/memcheck/tests/s390x/vme.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/vstrc.stdout.exp b/memcheck/tests/s390x/vstrc.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/vstrs.stdout.exp b/memcheck/tests/s390x/vstrs.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/Makefile.am b/memcheck/tests/solaris/Makefile.am index 0c0d551ed..1387c715a 100644 --- a/memcheck/tests/solaris/Makefile.am +++ b/memcheck/tests/solaris/Makefile.am @@ -14,50 +14,50 @@ noinst_HEADERS = scalar.h EXTRA_DIST = \ aligned_alloc.stderr.exp aligned_alloc.vgtest \ aligned_alloc.stderr.exp-solaris \ - brk.stderr.exp brk.stdout.exp brk.vgtest \ - context_stack_die.stderr.exp context_stack_die.stdout.exp context_stack_die.vgtest \ + brk.stderr.exp brk.vgtest \ + context_stack_die.stderr.exp context_stack_die.vgtest \ door_data.stderr.exp door_data.stdout.exp door_data.vgtest \ door_kill.stderr.exp door_kill.stdout.exp door_kill.vgtest \ execx.stderr.exp execx.stdout.exp execx.vgtest \ getzoneoffset.stderr.exp getzoneoffset.vgtest \ gethrtime.stderr.exp gethrtime.stdout.exp gethrtime.vgtest \ gethrusec.stderr.exp gethrusec.stdout.exp gethrusec.vgtest \ - ioctl.stderr.exp ioctl.stdout.exp ioctl.vgtest \ - ldynsym.stderr.exp ldynsym.stdout.exp ldynsym.vgtest \ + ioctl.stderr.exp ioctl.vgtest \ + ldynsym.stderr.exp ldynsym.vgtest \ lsframe1.stderr.exp lsframe1.stdout.exp lsframe1.vgtest \ lsframe2.stderr.exp lsframe2.stdout.exp lsframe2.vgtest \ mmapobj_bssonly.stderr.exp mmapobj_bssonly.stdout.exp mmapobj_bssonly.vgtest \ name_service_door.stderr.exp-amd64 name_service_door.stderr.exp-x86 \ name_service_door.stdout.exp name_service_door.vgtest \ - pkcs11.stderr.exp-illumos pkcs11.stderr.exp-solaris pkcs11.stdout.exp pkcs11.vgtest \ - scalar.stderr.exp scalar.stdout.exp scalar.vgtest \ - scalar_auditon_stat.stderr.exp scalar_auditon_stat.stdout.exp scalar_auditon_stat.vgtest \ - scalar_frealpathat.stderr.exp scalar_frealpathat.stdout.exp scalar_frealpathat.vgtest \ - scalar_getrandom.stderr.exp scalar_getrandom.stdout.exp scalar_getrandom.vgtest \ + pkcs11.stderr.exp-illumos pkcs11.stderr.exp-solaris pkcs11.vgtest \ + scalar.stderr.exp scalar.vgtest \ + scalar_auditon_stat.stderr.exp scalar_auditon_stat.vgtest \ + scalar_frealpathat.stderr.exp scalar_frealpathat.vgtest \ + scalar_getrandom.stderr.exp scalar_getrandom.vgtest \ scalar_getrandom.stderr.exp-illumos \ - scalar_ioctl.stderr.exp scalar_ioctl.stdout.exp scalar_ioctl.vgtest \ - scalar_lwp_kill.stderr.exp scalar_lwp_kill.stdout.exp scalar_lwp_kill.vgtest \ - scalar_lwp_name.stderr.exp scalar_lwp_name.stdout.exp scalar_lwp_name.vgtest \ - scalar_lwp_sigqueue.stderr.exp scalar_lwp_sigqueue.stdout.exp scalar_lwp_sigqueue.vgtest \ + scalar_ioctl.stderr.exp scalar_ioctl.vgtest \ + scalar_lwp_kill.stderr.exp scalar_lwp_kill.vgtest \ + scalar_lwp_name.stderr.exp scalar_lwp_name.vgtest \ + scalar_lwp_sigqueue.stderr.exp scalar_lwp_sigqueue.vgtest \ scalar_lwp_sigqueue_pid.stderr.exp scalar_lwp_sigqueue_pid.vgtest \ - scalar_modctl_modnvl.stderr.exp scalar_modctl_modnvl.stdout.exp scalar_modctl_modnvl.vgtest \ - scalar_obsolete.stderr.exp scalar_obsolete.stdout.exp scalar_obsolete.vgtest \ - scalar_shm_new.stderr.exp scalar_shm_new.stdout.exp scalar_shm_new.vgtest \ - scalar_spawn.stderr.exp scalar_spawn.stdout.exp scalar_spawn.vgtest \ - scalar_system_stats.stderr.exp scalar_system_stats.stdout.exp scalar_system_stats.vgtest \ + scalar_modctl_modnvl.stderr.exp scalar_modctl_modnvl.vgtest \ + scalar_obsolete.stderr.exp scalar_obsolete.vgtest \ + scalar_shm_new.stderr.exp scalar_shm_new.vgtest \ + scalar_spawn.stderr.exp scalar_spawn.vgtest \ + scalar_system_stats.stderr.exp scalar_system_stats.vgtest \ scalar_tsol_clearance.stderr.exp scalar_tsol_clearance.vgtest \ - scalar_utimensat.stderr.exp scalar_utimensat.stdout.exp scalar_utimensat.vgtest \ - scalar_utimesys.stderr.exp scalar_utimesys.stdout.exp scalar_utimesys.vgtest \ - scalar_uuidsys.stderr.exp scalar_uuidsys.stdout.exp scalar_uuidsys.vgtest \ - scalar_zone_defunct.stderr.exp scalar_zone_defunct.stdout.exp scalar_zone_defunct.vgtest \ + scalar_utimensat.stderr.exp scalar_utimensat.vgtest \ + scalar_utimesys.stderr.exp scalar_utimesys.vgtest \ + scalar_uuidsys.stderr.exp scalar_uuidsys.vgtest \ + scalar_zone_defunct.stderr.exp scalar_zone_defunct.vgtest \ sendfilev.stderr.exp sendfilev.stdout.exp sendfilev.vgtest \ shmat.stderr.exp shmat.stdout.exp shmat.vgtest \ spawn.stderr.exp spawn.stdout.exp spawn.vgtest \ - strlcpy.stderr.exp strlcpy.stdout.exp strlcpy.vgtest \ + strlcpy.stderr.exp strlcpy.vgtest \ supponlyobj.stderr.exp supponlyobj.supp supponlyobj.vgtest \ - syscall_at.stderr.exp syscall_at.stdout.exp syscall_at.vgtest \ + syscall_at.stderr.exp syscall_at.vgtest \ thr_daemon_exit_libc.stderr.exp thr_daemon_exit_libc.stdout.exp thr_daemon_exit_libc.vgtest \ - thr_daemon_exit_standalone.stderr.exp thr_daemon_exit_standalone.stdout.exp thr_daemon_exit_standalone.vgtest \ + thr_daemon_exit_standalone.stderr.exp thr_daemon_exit_standalone.vgtest \ memalign.vgtest memalign.stderr.exp check_PROGRAMS = \ diff --git a/memcheck/tests/solaris/brk.stdout.exp b/memcheck/tests/solaris/brk.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/context_stack_die.stdout.exp b/memcheck/tests/solaris/context_stack_die.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/ioctl.stdout.exp b/memcheck/tests/solaris/ioctl.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/ldynsym.stdout.exp b/memcheck/tests/solaris/ldynsym.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/pkcs11.stdout.exp b/memcheck/tests/solaris/pkcs11.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar.stdout.exp b/memcheck/tests/solaris/scalar.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_auditon_stat.stdout.exp b/memcheck/tests/solaris/scalar_auditon_stat.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_frealpathat.stdout.exp b/memcheck/tests/solaris/scalar_frealpathat.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_getrandom.stdout.exp b/memcheck/tests/solaris/scalar_getrandom.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_ioctl.stdout.exp b/memcheck/tests/solaris/scalar_ioctl.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_lwp_kill.stdout.exp b/memcheck/tests/solaris/scalar_lwp_kill.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_lwp_name.stdout.exp b/memcheck/tests/solaris/scalar_lwp_name.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_lwp_sigqueue.stdout.exp b/memcheck/tests/solaris/scalar_lwp_sigqueue.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_modctl_modnvl.stdout.exp b/memcheck/tests/solaris/scalar_modctl_modnvl.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_obsolete.stdout.exp b/memcheck/tests/solaris/scalar_obsolete.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_shm_new.stdout.exp b/memcheck/tests/solaris/scalar_shm_new.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_spawn.stdout.exp b/memcheck/tests/solaris/scalar_spawn.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_system_stats.stdout.exp b/memcheck/tests/solaris/scalar_system_stats.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_utimensat.stdout.exp b/memcheck/tests/solaris/scalar_utimensat.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_utimesys.stdout.exp b/memcheck/tests/solaris/scalar_utimesys.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_uuidsys.stdout.exp b/memcheck/tests/solaris/scalar_uuidsys.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/scalar_zone_defunct.stdout.exp b/memcheck/tests/solaris/scalar_zone_defunct.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/strlcpy.stdout.exp b/memcheck/tests/solaris/strlcpy.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/syscall_at.stdout.exp b/memcheck/tests/solaris/syscall_at.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/thr_daemon_exit_standalone.stdout.exp b/memcheck/tests/solaris/thr_daemon_exit_standalone.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/stpncpy.stdout.exp b/memcheck/tests/stpncpy.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/suppsrc_lineno.stdout.exp b/memcheck/tests/suppsrc_lineno.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/suppsrc_sanlineno.stdout.exp b/memcheck/tests/suppsrc_sanlineno.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/test-plo-no.stdout.exp b/memcheck/tests/test-plo-no.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/test-plo-yes.stdout.exp b/memcheck/tests/test-plo-yes.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/varinfo1.stdout.exp b/memcheck/tests/varinfo1.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/varinfo2.stdout.exp b/memcheck/tests/varinfo2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/varinfo3.stdout.exp b/memcheck/tests/varinfo3.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/varinfo5.stdout.exp b/memcheck/tests/varinfo5.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wcs.stdout.exp b/memcheck/tests/wcs.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86-solaris/Makefile.am b/memcheck/tests/x86-solaris/Makefile.am index 53991a8be..472e98222 100644 --- a/memcheck/tests/x86-solaris/Makefile.am +++ b/memcheck/tests/x86-solaris/Makefile.am @@ -4,10 +4,10 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ - scalar.stderr.exp scalar.stdout.exp scalar.vgtest \ - scalar_obsolete.stderr.exp scalar_obsolete.stdout.exp scalar_obsolete.vgtest \ + scalar.stderr.exp scalar.vgtest \ + scalar_obsolete.stderr.exp scalar_obsolete.vgtest \ context_eflags.stderr.exp context_eflags.stdout.exp context_eflags.vgtest \ - context_eflags2.stderr.exp context_eflags2.stdout.exp context_eflags2.vgtest \ + context_eflags2.stderr.exp context_eflags2.vgtest \ context_fpu.stderr.exp context_fpu.stdout.exp context_fpu.vgtest \ context_gpr.stderr.exp context_gpr.stdout.exp context_gpr.vgtest \ context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest \ diff --git a/memcheck/tests/x86-solaris/context_eflags2.stdout.exp b/memcheck/tests/x86-solaris/context_eflags2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86-solaris/scalar.stdout.exp b/memcheck/tests/x86-solaris/scalar.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86-solaris/scalar_obsolete.stdout.exp b/memcheck/tests/x86-solaris/scalar_obsolete.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/Makefile.am b/memcheck/tests/x86/Makefile.am index 53ae83f6c..788cdde21 100644 --- a/memcheck/tests/x86/Makefile.am +++ b/memcheck/tests/x86/Makefile.am @@ -8,7 +8,7 @@ noinst_SCRIPTS = filter_pushfpopf INSN_TESTS = insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2 EXTRA_DIST = \ - bug152022.vgtest bug152022.stderr.exp bug152022.stdout.exp \ + bug152022.vgtest bug152022.stderr.exp \ bug487993.vgtest bug487993.stderr.exp \ espindola2.vgtest espindola2.stderr.exp \ fpeflags.stderr.exp fpeflags.vgtest \ @@ -22,10 +22,8 @@ EXTRA_DIST = \ pcmpgt.stderr.exp pcmpgt.vgtest \ sh-mem-vec128-plo-no.vgtest \ sh-mem-vec128-plo-no.stderr.exp \ - sh-mem-vec128-plo-no.stdout.exp \ sh-mem-vec128-plo-yes.vgtest \ sh-mem-vec128-plo-yes.stderr.exp \ - sh-mem-vec128-plo-yes.stdout.exp \ sse1_memory.stderr.exp sse1_memory.stdout.exp sse1_memory.vgtest \ sse2_memory.stderr.exp sse2_memory.stdout.exp sse2_memory.vgtest \ tronical.stderr.exp tronical.vgtest \ diff --git a/memcheck/tests/x86/bug152022.stdout.exp b/memcheck/tests/x86/bug152022.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/sh-mem-vec128-plo-no.stdout.exp b/memcheck/tests/x86/sh-mem-vec128-plo-no.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/sh-mem-vec128-plo-yes.stdout.exp b/memcheck/tests/x86/sh-mem-vec128-plo-yes.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 20be62cbd..0cc4ca8b0 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -139,9 +139,9 @@ EXTRA_DIST = \ exec-sigmask.vgtest exec-sigmask.stdout.exp \ exec-sigmask.stdout.exp2 exec-sigmask.stdout.exp3 \ exec-sigmask.stdout.exp-solaris exec-sigmask.stderr.exp \ - execve.vgtest execve.stdout.exp execve.stderr.exp \ + execve.vgtest execve.stderr.exp \ faultstatus.vgtest faultstatus.stderr.exp faultstatus.stderr.exp-s390x \ - fcntl_setown.vgtest fcntl_setown.stdout.exp fcntl_setown.stderr.exp \ + fcntl_setown.vgtest fcntl_setown.stderr.exp \ fdleak_cat.vgtest fdleak_cat.stderr.exp \ fdleak_cmsg.stderr.exp fdleak_cmsg.vgtest \ fdleak_cmsg_xml.stderr.exp-ppc64le \ @@ -182,8 +182,7 @@ EXTRA_DIST = \ manythreads.stdout.exp manythreads.stderr.exp manythreads.vgtest \ map_unaligned.stderr.exp map_unaligned.vgtest \ map_unmap.stderr.exp map_unmap.stdout.exp map_unmap.vgtest \ - mmap_fcntl_bug.vgtest mmap_fcntl_bug.stdout.exp \ - mmap_fcntl_bug.stderr.exp \ + mmap_fcntl_bug.vgtest mmap_fcntl_bug.stderr.exp \ mmap_o_direct.stderr.exp mmap_o_direct.vgtest \ mq.stderr.exp mq.vgtest \ munmap_exe.stderr.exp munmap_exe.vgtest \ @@ -193,16 +192,15 @@ EXTRA_DIST = \ nodir.stderr.exp nodir.vgtest \ nodir.stderr.exp-freebsd \ pending.stdout.exp pending.stderr.exp pending.vgtest \ - ppoll_alarm.stdout.exp ppoll_alarm.stderr.exp ppoll_alarm.vgtest \ + ppoll_alarm.stderr.exp ppoll_alarm.vgtest \ procfs-linux.stderr.exp-with-readlinkat \ procfs-linux.stderr.exp-without-readlinkat \ procfs-linux.vgtest \ procfs-non-linux.vgtest \ procfs-non-linux.stderr.exp-with-readlinkat \ procfs-non-linux.stderr.exp-without-readlinkat \ - pselect_alarm.stdout.exp pselect_alarm.stderr.exp pselect_alarm.vgtest \ - pselect_sigmask_null.vgtest \ - pselect_sigmask_null.stdout.exp pselect_sigmask_null.stderr.exp \ + pselect_alarm.stderr.exp pselect_alarm.vgtest \ + pselect_sigmask_null.vgtest pselect_sigmask_null.stderr.exp \ pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \ pth_blockedsig.stderr.exp \ pth_blockedsig.stdout.exp pth_blockedsig.vgtest \ @@ -235,19 +233,19 @@ EXTRA_DIST = \ require-text-symbol-3.vgtest require-text-symbol-3.stderr.exp \ res_search.stderr.exp res_search.stdout.exp res_search.vgtest \ resolv.stderr.exp resolv.stdout.exp resolv.vgtest \ - rlimit_nofile.stderr.exp rlimit_nofile.stdout.exp rlimit_nofile.vgtest \ - rlimit64_nofile.stderr.exp rlimit64_nofile.stdout.exp rlimit64_nofile.vgtest \ + rlimit_nofile.stderr.exp rlimit_nofile.vgtest \ + rlimit64_nofile.stderr.exp rlimit64_nofile.vgtest \ selfrun.stderr.exp selfrun.stdout.exp selfrun.vgtest \ - sem.stderr.exp sem.stdout.exp sem.vgtest \ - semlimit.stderr.exp semlimit.stdout.exp semlimit.vgtest \ + sem.stderr.exp sem.vgtest \ + semlimit.stderr.exp semlimit.vgtest \ sha1_test.stderr.exp sha1_test.vgtest \ shortpush.stderr.exp shortpush.vgtest \ shorts.stderr.exp shorts.vgtest \ sigstackgrowth.stdout.exp sigstackgrowth.stderr.exp sigstackgrowth.vgtest \ sigsusp.stderr.exp sigsusp.vgtest \ stackgrowth.stdout.exp stackgrowth.stderr.exp stackgrowth.vgtest \ - syscall-restart1.vgtest syscall-restart1.stdout.exp syscall-restart1.stderr.exp \ - syscall-restart2.vgtest syscall-restart2.stdout.exp syscall-restart2.stderr.exp \ + syscall-restart1.vgtest syscall-restart1.stderr.exp \ + syscall-restart2.vgtest syscall-restart2.stderr.exp \ syslog.vgtest syslog.stderr.exp \ system.stderr.exp system.vgtest \ thread-exits.stderr.exp thread-exits.stdout.exp thread-exits.vgtest \ @@ -275,8 +273,7 @@ EXTRA_DIST = \ xml-track-fds.stderr.exp xml-track-fds.vgtest \ fdbaduse.stderr.exp fdbaduse.vgtest \ use_after_close.stderr.exp use_after_close.vgtest \ - track_new.stderr.exp track_new.stdout.exp \ - track_new.vgtest track_new.stderr.exp-illumos \ + track_new.stderr.exp track_new.vgtest track_new.stderr.exp-illumos \ track_yes.vgtest track_high.vgtest \ track_yes.stderr.exp track_high.stderr.exp \ track_bad.vgtest track_bad.stderr.exp diff --git a/none/tests/amd64-solaris/Makefile.am b/none/tests/amd64-solaris/Makefile.am index f34d23f70..79b7704b8 100644 --- a/none/tests/amd64-solaris/Makefile.am +++ b/none/tests/amd64-solaris/Makefile.am @@ -9,10 +9,10 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = \ cet_nops_fs.stderr.exp cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ coredump_single_thread.post.exp coredump_single_thread.stderr.exp \ - coredump_single_thread.stdout.exp coredump_single_thread.vgtest \ + coredump_single_thread.vgtest \ coredump_single_thread_sse.post.exp coredump_single_thread_sse.stderr.exp \ coredump_single_thread_sse.post.exp-illumos \ - coredump_single_thread_sse.stdout.exp coredump_single_thread_sse.vgtest \ + coredump_single_thread_sse.vgtest \ syscall_return_args.stderr.exp syscall_return_args.vgtest check_PROGRAMS = \ diff --git a/none/tests/amd64-solaris/coredump_single_thread.stdout.exp b/none/tests/amd64-solaris/coredump_single_thread.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64-solaris/coredump_single_thread_sse.stdout.exp b/none/tests/amd64-solaris/coredump_single_thread_sse.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/Makefile.am b/none/tests/amd64/Makefile.am index e4d907c3d..6c9d61c46 100644 --- a/none/tests/amd64/Makefile.am +++ b/none/tests/amd64/Makefile.am @@ -31,7 +31,7 @@ EXTRA_DIST = \ avx_estimate_insn.stdout.exp avx_estimate_insn.stdout.exp-amd \ avx-vmovq.vgtest avx-vmovq.stdout.exp avx-vmovq.stderr.exp \ avx2-1.vgtest avx2-1.stdout.exp avx2-1.stderr.exp \ - asorep.stderr.exp asorep.stdout.exp asorep.vgtest \ + asorep.stderr.exp asorep.vgtest \ bmi.stderr.exp bmi.stdout.exp bmi.vgtest \ bt_flags.stderr.exp bt_flags.stdout.exp bt_flags.vgtest \ fma.stderr.exp fma.stdout.exp fma.vgtest \ @@ -72,7 +72,7 @@ EXTRA_DIST = \ loopnel.stderr.exp loopnel.stdout.exp loopnel.vgtest \ lzcnt64.stderr.exp lzcnt64.stdout.exp lzcnt64.vgtest \ movbe.stderr.exp movbe.stdout.exp movbe.vgtest \ - mpx.stderr.exp mpx.stdout.exp mpx.vgtest \ + mpx.stderr.exp mpx.vgtest \ nan80and64.stderr.exp nan80and64.stdout.exp nan80and64.vgtest \ nibz_bennee_mmap.stderr.exp nibz_bennee_mmap.stdout.exp \ nibz_bennee_mmap.vgtest \ @@ -92,8 +92,7 @@ EXTRA_DIST = \ smc1.stderr.exp smc1.stdout.exp smc1.vgtest \ sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \ shrld.stderr.exp shrld.stdout.exp shrld.vgtest \ - ssse3_misaligned.stderr.exp ssse3_misaligned.stdout.exp \ - ssse3_misaligned.vgtest \ + ssse3_misaligned.stderr.exp ssse3_misaligned.vgtest \ sse4-64.stderr.exp sse4-64.stdout.exp sse4-64.vgtest \ sse4-64.stdout.exp-older-glibc \ slahf-amd64.stderr.exp slahf-amd64.stdout.exp \ diff --git a/none/tests/amd64/asorep.stdout.exp b/none/tests/amd64/asorep.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/mpx.stdout.exp b/none/tests/amd64/mpx.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/ssse3_misaligned.stdout.exp b/none/tests/amd64/ssse3_misaligned.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/execve.stdout.exp b/none/tests/execve.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/fcntl_setown.stdout.exp b/none/tests/fcntl_setown.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/Makefile.am b/none/tests/linux/Makefile.am index 55426e2b2..519eb7dd6 100644 --- a/none/tests/linux/Makefile.am +++ b/none/tests/linux/Makefile.am @@ -12,8 +12,7 @@ EXTRA_DIST = \ clonev.stdout.exp clonev.stderr.exp clonev.vgtest \ getdents_filter.stderr.exp getdents_filter.stdout.exp getdents_filter.vgtest \ membarrier.stderr.exp membarrier.vgtest \ - mremap.stderr.exp mremap.stderr.exp-glibc27 mremap.stdout.exp \ - mremap.vgtest \ + mremap.stderr.exp mremap.stderr.exp-glibc27 mremap.vgtest \ mremap2.stderr.exp mremap2.stdout.exp mremap2.vgtest \ mremap3.stderr.exp mremap3.stdout.exp mremap3.vgtest \ mremap4.stderr.exp mremap4.vgtest \ diff --git a/none/tests/linux/mremap.stdout.exp b/none/tests/linux/mremap.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mmap_fcntl_bug.stdout.exp b/none/tests/mmap_fcntl_bug.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am index 7727876fd..bdf77f03d 100644 --- a/none/tests/ppc32/Makefile.am +++ b/none/tests/ppc32/Makefile.am @@ -32,7 +32,7 @@ EXTRA_DIST = \ xlc_dbl_u32.stderr.exp xlc_dbl_u32.stdout.exp xlc_dbl_u32.vgtest \ opcodes.h \ power5+_round.stderr.exp power5+_round.stdout.exp power5+_round.vgtest \ - power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \ + power6_bcmp.stderr.exp power6_bcmp.vgtest \ test_isa_2_06_part1.stderr.exp test_isa_2_06_part1.stdout.exp test_isa_2_06_part1.vgtest \ test_isa_2_06_part2.stderr.exp test_isa_2_06_part2.stdout.exp test_isa_2_06_part2.vgtest \ test_isa_2_06_part3.stderr.exp test_isa_2_06_part3.stdout.exp test_isa_2_06_part3.vgtest \ @@ -51,7 +51,7 @@ EXTRA_DIST = \ jm_int_isa_2_07.stdout.exp \ test_isa_2_07_part2.stderr.exp test_isa_2_07_part2.stdout.exp test_isa_2_07_part2.vgtest \ test_tm.stderr.exp test_tm.stdout.exp test_tm.vgtest \ - test_touch_tm.stderr.exp test_touch_tm.stdout.exp test_touch_tm.vgtest \ + test_touch_tm.stderr.exp test_touch_tm.vgtest \ ldst_multiple.stderr.exp ldst_multiple.stdout.exp ldst_multiple.vgtest \ data-cache-instructions.stderr.exp data-cache-instructions.stdout.exp data-cache-instructions.vgtest diff --git a/none/tests/ppc32/power6_bcmp.stdout.exp b/none/tests/ppc32/power6_bcmp.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppc32/test_touch_tm.stdout.exp b/none/tests/ppc32/test_touch_tm.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppc64/Makefile.am b/none/tests/ppc64/Makefile.am index 98a14b434..69267e774 100644 --- a/none/tests/ppc64/Makefile.am +++ b/none/tests/ppc64/Makefile.am @@ -26,7 +26,7 @@ EXTRA_DIST = \ twi_tdi.stderr.exp twi_tdi.stdout.exp twi_tdi.vgtest \ tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest \ opcodes.h \ - power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \ + power6_bcmp.stderr.exp power6_bcmp.vgtest \ test_isa_2_06_part1.stderr.exp test_isa_2_06_part1.stdout.exp test_isa_2_06_part1.vgtest \ test_isa_2_06_part1.stdout.exp-LE \ test_isa_2_06_part2.stderr.exp test_isa_2_06_part2.stdout.exp test_isa_2_06_part2.vgtest \ @@ -47,7 +47,7 @@ EXTRA_DIST = \ jm_int_isa_2_07.stdout.exp jm_int_isa_2_07.stdout.exp-LE \ test_isa_2_07_part2.stderr.exp test_isa_2_07_part2.stdout.exp test_isa_2_07_part2.vgtest \ test_tm.stderr.exp test_tm.stdout.exp test_tm.vgtest \ - test_touch_tm.stderr.exp test_touch_tm.stdout.exp test_touch_tm.vgtest \ + test_touch_tm.stderr.exp test_touch_tm.vgtest \ ldst_multiple.stderr.exp ldst_multiple.stdout.exp ldst_multiple.vgtest \ data-cache-instructions.stderr.exp data-cache-instructions.stdout.exp data-cache-instructions.vgtest \ test_isa_3_0_altivec.stderr.exp \ diff --git a/none/tests/ppc64/power6_bcmp.stdout.exp b/none/tests/ppc64/power6_bcmp.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppc64/test_touch_tm.stdout.exp b/none/tests/ppc64/test_touch_tm.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppoll_alarm.stdout.exp b/none/tests/ppoll_alarm.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/pselect_alarm.stdout.exp b/none/tests/pselect_alarm.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/pselect_sigmask_null.stdout.exp b/none/tests/pselect_sigmask_null.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/rlimit64_nofile.stdout.exp b/none/tests/rlimit64_nofile.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/rlimit_nofile.stdout.exp b/none/tests/rlimit_nofile.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 66b60a868..8a828463a 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -3,9 +3,9 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr bfp-emit.pl emwarn-gen.pl INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ - and or xor insert div srst fold_And16 flogr sub_EI add_EI \ + and or xor insert div srst fold_And16 sub_EI add_EI \ and_EI or_EI xor_EI insert_EI mul_GE add_GE condloadstore \ - op_exception stck stckf stcke stfle cksm mvcl clcl troo \ + op_exception stck stckf stcke stfle mvcl clcl troo \ trto trot trtt tr tre cij cgij clij clgij crj cgrj clrj clgrj \ cs csg cds cdsg cu21 cu21_1 cu24 cu24_1 cu42 cu12 cu12_1 \ ex_sig ex_clone cu14 cu14_1 cu41 ecag \ @@ -46,6 +46,8 @@ EXTRA_DIST = \ bfp-tdc.vgtest bfp-tdc.stdout.exp bfp-tdc.stderr.exp \ bfp-emit.vgtest bfp-emit.stderr.exp bfp-emit.post.exp \ bfp-XxC.vgtest bfp-XxC.stderr.exp bfp-XxC.post.exp \ + cksm.vgtest cksm.stderr.exp \ + flogr.vgtest flogr.stderr.exp \ ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \ ecag.stdout.exp-z16 ecag.stdout.exp-z17 \ diff --git a/none/tests/s390x/cksm.stdout.exp b/none/tests/s390x/cksm.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/s390x/flogr.stdout.exp b/none/tests/s390x/flogr.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/sem.stdout.exp b/none/tests/sem.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/semlimit.stdout.exp b/none/tests/semlimit.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/Makefile.am b/none/tests/solaris/Makefile.am index 861c9ff56..e7d7a0778 100644 --- a/none/tests/solaris/Makefile.am +++ b/none/tests/solaris/Makefile.am @@ -9,27 +9,27 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = \ block_all_signals.stderr.exp block_all_signals.stdout.exp block_all_signals.vgtest \ blockfault.stderr.exp blockfault.vgtest \ - context_link.stderr.exp context_link.stdout.exp context_link.vgtest \ - context_link2.stderr.exp context_link2.stdout.exp context_link2.vgtest \ - context_null.stderr.exp context_null.stdout.exp context_null.vgtest \ - context_stack.stderr.exp context_stack.stdout.exp context_stack.vgtest \ + context_link.stderr.exp context_link.stdout.exp context_link.vgtest \ + context_link2.stderr.exp context_link2.vgtest \ + context_null.stderr.exp context_null.vgtest \ + context_stack.stderr.exp context_stack.vgtest \ coredump_many_threads.post.exp coredump_many_threads.stderr.exp coredump_many_threads.vgtest \ mmap_noreserve.stderr.exp mmap_noreserve.stdout.exp mmap_noreserve.vgtest \ proc_aout.stderr.exp proc_aout.stdout.exp proc_aout.vgtest \ - proc_auxv.stderr.exp proc_auxv.stdout.exp proc_auxv.vgtest \ - proc_auxv_multiple.stderr.exp proc_auxv_multiple.stdout.exp proc_auxv_multiple.vgtest \ + proc_auxv.stderr.exp proc_auxv.vgtest \ + proc_auxv_multiple.stderr.exp proc_auxv_multiple.vgtest \ proc-cmdline-exe.stderr.exp-with-cmdline proc-cmdline-exe.stderr.exp-without-cmdline \ proc-cmdline-exe.vgtest \ proc_psinfo.stderr.exp proc_psinfo.stdout.exp proc_psinfo.vgtest \ - posix_spawn.stderr.exp posix_spawn.stdout.exp posix_spawn.vgtest \ + posix_spawn.stderr.exp posix_spawn.vgtest \ pthread-stack.stderr.exp pthread-stack.vgtest \ reserve_sysstat_addr.map reserve_sysstat_addr.stderr.exp reserve_sysstat_addr.vgtest \ reserve_sysstat_zone_addr.map reserve_sysstat_zone_addr.stderr.exp reserve_sysstat_zone_addr.vgtest \ resolv.stdout.exp resolv.stderr.exp resolv.vgtest \ sigresend.stderr.exp sigresend.stdout.exp sigresend.vgtest \ stack_overflow.stderr.exp stack_overflow.vgtest \ - stack_prot.stderr.exp stack_prot.stdout.exp stack_prot.vgtest \ - threads_exitall.stderr.exp threads_exitall.stdout.exp threads_exitall.vgtest + stack_prot.stderr.exp stack_prot.vgtest \ + threads_exitall.stderr.exp threads_exitall.vgtest check_PROGRAMS = \ block_all_signals \ diff --git a/none/tests/solaris/context_link2.stdout.exp b/none/tests/solaris/context_link2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/context_null.stdout.exp b/none/tests/solaris/context_null.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/context_stack.stdout.exp b/none/tests/solaris/context_stack.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/posix_spawn.stdout.exp b/none/tests/solaris/posix_spawn.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/proc_auxv.stdout.exp b/none/tests/solaris/proc_auxv.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/proc_auxv_multiple.stdout.exp b/none/tests/solaris/proc_auxv_multiple.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/stack_prot.stdout.exp b/none/tests/solaris/stack_prot.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/threads_exitall.stdout.exp b/none/tests/solaris/threads_exitall.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/syscall-restart1.stdout.exp b/none/tests/syscall-restart1.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/syscall-restart2.stdout.exp b/none/tests/syscall-restart2.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/track_new.stdout.exp b/none/tests/track_new.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86-solaris/Makefile.am b/none/tests/x86-solaris/Makefile.am index 6744edfb0..03b68104b 100644 --- a/none/tests/x86-solaris/Makefile.am +++ b/none/tests/x86-solaris/Makefile.am @@ -5,16 +5,15 @@ dist_noinst_SCRIPTS = \ coredump_single_thread_mdb \ coredump_single_thread_sse_mdb \ filter_stderr - EXTRA_DIST = \ cet_nops_fs.stderr.exp cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ coredump_single_thread.post.exp coredump_single_thread.stderr.exp \ - coredump_single_thread.stdout.exp coredump_single_thread.vgtest \ + coredump_single_thread.vgtest \ coredump_single_thread_sse.post.exp coredump_single_thread_sse.stderr.exp \ - coredump_single_thread_sse.stdout.exp coredump_single_thread_sse.vgtest \ + coredump_single_thread_sse.vgtest \ coredump_single_thread_sse.post.exp-illumos \ - syscalls.stderr.exp syscalls.stdout.exp syscalls.vgtest + syscalls.stderr.exp syscalls.vgtest check_PROGRAMS = \ cet_nops_fs \ diff --git a/none/tests/x86-solaris/coredump_single_thread.stdout.exp b/none/tests/x86-solaris/coredump_single_thread.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86-solaris/coredump_single_thread_sse.stdout.exp b/none/tests/x86-solaris/coredump_single_thread_sse.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86-solaris/syscalls.stdout.exp b/none/tests/x86-solaris/syscalls.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/Makefile.am b/none/tests/x86/Makefile.am index b95631a21..d0f704816 100644 --- a/none/tests/x86/Makefile.am +++ b/none/tests/x86/Makefile.am @@ -54,7 +54,7 @@ EXTRA_DIST = \ getseg.stdout.exp getseg.stderr.exp getseg.vgtest \ gnu_binutils_nop.stderr.exp gnu_binutils_nop.vgtest \ incdec_alt.stdout.exp incdec_alt.stderr.exp incdec_alt.vgtest \ - int.stderr.exp int.stdout.exp int.disabled \ + int.stderr.exp int.disabled \ $(addsuffix .stderr.exp,$(INSN_TESTS)) \ $(addsuffix .stdout.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ @@ -73,7 +73,7 @@ EXTRA_DIST = \ sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \ shift_ndep.stderr.exp shift_ndep.stdout.exp shift_ndep.vgtest \ smc1.stderr.exp smc1.stdout.exp smc1.vgtest \ - ssse3_misaligned.stderr.exp ssse3_misaligned.stdout.exp \ + ssse3_misaligned.stderr.exp \ ssse3_misaligned.vgtest ssse3_misaligned.c \ sse4-x86.stdout.exp sse4-x86.stderr.exp sse4-x86.vgtest \ x86locked.vgtest x86locked.stdout.exp x86locked.stderr.exp \ diff --git a/none/tests/x86/int.stdout.exp b/none/tests/x86/int.stdout.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/ssse3_misaligned.stdout.exp b/none/tests/x86/ssse3_misaligned.stdout.exp deleted file mode 100644 index e69de29bb..000000000 From 0282c1cfc9015b69d097ac1cddff4fb264755e66 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 13 Dec 2025 22:12:23 +0000 Subject: [PATCH 163/502] s390: Tweak a few helper functions. --- VEX/priv/host_s390_defs.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 3479bbc91..fe37e9d1c 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -5011,43 +5011,28 @@ s390_emit_RISBG(UChar *p, UChar r1, UChar r2, UChar i3, Char i4, UChar i5) static __inline__ Bool uint_fits_signed_16bit(UInt val) { - UInt v = val & 0xFFFFu; - - /* sign extend */ - v = (Int)(v << 16) >> 16; - - return val == v; + return val <= 0x7FFFu; } static __inline__ Bool ulong_fits_signed_16bit(ULong val) { - ULong v = val & 0xFFFFu; - - /* sign extend */ - v = (Long)(v << 48) >> 48; - - return val == v; + return val <= 0x7FFFu; } static __inline__ Bool ulong_fits_signed_32bit(ULong val) { - ULong v = val & 0xFFFFFFFFu; - - /* sign extend */ - v = (Long)(v << 32) >> 32; - - return val == v; + return val <= 0x7FFFFFFFu; } static __inline__ Bool ulong_fits_unsigned_32bit(ULong val) { - return (val & 0xFFFFFFFFu) == val; + return val <= 0xFFFFFFFFu; } From a28682dc7c6de34428eb680e4d04d887f2d45412 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 14 Dec 2025 10:05:04 +0100 Subject: [PATCH 164/502] Darwin regtest: update none ioctl_moans This testcase needs IOCTL_REQUEST_BASE to be set to some bogus value with the platform dependent "no direction" flag set. That flag wasn't being set for Darwin and so the testcase was failing. --- none/tests/ioctl_moans.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/none/tests/ioctl_moans.c b/none/tests/ioctl_moans.c index d35075834..efb758234 100644 --- a/none/tests/ioctl_moans.c +++ b/none/tests/ioctl_moans.c @@ -13,6 +13,8 @@ #define IOCTL_REQUEST_BASE (0x12345670 | _IOC(_IOC_NONE,0,0,0)) # elif defined(VGO_freebsd) #define IOCTL_REQUEST_BASE (0x12345670 | _IO(0,0)) +# elif defined(VGO_darwin) +#define IOCTL_REQUEST_BASE (0x12345670 | _IOC(IOC_VOID,0,0,0)) # else #define IOCTL_REQUEST_BASE 0x12345670 # endif From 6878e3f78fe16aa0e758a5eb4483a9c4834e7cb3 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 14 Dec 2025 13:31:18 +0100 Subject: [PATCH 165/502] Darwin fdleaks: fix handling of recvmsg cmsg In the Darwin headers the macro __DARWIN_ALIGN32 is used for the CMSG macros. We were using just ALIGN which looks like it uses __DARWIN_ALIGN for 8 byte alignment. Using the wrong alignment gate a wrong count of fds and check_cmsg_for_fds was only calling ML_(record_fd_open_named) for one fd. The result was fd errors when writing to a second fd that should have been recorded. --- include/vki/vki-darwin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vki/vki-darwin.h b/include/vki/vki-darwin.h index 056bd9e89..5e381ab4c 100644 --- a/include/vki/vki-darwin.h +++ b/include/vki/vki-darwin.h @@ -296,7 +296,7 @@ typedef uint32_t vki_u32; #define vki_cmsghdr cmsghdr -#define VKI_CMSG_ALIGN(a) ALIGN(a) +#define VKI_CMSG_ALIGN(a) __DARWIN_ALIGN32(a) #define VKI_CMSG_DATA(cmsg) CMSG_DATA(cmsg) #define VKI_CMSG_FIRSTHDR(mhdr) CMSG_FIRSTHDR(mhdr) #define VKI_CMSG_NXTHDR(mhdr, cmsg) CMSG_NXTHDR(mhdr, cmsg) From 2802b31ae644301ee641dcae20d1f84373615d54 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 14 Dec 2025 18:21:19 +0100 Subject: [PATCH 166/502] Darwin helgrind: redirs for semaphore functions The semaphore functions are not in the pthread library (similar to FreeBSD). Change the redirs to use libsystem_kernel.dylib Unfortunately this doesn't help much. Darwin has deprecated these functions so the tests will compile (with a warning) but at runtime they all fail with errors like ENOSYS and EBADF. --- helgrind/hg_intercepts.c | 22 ++++++++++++++-------- helgrind/tests/tc17_sembar.c | 4 ++++ helgrind/tests/tc24_nonzero_sem.c | 6 +++++- include/pub_tool_redir.h | 1 + 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 4bef0ab95..09e3bea17 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -119,6 +119,12 @@ #include #endif +#if defined(VGO_darwin) +#define LIBC_FUNC(ret_ty, f, args...) \ + ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBSYSTEM_KERNEL_SONAME,f)(args); \ + ret_ty I_WRAP_SONAME_FNNAME_ZZ(VG_Z_LIBSYSTEM_KERNEL_SONAME,f)(args) +#endif + // Do a client request. These are macros rather than a functions so // as to avoid having an extra frame in stack traces. @@ -3112,7 +3118,7 @@ static int sem_init_WRK(sem_t* sem, int pshared, unsigned long value) return sem_init_WRK(sem, pshared, value); } #elif defined(VGO_darwin) - PTH_FUNC(int, semZuinit, // sem_init + LIBC_FUNC(int, semZuinit, // sem_init sem_t* sem, int pshared, unsigned long value) { return sem_init_WRK(sem, pshared, value); } @@ -3200,7 +3206,7 @@ static int sem_destroy_WRK(sem_t* sem) return sem_destroy_WRK(sem); } #elif defined(VGO_darwin) - PTH_FUNC(int, semZudestroy, // sem_destroy + LIBC_FUNC(int, semZudestroy, // sem_destroy sem_t* sem) { return sem_destroy_WRK(sem); } @@ -3268,10 +3274,10 @@ static int sem_wait_WRK(sem_t* sem) return sem_wait_WRK(sem); } #elif defined(VGO_darwin) - PTH_FUNC(int, semZuwait, sem_t* sem) { /* sem_wait */ + LIBC_FUNC(int, semZuwait, sem_t* sem) { /* sem_wait */ return sem_wait_WRK(sem); } - PTH_FUNC(int, semZuwaitZDZa, sem_t* sem) { /* sem_wait$* */ + LIBC_FUNC(int, semZuwaitZDZa, sem_t* sem) { /* sem_wait$* */ return sem_wait_WRK(sem); } #elif defined(VGO_freebsd) @@ -3334,7 +3340,7 @@ PTH_FUNC(int, semZutrywaitZAZa, sem_t* sem) { /* sem_trywait@* */ return sem_trywait_WRK(sem); } #elif defined(VGO_darwin) -PTH_FUNC(int, semZutrywait, sem_t* sem) { /* sem_trywait */ +LIBC_FUNC(int, semZutrywait, sem_t* sem) { /* sem_trywait */ return sem_trywait_WRK(sem); } #elif defined(VGO_freebsd) @@ -3511,7 +3517,7 @@ static int sem_post_WRK(sem_t* sem) return sem_post_WRK(sem); } #elif defined(VGO_darwin) - PTH_FUNC(int, semZupost, sem_t* sem) { /* sem_post */ + LIBC_FUNC(int, semZupost, sem_t* sem) { /* sem_post */ return sem_post_WRK(sem); } #elif defined(VGO_freebsd) @@ -3533,7 +3539,7 @@ static int sem_post_WRK(sem_t* sem) // Solaris: sem_open // FreeBSD: sem_open // -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_DARWIN) LIBC_FUNC(sem_t*, semZuopen, const char* name, long oflag, long mode, unsigned long value) @@ -3578,7 +3584,7 @@ PTH_FUNC(sem_t*, semZuopen, // darwin: sem_close // Solaris: sem_close // FreeBSD: sem_close -#if defined (VGO_freebsd) +#if defined (VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, sem_close, sem_t* sem) #else PTH_FUNC(int, sem_close, sem_t* sem) diff --git a/helgrind/tests/tc17_sembar.c b/helgrind/tests/tc17_sembar.c index ee40160b0..9f8d3fa8c 100644 --- a/helgrind/tests/tc17_sembar.c +++ b/helgrind/tests/tc17_sembar.c @@ -253,7 +253,11 @@ static sem_t* my_sem_init (char* identity, int pshared, unsigned count) static int my_sem_destroy ( sem_t* s ) { +#if defined(VGO_darwin) +return 0; +#else return sem_destroy(s); +#endif } static int my_sem_wait(sem_t* s) diff --git a/helgrind/tests/tc24_nonzero_sem.c b/helgrind/tests/tc24_nonzero_sem.c index 2fe408191..9b08adee4 100644 --- a/helgrind/tests/tc24_nonzero_sem.c +++ b/helgrind/tests/tc24_nonzero_sem.c @@ -45,7 +45,11 @@ int main ( void ) } r= my_sem_destroy(sem); -#if !defined(VGO_darwin) +#if defined(VGO_darwin) + // This outputs "function not implemented" if uncommented + //if (r != 0) + // perror("sem_destroy"); +#else assert(!r); #endif return 0; diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h index f2d768108..e2cbac44f 100644 --- a/include/pub_tool_redir.h +++ b/include/pub_tool_redir.h @@ -267,6 +267,7 @@ /* Not tested on systems older than OSX 10.13 */ #define VG_Z_LIBSYSTEM_C_SONAME libsystemZucZddylib #define VG_Z_LIBSYSTEM_PLATFORM_SONAME libsystemZuplatformZddylib +#define VG_Z_LIBSYSTEM_KERNEL_SONAME libsystemZukernelZddylib #else # error "Unknown platform" From ab89bdcfbd139ba59d0e194f6c56650e3c3f64b2 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 14 Dec 2025 17:26:24 +0000 Subject: [PATCH 167/502] s390: Fix build failure Followup to 778fe51a69eb099bc6cbfa616986310560a8b828. --- none/tests/s390x/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 8a828463a..1f830d6f3 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -30,6 +30,8 @@ endif check_PROGRAMS = $(INSN_TESTS) \ allexec \ + cksm \ + flogr \ op00 noinst_HEADERS = add.h and.h div.h dfp_utils.h insert.h mul.h opcodes.h \ From b13afacd68bf667b50f52bfc5d0a010dc6f71e5a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 14 Dec 2025 20:23:10 +0100 Subject: [PATCH 168/502] Darwin DRD: redirs for semaphore functions Like 2802b31ae644301ee641dcae20d1f84373615d54 for Helgrind. Use the DRD script supported_sem_init in Helgrind tests that use semaphores, it's clearer than just using tests/os_test --- drd/drd_pthread_intercepts.c | 23 +++++++++++++++-------- helgrind/hg_intercepts.c | 3 +++ helgrind/tests/tc18_semabuse.vgtest | 1 + helgrind/tests/tc24_nonzero_sem.vgtest | 1 + 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c index 0cd7c0be6..6e150ca4e 100644 --- a/drd/drd_pthread_intercepts.c +++ b/drd/drd_pthread_intercepts.c @@ -202,6 +202,13 @@ ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \ { return implf argl; } #endif +#if defined(VGO_darwin) +#define LIBC_FUNC(ret_ty, zf, implf, argl_decl, argl) \ + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBSYSTEM_KERNEL_SONAME,zf) argl_decl; \ + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBSYSTEM_KERNEL_SONAME,zf) argl_decl \ + { return implf argl; } +#endif + /** * Macro for generating three Valgrind interception functions: one with the * Z-encoded name zf, one with ZAZa ("@*") appended to the name zf and one @@ -1491,7 +1498,7 @@ int sem_init_intercept(sem_t *sem, int pshared, unsigned int value) return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, semZuinit, sem_init_intercept, (sem_t *sem, int pshared, unsigned int value), (sem, pshared, value)); #else @@ -1534,7 +1541,7 @@ int sem_destroy_intercept(sem_t *sem) return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, semZudestroy, sem_destroy_intercept, (sem_t *sem), (sem)); #else PTH_FUNCS(int, semZudestroy, sem_destroy_intercept, (sem_t *sem), (sem)); @@ -1570,7 +1577,7 @@ sem_t* sem_open_intercept(const char *name, int oflag, mode_t mode, return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(sem_t *, semZuopen, sem_open_intercept, (const char *name, int oflag, mode_t mode, unsigned int value), (name, oflag, mode, value)); @@ -1593,7 +1600,7 @@ static __always_inline int sem_close_intercept(sem_t *sem) return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, semZuclose, sem_close_intercept, (sem_t *sem), (sem)); #else PTH_FUNCS(int, semZuclose, sem_close_intercept, (sem_t *sem), (sem)); @@ -1612,7 +1619,7 @@ static __always_inline int sem_wait_intercept(sem_t *sem) return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, semZuwait, sem_wait_intercept, (sem_t *sem), (sem)); #else PTH_FUNCS(int, semZuwait, sem_wait_intercept, (sem_t *sem), (sem)); @@ -1635,7 +1642,7 @@ static __always_inline int sem_trywait_intercept(sem_t *sem) return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, semZutrywait, sem_trywait_intercept, (sem_t *sem), (sem)); #else PTH_FUNCS(int, semZutrywait, sem_trywait_intercept, (sem_t *sem), (sem)); @@ -1658,7 +1665,7 @@ int sem_timedwait_intercept(sem_t *sem, const struct timespec *abs_timeout) return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, semZutimedwait, sem_timedwait_intercept, (sem_t *sem, const struct timespec *abs_timeout), (sem, abs_timeout)); @@ -1711,7 +1718,7 @@ static __always_inline int sem_post_intercept(sem_t *sem) return ret; } -#if defined(VGO_freebsd) +#if defined(VGO_freebsd) || defined(VGO_darwin) LIBC_FUNC(int, semZupost, sem_post_intercept, (sem_t *sem), (sem)); #else PTH_FUNCS(int, semZupost, sem_post_intercept, (sem_t *sem), (sem)); diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 09e3bea17..aa48ce02a 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -3118,6 +3118,7 @@ static int sem_init_WRK(sem_t* sem, int pshared, unsigned long value) return sem_init_WRK(sem, pshared, value); } #elif defined(VGO_darwin) +// exists but fails with ENOSYS function not implemented LIBC_FUNC(int, semZuinit, // sem_init sem_t* sem, int pshared, unsigned long value) { return sem_init_WRK(sem, pshared, value); @@ -3206,6 +3207,7 @@ static int sem_destroy_WRK(sem_t* sem) return sem_destroy_WRK(sem); } #elif defined(VGO_darwin) +// exists but fails with ENOSYS function not implemented LIBC_FUNC(int, semZudestroy, // sem_destroy sem_t* sem) { return sem_destroy_WRK(sem); @@ -3274,6 +3276,7 @@ static int sem_wait_WRK(sem_t* sem) return sem_wait_WRK(sem); } #elif defined(VGO_darwin) +// exists but fails with EBADF bad file number LIBC_FUNC(int, semZuwait, sem_t* sem) { /* sem_wait */ return sem_wait_WRK(sem); } diff --git a/helgrind/tests/tc18_semabuse.vgtest b/helgrind/tests/tc18_semabuse.vgtest index fe4d22ba1..4818d739d 100644 --- a/helgrind/tests/tc18_semabuse.vgtest +++ b/helgrind/tests/tc18_semabuse.vgtest @@ -1 +1,2 @@ +prereq: ../../drd/tests/supported_sem_init prog: tc18_semabuse diff --git a/helgrind/tests/tc24_nonzero_sem.vgtest b/helgrind/tests/tc24_nonzero_sem.vgtest index 1a43121eb..87f4b8bfd 100644 --- a/helgrind/tests/tc24_nonzero_sem.vgtest +++ b/helgrind/tests/tc24_nonzero_sem.vgtest @@ -1,2 +1,3 @@ +prereq: ../../drd/tests/supported_sem_init prog: tc24_nonzero_sem vgopts: --hg-sanity-flags=111111 From e40b4d78b841d61b852d64e4695d15c50ccbf147 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 15 Dec 2025 10:24:49 +0000 Subject: [PATCH 169/502] Testcase tweak: clenup after yourself --- .gitignore | 1 - memcheck/tests/mmaptest.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 58b81fa46..7bdac9edf 100644 --- a/.gitignore +++ b/.gitignore @@ -898,7 +898,6 @@ /memcheck/tests/demangle-rust /memcheck/tests/describe-block /memcheck/tests/descr_belowsp -/memcheck/tests/dir /memcheck/tests/doublefree /memcheck/tests/duplicate_align_size_errors /memcheck/tests/dw4 diff --git a/memcheck/tests/mmaptest.c b/memcheck/tests/mmaptest.c index fac1f655c..184042076 100644 --- a/memcheck/tests/mmaptest.c +++ b/memcheck/tests/mmaptest.c @@ -4,12 +4,13 @@ #include #include "tests/sys_mman.h" -int main() +int main(void) { int fd; mkdir("dir", 0777); fd = open("dir", O_RDONLY); mmap(NULL, 4711, PROT_READ, MAP_PRIVATE, fd, 0); + rmdir("dir"); return 0; } From 8d6a233295bde8d47da97a010dfe2af3f93bd3cf Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 15 Dec 2025 22:38:37 +0000 Subject: [PATCH 170/502] s390: Clarify a variable name. --- VEX/priv/host_s390_defs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index fe37e9d1c..3205060b5 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -10881,7 +10881,7 @@ s390_insn_vec_replicate_emit(UChar *buf, const s390_insn *insn) Int emit_S390Instr(Bool *is_profinc, UChar *buf, Int nbuf, const s390_insn *insn, - Bool mode64, const VexArchInfo *archinfo, + Bool mode64, const VexArchInfo *archinfo_host, const void *disp_cp_chain_me_to_slowEP, const void *disp_cp_chain_me_to_fastEP, const void *disp_cp_xindir, From ce7a2995b3194b4ad38a6f7f413988e259d98a24 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Tue, 16 Dec 2025 09:52:29 +0100 Subject: [PATCH 171/502] Wrap new lsm_list_modules syscall The lsm_list_modules syscall returns a list of the active LSM ids. On success this function returns the number of @ids array elements. This value may be zero if there are no LSMs active. If @size is insufficient to contain the return data -E2BIG is returned and @size is set to the minimum required size. In all other cases a negative value indicating the error is returned. SYSCALL_DEFINE3(lsm_list_modules, u64 __user *, ids, u32 __user *, size, u32, flags) Declare lsm_list_modules wrappers in priv_syswrap-linux.h and hook it for {amd64,arm,arm64,mips64,ppc32,ppc64,riscv64,s390x,x86}-linux. https://bugs.kde.org/show_bug.cgi?id=513257 --- NEWS | 1 + coregrind/m_syswrap/priv_syswrap-linux.h | 1 + coregrind/m_syswrap/syswrap-amd64-linux.c | 1 + coregrind/m_syswrap/syswrap-arm-linux.c | 1 + coregrind/m_syswrap/syswrap-arm64-linux.c | 1 + coregrind/m_syswrap/syswrap-linux.c | 22 ++++++++++++++++++++ coregrind/m_syswrap/syswrap-mips32-linux.c | 1 + coregrind/m_syswrap/syswrap-mips64-linux.c | 5 +++-- coregrind/m_syswrap/syswrap-nanomips-linux.c | 5 +++-- coregrind/m_syswrap/syswrap-ppc32-linux.c | 5 +++-- coregrind/m_syswrap/syswrap-ppc64-linux.c | 5 +++-- coregrind/m_syswrap/syswrap-riscv64-linux.c | 1 + coregrind/m_syswrap/syswrap-s390x-linux.c | 5 +++-- coregrind/m_syswrap/syswrap-x86-linux.c | 1 + include/vki/vki-scnums-shared-linux.h | 1 + 15 files changed, 46 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 51ba3e940..53768ece3 100644 --- a/NEWS +++ b/NEWS @@ -45,6 +45,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 512030 s390x: bfp-convert testcase fails 512037 malloc trace does not print free size or alignment 512571 regtest problems with darwin dsymuti +513257 Add missing syswraps for lsm_list_modules To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h index b02701d27..f4d3f8a7a 100644 --- a/coregrind/m_syswrap/priv_syswrap-linux.h +++ b/coregrind/m_syswrap/priv_syswrap-linux.h @@ -374,6 +374,7 @@ DECL_TEMPLATE(linux, sys_statmount); DECL_TEMPLATE(linux, sys_mseal); DECL_TEMPLATE(linux, sys_lsm_get_self_attr); DECL_TEMPLATE(linux, sys_lsm_set_self_attr); +DECL_TEMPLATE(linux, sys_lsm_list_modules); // Since Linux 6.17-rc1 DECL_TEMPLATE(linux, sys_file_getattr); diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index 0a05d7cb5..ab24a2e8f 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -911,6 +911,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_listmount, sys_listmount), // 458 LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY(__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index e923bee9c..73e5ef1a7 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -1081,6 +1081,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_listmount, sys_listmount), // 458 LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY(__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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 9b6e05dbc..71d16739c 100644 --- a/coregrind/m_syswrap/syswrap-arm64-linux.c +++ b/coregrind/m_syswrap/syswrap-arm64-linux.c @@ -862,6 +862,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_listmount, sys_listmount), // 458 LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY(__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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 7186cf0c4..10e63348d 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -4676,6 +4676,28 @@ PRE(sys_lsm_set_self_attr) PRE_MEM_READ("lsm_get_self_attr(ctx)", ARG2, ARG3); } +PRE(sys_lsm_list_modules) +{ + // * sys_lsm_list_modules - Return a list of the active security modules + // * @ids: the LSM module ids + // * @size: pointer to size of @ids, updated on return + // * @flags: reserved for future use, must be zero + // SYSCALL_DEFINE3(lsm_list_modules, u64 __user *, ids, u32 __user *, size, + // u32, flags) + PRINT("sys_lsm_list_modules ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %#" FMT_REGWORD "x)", ARG1, ARG2, ARG3); + PRE_REG_READ3(long, "lsm_list_modules", __vki_u64 *, ids, __vki_u32 *, size, __vki_u32, flags); + PRE_MEM_READ("lsm_list_modules(size)", ARG2, sizeof(__vki_u32)); + if (ML_(safe_to_deref)((__vki_u32 *)ARG2,sizeof(__vki_u32))) + PRE_MEM_READ("lsm_list_modules(ids)", ARG1, *(__vki_u32 *)ARG2); +} + +POST(sys_lsm_list_modules) +{ + // No need to POST_MEM_WRITE((Addr)ARG2, sizeof(__vki_u32)); + // per https://bugs.kde.org/show_bug.cgi?id=513257#c4 + POST_MEM_WRITE(ARG1, *(__vki_u32 *)ARG2); +} + PRE(sys_syncfs) { *flags |= SfMayBlock; diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index 43c9b861d..3854c2871 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -1190,6 +1190,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_listmount, sys_listmount), // 458 LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY(__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index d78e59842..71adfcc68 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -797,8 +797,9 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_userfaultfd, sys_userfaultfd), LINXY (__NR_statmount, sys_statmount), LINXY (__NR_listmount, sys_listmount), - LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), - LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), + LINXY (__NR_lsm_get_self_attr, sys_lsm_get_self_attr), + LINX_ (__NR_lsm_set_self_attr, sys_lsm_set_self_attr), + LINXY (__NR_lsm_list_modules, sys_lsm_list_modules), LINX_ (__NR_mseal, sys_mseal), LINX_ (__NR_futex_waitv, sys_futex_waitv), LINXY (__NR_quotactl_fd, sys_quotactl_fd), diff --git a/coregrind/m_syswrap/syswrap-nanomips-linux.c b/coregrind/m_syswrap/syswrap-nanomips-linux.c index e5c642572..1a2de9158 100644 --- a/coregrind/m_syswrap/syswrap-nanomips-linux.c +++ b/coregrind/m_syswrap/syswrap-nanomips-linux.c @@ -823,8 +823,9 @@ static SyscallTableEntry syscall_main_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), LINXY (__NR_statmount, sys_statmount), LINXY (__NR_listmount, sys_listmount), - LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), - LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), + LINXY (__NR_lsm_get_self_attr, sys_lsm_get_self_attr), + LINX_ (__NR_lsm_set_self_attr, sys_lsm_set_self_attr), + LINXY (__NR_lsm_list_modules, sys_lsm_list_modules), LINX_ (__NR_mseal, sys_mseal), LINX_ (__NR_futex_waitv, sys_futex_waitv), LINXY (__NR_file_getattr, sys_file_getattr), diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 82b67afe3..03773ebc9 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -1087,8 +1087,9 @@ static SyscallTableEntry syscall_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 - LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 - LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY (__NR_lsm_get_self_attr,sys_lsm_get_self_attr), // 459 + LINX_ (__NR_lsm_set_self_attr,sys_lsm_set_self_attr), // 460 + LINXY (__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index 445ee30f3..56fe34aa5 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1065,8 +1065,9 @@ static SyscallTableEntry syscall_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 - LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 - LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY (__NR_lsm_get_self_attr,sys_lsm_get_self_attr), // 459 + LINX_ (__NR_lsm_set_self_attr,sys_lsm_set_self_attr), // 460 + LINXY (__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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-riscv64-linux.c b/coregrind/m_syswrap/syswrap-riscv64-linux.c index 92e279485..a495d09d0 100644 --- a/coregrind/m_syswrap/syswrap-riscv64-linux.c +++ b/coregrind/m_syswrap/syswrap-riscv64-linux.c @@ -610,6 +610,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY(__NR_listmount, sys_listmount), /* 458 */ LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), /* 459 */ LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), /* 460 */ + LINXY(__NR_lsm_list_modules, sys_lsm_list_modules), /* 461 */ 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-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c index 0b5d436b0..dc8b0d9e7 100644 --- a/coregrind/m_syswrap/syswrap-s390x-linux.c +++ b/coregrind/m_syswrap/syswrap-s390x-linux.c @@ -900,8 +900,9 @@ static SyscallTableEntry syscall_table[] = { LINX_ (__NR_fchmodat2, sys_fchmodat2), // 452 LINXY (__NR_statmount, sys_statmount), // 457 LINXY (__NR_listmount, sys_listmount), // 458 - LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 - LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY (__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 + LINX_ (__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY (__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index 1165304da..922585a87 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1692,6 +1692,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_listmount, sys_listmount), // 458 LINXY(__NR_lsm_get_self_attr, sys_lsm_get_self_attr), // 459 LINX_(__NR_lsm_set_self_attr, sys_lsm_set_self_attr), // 460 + LINXY(__NR_lsm_list_modules, sys_lsm_list_modules), // 461 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/include/vki/vki-scnums-shared-linux.h b/include/vki/vki-scnums-shared-linux.h index 231372af4..f022c1ff3 100644 --- a/include/vki/vki-scnums-shared-linux.h +++ b/include/vki/vki-scnums-shared-linux.h @@ -62,6 +62,7 @@ #define __NR_listmount 458 #define __NR_lsm_get_self_attr 459 #define __NR_lsm_set_self_attr 460 +#define __NR_lsm_list_modules 461 #define __NR_mseal 462 #define __NR_file_getattr 468 #define __NR_file_setattr 469 From d45b016046fd6af55e23891f9392e2b8c1193372 Mon Sep 17 00:00:00 2001 From: Sertonix Date: Mon, 15 Dec 2025 18:29:40 +0000 Subject: [PATCH 172/502] Linux ppc32: map a few more syscalls --- coregrind/m_syswrap/syswrap-ppc32-linux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 03773ebc9..16bae5d08 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -864,7 +864,7 @@ static SyscallTableEntry syscall_table[] = { GENX_(__NR_madvise, sys_madvise), // 205 GENXY(__NR_mincore, sys_mincore), // 206 LINX_(__NR_gettid, sys_gettid), // 207 -//.. LINX_(__NR_tkill, sys_tkill), // 208 */Linux + LINX_(__NR_tkill, sys_tkill), // 208 */Linux LINX_(__NR_setxattr, sys_setxattr), // 209 LINX_(__NR_lsetxattr, sys_lsetxattr), // 210 LINX_(__NR_fsetxattr, sys_fsetxattr), // 211 @@ -954,6 +954,8 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_pselect6, sys_pselect6), // 280 LINXY(__NR_ppoll, sys_ppoll), // 281 + LINX_(__NR_splice, sys_splice), // 283 + LINXY(__NR_openat, sys_openat), // 286 LINX_(__NR_mkdirat, sys_mkdirat), // 287 LINX_(__NR_mknodat, sys_mknodat), // 288 @@ -992,6 +994,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_pwritev, sys_pwritev), // 321 LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 322 + LINXY(__NR_prlimit64, sys_prlimit64), // 325 LINXY(__NR_socket, sys_socket), // 326 LINX_(__NR_bind, sys_bind), // 327 LINX_(__NR_connect, sys_connect), // 328 @@ -1027,6 +1030,8 @@ static SyscallTableEntry syscall_table[] = { LINX_ (__NR_execveat, sys_execveat), // 362 LINXY(__NR_userfaultfd, sys_userfaultfd), // 364 + LINX_(__NR_membarrier, sys_membarrier), // 365 + GENX_(__NR_mlock2, sys_mlock2), // 378 LINX_(__NR_copy_file_range, sys_copy_file_range), // 379 LINX_(__NR_preadv2, sys_preadv2), // 380 From d3cd66160c7e62f611c23a5916b6025a835e857f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 14 Dec 2025 21:04:08 +0100 Subject: [PATCH 173/502] Darwin: add macOS 10.15 support == 721 tests, 46 stderr failures, 6 stdout failures, 0 stderrB failures, 0 stdoutB failures, 4 post failures == A couple more failures in none (empty-exe and scripts/shell). Otherwise quite like macOS 10.14. Much of the code merged from Louis Brunner's git repo. Many thanks once again Louis. --- NEWS | 2 +- configure.ac | 6 +- coregrind/Makefile.am | 1 + coregrind/m_debuginfo/debuginfo.c | 20 ++- coregrind/m_debuginfo/readmacho.c | 6 +- coregrind/m_initimg/initimg-darwin.c | 9 +- coregrind/m_mach/mig_strncpy.c | 121 +++++++++++++++ coregrind/m_syswrap/priv_syswrap-darwin.h | 11 ++ coregrind/m_syswrap/syswrap-darwin.c | 144 +++++++++++++++++- darwin-drd.supp | 21 +++ darwin-helgrind.supp | 26 ++++ darwin.supp | 43 ++---- include/vki/vki-darwin.h | 3 + include/vki/vki-scnums-darwin.h | 11 ++ massif/tests/alloc-fns-A.vgtest | 2 + massif/tests/alloc-fns-B.vgtest | 2 + massif/tests/basic.vgtest | 2 + massif/tests/basic2.vgtest | 2 + massif/tests/big-alloc.vgtest | 2 + massif/tests/bug469146.vgtest | 2 + massif/tests/culling1.stderr.exp | 5 + massif/tests/culling1.vgtest | 2 + massif/tests/culling2.stderr.exp | 5 + massif/tests/culling2.vgtest | 2 + massif/tests/custom_alloc.vgtest | 2 + massif/tests/deep-A.vgtest | 2 + massif/tests/deep-B.stderr.exp | 5 + massif/tests/deep-B.vgtest | 2 + massif/tests/deep-C.stderr.exp | 5 + massif/tests/deep-C.vgtest | 2 + massif/tests/deep-D.vgtest | 2 + massif/tests/filter_ignore_fn | 6 +- massif/tests/ignored.vgtest | 2 + massif/tests/ignoring.vgtest | 2 + massif/tests/inlinfomalloc.vgtest | 2 + massif/tests/insig.vgtest | 2 + massif/tests/long-names.vgtest | 2 + massif/tests/long-time.vgtest | 2 + massif/tests/new-cpp.vgtest | 2 + massif/tests/null.vgtest | 2 + massif/tests/one.vgtest | 2 + massif/tests/overloaded-new.vgtest | 2 + massif/tests/peak.vgtest | 2 + massif/tests/peak2.stderr.exp | 5 + massif/tests/peak2.vgtest | 2 + massif/tests/realloc.stderr.exp | 5 + massif/tests/realloc.vgtest | 2 + massif/tests/thresholds_0_0.vgtest | 2 + massif/tests/thresholds_0_10.vgtest | 2 + massif/tests/thresholds_10_0.vgtest | 2 + massif/tests/thresholds_10_10.vgtest | 2 + massif/tests/thresholds_5_0.vgtest | 2 + massif/tests/thresholds_5_10.vgtest | 2 + massif/tests/zero1.vgtest | 2 + massif/tests/zero2.vgtest | 2 + memcheck/tests/Makefile.am | 2 + ...icate_align_size_errors.stderr.exp-darwin2 | 27 ++++ .../tests/memalign_args.stderr.exp-darwin2 | 12 ++ 58 files changed, 529 insertions(+), 40 deletions(-) create mode 100644 coregrind/m_mach/mig_strncpy.c create mode 100644 memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin2 create mode 100644 memcheck/tests/memalign_args.stderr.exp-darwin2 diff --git a/NEWS b/NEWS index 53768ece3..06bf59ebb 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,7 @@ PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, RISCV64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support -for nanoMIPS/Linux. macOS is supported up to version 10.14 Mojave. +for nanoMIPS/Linux. macOS is supported up to version 10.15 Catalina. * ==================== CORE CHANGES =================== diff --git a/configure.ac b/configure.ac index 5deb338fa..81e7178b5 100644 --- a/configure.ac +++ b/configure.ac @@ -546,9 +546,13 @@ case "${host_os}" in AC_MSG_RESULT([Darwin 18.x (${kernel}) / macOS 10.14 Mojave]) DARWIN_VERS=$DARWIN_10_14 ;; + 19.*) + AC_MSG_RESULT([Darwin 19.x (${kernel}) / macOS 10.15 Catalina]) + DARWIN_VERS=$DARWIN_10_15 + ;; *) AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) - AC_MSG_ERROR([Valgrind works on Darwin 10.x-25.x (Mac OS X 10.8-10.11, macOS 10.12-10.13)]) + AC_MSG_ERROR([Valgrind works on Darwin 12.x-19.x (Mac OS X 10.8-10.11, macOS 10.12-10.15)]) ;; esac diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 65369ebcd..90d921db2 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -432,6 +432,7 @@ COREGRIND_SOURCES_COMMON = \ m_mach/mach_msg.c \ m_mach/mach_traps-x86-darwin.S \ m_mach/mach_traps-amd64-darwin.S \ + m_mach/mig_strncpy.c \ m_replacemalloc/replacemalloc_core.c \ m_scheduler/sched-lock.c \ m_scheduler/sched-lock-generic.c \ diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 3daa38a3a..66430668b 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -555,9 +555,26 @@ static Bool ranges_overlap (Addr s1, SizeT len1, Addr s2, SizeT len2 ) /* Do the basic mappings of the two DebugInfos overlap in any way? */ static Bool do_DebugInfos_overlap ( const DebugInfo* di1, const DebugInfo* di2 ) { - Word i, j; vg_assert(di1); vg_assert(di2); +#if defined(VGO_darwin) && DARWIN_VERS >= DARWIN_10_15 + // FIXME: This is probably wrong but the other methods returns too many false positives + // as it doesn't account for munmap being called on one of these maps. + // dyld will mmap and then munmap every library ro_map at the same address thus every library shows + // an overlap and only the last is retained, making most debug UNKNOW_FUNCTION UNKNOWN_OBJECT. + // Seeing how discard_syms_in_range relies exclusively on text_* to check conflicts, let's do the same here + + // Sanity check needed by discard_DebugInfos_which_overlap_with + if (di1 == di2) { + return True; + } + if (!di1->text_present || !di2->text_present) { + return False; + } + return ranges_overlap(di1->text_avma, di1->text_size, di2->text_avma, di2->text_size); +#else + Word i, j; + for (i = 0; i < VG_(sizeXA)(di1->fsm.maps); i++) { const DebugInfoMapping* map1 = VG_(indexXA)(di1->fsm.maps, i); for (j = 0; j < VG_(sizeXA)(di2->fsm.maps); j++) { @@ -569,6 +586,7 @@ static Bool do_DebugInfos_overlap ( const DebugInfo* di1, const DebugInfo* di2 ) } return False; +#endif } diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index 2c59d09de..6224feea3 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -92,8 +92,8 @@ static Int count_rw_loads(const struct load_command* macho_load_commands, unsign if (lc->cmd == LC_SEGMENT_CMD) { const struct SEGMENT_COMMAND* sc = (const struct SEGMENT_COMMAND*)lc; if (sc->initprot == 3 && sc->filesize -#if DARWIN_VERS >= DARWIN_13_00 -// FIXME: somehow __DATA_CONST appears as rw- in most binaries in macOS 13 and later (not sure when that started) +#if DARWIN_VERS >= DARWIN_10_15 +// FIXME: somehow __DATA_CONST appears as rw- in most binaries in macOS 10.15 // so we ignore it otherwise some binaries don't get symbols && VG_(strcmp)(sc->segname, "__DATA_CONST") != 0 #endif @@ -1010,7 +1010,7 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) di->data_present = True; di->data_svma = (Addr)seg.vmaddr; di->data_avma = rw_map->avma; -#if defined(VGA_arm64) +#if defined(VGO_darwin) && (DARWIN_VERS >= DARWIN_10_15) // FIXME: the same mmap contains both __DATA_CONST, __DATA and __DATA_DIRTY // this means that symbols in __DATA/__DATA_DIRTY are offset by the size of __DATA_CONST // not sure when this started to be an issue so I am going to gate this under arm64 for now diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index d4257c954..c15c02372 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -160,7 +160,11 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname) /* Allocate a new space */ ret = VG_(malloc) ("initimg-darwin.sce.3", +#if DARWIN_VERS >= DARWIN_10_15 + sizeof(HChar *) * (envc+3+1)); /* 3 new entries + NULL */ +#else sizeof(HChar *) * (envc+2+1)); /* 2 new entries + NULL */ +#endif /* copy it over */ for (cpp = ret; *origenv; ) @@ -211,7 +215,10 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname) ret[envc++] = cp; } - +#if DARWIN_VERS >= DARWIN_10_15 + // pthread really wants a non-zero value for ptr_munge + ret[envc++] = VG_(strdup)("initimg-darwin.sce.6", "PTHREAD_PTR_MUNGE_TOKEN=0x00000001"); +#endif /* ret[0 .. envc-1] is live now. */ /* Find and remove a binding for VALGRIND_LAUNCHER. */ diff --git a/coregrind/m_mach/mig_strncpy.c b/coregrind/m_mach/mig_strncpy.c new file mode 100644 index 000000000..9e07e8c85 --- /dev/null +++ b/coregrind/m_mach/mig_strncpy.c @@ -0,0 +1,121 @@ +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (c) 2020-2025 Louis Brunner + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + The GNU General Public License is contained in the file COPYING. +*/ +/* + * This file contains mig_strncpy and mig_strncpy_zerofill reimplemented + * from comments left by Joshua Block in the original file + * `xnu/libsyscall/mach/mig_strncpy.c` + * + * Here they are for reference: + */ +/* + * mig_strncpy.c - by Joshua Block + * + * mig_strncpy -- Bounded string copy. Does what the library routine strncpy + * OUGHT to do: Copies the (null terminated) string in src into dest, a + * buffer of length len. Assures that the copy is still null terminated + * and doesn't overflow the buffer, truncating the copy if necessary. + * + * Parameters: + * + * dest - Pointer to destination buffer. + * + * src - Pointer to source string. + * + * len - Length of destination buffer. + * + * Result: + * length of string copied, INCLUDING the trailing 0. + * + * mig_strncpy_zerofill -- Bounded string copy. Does what the + * library routine strncpy OUGHT to do: Copies the (null terminated) + * string in src into dest, a buffer of length len. Assures that + * the copy is still null terminated and doesn't overflow the buffer, + * truncating the copy if necessary. If the string in src is smaller + * than given length len, it will zero fill the remaining bytes in dest. + * + * Parameters: + * + * dest - Pointer to destination buffer. + * + * src - Pointer to source string. + * + * len - Length of destination buffer. + * + * Result: + * length of string copied, INCLUDING the trailing 0. + */ + +#if defined(VGO_darwin) + +#include + +int mig_strncpy(char *dest, const char *src, int len) +{ + int i; + int src_len; + + for (src_len = 0; src[src_len]; ++src_len); + + if (len > src_len) { + for (i = 0; i < src_len; ++i) { + dest[i] = src[i]; + } + dest[i] = '\0'; + return i + 1; + } + + for (i = 0; i < len; ++i) { + dest[i] = src[i]; + } + dest[i - 1] = '\0'; + return i; +} + +int mig_strncpy_zerofill(char *dest, const char *src, int len) +{ + int i; + int src_len; + + for (src_len = 0; src[src_len]; ++src_len); + + if (len > src_len) { + for (i = 0; i < src_len; ++i) { + dest[i] = src[i]; + } + for (; i < len; ++i) { + dest[i] = '\0'; + } + return len; + } + + for (i = 0; i < len; ++i) { + dest[i] = src[i]; + } + dest[i - 1] = '\0'; + return len; +} + +#endif // defined(VGO_darwin) + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index a96ce36b4..7ffc4f88f 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -650,6 +650,11 @@ DECL_TEMPLATE(darwin, abort_with_payload); // 521 // NYI kqueue_workloop_ctl // 530 // NYI __mach_bridge_remote_time // 531 #endif /* DARWIN_VERS >= DARWIN_10_14 */ +#if DARWIN_VERS >= DARWIN_10_15 +// NYI coalition_ledger // 532 +// NYI log_data // 533 +// NYI memorystatus_available_memory // 534 +#endif // Mach message helpers DECL_TEMPLATE(darwin, mach_port_set_context); @@ -794,6 +799,12 @@ DECL_TEMPLATE(darwin, swtch_pri); DECL_TEMPLATE(darwin, kernelrpc_mach_port_get_attributes_trap); #endif /* DARWIN_VERS >= DARWIN_10_14 */ +#if DARWIN_VERS >= DARWIN_10_15 +DECL_TEMPLATE(darwin, task_restartable_ranges_register); +DECL_TEMPLATE(darwin, kernelrpc_mach_port_type_trap); +DECL_TEMPLATE(darwin, kernelrpc_mach_port_request_notification_trap); +#endif /* DARWIN_VERS >= DARWIN_10_15 */ + // Machine-dependent traps DECL_TEMPLATE(darwin, thread_fast_set_cthread_self); diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 80bd013f3..09c1338cf 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -1779,6 +1779,9 @@ static const HChar *name_for_fcntl(UWord cmd) { # endif # if DARWIN_VERS >= DARWIN_10_14 F(F_CHECK_LV); +# endif +# if DARWIN_VERS >= DARWIN_10_15 + F(F_SPECULATIVE_READ); # endif default: return "UNKNOWN"; @@ -1985,6 +1988,29 @@ PRE(fcntl) break; # endif +# if DARWIN_VERS >= DARWIN_10_15 + case VKI_F_SPECULATIVE_READ: /* Synchronous advisory read fcntl for regular and compressed file */ + PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3); + PRE_REG_READ3(long, "fcntl", + unsigned int, fd, unsigned int, cmd, + fspecread_t *, args); + + { + fspecread_t *fspecread = (fspecread_t *)ARG3; + PRE_FIELD_READ( "fcntl(VKI_F_SPECULATIVE_READ, fspecread->fsr_flags)", + fspecread->fsr_flags); + PRE_FIELD_READ( "fcntl(VKI_F_SPECULATIVE_READ, fspecread->fsr_offset)", + fspecread->fsr_offset); + PRE_FIELD_READ( "fcntl(VKI_F_SPECULATIVE_READ, fspecread->fsr_length)", + fspecread->fsr_length); + + if (fspecread->fsr_offset < 0 || fspecread->fsr_length < 0) { + SET_STATUS_Failure( VKI_EINVAL ); + } + } + break; +# endif + default: PRINT("fcntl ( %lu, %lu [??] )", ARG1, ARG2); log_decaying("UNKNOWN fcntl %lu!", ARG2); @@ -3399,8 +3425,13 @@ static void scan_attrlist(ThreadId tid, struct vki_attrlist *attrList, { ATTR_CMN_OWNERID, sizeof(uid_t) }, { ATTR_CMN_GRPID, sizeof(gid_t) }, { ATTR_CMN_ACCESSMASK, sizeof(uint32_t) }, +#if DARWIN_VERS >= DARWIN_10_15 + { ATTR_CMN_GEN_COUNT, sizeof(uint32_t) }, + { ATTR_CMN_DOCUMENT_ID, sizeof(uint32_t) }, +#else { ATTR_CMN_NAMEDATTRCOUNT, sizeof(uint32_t) }, { ATTR_CMN_NAMEDATTRLIST, -1 }, +#endif { ATTR_CMN_FLAGS, sizeof(uint32_t) }, { ATTR_CMN_USERACCESS, sizeof(uint32_t) }, { ATTR_CMN_EXTENDED_SECURITY, -1 }, @@ -3413,6 +3444,10 @@ static void scan_attrlist(ThreadId tid, struct vki_attrlist *attrList, #endif #if DARWIN_VERS >= DARWIN_10_8 { ATTR_CMN_ADDEDTIME, -1 }, +#endif +#if DARWIN_VERS >= DARWIN_10_15 + { ATTR_CMN_ERROR, sizeof(uint32_t) }, + { ATTR_CMN_DATA_PROTECT_FLAGS, sizeof(uint32_t) }, #endif { 0, 0 } }; @@ -3439,6 +3474,10 @@ static void scan_attrlist(ThreadId tid, struct vki_attrlist *attrList, { ATTR_VOL_CAPABILITIES, sizeof(vol_capabilities_attr_t) }, #if DARWIN_VERS >= DARWIN_10_6 { ATTR_VOL_UUID, sizeof(uuid_t) }, +#endif +#if DARWIN_VERS >= DARWIN_10_15 + { ATTR_VOL_QUOTA_SIZE, sizeof(off_t) }, + { ATTR_VOL_RESERVED_SIZE, sizeof(off_t) }, #endif { ATTR_VOL_ATTRIBUTES, sizeof(vol_attributes_attr_t) }, { 0, 0 } @@ -3448,6 +3487,11 @@ static void scan_attrlist(ThreadId tid, struct vki_attrlist *attrList, { ATTR_DIR_LINKCOUNT, sizeof(uint32_t) }, { ATTR_DIR_ENTRYCOUNT, sizeof(uint32_t) }, { ATTR_DIR_MOUNTSTATUS, sizeof(uint32_t) }, +#if DARWIN_VERS >= DARWIN_10_15 + { ATTR_DIR_ALLOCSIZE, sizeof(off_t) }, + { ATTR_DIR_IOBLOCKSIZE, sizeof(uint32_t) }, + { ATTR_DIR_DATALENGTH, sizeof(off_t) }, +#endif { 0, 0 } }; static const attrspec fileattr[] = { @@ -3473,6 +3517,16 @@ static void scan_attrlist(ThreadId tid, struct vki_attrlist *attrList, // This order is important. { ATTR_FORK_TOTALSIZE, sizeof(off_t) }, { ATTR_FORK_ALLOCSIZE, sizeof(off_t) }, +#if DARWIN_VERS >= DARWIN_10_15 + { ATTR_CMNEXT_RELPATH, sizeof(struct attrreference) }, + { ATTR_CMNEXT_PRIVATESIZE, sizeof(off_t) }, + { ATTR_CMNEXT_LINKID, sizeof(uint64_t) }, + { ATTR_CMNEXT_NOFIRMLINKPATH, sizeof(struct attrreference) }, + { ATTR_CMNEXT_REALDEVID, sizeof(uint32_t) }, + { ATTR_CMNEXT_REALFSID, sizeof(fsid_t) }, + { ATTR_CMNEXT_CLONEID, sizeof(uint64_t) }, + { ATTR_CMNEXT_EXT_FLAGS, sizeof(uint64_t) }, +#endif { 0, 0 } }; @@ -8643,6 +8697,12 @@ PRE(mach_msg_task) CALL_PRE(mach_vm_purgable_control); return; +#if DARWIN_VERS >= DARWIN_10_15 + case 8000: + CALL_PRE(task_restartable_ranges_register); + return; +#endif + default: // unknown message to task self log_decaying("UNKNOWN task message [id %d, to %s, reply 0x%x]", @@ -10949,6 +11009,79 @@ PRE(kernelrpc_mach_port_get_attributes_trap) } } #endif /* DARWIN_VERS >= DARWIN_10_14 */ + + +/* --------------------------------------------------------------------- + Added for macOS 10.15 (Catalina) + ------------------------------------------------------------------ */ + +#if DARWIN_VERS >= DARWIN_10_15 + +PRE(task_restartable_ranges_register) +{ + PRINT("task_restartable_ranges_register(%s, %#lx, %ld)", name_for_port(ARG1), ARG2, SARG3); +} + +POST(task_restartable_ranges_register) +{ +#pragma pack(4) + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } Reply; +#pragma pack() + + Reply *reply = (Reply *)ARG1; + + if (!reply->RetCode) { + } else { + PRINT("mig return %d", reply->RetCode); + } +} + +PRE(kernelrpc_mach_port_request_notification_trap) +{ + PRINT("kernelrpc_mach_port_request_notification_trap(%s, %s, %ld, %ld, %s, %ld, %#lx)", + name_for_port(ARG1), name_for_port(ARG2), SARG3, SARG4, name_for_port(ARG5), SARG6, ARG7); + PRE_REG_READ7(kern_return_t, "kernelrpc_mach_port_request_notification_trap", + ipc_space_t, task, mach_port_name_t, name, mach_msg_id_t, msgid, + mach_port_mscount_t, sync, mach_port_name_t, notify, mach_msg_type_name_t, notifyPoly, + mach_port_name_t*, previous); + if (ARG7 != 0) { + PRE_MEM_WRITE("kernelrpc_mach_port_request_notification_trap(previous)", ARG7, sizeof(mach_port_name_t)); + } +} + +POST(kernelrpc_mach_port_request_notification_trap) +{ + if (RES == 0 && ARG7 != 0) { + POST_MEM_WRITE(ARG7, sizeof(mach_port_name_t)); + PRINT("-> previous:%s", name_for_port(*(mach_port_name_t*)ARG7)); + } +} + +PRE(kernelrpc_mach_port_type_trap) +{ + PRINT("kernelrpc_mach_port_type_trap(%s, %s, %#lx)", + name_for_port(ARG1), name_for_port(ARG2), ARG3); + PRE_REG_READ3(kern_return_t, "kernelrpc_mach_port_type_trap", + ipc_space_t, task, mach_port_name_t, name, mach_port_type_t*, ptype); + if (ARG3 != 0) { + PRE_MEM_WRITE("kernelrpc_mach_port_type_trap(ptype)", ARG3, sizeof(mach_port_type_t)); + } +} + +POST(kernelrpc_mach_port_type_trap) +{ + if (RES == 0 && ARG3 != 0) { + POST_MEM_WRITE(ARG3, sizeof(mach_port_type_t)); + PRINT("-> ptype:%#x", *(mach_port_type_t*)ARG3); + } +} + +#endif /* DARWIN_VERS >= DARWIN_10_15 */ + /* --------------------------------------------------------------------- syscall tables ------------------------------------------------------------------ */ @@ -11576,7 +11709,11 @@ const SyscallTableEntry ML_(syscall_table)[] = { // _____(__NR_kqueue_workloop_ctl), // 530 // _____(__NR___mach_bridge_remote_time), // 531 #endif - +#if DARWIN_VERS >= DARWIN_10_15 +// _____(__NR_coalition_ledger), // 532 +// _____(__NR_log_data), // 533 +// _____(__NR_memorystatus_available_memory), // 534 +#endif MACX_(__NR_darwin_fake_sigreturn, fake_sigreturn) }; @@ -11744,8 +11881,13 @@ const SyscallTableEntry ML_(mach_trap_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(73)), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(74)), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(75)), +#if DARWIN_VERS >= DARWIN_10_15 + MACXY(__NR_kernelrpc_mach_port_type_trap, kernelrpc_mach_port_type_trap), + MACXY(__NR_kernelrpc_mach_port_request_notification_trap, kernelrpc_mach_port_request_notification_trap), +#else _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(76)), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(77)), +#endif _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(78)), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(79)), _____(VG_DARWIN_SYSCALL_CONSTRUCT_MACH(80)), // -80 diff --git a/darwin-drd.supp b/darwin-drd.supp index 39f9b9b63..35f036ca0 100644 --- a/darwin-drd.supp +++ b/darwin-drd.supp @@ -420,3 +420,24 @@ ... fun:_ZN4dyld4loadEPKcRKNS_11LoadContextERj } + +{ + macOS1015:_CFInitialize + drd:ConflictingAccess + ... + fun:__CFInitialize +} + +{ + macOS1015:cache_validate_item + drd:ConflictingAccess + ... + fun:cache_validate_item +} + +{ + macOS1015:ds_user_byuid + drd:ConflictingAccess + ... + fun:ds_user_byuid +} diff --git a/darwin-helgrind.supp b/darwin-helgrind.supp index e4f628997..1bd417523 100644 --- a/darwin-helgrind.supp +++ b/darwin-helgrind.supp @@ -190,3 +190,29 @@ ... fun:_objc_msgSend_uncached } + +{ + macOS1015:NXMapInsert + Helgrind:Race + fun:NXMapInsert +} + +{ + macOS1015:notify_monitor_file + Helgrind:Race + fun:notify_monitor_file +} + +{ + macOS1015:_xpc_asprintf + Helgrind:Race + ... + fun:_xpc_asprintf +} + +{ + macOS1015:lookUpImpOrForward + Helgrind:Race + ... + fun:lookUpImpOrForward +} diff --git a/darwin.supp b/darwin.supp index 1fd194811..1f693d6b2 100644 --- a/darwin.supp +++ b/darwin.supp @@ -54,21 +54,9 @@ { OSX1013:6-Leak Memcheck:Leak - match-leak-kinds: reachable - fun:malloc_zone_?alloc - ... - fun:map_images_nolock - fun:map_2_images -} - -{ - OSX1013:7-Leak - Memcheck:Leak - match-leak-kinds: possible - fun:malloc_zone_?alloc + match-leak-kinds: all ... fun:map_images_nolock - fun:map_2_images } { @@ -740,15 +728,6 @@ fun:NXCreate*TableFromZone } -{ - OSX1013:map_images-2 - Memcheck:Leak - match-leak-kinds: possible - fun:calloc - fun:map_images_nolock - fun:map_images -} - { OSX1013:map_images-3 Memcheck:Leak @@ -756,18 +735,11 @@ fun:calloc fun:_ZL12realizeClassP10objc_class } -{ - OSX1013:map_images-4 - Memcheck:Leak - match-leak-kinds: indirect - fun:malloc_zone_malloc - ... - fun:map_images_nolock -} + { OSX1013:map_images-5 Memcheck:Leak - match-leak-kinds: indirect + match-leak-kinds: all fun:malloc_zone_calloc fun:*NXHash* } @@ -807,3 +779,12 @@ fun:malloc_zone_calloc fun:_NXHashRehashToCapacity } + +# I suppose that this is deliberate +# and that Apple know what they are doing? +{ + masOS1015:__chkstk_darwin_probe + Memcheck:Addr8 + fun:__chkstk_darwin_probe +} + diff --git a/include/vki/vki-darwin.h b/include/vki/vki-darwin.h index 5e381ab4c..5acd38a4f 100644 --- a/include/vki/vki-darwin.h +++ b/include/vki/vki-darwin.h @@ -411,6 +411,9 @@ typedef uint32_t vki_u32; #if DARWIN_VERS >= DARWIN_10_14 # define VKI_F_CHECK_LV F_CHECK_LV #endif +#if DARWIN_VERS >= DARWIN_10_15 +# define VKI_F_SPECULATIVE_READ F_SPECULATIVE_READ +#endif #define VKI_F_FULLFSYNC F_FULLFSYNC #define VKI_F_PATHPKG_CHECK F_PATHPKG_CHECK #define VKI_F_FREEZE_FS F_FREEZE_FS diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index 70b110e81..3f378d301 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -218,6 +218,11 @@ #define __NR_host_create_mach_voucher_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(70) #endif +#if DARWIN_VERS >= DARWIN_10_15 +#define __NR_kernelrpc_mach_port_type_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(76) +#define __NR_kernelrpc_mach_port_request_notification_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(77) +#endif + #define __NR_mach_voucher_extract_attr_recipe_trap VG_DARWIN_SYSCALL_CONSTRUCT_MACH(72) #define __NR_mach_timebase_info VG_DARWIN_SYSCALL_CONSTRUCT_MACH(89) @@ -859,6 +864,12 @@ #define __NR___mach_bridge_remote_time VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(531) #endif /* DARWIN_VERS >= DARWIN_10_14 */ +#if DARWIN_VERS >= DARWIN_10_15 +#define __NR_coalition_ledger VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(532) +#define __NR_log_data VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(533) +#define __NR_memorystatus_available_memory VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(534) +#endif + #define __NR_darwin_fake_sigreturn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(1000) #endif diff --git a/massif/tests/alloc-fns-A.vgtest b/massif/tests/alloc-fns-A.vgtest index c9163223d..ba3e87d19 100644 --- a/massif/tests/alloc-fns-A.vgtest +++ b/massif/tests/alloc-fns-A.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" 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.vgtest b/massif/tests/alloc-fns-B.vgtest index e7329a378..2456604c6 100644 --- a/massif/tests/alloc-fns-B.vgtest +++ b/massif/tests/alloc-fns-B.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic.vgtest b/massif/tests/basic.vgtest index 87c3a6444..0a3bc1054 100644 --- a/massif/tests/basic.vgtest +++ b/massif/tests/basic.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic2.vgtest b/massif/tests/basic2.vgtest index 1dce7706f..950b57e5b 100644 --- a/massif/tests/basic2.vgtest +++ b/massif/tests/basic2.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/big-alloc.vgtest b/massif/tests/big-alloc.vgtest index 7f9149d91..b2520b997 100644 --- a/massif/tests/big-alloc.vgtest +++ b/massif/tests/big-alloc.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/bug469146.vgtest b/massif/tests/bug469146.vgtest index 3bf1b60c1..2004bf268 100644 --- a/massif/tests/bug469146.vgtest +++ b/massif/tests/bug469146.vgtest @@ -8,5 +8,7 @@ vgopts: --ignore-fn=filter_function1 --ignore-fn="filter_function2(int)" --ignor vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_nolock --ignore-fn="realizeClass(objc_class*)" --ignore-fn=_NXHashRehashToCapacity --ignore-fn=NXCreateHashTableFromZone --ignore-fn=NXCreateMapTableFromZone --ignore-fn=NXHashInser --ignore-fn=add_class_to_loadable_list --ignore-fn=NXHashInsert --ignore-fn=class_createInstance --ignore-fn=_xpc_malloc --ignore-fn=strdup --ignore-fn=_xpc_calloc # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" 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/culling1.stderr.exp b/massif/tests/culling1.stderr.exp index e277dc60e..eaa4e7294 100644 --- a/massif/tests/culling1.stderr.exp +++ b/massif/tests/culling1.stderr.exp @@ -39,6 +39,11 @@ Massif: 15: xpc_array_create Massif: 16: _NXMapRehash(_NXMapTable*) Massif: 17: arc4_init Massif: 18: realizeClassWithoutSwift(objc_class*) +Massif: 19: _objc_init +Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int) +Massif: 21: realizeClassWithoutSwift(objc_class*, objc_class*) +Massif: 22: schedule_class_load(objc_class*) +Massif: 23: objc::SafeRanges::add(unsigned long, unsigned long) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:32, hp:16, ex:16, st:0) Massif: alloc S. 2 (t:64, hp:32, ex:32, st:0) diff --git a/massif/tests/culling1.vgtest b/massif/tests/culling1.vgtest index 5247e1b71..9dbfa6665 100644 --- a/massif/tests/culling1.vgtest +++ b/massif/tests/culling1.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" stderr_filter: filter_verbose cleanup: rm massif.out diff --git a/massif/tests/culling2.stderr.exp b/massif/tests/culling2.stderr.exp index 599d0f0aa..2d77d0461 100644 --- a/massif/tests/culling2.stderr.exp +++ b/massif/tests/culling2.stderr.exp @@ -39,6 +39,11 @@ Massif: 15: xpc_array_create Massif: 16: _NXMapRehash(_NXMapTable*) Massif: 17: arc4_init Massif: 18: realizeClassWithoutSwift(objc_class*) +Massif: 19: _objc_init +Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int) +Massif: 21: realizeClassWithoutSwift(objc_class*, objc_class*) +Massif: 22: schedule_class_load(objc_class*) +Massif: 23: objc::SafeRanges::add(unsigned long, unsigned long) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:16, hp:0, ex:16, st:0) Massif: alloc S. 2 (t:432, hp:400, ex:32, st:0) diff --git a/massif/tests/culling2.vgtest b/massif/tests/culling2.vgtest index 847010e1e..a5b4771a7 100644 --- a/massif/tests/culling2.vgtest +++ b/massif/tests/culling2.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" stderr_filter: filter_verbose cleanup: rm massif.out diff --git a/massif/tests/custom_alloc.vgtest b/massif/tests/custom_alloc.vgtest index c651534da..6db7e483b 100644 --- a/massif/tests/custom_alloc.vgtest +++ b/massif/tests/custom_alloc.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-A.vgtest b/massif/tests/deep-A.vgtest index 77fc9d0e3..cd80c108d 100644 --- a/massif/tests/deep-A.vgtest +++ b/massif/tests/deep-A.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-B.stderr.exp b/massif/tests/deep-B.stderr.exp index 7f7c332b9..f3fd39d2a 100644 --- a/massif/tests/deep-B.stderr.exp +++ b/massif/tests/deep-B.stderr.exp @@ -46,6 +46,11 @@ Massif: 15: xpc_array_create Massif: 16: _NXMapRehash(_NXMapTable*) Massif: 17: arc4_init Massif: 18: realizeClassWithoutSwift(objc_class*) +Massif: 19: _objc_init +Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int) +Massif: 21: realizeClassWithoutSwift(objc_class*, objc_class*) +Massif: 22: schedule_class_load(objc_class*) +Massif: 23: objc::SafeRanges::add(unsigned long, unsigned long) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0) Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0) diff --git a/massif/tests/deep-B.vgtest b/massif/tests/deep-B.vgtest index 0328353b3..ddbd32c34 100644 --- a/massif/tests/deep-B.vgtest +++ b/massif/tests/deep-B.vgtest @@ -6,5 +6,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-C.stderr.exp b/massif/tests/deep-C.stderr.exp index 39b35f139..154c757c2 100644 --- a/massif/tests/deep-C.stderr.exp +++ b/massif/tests/deep-C.stderr.exp @@ -49,6 +49,11 @@ Massif: 15: xpc_array_create Massif: 16: _NXMapRehash(_NXMapTable*) Massif: 17: arc4_init Massif: 18: realizeClassWithoutSwift(objc_class*) +Massif: 19: _objc_init +Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int) +Massif: 21: realizeClassWithoutSwift(objc_class*, objc_class*) +Massif: 22: schedule_class_load(objc_class*) +Massif: 23: objc::SafeRanges::add(unsigned long, unsigned long) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0) Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0) diff --git a/massif/tests/deep-C.vgtest b/massif/tests/deep-C.vgtest index b21e5df8b..ef8b558a1 100644 --- a/massif/tests/deep-C.vgtest +++ b/massif/tests/deep-C.vgtest @@ -5,6 +5,8 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" stderr_filter: filter_verbose post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-D.vgtest b/massif/tests/deep-D.vgtest index 374f2afc2..d669fdf9a 100644 --- a/massif/tests/deep-D.vgtest +++ b/massif/tests/deep-D.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" 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/filter_ignore_fn b/massif/tests/filter_ignore_fn index 2b524f08b..3cbc22407 100755 --- a/massif/tests/filter_ignore_fn +++ b/massif/tests/filter_ignore_fn @@ -1,5 +1,9 @@ #! /bin/sh -awk '/Massif arguments/{gsub(/ unsigned int/, "uint")}{print}' | +awk '/Massif arguments/{gsub(/ ?unsigned int/, "uint")}{print}' | +awk '/Massif arguments/{gsub(/ ?unsigned long/, "ulong")}{print}' | +awk '/Massif arguments/{gsub(/char const/, "char_const")}{print}' | +awk '/Massif arguments/{gsub(/ objc/, "_objc")}{print}' | +awk '/Massif arguments/{gsub(/> >/, ">>")}{print}' | # unmangled C++ names can contain spaces so the above filter removes themn first awk '{gsub(/ --ignore-fn=[^ ]*/, ""); print}' diff --git a/massif/tests/ignored.vgtest b/massif/tests/ignored.vgtest index 7f9448156..805a36eb4 100644 --- a/massif/tests/ignored.vgtest +++ b/massif/tests/ignored.vgtest @@ -6,5 +6,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/ignoring.vgtest b/massif/tests/ignoring.vgtest index 7181f3435..c3d7a1365 100644 --- a/massif/tests/ignoring.vgtest +++ b/massif/tests/ignoring.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/inlinfomalloc.vgtest b/massif/tests/inlinfomalloc.vgtest index 8f5c401e4..8df84d201 100644 --- a/massif/tests/inlinfomalloc.vgtest +++ b/massif/tests/inlinfomalloc.vgtest @@ -6,5 +6,7 @@ vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn="realizeClas # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" stderr_filter: filter_verbose +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" 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.vgtest b/massif/tests/insig.vgtest index a2994b524..ba307adab 100644 --- a/massif/tests/insig.vgtest +++ b/massif/tests/insig.vgtest @@ -6,5 +6,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-names.vgtest b/massif/tests/long-names.vgtest index 562778dee..09ce4f507 100644 --- a/massif/tests/long-names.vgtest +++ b/massif/tests/long-names.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-time.vgtest b/massif/tests/long-time.vgtest index 16d0af0fa..d7d9ead29 100644 --- a/massif/tests/long-time.vgtest +++ b/massif/tests/long-time.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/new-cpp.vgtest b/massif/tests/new-cpp.vgtest index aa966243d..2cc809cd1 100644 --- a/massif/tests/new-cpp.vgtest +++ b/massif/tests/new-cpp.vgtest @@ -7,5 +7,7 @@ vgopts: --ignore-fn=call_init --ignore-fn=pool 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" 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/null.vgtest b/massif/tests/null.vgtest index bab26da37..7f9555bf0 100644 --- a/massif/tests/null.vgtest +++ b/massif/tests/null.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/one.vgtest b/massif/tests/one.vgtest index aa867395e..d6a61dfa4 100644 --- a/massif/tests/one.vgtest +++ b/massif/tests/one.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index cf41ad2a7..969d9791f 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -8,5 +8,7 @@ vgopts: --ignore-fn=call_init --ignore-fn=pool vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_nolock --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_malloc # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ./filter_new_aligned | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/peak.vgtest b/massif/tests/peak.vgtest index fd2ccbe1e..c4f79dfff 100644 --- a/massif/tests/peak.vgtest +++ b/massif/tests/peak.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/peak2.stderr.exp b/massif/tests/peak2.stderr.exp index 0bbf60f5e..8ebb43667 100644 --- a/massif/tests/peak2.stderr.exp +++ b/massif/tests/peak2.stderr.exp @@ -39,6 +39,11 @@ Massif: 15: xpc_array_create Massif: 16: _NXMapRehash(_NXMapTable*) Massif: 17: arc4_init Massif: 18: realizeClassWithoutSwift(objc_class*) +Massif: 19: _objc_init +Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int) +Massif: 21: realizeClassWithoutSwift(objc_class*, objc_class*) +Massif: 22: schedule_class_load(objc_class*) +Massif: 23: objc::SafeRanges::add(unsigned long, unsigned long) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:1728, hp:1600, ex:128, st:0) Massif: alloc S. 2 (t:1872, hp:1616, ex:256, st:0) diff --git a/massif/tests/peak2.vgtest b/massif/tests/peak2.vgtest index 2c253566a..6df7e0550 100644 --- a/massif/tests/peak2.vgtest +++ b/massif/tests/peak2.vgtest @@ -5,6 +5,8 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" stderr_filter: filter_verbose post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/realloc.stderr.exp b/massif/tests/realloc.stderr.exp index 585a9ee7e..180e3ec8e 100644 --- a/massif/tests/realloc.stderr.exp +++ b/massif/tests/realloc.stderr.exp @@ -39,6 +39,11 @@ Massif: 15: xpc_array_create Massif: 16: _NXMapRehash(_NXMapTable*) Massif: 17: arc4_init Massif: 18: realizeClassWithoutSwift(objc_class*) +Massif: 19: _objc_init +Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int) +Massif: 21: realizeClassWithoutSwift(objc_class*, objc_class*) +Massif: 22: schedule_class_load(objc_class*) +Massif: 23: objc::SafeRanges::add(unsigned long, unsigned long) Massif: startup S. 0 (t:0, hp:0, ex:0, st:0) Massif: alloc S. 1 (t:800, hp:800, ex:0, st:0) Massif: realloc S. 2 (t:800, hp:800, ex:0, st:0) diff --git a/massif/tests/realloc.vgtest b/massif/tests/realloc.vgtest index 07207cecf..06bf1f683 100644 --- a/massif/tests/realloc.vgtest +++ b/massif/tests/realloc.vgtest @@ -6,6 +6,8 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" stderr_filter: filter_verbose post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_0_0.vgtest b/massif/tests/thresholds_0_0.vgtest index 46024cc3f..4334d036e 100644 --- a/massif/tests/thresholds_0_0.vgtest +++ b/massif/tests/thresholds_0_0.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_0_10.vgtest b/massif/tests/thresholds_0_10.vgtest index 8c750b083..83d05b565 100644 --- a/massif/tests/thresholds_0_10.vgtest +++ b/massif/tests/thresholds_0_10.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_0.vgtest b/massif/tests/thresholds_10_0.vgtest index d4e2f376c..f0c38526b 100644 --- a/massif/tests/thresholds_10_0.vgtest +++ b/massif/tests/thresholds_10_0.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_10.vgtest b/massif/tests/thresholds_10_10.vgtest index 478e5099f..4af556954 100644 --- a/massif/tests/thresholds_10_10.vgtest +++ b/massif/tests/thresholds_10_10.vgtest @@ -5,6 +5,8 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_0.vgtest b/massif/tests/thresholds_5_0.vgtest index 791a4fceb..de8bf93f2 100644 --- a/massif/tests/thresholds_5_0.vgtest +++ b/massif/tests/thresholds_5_0.vgtest @@ -5,6 +5,8 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_10.vgtest b/massif/tests/thresholds_5_10.vgtest index 4cb99429e..895fe2f1c 100644 --- a/massif/tests/thresholds_5_10.vgtest +++ b/massif/tests/thresholds_5_10.vgtest @@ -5,6 +5,8 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/zero1.vgtest b/massif/tests/zero1.vgtest index fb8dfe26a..2fe02a6a3 100644 --- a/massif/tests/zero1.vgtest +++ b/massif/tests/zero1.vgtest @@ -5,6 +5,8 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/zero2.vgtest b/massif/tests/zero2.vgtest index 3c3612295..933f6a345 100644 --- a/massif/tests/zero2.vgtest +++ b/massif/tests/zero2.vgtest @@ -5,5 +5,7 @@ vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-f 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 # Darwin ignore functions, for macOS 10.14 vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" +# Darwin ignore functions, for macOS 10.15 +vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 51055e57b..470042902 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -170,6 +170,7 @@ EXTRA_DIST = \ duplicate_align_size_errors.stderr.exp \ duplicate_align_size_errors.stderr.exp-memalign \ duplicate_align_size_errors.stderr.exp-darwin \ + duplicate_align_size_errors.stderr.exp-darwin2 \ duplicate_align_size_errors.vgtest \ sized_aligned_new_delete_args.stderr.exp \ sized_aligned_new_delete_args.vgtest \ @@ -288,6 +289,7 @@ EXTRA_DIST = \ memalign_args.vgtest memalign_args.stderr.exp \ memalign_args.stderr.exp-glibc \ memalign_args.stderr.exp-darwin \ + memalign_args.stderr.exp-darwin2 \ memalign_args.stderr.exp-solaris \ memccpy1.stderr.exp memccpy1.stdout.exp memccpy1.vgtest \ memccpy2.stderr.exp memccpy2.vgtest \ diff --git a/memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin2 b/memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin2 new file mode 100644 index 000000000..d0dc87eb4 --- /dev/null +++ b/memcheck/tests/duplicate_align_size_errors.stderr.exp-darwin2 @@ -0,0 +1,27 @@ +Invalid alignment value: 0 (should be non-zero and a power of 2) + at 0x........: operator new(unsigned long, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:19) + +Invalid alignment value: 0 (should be non-zero and a power of 2) + at 0x........: operator delete(void*, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:20) + +Unsafe allocation with size of zero is implementation-defined + at 0x........: malloc_zone_memalign (vg_replace_malloc.c:...) + ... + by 0x........: main (duplicate_align_size_errors.cpp:33) + +Mismatched new/delete size value: 33 + at 0x........: operator delete(void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:43) + Address 0x........ is 0 bytes inside a block of size 32 alloc'd + at 0x........: operator new(unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:42) + +Mismatched new[]/delete[] alignment alloc value: 64 dealloc value: 128 + at 0x........: operator delete[](void*, unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:48) + Address 0x........ is 0 bytes inside a block of size 32 alloc'd + at 0x........: operator new[](unsigned long, std::align_val_t) (vg_replace_malloc.c:...) + by 0x........: main (duplicate_align_size_errors.cpp:47) + diff --git a/memcheck/tests/memalign_args.stderr.exp-darwin2 b/memcheck/tests/memalign_args.stderr.exp-darwin2 new file mode 100644 index 000000000..39363cfd5 --- /dev/null +++ b/memcheck/tests/memalign_args.stderr.exp-darwin2 @@ -0,0 +1,12 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: malloc_zone_memalign (vg_replace_malloc.c:...) + ... + by 0x........: main (memalign_args.c:23) + +Conditional jump or move depends on uninitialised value(s) + ... + by 0x........: main (memalign_args.c:27) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: valloc (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:31) From 1d4182eed4dd25d7f2a0004f46e51b7a00ca5d5a Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 17 Dec 2025 22:31:41 +0000 Subject: [PATCH 174/502] s390 disasm-test: Add constraint for VPDI insn. --- none/tests/s390x/disasm-test/disasm-test.post.exp | 4 ++-- none/tests/s390x/disasm-test/opcode.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index 0f31f36ca..bd8790855 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,4 +1,4 @@ -Total: 148776 tests generated -Total: 148684 insns verified +Total: 148764 tests generated +Total: 148672 insns verified Total: 0 disassembly mismatches Total: 92 specification exceptions diff --git a/none/tests/s390x/disasm-test/opcode.c b/none/tests/s390x/disasm-test/opcode.c index 86cd642f3..3623e8ecb 100644 --- a/none/tests/s390x/disasm-test/opcode.c +++ b/none/tests/s390x/disasm-test/opcode.c @@ -1236,7 +1236,7 @@ static const char *opcodes[] = { "vpks v1,v2,v3,m4:{1..3},m5:{0,1}", // no spec. exception for m5 "vpkls v1,v2,v3,m4:{1..3},m5:{0,1}", // no spec. exception for m5 "vperm v1,v2,v3,v4", - "vpdi v1,v2,v3,m4", + "vpdi v1,v2,v3,m4:{0,1,4,5}", // no spec. exception for m4 // "vrep v1,v3,i2:u16,m4:{0..3}", "vrepi v1,i2:s16,m3:{0..3}", "vscef v1,d12(v2,b2),m3:{0..3}", From 6f1b1f3d7d00f45bacebc2bfae667fc0ff8a461b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 18 Dec 2025 07:59:38 +0100 Subject: [PATCH 175/502] Bug 513522 - m_libcassert.c: 'ordered comparison of pointer with integer zero' compiler warning --- NEWS | 2 ++ coregrind/m_libcassert.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 06bf59ebb..b8e15e0df 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 512037 malloc trace does not print free size or alignment 512571 regtest problems with darwin dsymuti 513257 Add missing syswraps for lsm_list_modules +513522 m_libcassert.c: 'ordered comparison of pointer with integer zero' + compiler warning To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_libcassert.c b/coregrind/m_libcassert.c index 35a988c65..e757aa59e 100644 --- a/coregrind/m_libcassert.c +++ b/coregrind/m_libcassert.c @@ -500,7 +500,7 @@ static void report_and_quit ( const HChar* report, False, // exited_threads startRegsIN); - if (VG_(debugLog_getLevel) > 0) { + if (VG_(debugLog_getLevel)() > 0) { VG_(am_show_nsegments) (1, "report_and_quit"); (void) VG_(am_do_sync_check) ("report_and_quit", __FILE__, __LINE__); } From 4edf31a38f01c860b3d1677c79784f25f941bb0d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 18 Dec 2025 08:30:07 +0100 Subject: [PATCH 176/502] configure.ac: tabs to spaces in block setting PLATFORM PRI and SEC variables It was a mix of tabs and spaces, hard to read without the right tab width setting. --- configure.ac | 64 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac index 81e7178b5..1a374999b 100644 --- a/configure.ac +++ b/configure.ac @@ -765,83 +765,83 @@ case "$ARCH_MAX-$VGCONF_OS" in x86-linux) VGCONF_ARCH_PRI="x86" VGCONF_ARCH_SEC="" - VGCONF_PLATFORM_PRI_CAPS="X86_LINUX" - VGCONF_PLATFORM_SEC_CAPS="" + VGCONF_PLATFORM_PRI_CAPS="X86_LINUX" + VGCONF_PLATFORM_SEC_CAPS="" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" valt_load_address_sec_norml="0xUNSET" valt_load_address_sec_inner="0xUNSET" AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})]) - ;; + ;; amd64-linux) valt_load_address_sec_norml="0xUNSET" valt_load_address_sec_inner="0xUNSET" - if test x$vg_cv_only64bit = xyes; then + if test x$vg_cv_only64bit = xyes; then VGCONF_ARCH_PRI="amd64" VGCONF_ARCH_SEC="" - VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX" - VGCONF_PLATFORM_SEC_CAPS="" + VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX" + VGCONF_PLATFORM_SEC_CAPS="" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" - elif test x$vg_cv_only32bit = xyes; then - VGCONF_ARCH_PRI="x86" + elif test x$vg_cv_only32bit = xyes; then + VGCONF_ARCH_PRI="x86" VGCONF_ARCH_SEC="" - VGCONF_PLATFORM_PRI_CAPS="X86_LINUX" - VGCONF_PLATFORM_SEC_CAPS="" + VGCONF_PLATFORM_PRI_CAPS="X86_LINUX" + VGCONF_PLATFORM_SEC_CAPS="" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" - else + else VGCONF_ARCH_PRI="amd64" VGCONF_ARCH_SEC="x86" - VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX" - VGCONF_PLATFORM_SEC_CAPS="X86_LINUX" + VGCONF_PLATFORM_PRI_CAPS="AMD64_LINUX" + VGCONF_PLATFORM_SEC_CAPS="X86_LINUX" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" valt_load_address_sec_norml="0x58000000" valt_load_address_sec_inner="0x38000000" - fi + fi AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})]) - ;; + ;; ppc32-linux) VGCONF_ARCH_PRI="ppc32" VGCONF_ARCH_SEC="" - VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX" - VGCONF_PLATFORM_SEC_CAPS="" + VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX" + VGCONF_PLATFORM_SEC_CAPS="" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" valt_load_address_sec_norml="0xUNSET" valt_load_address_sec_inner="0xUNSET" AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})]) - ;; + ;; ppc64be-linux) valt_load_address_sec_norml="0xUNSET" valt_load_address_sec_inner="0xUNSET" - if test x$vg_cv_only64bit = xyes; then - VGCONF_ARCH_PRI="ppc64be" + if test x$vg_cv_only64bit = xyes; then + VGCONF_ARCH_PRI="ppc64be" VGCONF_ARCH_SEC="" - VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX" - VGCONF_PLATFORM_SEC_CAPS="" + VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX" + VGCONF_PLATFORM_SEC_CAPS="" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" - elif test x$vg_cv_only32bit = xyes; then - VGCONF_ARCH_PRI="ppc32" + elif test x$vg_cv_only32bit = xyes; then + VGCONF_ARCH_PRI="ppc32" VGCONF_ARCH_SEC="" - VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX" - VGCONF_PLATFORM_SEC_CAPS="" + VGCONF_PLATFORM_PRI_CAPS="PPC32_LINUX" + VGCONF_PLATFORM_SEC_CAPS="" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" - else - VGCONF_ARCH_PRI="ppc64be" + else + VGCONF_ARCH_PRI="ppc64be" VGCONF_ARCH_SEC="ppc32" - VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX" - VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX" + VGCONF_PLATFORM_PRI_CAPS="PPC64BE_LINUX" + VGCONF_PLATFORM_SEC_CAPS="PPC32_LINUX" valt_load_address_pri_norml="0x58000000" valt_load_address_pri_inner="0x38000000" valt_load_address_sec_norml="0x58000000" valt_load_address_sec_inner="0x38000000" - fi + fi AC_MSG_RESULT([ok (${ARCH_MAX}-${VGCONF_OS})]) - ;; + ;; ppc64le-linux) # Little Endian is only supported on PPC64 valt_load_address_sec_norml="0xUNSET" From f20461ab7764226e9eb71cf07a93b931a55d2cac Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 18 Dec 2025 08:36:25 +0100 Subject: [PATCH 177/502] Darwin and FreeBSD: and the two platforms to the check that 32bit executables can be built I don't think that I've ever tested this on a FreeBSD amd64 install without 32bit support. This check is required on Darwin 19 and later. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1a374999b..55d26b2a5 100644 --- a/configure.ac +++ b/configure.ac @@ -682,7 +682,7 @@ esac # does not support building 32 bit programs case "$ARCH_MAX-$VGCONF_OS" in - amd64-linux|ppc64be-linux|arm64-linux|amd64-solaris) + amd64-linux|ppc64be-linux|arm64-linux|amd64-solaris|amd64-darwin|amd64-freebsd) AC_MSG_CHECKING([for 32 bit build support]) safe_CFLAGS=$CFLAGS CFLAGS="-m32" From 8a95c48c80de40199eba5d8e6119f27bb84a50b9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 19 Dec 2025 06:58:51 +0100 Subject: [PATCH 178/502] Bug 258140 - Valgrind on OS X always reports some memory "still reachable" Just needed one more suppression for the minimal test in the bugzilla item. I expect that there will be a seemingly endless number of leaks in Darwin (different libs, later versions). --- NEWS | 1 + darwin.supp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b8e15e0df..6360e83a5 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,7 @@ than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. 228343 none/tests/darwin/bug228343 fails on OS X +258140 Valgrind on OS X always reports some memory "still reachable" 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) 487055 memcheck/tests/x86-linux/scalar fails running in Docker 509562 s390x: Define minimum required machine model diff --git a/darwin.supp b/darwin.supp index 1f693d6b2..f256a3a06 100644 --- a/darwin.supp +++ b/darwin.supp @@ -783,8 +783,16 @@ # I suppose that this is deliberate # and that Apple know what they are doing? { - masOS1015:__chkstk_darwin_probe + macOS1015:__chkstk_darwin_probe Memcheck:Addr8 fun:__chkstk_darwin_probe } +{ + macOS1015:_mh_execute_header + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:_mh_execute_header +} + From d101bbd76e7c5b6078431ff0eca53b6b3d8c9250 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 19 Dec 2025 07:07:12 +0100 Subject: [PATCH 179/502] regtest: change memcheck threadname_xml prereq This was using test -u which doesn't work on Darwin so I changed that to -e. --- memcheck/tests/threadname_xml.vgtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/threadname_xml.vgtest b/memcheck/tests/threadname_xml.vgtest index 5d3acea6f..8a352da98 100644 --- a/memcheck/tests/threadname_xml.vgtest +++ b/memcheck/tests/threadname_xml.vgtest @@ -1,4 +1,4 @@ -prereq: test -u ./threadname && ! ../../tests/os_test illumos +prereq: test -e ./threadname && ! ../../tests/os_test illumos prog: threadname vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null stderr_filter: filter_xml From 2fd107444decbcc777790b448c39e5f7036f4748 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 19 Dec 2025 12:33:50 +0100 Subject: [PATCH 180/502] regtest: filter leaks from memcheck threadname_xml and update expected --- memcheck/tests/threadname_xml.stderr.exp | 2 -- memcheck/tests/threadname_xml.vgtest | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/memcheck/tests/threadname_xml.stderr.exp b/memcheck/tests/threadname_xml.stderr.exp index 1671b50a2..0b693ec02 100644 --- a/memcheck/tests/threadname_xml.stderr.exp +++ b/memcheck/tests/threadname_xml.stderr.exp @@ -304,8 +304,6 @@ ... -... - ... diff --git a/memcheck/tests/threadname_xml.vgtest b/memcheck/tests/threadname_xml.vgtest index 8a352da98..eba971a92 100644 --- a/memcheck/tests/threadname_xml.vgtest +++ b/memcheck/tests/threadname_xml.vgtest @@ -1,4 +1,4 @@ prereq: test -e ./threadname && ! ../../tests/os_test illumos prog: threadname vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null -stderr_filter: filter_xml +stderr_filter: filter_xml_leak From eab939e9c9a8893556b83f68424d087bbafeb5d9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 20 Dec 2025 13:01:26 +0100 Subject: [PATCH 181/502] Bug 513533 - Support macOS 11.0 (Big Sur) Most of the work for this was done by Louis Brunner. Thanks Louis. --- NEWS | 8 +- configure.ac | 4 + coregrind/Makefile.am | 1 + coregrind/fixup_macho_loadcmds.c | 24 +- coregrind/m_debuginfo/debuginfo.c | 60 +++ coregrind/m_debuginfo/image.c | 54 +- coregrind/m_debuginfo/priv_storage.h | 6 + coregrind/m_initimg/initimg-darwin.c | 54 +- coregrind/m_mach/dyld_cache.c | 504 ++++++++++++++++++ coregrind/m_mach/priv_dyld_internals.h | 146 +++++ coregrind/m_main.c | 12 + coregrind/m_replacemalloc/vg_replace_malloc.c | 33 +- coregrind/m_syswrap/priv_syswrap-darwin.h | 21 +- coregrind/m_syswrap/syswrap-darwin.c | 154 +++++- coregrind/pub_core_debuginfo.h | 4 + coregrind/pub_core_initimg.h | 3 + darwin-drd.supp | 7 + darwin-helgrind.supp | 14 + darwin.supp | 27 + helgrind/tests/Makefile.am | 1 + helgrind/tests/filter_darwin.awk | 152 ++++++ helgrind/tests/filter_stderr.in | 3 +- include/vki/vki-darwin.h | 11 + include/vki/vki-scnums-darwin.h | 14 + memcheck/mc_main.c | 4 +- memcheck/tests/Makefile.am | 1 + .../tests/memalign_args.stderr.exp-darwin3 | 11 + none/tests/darwin/apple-main-arg.c | 12 +- none/tests/filter_fdleak | 17 +- 29 files changed, 1320 insertions(+), 42 deletions(-) create mode 100644 coregrind/m_mach/dyld_cache.c create mode 100644 coregrind/m_mach/priv_dyld_internals.h create mode 100644 helgrind/tests/filter_darwin.awk create mode 100644 memcheck/tests/memalign_args.stderr.exp-darwin3 diff --git a/NEWS b/NEWS index 6360e83a5..51f0b301a 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,7 @@ PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, RISCV64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support -for nanoMIPS/Linux. macOS is supported up to version 10.15 Catalina. +for nanoMIPS/Linux. macOS is supported up to version 11 Big Sur (amd64 only). * ==================== CORE CHANGES =================== @@ -14,7 +14,11 @@ for nanoMIPS/Linux. macOS is supported up to version 10.15 Catalina. s390x: Machine models older than z196 are no longer supported. -Initial support for macOS 10.14 Mojave has been added. +Support for the following macOS versions has been added +10,13 High Sierra (bug fixes) +10.14 Mojave +10.15 Calalina +11.0 Big Sur * ==================== TOOL CHANGES =================== diff --git a/configure.ac b/configure.ac index 55d26b2a5..528e44b30 100644 --- a/configure.ac +++ b/configure.ac @@ -550,6 +550,10 @@ case "${host_os}" in AC_MSG_RESULT([Darwin 19.x (${kernel}) / macOS 10.15 Catalina]) DARWIN_VERS=$DARWIN_10_15 ;; + 20.*) + AC_MSG_RESULT([Darwin 20.x (${kernel}) / macOS 11 Big Sur]) + DARWIN_VERS=$DARWIN_11_00 + ;; *) AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) AC_MSG_ERROR([Valgrind works on Darwin 12.x-19.x (Mac OS X 10.8-10.11, macOS 10.12-10.15)]) diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 90d921db2..f94aaf471 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -433,6 +433,7 @@ COREGRIND_SOURCES_COMMON = \ m_mach/mach_traps-x86-darwin.S \ m_mach/mach_traps-amd64-darwin.S \ m_mach/mig_strncpy.c \ + m_mach/dyld_cache.c \ m_replacemalloc/replacemalloc_core.c \ m_scheduler/sched-lock.c \ m_scheduler/sched-lock-generic.c \ diff --git a/coregrind/fixup_macho_loadcmds.c b/coregrind/fixup_macho_loadcmds.c index b751829fb..0031177ee 100644 --- a/coregrind/fixup_macho_loadcmds.c +++ b/coregrind/fixup_macho_loadcmds.c @@ -117,10 +117,18 @@ #include #include -/* Check that DARWIN_VERS is defined */ +/* Get hold of DARWIN_VERS, and check it has a sane value. */ #include "config.h" -#if !defined(DARWIN_VERS) -# error "DARWIN_VERS not defind. This file only compiles on Darwin." +#if DARWIN_VERS != DARWIN_10_5 && DARWIN_VERS != DARWIN_10_6 \ + && DARWIN_VERS != DARWIN_10_7 && DARWIN_VERS != DARWIN_10_8 \ + && DARWIN_VERS != DARWIN_10_9 && DARWIN_VERS != DARWIN_10_10 \ + && DARWIN_VERS != DARWIN_10_11 && DARWIN_VERS != DARWIN_10_12 \ + && DARWIN_VERS != DARWIN_10_13 && DARWIN_VERS != DARWIN_10_14 \ + && DARWIN_VERS != DARWIN_10_15 && DARWIN_VERS != DARWIN_11_00 \ + && DARWIN_VERS != DARWIN_12_00 && DARWIN_VERS != DARWIN_13_00 \ + && DARWIN_VERS != DARWIN_14_00 && DARWIN_VERS != DARWIN_15_00 \ + && DARWIN_VERS != DARWIN_15_04 && DARWIN_VERS != DARWIN_26_00 +# error "Unknown DARWIN_VERS value. This file only compiles on Darwin." #endif @@ -267,7 +275,7 @@ static Int map_image_aboard ( /*OUT*/ImageInfo* ii, HChar* filename ) { struct fat_header* fh_be; struct fat_header fh; struct mach_header_64* mh; - + // Assume initially that we have a thin image, and update // these if it turns out to be fat. ii->macho_img = ii->img; @@ -290,7 +298,7 @@ static Int map_image_aboard ( /*OUT*/ImageInfo* ii, HChar* filename ) + fh.nfat_arch * sizeof(struct fat_arch)) fail("Invalid Mach-O file (1 too small)."); - for (f = 0, arch_be = (struct fat_arch *)(fh_be+1); + for (f = 0, arch_be = (struct fat_arch *)(fh_be+1); f < fh.nfat_arch; f++, arch_be++) { Int cputype; @@ -573,7 +581,7 @@ void modify_macho_loadcmds ( HChar* filename, seg__pagezero->vmaddr = 0; # endif - out: + out: if (ii.img) unmap_image(&ii); } @@ -606,7 +614,7 @@ int main ( int argc, char** argv ) if (argc != 4) fail("args: -stack_addr-arg -stack_size-arg " - "name-of-tool-executable-to-modify"); + "name-of-tool-executable-to-modify"); r= sscanf(argv[1], "0x%llx", &req_stack_addr); if (r != 1) fail("invalid stack_addr arg"); @@ -621,7 +629,7 @@ int main ( int argc, char** argv ) if (!is_plausible_tool_exe_name(argv[3])) fail("implausible tool exe name -- not of the form *-{x86,amd64}-darwin"); - fprintf(stderr, "fixup_macho_loadcmds: examining tool exe: %s\n", + fprintf(stderr, "fixup_macho_loadcmds: examining tool exe: %s\n", argv[3] ); modify_macho_loadcmds( argv[3], req_stack_addr - req_stack_size, req_stack_size ); diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 66430668b..6ed649bc2 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -326,6 +326,10 @@ DebugInfo* alloc_DebugInfo( const HChar* filename ) di->ddump_frames = VG_(clo_debug_dump_frames); } +#if DARWIN_VERS >= DARWIN_11_00 + di->from_memory = False; +#endif + return di; } @@ -1880,6 +1884,62 @@ void VG_(di_notify_pdb_debuginfo)( Int fd_obj, Addr avma_obj, #endif /* defined(VGO_linux) || defined(VGO_darwin) || defined(VGO_solaris) || defined(VGO_freebsd) */ +#if defined(VGO_darwin) && DARWIN_VERS >= DARWIN_11_00 +// Special version of VG_(di_notify_mmap) specifically to read debug info from the DYLD Shared Cache (DSC) +// We only use this on macOS 11.0 and later, because Apple stopped shipping dylib on-disk then. + +ULong VG_(di_notify_dsc)( const HChar* filename, Addr header, SizeT len ) +{ + DebugInfo* di; + Int rw_load_count; + const Bool debug = VG_(debugLog_getLevel)() >= 3; + + if (debug) + VG_(dmsg)("di_notify_dsc-1: %s at %#lx-%#lx\n", filename, header, header+len); + + if (!ML_(check_macho_and_get_rw_loads_from_memory)( (const void*) header, len, &rw_load_count )) + return 0; + + /* See if we have a DebugInfo for this filename. If not, + create one. */ + di = find_or_create_DebugInfo_for( filename ); + vg_assert(di); + + di->from_memory = True; + + if (di->have_dinfo) { + if (debug) + VG_(dmsg)("di_notify_dsc-2x: " + "ignoring mapping because we already read debuginfo " + "for DebugInfo* %p\n", di); + return 0; + } + + if (debug) + VG_(dmsg)("di_notify_dsc-2: " + "noting details in DebugInfo* at %p\n", di); + + /* Note the details about the mapping. */ + DebugInfoMapping map; + map.avma = header; + map.size = len; + map.foff = 0; + map.rx = True; + map.rw = False; + map.ro = False; + VG_(addToXA)(di->fsm.maps, &map); + + /* Update flags about what kind of mappings we've already seen. */ + di->fsm.have_rx_map |= True; + + vg_assert(!di->have_dinfo); + + if (debug) + VG_(dmsg)("di_notify_dsc-3: " + "achieved accept state for %s\n", filename); + return di_notify_ACHIEVE_ACCEPT_STATE ( di ); +} +#endif /*------------------------------------------------------------*/ /*--- ---*/ diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c index 21deabb35..7b5847820 100644 --- a/coregrind/m_debuginfo/image.c +++ b/coregrind/m_debuginfo/image.c @@ -139,8 +139,8 @@ static Bool is_sane_CEnt ( const HChar* who, const DiImage* img, UInt i ) if (!(ce->used <= ce->size)) goto fail; if (ce->fromC) { // ce->size can be anything, but ce->used must be either the - // same or zero, in the case that it hasn't been set yet. - // Similarly, ce->off must either be above the real_size + // same or zero, in the case that it hasn't been set yet. + // Similarly, ce->off must either be above the real_size // threshold, or zero if it hasn't been set yet. if (!(ce->off >= img->real_size || ce->off == 0)) goto fail; if (!(ce->off + ce->used <= img->size)) goto fail; @@ -432,7 +432,7 @@ static Bool parse_Frame_asciiz ( const Frame* fr, const HChar* tag, static Bool parse_Frame_le64_le64_le64_bytes ( const Frame* fr, const HChar* tag, /*OUT*/ULong* n1, /*OUT*/ULong* n2, /*OUT*/ULong* n3, - /*OUT*/UChar** data, /*OUT*/ULong* n_data + /*OUT*/UChar** data, /*OUT*/ULong* n_data ) { vg_assert(VG_(strlen)(tag) == 4); @@ -581,13 +581,15 @@ static void set_CEnt ( const DiImage* img, UInt entNo, DiOffT off ) UInt delay = now - t_last; t_last = now; nread += len; - VG_(printf)("XXXXXXXX (tot %'llu) read %'lu offset %'llu delay %'u\n", + VG_(printf)("XXXXXXXX (tot %'llu) read %'lu offset %'llu delay %'u\n", nread, len, off, delay); } if (img->source.is_local) { // Simple: just read it - + if (img->source.fd == -1) { + VG_(memcpy)(&ce->data[0], ((const char *)img->source.session_id) + off, len); + } else { // PJF not quite so simple - see // https://bugs.kde.org/show_bug.cgi?id=480405 // if img->source.fd was opened with O_DIRECT the memory needs @@ -610,6 +612,7 @@ static void set_CEnt ( const DiImage* img, UInt entNo, DiOffT off ) } #endif vg_assert(!sr_isError(sr)); + } } else { // Not so simple: poke the server vg_assert(img->source.session_id > 0); @@ -671,7 +674,7 @@ static void set_CEnt ( const DiImage* img, UInt entNo, DiOffT off ) end_of_else_clause: {} } - + ce->off = off; ce->used = len; ce->fromC = False; @@ -888,7 +891,7 @@ DiImage* ML_(img_from_local_file)(const HChar* fullpath) || /* size is unrepresentable as a SizeT */ size != (DiOffT)(SizeT)(size)) { VG_(close)(sr_Res(fd)); - return NULL; + return NULL; } DiImage* img = ML_(dinfo_zalloc)("di.image.ML_iflf.1", sizeof(DiImage)); @@ -958,6 +961,39 @@ DiImage* ML_(img_from_fd)(Int fd, const HChar* fullpath) return img; } +/* Create an image from a place in memory, this is to support certain use cases (DSC on macOS) + where images are already loaded in memory without changing every usage of DiImage. */ +DiImage* ML_(img_from_memory)(Addr a, SizeT size, const HChar* fullpath) +{ + if (size == 0 || size == DiOffT_INVALID + || /* size is unrepresentable as a SizeT */ + size != (DiOffT)(SizeT)(size)) { + return NULL; + } + + DiImage* img = ML_(dinfo_zalloc)("di.image.ML_iflf.1", sizeof(DiImage)); + img->source.is_local = True; + img->source.fd = -1; + img->source.session_id = a; // FIXME: hacky, but avoids a new variable + img->size = size; + img->real_size = size; + img->ces_used = 0; + img->source.name = ML_(dinfo_strdup)("di.image.ML_iflf.2", fullpath); + img->cslc = NULL; + img->cslc_size = 0; + img->cslc_used = 0; + + /* Force the zeroth entry to be the first chunk of the file. + That's likely to be the first part that's requested anyway, and + loading it at this point forcing img->cent[0] to always be + non-empty, thereby saving us an is-it-empty check on the fast + path in get(). */ + UInt entNo = alloc_CEnt(img, CACHE_ENTRY_SIZE, False/*!fromC*/); + vg_assert(entNo == 0); + set_CEnt(img, 0, 0); + + return img; +} /* Create an image from a file on a remote debuginfo server. This is @@ -984,7 +1020,7 @@ DiImage* ML_(img_from_di_server)(const HChar* filename, if (!set_blocking(sd)) return NULL; Int one = 1; - Int sr = VG_(setsockopt)(sd, VKI_IPPROTO_TCP, VKI_TCP_NODELAY, + Int sr = VG_(setsockopt)(sd, VKI_IPPROTO_TCP, VKI_TCP_NODELAY, &one, sizeof(one)); vg_assert(sr == 0); @@ -1116,9 +1152,11 @@ void ML_(img_done)(DiImage* img) { vg_assert(img != NULL); if (img->source.is_local) { + if (img->source.fd != -1) { /* Close the file; nothing else to do. */ vg_assert(img->source.session_id == 0); VG_(close)(img->source.fd); + } } else { /* Close the socket. The server can detect this and will scrub the connection when it happens, so there's no need to tell it diff --git a/coregrind/m_debuginfo/priv_storage.h b/coregrind/m_debuginfo/priv_storage.h index c38dfd76f..cd1ac3431 100644 --- a/coregrind/m_debuginfo/priv_storage.h +++ b/coregrind/m_debuginfo/priv_storage.h @@ -1094,6 +1094,12 @@ struct _DebugInfo { This helps performance a lot during ML_(addLineInfo) etc., which can easily be invoked hundreds of thousands of times. */ DebugInfoMapping* last_rx_map; + +#if DARWIN_VERS >= DARWIN_11_00 + /* Indicate that this debug info was loaded from memory (i.e. DSC) + instead than from a file. This means that some data might be missing (e.g. rw data). */ + Bool from_memory; +#endif }; /* --------------------- functions --------------------- */ diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index c15c02372..4a8e8a0d7 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -43,12 +43,12 @@ #include "pub_core_mallocfree.h" #include "pub_core_machine.h" #include "pub_core_ume.h" +#include "pub_core_mach.h" #include "pub_core_options.h" #include "pub_core_tooliface.h" /* VG_TRACK */ #include "pub_core_threadstate.h" /* ThreadArchState */ #include "pub_core_pathscan.h" /* find_executable */ #include "pub_core_initimg.h" /* self */ -#include "pub_core_mach.h" /*====================================================================*/ @@ -98,9 +98,14 @@ static void load_client ( /*OUT*/ExeInfo* info, Also, remove any binding for VALGRIND_LAUNCHER=. The client should not be able to see this. + Before macOS 11: Also, add DYLD_SHARED_REGION=avoid, because V doesn't know how to process the dyld shared cache file. + Since macOS 11: + Use DYLD_SHARED_REGION=use because system libraries aren't provided outside the cache anymore. + This means we need to start processing the dyld shared cache file. + Also, change VYLD_* (mangled by launcher) back to DYLD_*. If this needs to handle any more variables it should be hacked @@ -111,7 +116,11 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname) const HChar* preload_core = "vgpreload_core"; const HChar* ld_preload = "DYLD_INSERT_LIBRARIES="; const HChar* dyld_cache = "DYLD_SHARED_REGION="; +#if DARWIN_VERS >= DARWIN_11_00 + const HChar* dyld_cache_value= "use"; +#else const HChar* dyld_cache_value= "avoid"; +#endif const HChar* v_launcher = VALGRIND_LAUNCHER "="; Int ld_preload_len = VG_(strlen)( ld_preload ); Int dyld_cache_len = VG_(strlen)( dyld_cache ); @@ -194,7 +203,7 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname) *cpp = cp; - ld_preload_done = True; + dyld_cache_done = True; } } @@ -371,8 +380,18 @@ Addr setup_client_stack( void* init_sp, auxsize += 2 * sizeof(HChar **); if (info->executable_path) { stringsize += 1 + VG_(strlen)(info->executable_path); +#if SDK_VERS >= SDK_10_14_6 + stringsize += 16; // executable_path= +#endif } +#if defined(VGA_arm64) + // This is required so that dyld can load our dylib specified in DYLD_INSERT_LIBRARIES +#define EXTRA_APPLE_ARG "arm64e_abi=all" + stringsize += VG_(strlen)(EXTRA_APPLE_ARG) + 1; + auxsize += sizeof(Word); +#endif + /* Darwin mach_header */ if (info->dynamic) auxsize += sizeof(Word); @@ -387,7 +406,7 @@ Addr setup_client_stack( void* init_sp, auxsize + /* auxv */ VG_ROUNDUP(stringsize, sizeof(Word)); /* strings (aligned) */ - if (0) VG_(printf)("stacksize = %d\n", stacksize); + if (0) VG_(printf)("stacksize = %u\n", stacksize); /* client_SP is the client's stack pointer */ client_SP = clstack_end + 1 - stacksize; @@ -409,10 +428,10 @@ Addr setup_client_stack( void* init_sp, VG_(clstk_end) = clstack_end; if (0) - VG_(printf)("stringsize=%d auxsize=%d stacksize=%d maxsize=0x%x\n" + VG_(printf)("stringsize=%u auxsize=%u stacksize=%u maxsize=0x%x\n" "clstack_start %p\n" "clstack_end %p\n", - stringsize, auxsize, stacksize, (Int)clstack_max_size, + stringsize, auxsize, stacksize, (UInt)clstack_max_size, (void*)clstack_start, (void*)clstack_end); /* ==================== allocate space ==================== */ @@ -451,11 +470,25 @@ Addr setup_client_stack( void* init_sp, *ptr = (Addr)copy_str(&strtab, *cpp); *ptr++ = 0; - /* --- executable_path + NULL --- */ - if (info->executable_path) + /* --- executable_path --- */ + if (info->executable_path) { +#if SDK_VERS >= SDK_10_14_6 + Int executable_path_len = VG_(strlen)(info->executable_path) + 16 + 1; + HChar *executable_path = VG_(malloc)("initimg-darwin.scs.1", executable_path_len); + VG_(snprintf)(executable_path, executable_path_len, "executable_path=%s", info->executable_path); + *ptr++ = (Addr)copy_str(&strtab, executable_path); + VG_(free)(executable_path); +#else *ptr++ = (Addr)copy_str(&strtab, info->executable_path); - else - *ptr++ = 0; +#endif + } + // FIXME PJF there was an extra *ptr++ = 0; in an else here + // there is a good chance that executable_path is never NULL so itr was nevwer used + +#if defined(VGA_arm64) + *ptr++ = (Addr)copy_str(&strtab, EXTRA_APPLE_ARG); +#endif + *ptr++ = 0; vg_assert((strtab-stringbase) == stringsize); @@ -470,7 +503,7 @@ Addr setup_client_stack( void* init_sp, } HChar resolved_name[VKI_PATH_MAX]; VG_(realpath)(exe_name, resolved_name); - VG_(resolved_exename) = VG_(strdup)("initimg-darwin.sre.1", resolved_name); + VG_(resolved_exename) = VG_(strdup)("initimg-darwin.scs.2", resolved_name); } /* client_SP is pointing at client's argc/argv */ @@ -675,3 +708,4 @@ void VG_(ii_finalise_image)( IIFinaliseImageInfo iifii ) /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ + diff --git a/coregrind/m_mach/dyld_cache.c b/coregrind/m_mach/dyld_cache.c new file mode 100644 index 000000000..953cccd5f --- /dev/null +++ b/coregrind/m_mach/dyld_cache.c @@ -0,0 +1,504 @@ + +/*--------------------------------------------------------------------*/ +/*--- DYLD Cache dyld_cache.c ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (c) 2020-2025 Louis Brunner + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + The GNU General Public License is contained in the file COPYING. +*/ + +// While dyld_caching as existed for longer than that +// we have used DYLD_SHARED_REGION=avoid in the past +// +// Starting with macOS 11 (Big Sur), it isn't an option anymore +// as some dylib are not provided in file format anymore +#if defined(VGO_darwin) && DARWIN_VERS >= DARWIN_11_00 + +#include "pub_core_debuginfo.h" // VG_(di_notify_dsc) +#include "pub_core_debuglog.h" // VG_(debugLog) +#include "pub_core_mach.h" // VG_(dyld_cache_*) +#include "pub_core_syscall.h" // VG_(do_syscall1) +#include "pub_core_libcbase.h" // VG_(strncmp) +#include "pub_core_libcprint.h" // VG_(dmsg) +#include "pub_core_libcfile.h" // VG_(stat) +#include "vki/vki-scnums-darwin.h" // __NR_shared_region_check_np +#include "priv_dyld_internals.h" // CACHE_MAGIC_*, dyld_cache_header, etc + +// Required by private headers underneath +#include "pub_core_libcassert.h" // vg_assert +#include "pub_core_threadstate.h" // ThreadState + +// FIXME: probably shouldn't include this directly? +#include "m_syswrap/priv_syswrap-generic.h" // ML_(notify_core_and_tool_of_mmap) + +#include +#include + +// Only supported on macOS 11 onwards which is 64bit only +# define MACH_HEADER mach_header_64 +# define MAGIC MH_MAGIC_64 + +static void output_text_debug_info(const dyld_cache_image_text_info* textInfo); +static void output_debug_info(const dyld_cache_header* dyld_cache); + +typedef struct { + const dyld_cache_header* header; + Addr slide; + Bool tried; +} DYLDCache; + +static DYLDCache dyld_cache = { + .header = NULL, + .slide = 0, + .tried = False, +}; + +static Addr calculate_relative(const dyld_cache_header * header, Addr offset) { + return (Addr)header + offset; +} + +static Addr calculate_unslid(Addr addr) { + return addr + dyld_cache.slide; +} + +static int try_to_init_header(Addr address) { + const dyld_cache_header* header = (const dyld_cache_header *) address; + + if ( +#if defined(VGA_amd64) + VG_(strcmp)(header->magic, CACHE_MAGIC_x86_64) != 0 + && VG_(strcmp)(header->magic, CACHE_MAGIC_x86_64_HASWELL) != 0 +#elif defined(VGA_arm64) + VG_(strcmp)(header->magic, CACHE_MAGIC_arm64) != 0 + && VG_(strcmp)(header->magic, CACHE_MAGIC_arm64e) != 0 +#else + 0 +#error "unknown architecture" +#endif + ) { + VG_(debugLog)(2, "dyld_cache", "ERROR: incompatible shared dyld cache (%s)\n", header->magic); + return 0; + } + + if (header->mappingCount < 1) { + VG_(debugLog)(2, "dyld_cache", "ERROR: no mappings in the dyld cache\n"); + return 0; + } + + VG_(debugLog)(2, "dyld_cache", "shared dyld cache format: %d / %#x\n", header->formatVersion, header->mappingOffset); + output_debug_info(header); + + const dyld_cache_mapping_info* mappings = (const dyld_cache_mapping_info*)(calculate_relative(header, header->mappingOffset)); + for (int i = 0; i < header->mappingCount; ++i) { + const dyld_cache_mapping_info* mapping = &mappings[i]; + Addr map_addr = calculate_unslid(mapping->address); + VG_(debugLog)(5, "dyld_cache", + "mapping[%d]{\n" + " .address: %#lx,\n" + " .size: %llu (%#llx),\n" + " .fileOffset: %#lx,\n" + " .maxProt: %#x,\n" + " .initProt: %#x,\n" + "}\n", + i, + map_addr, + mapping->size, + mapping->size, + calculate_relative(header, mapping->fileOffset), + mapping->maxProt, + mapping->initProt + ); + ML_(notify_core_and_tool_of_mmap)(map_addr, mapping->size, mapping->initProt, VKI_MAP_PRIVATE | VKI_MAP_ANONYMOUS, -1, 0); + } + + if (dyld_cache.header->mappingOffset >= __offsetof(dyld_cache_header, dynamicDataMaxSize) && header->dynamicDataMaxSize > 0) { + ML_(notify_core_and_tool_of_mmap)(calculate_relative(header, header->dynamicDataOffset), header->dynamicDataMaxSize, VKI_PROT_READ|VKI_PROT_WRITE, VKI_MAP_PRIVATE | VKI_MAP_ANONYMOUS, -1, 0); + } + + return 1; +} + +static int try_to_init(void) { + // Read address of the shared cache which is mapped in our address space + // and tell Valgrind about it so we avoid false-positives and massive suppression files + { + Addr cache_address; + if (sr_Res(VG_(do_syscall1)(__NR_shared_region_check_np, (UWord)&cache_address)) != 0) { + VG_(debugLog)(2, "dyld_cache", "ERROR: could not get shared dyld cache address\n"); + return 0; + } + VG_(debugLog)(2, "dyld_cache", "shared dyld cache found: %#lx\n", cache_address); + + // FIXME: should be after `try_to_init_header` but we also need the slide calculate _before_ + dyld_cache.header = (const dyld_cache_header *) cache_address; + const dyld_cache_mapping_info* mappings = (const dyld_cache_mapping_info*)(calculate_relative(dyld_cache.header, dyld_cache.header->mappingOffset)); + dyld_cache.slide = cache_address - mappings[0].address; + VG_(debugLog)(2, "dyld_cache", "dyld cache slide: %#lx\n", dyld_cache.slide); + + if (!try_to_init_header(cache_address)) { + return 0; + } + + if (dyld_cache.header->mappingOffset >= __offsetof(dyld_cache_header, subCacheArrayCount)) { + Bool sub_cache_v2 = dyld_cache.header->mappingOffset > __offsetof(dyld_cache_header, cacheSubType); + Addr sub_caches = calculate_relative(dyld_cache.header, dyld_cache.header->subCacheArrayOffset); + + for (int i = 0; i < dyld_cache.header->subCacheArrayCount; ++i) { + Addr sub_cache_addr; + + VG_(debugLog)(2, "dyld_cache", "found sub cache %d (v2: %d)\n", i, sub_cache_v2); + + if (sub_cache_v2) { + const dyld_subcache_entry* sub_cache = &((const dyld_subcache_entry*) sub_caches)[i]; + const uint8_t* u = sub_cache->uuid; + sub_cache_addr = calculate_relative(dyld_cache.header, sub_cache->cacheVMOffset); + VG_(debugLog)(5, "dyld_cache", + "sub_cache_v2[%d]{\n" + " .uuid: %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x,\n" + " .cacheVMOffset: %#lx,\n" + " .fileSuffix: %s,\n" + "}\n", + i, + u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], u[9], u[10], u[11], u[12], u[13], u[14], u[15], + sub_cache_addr, + sub_cache->fileSuffix + ); + + } else { + const dyld_subcache_entry_v1* sub_cache = &((const dyld_subcache_entry_v1*) sub_caches)[i]; + const uint8_t* u = sub_cache->uuid; + sub_cache_addr = calculate_relative(dyld_cache.header, sub_cache->cacheVMOffset); + VG_(debugLog)(5, "dyld_cache", + "sub_cache_v1[%d]{\n" + " .uuid: %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x,\n" + " .cacheVMOffset: %#lx,\n" + "}\n", + i, + u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], u[9], u[10], u[11], u[12], u[13], u[14], u[15], + sub_cache_addr + ); + } + + if (!try_to_init_header(sub_cache_addr)) { + return 0; + } + } + } + } + + return 1; +} + +Addr VG_(dyld_cache_get_slide)(void) { + return dyld_cache.slide; +} + +int ensure_init(void) { + if (dyld_cache.header != NULL) { + return 1; + } + + // FIXME: unlikely race condition? + if (dyld_cache.tried) { + return 0; + } + dyld_cache.tried = True; + + if (!try_to_init()) { + VG_(dmsg)( + "WARNING: could not read from dyld shared cache (DSC)\n" + "Some reports (especially memory leaks) might be missing or incorrect (false-positives)\n" + ); + return 0; + } + // We currently detect if dyld is loading/using a library by checking if stat64 fails. + // However, dyld doesn't seem to call stat64 for all of them anymore. + // All arm64 binaries are executables but some x86 ones might not be so let's avoid them just to be safe. + VG_(dyld_cache_load_library)("/usr/lib/system/libsystem_kernel.dylib"); + VG_(dyld_cache_load_library)("/usr/lib/system/libsystem_pthread.dylib"); + VG_(dyld_cache_load_library)("/usr/lib/system/libsystem_platform.dylib"); + + return 1; +} + +void VG_(dyld_cache_init)(const HChar* tool) { + // drd crashes if you map memory segments in m_main + if (VG_(strcmp)(tool, "drd") == 0) { + return; + } + + ensure_init(); +} + +int VG_(dyld_cache_might_be_in)(const HChar* path) { + // If not init'd, there is no point + if (!ensure_init()) { + return 0; + } + + if (VG_(strncmp)(path, "/usr/lib/", 9) == 0) { + return 1; + } + if (VG_(strncmp)(path, "/System/Library/", 16) == 0) { + return 1; + } + // FIXME: more flexible heuristics around extensions? + return 0; +} + +static struct MACH_HEADER* find_image_text(const dyld_cache_header* header, const char* path, SizeT* len) { + vg_assert(len); + *len = 0; + + const dyld_cache_image_text_info* textInfos = (const dyld_cache_image_text_info*) calculate_relative(header, header->imagesTextOffset); + + for (int i = 0; i < header->imagesTextCount; ++i) { + const dyld_cache_image_text_info* textInfo = &textInfos[i]; + const char* imagePath = (const char*) calculate_relative(header, textInfo->pathOffset); + + if (VG_(strcmp)(imagePath, path) == 0) { + output_text_debug_info(textInfo); + *len = textInfo->textSegmentSize; + return (struct MACH_HEADER*) calculate_unslid(textInfo->loadAddress); + } + } + + return NULL; +} + +int VG_(dyld_cache_load_library)(const HChar* path) { + struct MACH_HEADER *image = NULL; + ULong res = 0; + SizeT len = 0; + + if (VG_(strstr)(path, "/PrivateFrameworks/") != NULL) { + return 0; + } + + // If not init'd, there is no point trying + if (!ensure_init()) { + return 0; + } + + VG_(debugLog)(2, "dyld_cache", "potential dylib to check in the cache: %s\n", path); + + image = find_image_text(dyld_cache.header, path, &len); + if (image == NULL) { + VG_(debugLog)(2, "dyld_cache", "image not found: %s\n", path); + return 0; + } + + if (image->magic != MAGIC) { + VG_(debugLog)(2, "dyld_cache", "image not mach-o (%#x): %s\n", image->magic, path); + return 0; + } + + VG_(debugLog)(2, "dyld_cache", "image (%p) is valid, forwarding to debuginfo: %s\n", image, path); + res = VG_(di_notify_dsc)(path, (Addr)image, len); + if (res == 0) { + VG_(debugLog)(2, "dyld_cache", "failed to load debuginfo from: %s\n", path); + return 0; + } + + VG_(debugLog)(2, "dyld_cache", "image fully loaded: %s\n", path); + + return 1; +} + +static void output_text_debug_info(const dyld_cache_image_text_info* textInfo) { + const uint8_t* u = textInfo->uuid; + VG_(debugLog)(5, "dyld_cache", + "image_text_info{\n" + " .uuid: %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x,\n" + " .loadAddress: %#llx,\n" + " .textSegmentSize: %u,\n" + " .pathOffset: %#x,\n" + "}\n", + u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], + u[9], u[10], u[11], u[12], u[13], u[14], u[15], + textInfo->loadAddress, + textInfo->textSegmentSize, + textInfo->pathOffset + ); +} + +static void output_debug_info(const dyld_cache_header* cache) { + const uint8_t* u1 = cache->uuid; + const uint8_t* u2 = cache->symbolFileUUID; + VG_(debugLog)(5, "dyld_cache", + "shared dyld content: {\n" + " .magic: %s,\n" + " .mappingOffset: %#x,\n" + " .mappingCount: %u,\n" + " .imagesOffsetOld: %#x,\n" + " .imagesCountOld: %u,\n" + " .dyldBaseAddress: %#llx,\n" + " .codeSignatureOffset: %#llx,\n" + " .codeSignatureSize: %llu,\n" + " .slideInfoOffsetUnused: %#llx,\n" + " .slideInfoSizeUnused: %llu,\n" + " .localSymbolsOffset: %#llx,\n" + " .localSymbolsSize: %llu,\n" + " .uuid: %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x,\n" + " .cacheType: %llu,\n" + " .branchPoolsOffset: %#x,\n" + " .branchPoolsCount: %u,\n" + " .dyldInCacheMH: %#llx,\n" + " .dyldInCacheEntry: %#llx,\n" + " .imagesTextOffset: %#llx,\n" + " .imagesTextCount: %llu,\n" + " .patchInfoAddr: %#llx,\n" + " .patchInfoSize: %llu,\n" + " .otherImageGroupAddrUnused: %#llx,\n" + " .otherImageGroupSizeUnused: %llu,\n" + " .progClosuresAddr: %#llx,\n" + " .progClosuresSize: %llu,\n" + " .progClosuresTrieAddr: %#llx,\n" + " .progClosuresTrieSize: %llu,\n" + " .platform: %#x,\n" + " .formatVersion: %#x,\n" + " .dylibsExpectedOnDisk: %d,\n" + " .simulator: %d,\n" + " .locallyBuiltCache: %d,\n" + " .builtFromChainedFixups: %d,\n" + " .padding: %d,\n" + " .sharedRegionStart: %#llx,\n" + " .sharedRegionSize: %llu,\n" + " .maxSlide: %#llx,\n" + " .dylibsImageArrayAddr: %#llx,\n" + " .dylibsImageArraySize: %llu,\n" + " .dylibsTrieAddr: %#llx,\n" + " .dylibsTrieSize: %llu,\n" + " .otherImageArrayAddr: %#llx,\n" + " .otherImageArraySize: %llu,\n" + " .otherTrieAddr: %#llx,\n" + " .otherTrieSize: %llu,\n" + " .mappingWithSlideOffset: %#x,\n" + " .mappingWithSlideCount: %u,\n" + " .dylibsPBLStateArrayAddrUnused: %llu,\n" + " .dylibsPBLSetAddr: %llx,\n" + " .programsPBLSetPoolAddr: %#llx,\n" + " .programsPBLSetPoolSize: %llu,\n" + " .programTrieAddr: %#llx,\n" + " .programTrieSize: %u,\n" + " .osVersion: %#x,\n" + " .altPlatform: %#x,\n" + " .altOsVersion: %#x,\n" + " .swiftOptsOffset: %#llx,\n" + " .swiftOptsSize: %llu,\n" + " .subCacheArrayOffset: %#x,\n" + " .subCacheArrayCount: %u,\n" + " .symbolFileUUID: %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x,\n" + " .rosettaReadOnlyAddr: %#llx,\n" + " .rosettaReadOnlySize: %llu,\n" + " .rosettaReadWriteAddr: %#llx,\n" + " .rosettaReadWriteSize: %llu,\n" + " .imagesOffset: %#x,\n" + " .imagesCount: %u,\n" + " .cacheSubType: %#x,\n" + " .objcOptsOffset: %#llx,\n" + " .objcOptsSize: %llu,\n" + " .cacheAtlasOffset: %#llx,\n" + " .cacheAtlasSize: %llu,\n" + " .dynamicDataOffset: %#llx,\n" + " .dynamicDataMaxSize: %llu,\n" + "}\n", + cache->magic, + cache->mappingOffset, + cache->mappingCount, + cache->imagesOffsetOld, + cache->imagesCountOld, + cache->dyldBaseAddress, + cache->codeSignatureOffset, + cache->codeSignatureSize, + cache->slideInfoOffsetUnused, + cache->slideInfoSizeUnused, + cache->localSymbolsOffset, + cache->localSymbolsSize, + u1[0], u1[1], u1[2], u1[3], u1[4], u1[5], u1[6], u1[7], u1[8], + u1[9], u1[10], u1[11], u1[12], u1[13], u1[14], u1[15], + cache->cacheType, + cache->branchPoolsOffset, + cache->branchPoolsCount, + cache->dyldInCacheMH, + cache->dyldInCacheEntry, + cache->imagesTextOffset, + cache->imagesTextCount, + cache->patchInfoAddr, + cache->patchInfoSize, + cache->otherImageGroupAddrUnused, + cache->otherImageGroupSizeUnused, + cache->progClosuresAddr, + cache->progClosuresSize, + cache->progClosuresTrieAddr, + cache->progClosuresTrieSize, + cache->platform, + (UInt)cache->formatVersion, + cache->dylibsExpectedOnDisk, + cache->simulator, + cache->locallyBuiltCache, + cache->builtFromChainedFixups, + cache->padding, + cache->sharedRegionStart, + cache->sharedRegionSize, + cache->maxSlide, + cache->dylibsImageArrayAddr, + cache->dylibsImageArraySize, + cache->dylibsTrieAddr, + cache->dylibsTrieSize, + cache->otherImageArrayAddr, + cache->otherImageArraySize, + cache->otherTrieAddr, + cache->otherTrieSize, + cache->mappingWithSlideOffset, + cache->mappingWithSlideCount, + cache->dylibsPBLStateArrayAddrUnused, + cache->dylibsPBLSetAddr, + cache->programsPBLSetPoolAddr, + cache->programsPBLSetPoolSize, + cache->programTrieAddr, + cache->programTrieSize, + cache->osVersion, + cache->altPlatform, + cache->altOsVersion, + cache->swiftOptsOffset, + cache->swiftOptsSize, + cache->subCacheArrayOffset, + cache->subCacheArrayCount, + u2[0], u2[1], u2[2], u2[3], u2[4], u2[5], u2[6], u2[7], u2[8], + u2[9], u2[10], u2[11], u2[12], u2[13], u2[14], u2[15], + cache->rosettaReadOnlyAddr, + cache->rosettaReadOnlySize, + cache->rosettaReadWriteAddr, + cache->rosettaReadWriteSize, + cache->imagesOffset, + cache->imagesCount, + cache->cacheSubType, + cache->objcOptsOffset, + cache->objcOptsSize, + cache->cacheAtlasOffset, + cache->cacheAtlasSize, + cache->dynamicDataOffset, + cache->dynamicDataMaxSize + ); +} + +#endif diff --git a/coregrind/m_mach/priv_dyld_internals.h b/coregrind/m_mach/priv_dyld_internals.h new file mode 100644 index 000000000..32c31f9f9 --- /dev/null +++ b/coregrind/m_mach/priv_dyld_internals.h @@ -0,0 +1,146 @@ +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (c) 2020-2025 Louis Brunner + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + The GNU General Public License is contained in the file COPYING. +*/ +#ifndef __PRIV_DYLD_INTERNALS_H +#define __PRIV_DYLD_INTERNALS_H + +#if defined(VGO_darwin) + +// This file contains a bunch of structure defined in Apple's dyld + +// From Apple's `dyld/dyld/SharedCacheRuntime.cpp` +#define CACHE_MAGIC_x86_64 "dyld_v1 x86_64" +#define CACHE_MAGIC_x86_64_HASWELL "dyld_v1 x86_64h" +#define CACHE_MAGIC_arm64 "dyld_v1 arm64" +#define CACHE_MAGIC_arm64e "dyld_v1 arm64e" + +// From Apple's `dyld/cache-builder/dyld_cache_format.h` +typedef struct { + char magic[16]; // e.g. "dyld_v0 i386" + uint32_t mappingOffset; // file offset to first dyld_cache_mapping_info + uint32_t mappingCount; // number of dyld_cache_mapping_info entries + uint32_t imagesOffsetOld; // UNUSED: moved to imagesOffset to prevent older dsc_extarctors from crashing + uint32_t imagesCountOld; // UNUSED: moved to imagesCount to prevent older dsc_extarctors from crashing + uint64_t dyldBaseAddress; // base address of dyld when cache was built + uint64_t codeSignatureOffset; // file offset of code signature blob + uint64_t codeSignatureSize; // size of code signature blob (zero means to end of file) + uint64_t slideInfoOffsetUnused; // unused. Used to be file offset of kernel slid info + uint64_t slideInfoSizeUnused; // unused. Used to be size of kernel slid info + uint64_t localSymbolsOffset; // file offset of where local symbols are stored + uint64_t localSymbolsSize; // size of local symbols information + uint8_t uuid[16]; // unique value for each shared cache file + uint64_t cacheType; // 0 for development, 1 for production, 2 for multi-cache + uint32_t branchPoolsOffset; // file offset to table of uint64_t pool addresses + uint32_t branchPoolsCount; // number of uint64_t entries + uint64_t dyldInCacheMH; // (unslid) address of mach_header of dyld in cache + uint64_t dyldInCacheEntry; // (unslid) address of entry point (_dyld_start) of dyld in cache + uint64_t imagesTextOffset; // file offset to first dyld_cache_image_text_info + uint64_t imagesTextCount; // number of dyld_cache_image_text_info entries + uint64_t patchInfoAddr; // (unslid) address of dyld_cache_patch_info + uint64_t patchInfoSize; // Size of all of the patch information pointed to via the dyld_cache_patch_info + uint64_t otherImageGroupAddrUnused; // unused + uint64_t otherImageGroupSizeUnused; // unused + uint64_t progClosuresAddr; // (unslid) address of list of program launch closures + uint64_t progClosuresSize; // size of list of program launch closures + uint64_t progClosuresTrieAddr; // (unslid) address of trie of indexes into program launch closures + uint64_t progClosuresTrieSize; // size of trie of indexes into program launch closures + uint32_t platform; // platform number (macOS=1, etc) + uint32_t formatVersion : 8, // dyld3::closure::kFormatVersion + dylibsExpectedOnDisk : 1, // dyld should expect the dylib exists on disk and to compare inode/mtime to see if cache is valid + simulator : 1, // for simulator of specified platform + locallyBuiltCache : 1, // 0 for B&I built cache, 1 for locally built cache + builtFromChainedFixups : 1, // some dylib in cache was built using chained fixups, so patch tables must be used for overrides + padding : 20; // TBD + uint64_t sharedRegionStart; // base load address of cache if not slid + uint64_t sharedRegionSize; // overall size required to map the cache and all subCaches, if any + uint64_t maxSlide; // runtime slide of cache can be between zero and this value + uint64_t dylibsImageArrayAddr; // (unslid) address of ImageArray for dylibs in this cache + uint64_t dylibsImageArraySize; // size of ImageArray for dylibs in this cache + uint64_t dylibsTrieAddr; // (unslid) address of trie of indexes of all cached dylibs + uint64_t dylibsTrieSize; // size of trie of cached dylib paths + uint64_t otherImageArrayAddr; // (unslid) address of ImageArray for dylibs and bundles with dlopen closures + uint64_t otherImageArraySize; // size of ImageArray for dylibs and bundles with dlopen closures + uint64_t otherTrieAddr; // (unslid) address of trie of indexes of all dylibs and bundles with dlopen closures + uint64_t otherTrieSize; // size of trie of dylibs and bundles with dlopen closures + uint32_t mappingWithSlideOffset; // file offset to first dyld_cache_mapping_and_slide_info + uint32_t mappingWithSlideCount; // number of dyld_cache_mapping_and_slide_info entries + uint64_t dylibsPBLStateArrayAddrUnused; // unused + uint64_t dylibsPBLSetAddr; // (unslid) address of PrebuiltLoaderSet of all cached dylibs + uint64_t programsPBLSetPoolAddr; // (unslid) address of pool of PrebuiltLoaderSet for each program + uint64_t programsPBLSetPoolSize; // size of pool of PrebuiltLoaderSet for each program + uint64_t programTrieAddr; // (unslid) address of trie mapping program path to PrebuiltLoaderSet + uint32_t programTrieSize; + uint32_t osVersion; // OS Version of dylibs in this cache for the main platform + uint32_t altPlatform; // e.g. iOSMac on macOS + uint32_t altOsVersion; // e.g. 14.0 for iOSMac + uint64_t swiftOptsOffset; // VM offset from cache_header* to Swift optimizations header + uint64_t swiftOptsSize; // size of Swift optimizations header + uint32_t subCacheArrayOffset; // file offset to first dyld_subcache_entry + uint32_t subCacheArrayCount; // number of subCache entries + uint8_t symbolFileUUID[16]; // unique value for the shared cache file containing unmapped local symbols + uint64_t rosettaReadOnlyAddr; // (unslid) address of the start of where Rosetta can add read-only/executable data + uint64_t rosettaReadOnlySize; // maximum size of the Rosetta read-only/executable region + uint64_t rosettaReadWriteAddr; // (unslid) address of the start of where Rosetta can add read-write data + uint64_t rosettaReadWriteSize; // maximum size of the Rosetta read-write region + uint32_t imagesOffset; // file offset to first dyld_cache_image_info + uint32_t imagesCount; // number of dyld_cache_image_info entries + uint32_t cacheSubType; // 0 for development, 1 for production, when cacheType is multi-cache(2) + uint64_t objcOptsOffset; // VM offset from cache_header* to ObjC optimizations header + uint64_t objcOptsSize; // size of ObjC optimizations header + uint64_t cacheAtlasOffset; // VM offset from cache_header* to embedded cache atlas for process introspection + uint64_t cacheAtlasSize; // size of embedded cache atlas + uint64_t dynamicDataOffset; // VM offset from cache_header* to the location of dyld_cache_dynamic_data_header + uint64_t dynamicDataMaxSize; // maximum size of space reserved from dynamic data +} dyld_cache_header; + +// From Apple's `dyld/cache-builder/dyld_cache_format.h` +typedef struct { + uint64_t address; + uint64_t size; + uint64_t fileOffset; + uint32_t maxProt; + uint32_t initProt; +} dyld_cache_mapping_info; + +// From Apple's `dyld/cache-builder/dyld_cache_format.h` +typedef struct { + uint8_t uuid[16]; // The UUID of the subCache file + uint64_t cacheVMOffset; // The offset of this subcache from the main cache base address + char fileSuffix[32]; // The file name suffix of the subCache file e.g. ".25.data", ".03.development" +} dyld_subcache_entry; + +// From Apple's `dyld/cache-builder/dyld_cache_format.h` +typedef struct { + uint8_t uuid[16]; // The UUID of the subCache file + uint64_t cacheVMOffset; // The offset of this subcache from the main cache base address +} dyld_subcache_entry_v1; + +// From Apple's `dyld/cache-builder/dyld_cache_format.h` +typedef struct { + uuid_t uuid; + uint64_t loadAddress; // unslid address of start of __TEXT + uint32_t textSegmentSize; + uint32_t pathOffset; // offset from start of cache file +} dyld_cache_image_text_info; + +#endif + +#endif diff --git a/coregrind/m_main.c b/coregrind/m_main.c index ecd159e97..0bd929d0c 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -1970,6 +1970,18 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) VG_(init_Threads)(); + //-------------------------------------------------------------- + // Initialize the dyld cache, which is required with macOS 11 (Big Sur) and onwards + // as some system libraries aren't provided on the disk anymore + // p: none + // Note: some tools don't like to start mapping memory right way, so we do it lazily in those cases. + //-------------------------------------------------------------- +# if defined(VGO_darwin) && DARWIN_VERS >= DARWIN_11_00 + if (the_iifii.dynamic) { + VG_(dyld_cache_init)(VG_(clo_toolname)); + } +# endif + //-------------------------------------------------------------- // Initialise the scheduler (phase 1) [generates tid_main] // p: none, afaics diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 7d92450c4..12b01f678 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -455,6 +455,19 @@ extern int * __error(void) __attribute__((weak)); ALLOC_or_NULL(SO_SYN_MALLOC, malloc, malloc); ZONEALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_zone_malloc, malloc); ZONEALLOC_or_NULL(SO_SYN_MALLOC, malloc_zone_malloc, malloc); +#if DARWIN_VERS >= DARWIN_15_00 +#if defined(VGA_arm64) + // on arm64, malloc_type_malloc is used for malloc, new and new[] + // __typed_operator_new_impl[abi:ne180100]@libc++abi.dylib calls it for new and new[] + // all other usages (Swift, ObjC, C) it calls it for malloc + // this matters as we need to put the right tag in the allocation + // otherwise the tool might report a mismatch between allocation func and free func + TYPE_ALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_type_malloc); +#else + ALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_type_malloc, malloc); +#endif + ZONEALLOC_or_NULL(VG_Z_LIBC_SONAME, malloc_type_zone_malloc, malloc); +#endif #elif defined(VGO_solaris) ALLOC_or_NULL(VG_Z_LIBSTDCXX_SONAME, malloc, malloc); @@ -943,6 +956,8 @@ extern int * __error(void) __attribute__((weak)); #elif defined(VGO_darwin) FREE(VG_Z_LIBC_SONAME, free, free ); FREE(SO_SYN_MALLOC, free, free ); + FREE(VG_Z_LIBC_SONAME, vfree, free ); + FREE(SO_SYN_MALLOC, vfree, free ); ZONEFREE(VG_Z_LIBC_SONAME, malloc_zone_free, free ); ZONEFREE(SO_SYN_MALLOC, malloc_zone_free, free ); @@ -2156,8 +2171,9 @@ extern int * __error(void) __attribute__((weak)); POSIX_MEMALIGN(SO_SYN_MALLOC, posix_memalign); #elif defined(VGO_darwin) -#if (DARWIN_VERSIO >= DARWIN_10_6) +#if (DARWIN_VERS >= DARWIN_10_6) POSIX_MEMALIGN(VG_Z_LIBC_SONAME, posix_memalign); + POSIX_MEMALIGN(SO_SYN_MALLOC, posix_memalign); #endif #elif defined(VGO_solaris) @@ -2326,7 +2342,7 @@ extern int * __error(void) __attribute__((weak)); ALIGNED_ALLOC(SO_SYN_MALLOC, aligned_alloc); #elif defined(VGO_darwin) - //ALIGNED_ALLOC(VG_Z_LIBC_SONAME, aligned_alloc); + ALIGNED_ALLOC(VG_Z_LIBC_SONAME, aligned_alloc); #elif defined(VGO_solaris) ALIGNED_ALLOC(VG_Z_LIBC_SONAME, aligned_alloc); @@ -2495,6 +2511,17 @@ static size_t my_malloc_size ( void* zone, void* ptr ) return res; } +#define ZONE_DESTROY(soname, fnname) \ + \ + void VG_REPLACE_FUNCTION_EZU(10291,soname,fnname)(void* zone); \ + void VG_REPLACE_FUNCTION_EZU(10291,soname,fnname)(void* zone) \ + { \ + TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(zone); \ + } + +ZONE_DESTROY(VG_Z_LIBC_SONAME, malloc_zone_destroy); +ZONE_DESTROY(SO_SYN_MALLOC, malloc_zone_destroy); + /* Note that the (void*) casts below are a kludge which stops compilers complaining about the fact that the replacement functions aren't really of the right type. */ @@ -2507,7 +2534,7 @@ static vki_malloc_zone_t vg_default_zone = { (void*)VG_REPLACE_FUNCTION_EZU(10130,VG_Z_LIBC_SONAME,malloc_zone_valloc), (void*)VG_REPLACE_FUNCTION_EZU(10040,VG_Z_LIBC_SONAME,malloc_zone_free), (void*)VG_REPLACE_FUNCTION_EZU(10080,VG_Z_LIBC_SONAME,malloc_zone_realloc), - NULL, // GrP fixme: destroy + (void*)VG_REPLACE_FUNCTION_EZU(10291,VG_Z_LIBC_SONAME,malloc_zone_destroy), "ValgrindMallocZone", NULL, // batch_malloc NULL, // batch_free diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index 7ffc4f88f..f30136e29 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -362,7 +362,9 @@ DECL_TEMPLATE(darwin, gettid); // 286 // NYI mkfifo_extended 291 // NYI mkdir_extended 292 // NYI identitysvc 293 -// NYI shared_region_check_np 294 +#if DARWIN_VERS >= DARWIN_11_00 +DECL_TEMPLATE(darwin, shared_region_check_np); // 294 +#endif // NYI shared_region_map_np 295 #if DARWIN_VERS >= DARWIN_10_6 // NYI vm_pressure_monitor 296 @@ -540,7 +542,9 @@ DECL_TEMPLATE(darwin, fileport_makeport); // 430 // NYI pid_shutdown_sockets 436 #endif /* DARWIN_VERS >= DARWIN_10_10 */ // old old shared_region_slide_np 437 -// NYI shared_region_map_and_slide_np // 438 +#if DARWIN_VERS >= DARWIN_11_00 +DECL_TEMPLATE(darwin, shared_region_map_and_slide_np); // 438 +#endif // NYI kas_info // 439 // NYI memorystatus_control // 440 DECL_TEMPLATE(darwin, guarded_open_np); // 441 @@ -655,6 +659,19 @@ DECL_TEMPLATE(darwin, abort_with_payload); // 521 // NYI log_data // 533 // NYI memorystatus_available_memory // 534 #endif +#if DARWIN_VERS >= DARWIN_11_00 +DECL_TEMPLATE(darwin, objc_bp_assist_cfg_np); // 535 +// NYI shared_region_map_and_slide_2_np // 536 +// NYI pivot_root // 537 +// NYI task_inspect_for_pid // 538 +DECL_TEMPLATE(darwin, task_read_for_pid); // 539 +// NYI sys_preadv // 540 +// NYI sys_pwritev // 541 +// NYI sys_preadv_nocancel // 542 +// NYI sys_pwritev_nocancel // 543 +DECL_TEMPLATE(darwin, ulock_wait2); // 544 +// NYI proc_info_extended_id // 545 +#endif // Mach message helpers DECL_TEMPLATE(darwin, mach_port_set_context); diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 09c1338cf..25ac11eac 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -44,6 +44,7 @@ #include "pub_core_libcprint.h" #include "pub_core_libcproc.h" #include "pub_core_libcsignal.h" +#include "pub_core_mach.h" // VG_(dyld_cache_*) #include "pub_core_machine.h" // VG_(get_SP) #include "pub_core_mallocfree.h" #include "pub_core_options.h" @@ -3312,10 +3313,34 @@ PRE(stat64) PRE_REG_READ2(long, "stat", const char *,path, struct stat64 *,buf); PRE_MEM_RASCIIZ("stat64(path)", ARG1); PRE_MEM_WRITE( "stat64(buf)", ARG2, sizeof(struct vki_stat64) ); + +#if DARWIN_VERS >= DARWIN_11_00 + // Starting with macOS 11.0, some system libraries are not provided on the disk but only though + // shared dyld cache, thus we try to detect if dyld tried (and failed) to load a dylib, + // in which case we do the same thing as dyld and load the info from the cache directly + // + // This is our entry point for checking a particular dylib: if it looks like one, + // we want to see the error result, if any, and subsequently check the cache + if (ARG1 != 0 && VG_(dyld_cache_might_be_in)((HChar *)ARG1)) { + *flags |= SfPostOnFail; + } +#endif } POST(stat64) { - POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) ); + if (SUCCESS) { + POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) ); + } + +#if DARWIN_VERS >= DARWIN_11_00 + if (SUCCESS || (FAILURE && ERR == VKI_ENOENT)) { + // It failed and `SfPostOnFail` was set, thus this is probably a dylib, + // try to load it from cache which will call VG_(di_notify_mmap) like the previous versions did + if (VG_(dyld_cache_load_library)((HChar *)ARG1)) { + ML_(sync_mappings)("after", "stat64", 0); + } + } +#endif } PRE(lstat64) @@ -11082,6 +11107,109 @@ POST(kernelrpc_mach_port_type_trap) #endif /* DARWIN_VERS >= DARWIN_10_15 */ + +/* --------------------------------------------------------------------- + Added for macOS 11.0 (Big Sur) + ------------------------------------------------------------------ */ + +#if DARWIN_VERS >= DARWIN_11_00 + +#define DYLD_VM_END_MWL (-1ull) + +PRE(shared_region_check_np) +{ + // Special value used by dyld to forbid further uses of map_with_linking_np on macOS 13+ + Bool special_call = DARWIN_VERS >= DARWIN_13_00 && ARG1 == DYLD_VM_END_MWL; + + if (special_call) { + PRINT("shared_region_check_np(disable_map_with_linking)"); + } else { + PRINT("shared_region_check_np(%#lx)", ARG1); + } + PRE_REG_READ1(kern_return_t, "shared_region_check_np", uint64_t*, start_address); + + if (!special_call) { + PRE_MEM_WRITE("shared_region_check_np(start_address)", ARG1, sizeof(uint64_t)); +} +} + +POST(shared_region_check_np) +{ + Bool special_call = DARWIN_VERS >= DARWIN_13_00 && ARG1 == DYLD_VM_END_MWL; + + if (special_call) { + return; + } + + if (RES == 0) { + POST_MEM_WRITE(ARG1, sizeof(uint64_t)); + PRINT("shared dyld cache %#llx", *((uint64_t*) ARG1)); + } +} + +PRE(shared_region_map_and_slide_np) +{ + PRINT("shared_region_map_and_slide_np(%ld, %lu, %#lx, %lu, %#lx, %lu)", SARG1, ARG2, ARG3, ARG4, ARG5, ARG6); + PRE_REG_READ6(kern_return_t, "shared_region_map_and_slide_np", + int, fd, uint32_t, count, const struct shared_file_mapping_np*, mappings, + uint32_t, slide, uint64_t*, slide_start, uint32_t, slide_size); +} + +PRE(task_read_for_pid) +{ + PRINT("task_read_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), SARG2, ARG3); + PRE_REG_READ3(kern_return_t, "task_read_for_pid", mach_port_name_t, target_tport, int, pid, mach_port_name_t*, t); + + if (ARG3 != 0) { + PRE_MEM_WRITE("task_read_for_pid(t)", ARG3, sizeof(mach_port_name_t)); + } +} + +POST(task_read_for_pid) +{ + if (RES == 0 && ARG3 != 0) { + POST_MEM_WRITE(ARG3, sizeof(mach_port_name_t)); + PRINT("-> t:%s", name_for_port(*(mach_port_name_t*)ARG3)); + } +} + +PRE(ulock_wait2) +{ + PRINT("ulock_wait2(%ld, %#lx, %ld, %#lx, %ld)", + SARG1, ARG2, SARG3, ARG4, SARG5); + PRE_REG_READ5(int, "ulock_wait2", + uint32_t, operation, void*, addr, uint64_t, value, + uint32_t, timeout, uint64_t, value2); + Int value_size = 4; + if (ARG1 == VKI_UL_COMPARE_AND_WAIT64 + || ARG1 == VKI_UL_COMPARE_AND_WAIT64_SHARED + || ARG1 == VKI_UL_COMPARE_AND_WAIT_SHARED) { + value_size = 8; + } + if (ARG2 != 0) { + PRE_MEM_READ("ulock_wait2(addr)", ARG2, value_size); + *flags |= SfMayBlock; + } else { + SET_STATUS_Failure( VKI_EINVAL ); + } +} + +#if defined(VGA_arm64) +PRE(sys_crossarch_trap) +{ + PRINT("sys_crossarch_trap(%lu)", ARG1); + PRE_REG_READ1(kern_return_t, "sys_crossarch_trap", uint32_t, name); +} + +PRE(objc_bp_assist_cfg_np) +{ + PRINT("objc_bp_assist_cfg_np(%#lx, %#lx)", ARG1, ARG2); +} +#endif + +#endif /* DARWIN_VERS >= DARWIN_11_00 */ + + /* --------------------------------------------------------------------- syscall tables ------------------------------------------------------------------ */ @@ -11433,7 +11561,9 @@ const SyscallTableEntry ML_(syscall_table)[] = { // _____(__NR_mkfifo_extended), // _____(__NR_mkdir_extended), // _____(__NR_identitysvc), -// _____(__NR_shared_region_check_np), +#if DARWIN_VERS >= DARWIN_11_00 + MACXY(__NR_shared_region_check_np, shared_region_check_np), // 294 +#endif // _____(__NR_shared_region_map_np), #if DARWIN_VERS >= DARWIN_10_6 // _____(__NR_vm_pressure_monitor), @@ -11620,7 +11750,9 @@ const SyscallTableEntry ML_(syscall_table)[] = { _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(435)), // ??? _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(436)), // ??? _____(VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(437)), // ??? -// _____(__NR_shared_region_map_and_slide_np), // 438 +#if DARWIN_VERS >= DARWIN_11_00 + MACX_(__NR_shared_region_map_and_slide_np, shared_region_map_and_slide_np), // 438 +#endif // _____(__NR_kas_info), // 439 // _____(__NR_memorystatus_control), // 440 MACX_(__NR_guarded_open_np, guarded_open_np), @@ -11714,6 +11846,22 @@ const SyscallTableEntry ML_(syscall_table)[] = { // _____(__NR_log_data), // 533 // _____(__NR_memorystatus_available_memory), // 534 #endif +#if DARWIN_VERS >= DARWIN_11_00 +#if defined(VGP_arm64_darwin) + MACX_(__NR_objc_bp_assist_cfg_np, objc_bp_assist_cfg_np), // 535 +#endif +// _____(__NR_shared_region_map_and_slide_2_np), // 536 +// _____(__NR_pivot_root), // 537 +// _____(__NR_task_inspect_for_pid), // 538 + MACXY(__NR_task_read_for_pid, task_read_for_pid), // 539 +// _____(__NR_sys_preadv), // 540 +// _____(__NR_sys_pwritev), // 541 +// _____(__NR_sys_preadv_nocancel), // 542 +// _____(__NR_sys_pwritev_nocancel), // 543 + MACX_(__NR_ulock_wait2, ulock_wait2), // 544 +// _____(__NR_proc_info_extended_id), // 545 +#endif + MACX_(__NR_darwin_fake_sigreturn, fake_sigreturn) }; diff --git a/coregrind/pub_core_debuginfo.h b/coregrind/pub_core_debuginfo.h index ad484c4c2..68ffed841 100644 --- a/coregrind/pub_core_debuginfo.h +++ b/coregrind/pub_core_debuginfo.h @@ -76,6 +76,10 @@ extern void VG_(di_notify_pdb_debuginfo)( Int fd, Addr avma, extern void VG_(di_notify_vm_protect)( Addr a, SizeT len, UInt prot ); #endif +#if defined(VGO_darwin) && DARWIN_VERS >= DARWIN_11_00 +extern ULong VG_(di_notify_dsc)( const HChar* path, Addr header, SizeT len ); +#endif + extern void VG_(addr_load_di)( Addr a ); extern void VG_(di_load_di)( DebugInfo *di ); diff --git a/coregrind/pub_core_initimg.h b/coregrind/pub_core_initimg.h index 40ef71d04..dcb45cf87 100644 --- a/coregrind/pub_core_initimg.h +++ b/coregrind/pub_core_initimg.h @@ -117,6 +117,9 @@ struct _IIFinaliseImageInfo { Addr initial_client_SP; /* ------ Per-OS fields ------ */ Addr initial_client_IP; +#if defined(VGO_darwin) + Bool dynamic; /* False iff executable is static */ +#endif }; /* ------------------------- Solaris ------------------------- */ diff --git a/darwin-drd.supp b/darwin-drd.supp index 35f036ca0..ec0957139 100644 --- a/darwin-drd.supp +++ b/darwin-drd.supp @@ -441,3 +441,10 @@ ... fun:ds_user_byuid } + +{ + macOS1100:_os_semaphore_wait.cold.1 + drd:ConflictingAccess + fun:_os_semaphore_wait.cold.1 +} + diff --git a/darwin-helgrind.supp b/darwin-helgrind.supp index 1bd417523..2ce7d73bf 100644 --- a/darwin-helgrind.supp +++ b/darwin-helgrind.supp @@ -216,3 +216,17 @@ ... fun:lookUpImpOrForward } + +{ + maxOS1100:dlopen_internal + Helgrind:Race + ... + fun:dlopen_internal +} + +{ + macOS1100::__CFInitialize + Helgrind:Race + ... + fun:__CFInitialize +} diff --git a/darwin.supp b/darwin.supp index f256a3a06..1e05044fa 100644 --- a/darwin.supp +++ b/darwin.supp @@ -796,3 +796,30 @@ fun:_mh_execute_header } +{ + macOS1100:_dyld_start + Memcheck:Addr8 + ... + fun:_dyld_start +} + +{ + macOS1100:_dyld_start + Memcheck:Addr4 + ... + fun:_dyld_start +} + +{ + macOS1100:__chkstk_darwin_probe + Memcheck:Addr1 + fun:__chkstk_darwin_probe +} + +{ + macOS1100:_dyld_start + Memcheck:Addr1 + ... + fun:_dyld_start +} + diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index cc6698ea0..aa1948463 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -7,6 +7,7 @@ dist_noinst_SCRIPTS = \ filter_xml \ filter_fiw \ filter_freebsd.awk \ + filter_darwin.awk \ filter_stderr_freebsd \ filter_bug392331 diff --git a/helgrind/tests/filter_darwin.awk b/helgrind/tests/filter_darwin.awk new file mode 100644 index 000000000..b6c3c6c26 --- /dev/null +++ b/helgrind/tests/filter_darwin.awk @@ -0,0 +1,152 @@ +/pthread_create_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_create \(hg_intercepts.c/)) { + print " by 0x........: pthread_create@* (hg_intercepts.c:...)"; + print; + } else { + sub(/pthread_create/, "pthread_create@*"); + print; + } + next; +} +/pthread_cond_timedwait_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_cond_timedwait \(hg_intercepts.c/)) { + print " by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)"; + print; + } else { + sub(/pthread_cond_timedwait/, "pthread_cond_timedwait@*"); + print; + } + next; +} +/pthread_cond_wait_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_cond_wait \(hg_intercepts.c/)) { + print " by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)"; + print; + } else { + sub(/pthread_cond_wait/, "pthread_cond_wait@*"); + print; + } + next; +} +/pthread_cond_destroy_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_cond_destroy \(hg_intercepts.c/)) { + print " by 0x........: pthread_cond_destroy@* (hg_intercepts.c:...)"; + print; + } else { + sub(/pthread_cond_destroy/, "pthread_cond_destroy@*"); + print; + } + next; +} +/pthread_cond_signal_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_cond_signal \(hg_intercepts.c/)) { + print " by 0x........: pthread_cond_signal (hg_intercepts.c:...)"; + print; + } else { + print; + } + next; +} +/mutex_lock_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_mutex_lock \(hg_intercepts.c/)) { + print " by 0x........: pthread_mutex_lock (hg_intercepts.c:...)"; + print; + } else { + print; + } + next; +} +/mutex_unlock_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_mutex_unlock \(hg_intercepts.c/)) { + print " by 0x........: pthread_mutex_unlock (hg_intercepts.c:...)"; + print; + } else { + print; + } + next; +} +/pthread_rwlock_unlock_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_rwlock_unlock \(hg_intercepts.c/)) { + print " by 0x........: pthread_rwlock_unlock (hg_intercepts.c:...)"; + if (!match($0, /pthread_rwlock_unlock\*/)) { + print; + } + } else { + print; + } + next; +} +/pthread_rwlock_init_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /pthread_rwlock_init \(hg_intercepts.c/)) { + print " by 0x........: pthread_rwlock_init (hg_intercepts.c:...)"; + if (!match($0, /pthread_rwlock_init*/)) { + print; + } + } else { + print; + } + next; +} +/sem_init_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /sem_init \(hg_intercepts.c/)) { + print " by 0x........: sem_init (hg_intercepts.c:...)"; + print; + } else { + print; + } + next; +} +/sem_wait_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /sem_wait \(hg_intercepts.c/)) { + print " by 0x........: sem_wait (hg_intercepts.c:...)"; + print; + } else { + print; + } + next; +} +/sem_post_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /sem_post \(hg_intercepts.c/)) { + print " by 0x........: sem_post (hg_intercepts.c:...)"; + print; + } else { + print; + } + next; +} +/sem_destroy_WRK \(hg_intercepts.c/ { + print; + getline; + if (!match($0, /sem_destroy \(hg_intercepts.c/)) { + print " by 0x........: sem_destroy (hg_intercepts.c:...)"; + print; + } else { + print; + } + next; +} +{print;} diff --git a/helgrind/tests/filter_stderr.in b/helgrind/tests/filter_stderr.in index 3a89f54bd..efb3e2f18 100644 --- a/helgrind/tests/filter_stderr.in +++ b/helgrind/tests/filter_stderr.in @@ -26,8 +26,7 @@ fi | # And Darwin if $dir/../../tests/os_test darwin; then - # reuse the FreeBSD filter to start with - awk -f $dir/filter_freebsd.awk + awk -f $dir/filter_darwin.awk else cat fi | diff --git a/include/vki/vki-darwin.h b/include/vki/vki-darwin.h index 5acd38a4f..1aab28f33 100644 --- a/include/vki/vki-darwin.h +++ b/include/vki/vki-darwin.h @@ -453,6 +453,10 @@ typedef uint32_t vki_u32; #define VKI_MAP_RESERVED0080 MAP_RESERVED0080 #define VKI_MAP_NOEXTEND MAP_NOEXTEND #define VKI_MAP_HASSEMAPHORE MAP_HASSEMAPHORE +#if DARWIN_VERS >= DARWIN_11_00 +#define VKI_MAP_NOCACHE MAP_NOCACHE +#define VKI_MAP_JIT MAP_JIT +#endif #define VKI_MAP_FILE MAP_FILE #define VKI_MAP_ANON MAP_ANON #define VKI_MAP_FAILED MAP_FAILED @@ -1288,6 +1292,13 @@ struct vki_necp_aggregate_result { #define VKI_IFXNAMSIZ IFNAMSIZ + 8 #define VKI_IFNET_SIGNATURELEN 20 +#define VKI_UL_COMPARE_AND_WAIT 1 +#define VKI_UL_UNFAIR_LOCK 2 +#define VKI_UL_COMPARE_AND_WAIT_SHARED 3 +#define VKI_UL_UNFAIR_LOCK64_SHARED 4 +#define VKI_UL_COMPARE_AND_WAIT64 5 +#define VKI_UL_COMPARE_AND_WAIT64_SHARED 6 + struct vki_necp_client_signable { uuid_t client_id; u_int32_t sign_type; diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index 3f378d301..89f7fd386 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -870,6 +870,20 @@ #define __NR_memorystatus_available_memory VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(534) #endif +#if DARWIN_VERS >= DARWIN_11_00 +#define __NR_objc_bp_assist_cfg_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(535) +#define __NR_shared_region_map_and_slide_2_np VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(536) +#define __NR_pivot_root VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(537) +#define __NR_task_inspect_for_pid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(538) +#define __NR_task_read_for_pid VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(539) +#define __NR_sys_preadv VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(540) +#define __NR_sys_pwritev VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(541) +#define __NR_sys_preadv_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(542) +#define __NR_sys_pwritev_nocancel VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(543) +#define __NR_ulock_wait2 VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(544) +#define __NR_proc_info_extended_id VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(545) +#endif + #define __NR_darwin_fake_sigreturn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(1000) #endif diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index d6c14923c..a9e5d558d 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -1664,8 +1664,8 @@ void mc_STOREVn_slow ( Addr a, SizeT nBits, ULong vbytes, Bool bigendian ) /*--- Setting permissions over address ranges. ---*/ /*------------------------------------------------------------*/ -#if defined(VGO_darwin) -#if DARWIN_VERS >= DARWIN_26_00 && 0 +#if defined(VGO_darwin) && DARWIN_VERS >= DARWIN_11_00 +#if DARWIN_VERS >= DARWIN_26_00 // The new xzm_main_malloc_zone_create makes a 25GB (0x600000000) map in memory so, no choice but to raise the limit... # define VA_LARGE_RANGE ( 25UL * 1024 * 1024 * 1024) # else diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 470042902..8f8f90015 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -290,6 +290,7 @@ EXTRA_DIST = \ memalign_args.stderr.exp-glibc \ memalign_args.stderr.exp-darwin \ memalign_args.stderr.exp-darwin2 \ + memalign_args.stderr.exp-darwin3 \ memalign_args.stderr.exp-solaris \ memccpy1.stderr.exp memccpy1.stdout.exp memccpy1.vgtest \ memccpy2.stderr.exp memccpy2.vgtest \ diff --git a/memcheck/tests/memalign_args.stderr.exp-darwin3 b/memcheck/tests/memalign_args.stderr.exp-darwin3 new file mode 100644 index 000000000..949908d17 --- /dev/null +++ b/memcheck/tests/memalign_args.stderr.exp-darwin3 @@ -0,0 +1,11 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: posix_memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:23) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: aligned_alloc (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:27) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: valloc (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:31) diff --git a/none/tests/darwin/apple-main-arg.c b/none/tests/darwin/apple-main-arg.c index 945acc1a7..e49d5ed9a 100644 --- a/none/tests/darwin/apple-main-arg.c +++ b/none/tests/darwin/apple-main-arg.c @@ -4,6 +4,7 @@ #include #include #include +#include "../../../config.h" // On Darwin there's this secret fourth argument, 'apple', which is a pointer // to a string that contains the executable path, like argv[0], but unlike @@ -23,8 +24,17 @@ int main(int argc, char *argv[], char *envp[], char *apple[]) // Make sure realpath(argv[0]) == realpath(apple[0]). (realpath resolves // symlinks.) - realpath(argv[0], pargv); + // PJF this changed with macOS 11, apple path now has a prefix +#if (DARWIN_VERS >= DARWIN_11_00) + const char prefix[] = "executable_path="; + const size_t prefix_len = strlen(prefix); + assert(strncmp(apple[0], prefix, prefix_len) == 0); + realpath(apple[0]+prefix_len, pappl); + exit(0); +#else realpath(apple[0], pappl); +#endif + realpath(argv[0], pargv); assert(0 == strcmp(pargv, pappl)); return 0; diff --git a/none/tests/filter_fdleak b/none/tests/filter_fdleak index 0de7184b1..286b22a13 100755 --- a/none/tests/filter_fdleak +++ b/none/tests/filter_fdleak @@ -25,9 +25,24 @@ sed '/ _so_socket /d;' | sed 's/__xnet_socket/socket/' | awk '/ socket /{sub(/ by /, " at "); print; next}{print}' | awk '/ at .* _syscall6 /{getline; getline; sub(/ by /, " at "); print; next}{print}' | -sed '/__open/d' | sed 's/__systemcall6/creat/' | +# handling '__open' is different for Solaris and macOS 11+ + +# Perform Solaris-specific filtering. +if $dir/../../tests/os_test solaris; then + sed '/__open/d' +else + cat +fi | + +if $dir/../../tests/os_test darwin; then + sed 's/__open/creat/' +else + cat +fi | + + # arm systems substitute open for creat perl -p -e 's/open(?:64)? \(open64\.c:[1-9][0-9]*\)/creat (in \/...libc...)/' | perl -p -e "s/: open \(/: creat (/" | From 876baafa315b5b2c82d972a12916e51811e5da6a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 20 Dec 2025 18:51:43 +0100 Subject: [PATCH 182/502] Darwin: fix a compiler warning Make a function static since it's only used in the one compilation unit. --- coregrind/m_mach/dyld_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_mach/dyld_cache.c b/coregrind/m_mach/dyld_cache.c index 953cccd5f..8c5b9a3b1 100644 --- a/coregrind/m_mach/dyld_cache.c +++ b/coregrind/m_mach/dyld_cache.c @@ -211,7 +211,7 @@ Addr VG_(dyld_cache_get_slide)(void) { return dyld_cache.slide; } -int ensure_init(void) { +static int ensure_init(void) { if (dyld_cache.header != NULL) { return 1; } From acd5cb6c8d7d38c86103494a8c0f934da1d97f4a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 20 Dec 2025 19:44:39 +0100 Subject: [PATCH 183/502] Darwin: revert a bit of overzealous merging --- coregrind/fixup_macho_loadcmds.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/coregrind/fixup_macho_loadcmds.c b/coregrind/fixup_macho_loadcmds.c index 0031177ee..a6699baed 100644 --- a/coregrind/fixup_macho_loadcmds.c +++ b/coregrind/fixup_macho_loadcmds.c @@ -117,18 +117,10 @@ #include #include -/* Get hold of DARWIN_VERS, and check it has a sane value. */ +/* Check that DARWIN_VERS is defined */ #include "config.h" -#if DARWIN_VERS != DARWIN_10_5 && DARWIN_VERS != DARWIN_10_6 \ - && DARWIN_VERS != DARWIN_10_7 && DARWIN_VERS != DARWIN_10_8 \ - && DARWIN_VERS != DARWIN_10_9 && DARWIN_VERS != DARWIN_10_10 \ - && DARWIN_VERS != DARWIN_10_11 && DARWIN_VERS != DARWIN_10_12 \ - && DARWIN_VERS != DARWIN_10_13 && DARWIN_VERS != DARWIN_10_14 \ - && DARWIN_VERS != DARWIN_10_15 && DARWIN_VERS != DARWIN_11_00 \ - && DARWIN_VERS != DARWIN_12_00 && DARWIN_VERS != DARWIN_13_00 \ - && DARWIN_VERS != DARWIN_14_00 && DARWIN_VERS != DARWIN_15_00 \ - && DARWIN_VERS != DARWIN_15_04 && DARWIN_VERS != DARWIN_26_00 -# error "Unknown DARWIN_VERS value. This file only compiles on Darwin." +#if !defined(DARWIN_VERS) +# error "DARWIN_VERS not defind. This file only compiles on Darwin." #endif @@ -581,7 +573,7 @@ void modify_macho_loadcmds ( HChar* filename, seg__pagezero->vmaddr = 0; # endif - out: + out: if (ii.img) unmap_image(&ii); } From 9575cb18430e9f8fc161e68d42680b611c7c673b Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 22 Dec 2025 10:19:30 +0100 Subject: [PATCH 184/502] Helgrind regtest: add asserts to cond_timedwait_test.c This test fails on Darwin, It looks like Darwin uses another mutex and it's complaining that the condition mutex is not locked when the unlock call is made. I made these changes when checking that the testcase has the same behaviour on FreeBSD. --- helgrind/tests/cond_timedwait_test.c | 32 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/helgrind/tests/cond_timedwait_test.c b/helgrind/tests/cond_timedwait_test.c index e9b9be8a2..3b755917b 100644 --- a/helgrind/tests/cond_timedwait_test.c +++ b/helgrind/tests/cond_timedwait_test.c @@ -1,20 +1,28 @@ #include #include +#include +#include -int main() { - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +int main(void) +{ + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + int res; - // This time has most definitely passed already. (Epoch) - struct timespec now; - memset(&now, 0, sizeof(now)); + // This time has most definitely passed already. (Epoch) + struct timespec now; + memset(&now, 0, sizeof(now)); - pthread_mutex_lock(&mutex); - pthread_cond_timedwait(&cond, &mutex, &now); - pthread_mutex_unlock(&mutex); + res = pthread_mutex_lock(&mutex); + assert(res == 0); + res = pthread_cond_timedwait(&cond, &mutex, &now); + assert(res == ETIMEDOUT); - pthread_mutex_destroy(&mutex); - pthread_cond_destroy(&cond); + res = pthread_mutex_unlock(&mutex); + assert(res == 0); - return 0; + res = pthread_mutex_destroy(&mutex); + assert(res == 0); + res = pthread_cond_destroy(&cond); + assert(res == 0); } From e51e4f47ff9954afba0ee3f61139be192b83933c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 07:25:57 +0100 Subject: [PATCH 185/502] Darwin: add newline to if statements For some reason on macOS 12 the apple pointer is wrong. It's a pain to debug code where the if and the true statement are on the same line. --- coregrind/m_initimg/initimg-darwin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index 4a8e8a0d7..869f5ff83 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -393,7 +393,8 @@ Addr setup_client_stack( void* init_sp, #endif /* Darwin mach_header */ - if (info->dynamic) auxsize += sizeof(Word); + if (info->dynamic) + auxsize += sizeof(Word); /* OK, now we know how big the client stack is */ stacksize = @@ -443,7 +444,8 @@ Addr setup_client_stack( void* init_sp, ptr = (Addr*)client_SP; /* --- mach_header --- */ - if (info->dynamic) *ptr++ = info->text; + if (info->dynamic) + *ptr++ = info->text; /* --- client argc --- */ *ptr++ = (Addr)(argc + 1); From 19919fedefda316b283633951754068645aef65c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 08:27:29 +0100 Subject: [PATCH 186/502] Darwin: fix x86 build on macOS 10.13 (and probably 10.14) --- coregrind/m_mach/dyld_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coregrind/m_mach/dyld_cache.c b/coregrind/m_mach/dyld_cache.c index 8c5b9a3b1..625780700 100644 --- a/coregrind/m_mach/dyld_cache.c +++ b/coregrind/m_mach/dyld_cache.c @@ -25,12 +25,14 @@ The GNU General Public License is contained in the file COPYING. */ +#include "config.h" // for DARWIN_VERS + // While dyld_caching as existed for longer than that // we have used DYLD_SHARED_REGION=avoid in the past // // Starting with macOS 11 (Big Sur), it isn't an option anymore // as some dylib are not provided in file format anymore -#if defined(VGO_darwin) && DARWIN_VERS >= DARWIN_11_00 +#if defined(VGO_darwin) && (DARWIN_VERS >= DARWIN_11_00) #include "pub_core_debuginfo.h" // VG_(di_notify_dsc) #include "pub_core_debuglog.h" // VG_(debugLog) From 3932bdc09a54b74a0f250979099f80185df2ce5e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 08:31:02 +0100 Subject: [PATCH 187/502] Darwin regtest: update for one of the several memalign_args expecteds --- memcheck/tests/memalign_args.stderr.exp-darwin | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/memcheck/tests/memalign_args.stderr.exp-darwin b/memcheck/tests/memalign_args.stderr.exp-darwin index 6c8e4cba3..5669c769b 100644 --- a/memcheck/tests/memalign_args.stderr.exp-darwin +++ b/memcheck/tests/memalign_args.stderr.exp-darwin @@ -1,6 +1,5 @@ Conditional jump or move depends on uninitialised value(s) - at 0x........: malloc_zone_memalign (vg_replace_malloc.c:...) - ... + at 0x........: posix_memalign (vg_replace_malloc.c:...) by 0x........: main (memalign_args.c:23) Conditional jump or move depends on uninitialised value(s) From 7fa05936488fcaaa079dffbf359d32167a540fe8 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 10:55:25 +0100 Subject: [PATCH 188/502] Darwin regtest: update none apple-main-arg for macOS 10.14 Looks like the apple pointer to the executable name started having a prefix starting with macOS 10.14. --- none/tests/darwin/apple-main-arg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/none/tests/darwin/apple-main-arg.c b/none/tests/darwin/apple-main-arg.c index e49d5ed9a..d7f275aee 100644 --- a/none/tests/darwin/apple-main-arg.c +++ b/none/tests/darwin/apple-main-arg.c @@ -24,19 +24,21 @@ int main(int argc, char *argv[], char *envp[], char *apple[]) // Make sure realpath(argv[0]) == realpath(apple[0]). (realpath resolves // symlinks.) - // PJF this changed with macOS 11, apple path now has a prefix -#if (DARWIN_VERS >= DARWIN_11_00) + // PJF this changed with macOS 10.14, apple path now has a prefix +#if (DARWIN_VERS >= DARWIN_10_14) const char prefix[] = "executable_path="; const size_t prefix_len = strlen(prefix); assert(strncmp(apple[0], prefix, prefix_len) == 0); realpath(apple[0]+prefix_len, pappl); - exit(0); #else realpath(apple[0], pappl); #endif realpath(argv[0], pargv); assert(0 == strcmp(pargv, pappl)); + free(pargv); + free(pappl); + return 0; } From 6f12489dbfb702f2941cc2811987db6ed903089c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 14:29:19 +0100 Subject: [PATCH 189/502] Darwin helgrind: change api error handling for pthread_rwlock_trywrlock This may return EDEADLK is the rwlock is already locked by the same thread. Darwin seems to be the only OS that does this. --- helgrind/hg_intercepts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index aa48ce02a..95da23868 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -2656,7 +2656,19 @@ static int pthread_rwlock_trywrlock_WRK(pthread_rwlock_t* rwlock) pthread_rwlock_t*,rwlock, long,1/*isW*/, long, (ret == 0) ? True : False); if (ret != 0) { + Bool api_error = False; +#if defined(VGO_darwin) + // When rwlock is locked and there is an attempt to trylock it on the + // same thread POSIX says that it may return EADADLK. Darwin is the + // only one to do this, Linux, FreeBSD and Solaris all return EBUSY. + if (ret != EBUSY && ret != EDEADLK) + api_error = True; +#else if (ret != EBUSY) + api_error = True; +#endif + + if (api_error) DO_PthAPIerror( "pthread_rwlock_trywrlock", ret ); } From c07766dbdd46de98ae029b6d73f7ffa611589783 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 14:31:02 +0100 Subject: [PATCH 190/502] Darwin regtest: add a prereq for helgrind/tests/bug327548 sem_init returns ENOSYS on Darwin so use the DRD script to check that sem_init is supported (i.e., not Darwin). --- helgrind/tests/bug327548.vgtest | 1 + 1 file changed, 1 insertion(+) diff --git a/helgrind/tests/bug327548.vgtest b/helgrind/tests/bug327548.vgtest index e064b3257..c7505586a 100644 --- a/helgrind/tests/bug327548.vgtest +++ b/helgrind/tests/bug327548.vgtest @@ -1,2 +1,3 @@ +prereq: ../../drd/tests/supported_sem_init vgopts: -q prog: bug327548 From 46a94ba8c3dcf260d4ca1900f5e13ca13dde4cc6 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 14:55:59 +0100 Subject: [PATCH 191/502] Darwin signals: don't try to check for async signals for "Process terminating" message Darwin can't tell sync and async apart so don't bother trying. --- coregrind/m_signals.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index 1b0200287..cb0afc9c0 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -1887,7 +1887,10 @@ static void default_action(const vki_siginfo_t *info, ThreadId tid) } if ( VG_(clo_verbosity) >= 1 +#if !defined(VGO_darwin) + // Can't tell apart sync and async signals on Darwin || (could_core && is_signal_from_kernel(tid, sigNo, info->si_code)) +#endif || VG_(clo_xml) ) { if (VG_(clo_xml)) { VG_(printf_xml)("\n"); From 3b4a7e565caec02c33503259261016da13fb9150 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 16:30:53 +0100 Subject: [PATCH 192/502] DRD regtest: don't use -q with tc22_exit_w_lock This seems a better fix than turning off Darwin aysync signal termination messages. Also I don't think that the 32bit variant is used any more. --- drd/tests/tc22_exit_w_lock.stderr.exp-64bit | 7 +++++++ drd/tests/tc22_exit_w_lock.vgtest | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drd/tests/tc22_exit_w_lock.stderr.exp-64bit b/drd/tests/tc22_exit_w_lock.stderr.exp-64bit index 03e804650..ce55c062b 100644 --- a/drd/tests/tc22_exit_w_lock.stderr.exp-64bit +++ b/drd/tests/tc22_exit_w_lock.stderr.exp-64bit @@ -1,3 +1,4 @@ + Mutex still locked at thread exit: mutex 0x........, recursion count 1, owner 3. at 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) @@ -6,3 +7,9 @@ mutex 0x........ was first observed at: by 0x........: child_fn1 (tc22_exit_w_lock.c:18) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) + +Process terminating with default action of signal 6 (SIGABRT) + at 0x........: kill (in /...libc...) + by 0x........: main (tc22_exit_w_lock.c:48) + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/drd/tests/tc22_exit_w_lock.vgtest b/drd/tests/tc22_exit_w_lock.vgtest index 5edf4e5ff..023fea0e0 100644 --- a/drd/tests/tc22_exit_w_lock.vgtest +++ b/drd/tests/tc22_exit_w_lock.vgtest @@ -1,4 +1,4 @@ prereq: ./supported_libpthread && [ -e ../../helgrind/tests/tc22_exit_w_lock ] -vgopts: --num-callers=3 -q +vgopts: --num-callers=3 prog: ../../helgrind/tests/tc22_exit_w_lock cleanup: rm -f vgcore.* From 5da2908c1b0e3c2cbcbc63358f46a5c70c0fa123 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 17:18:48 +0100 Subject: [PATCH 193/502] Darwin regtest: one more with a sem_init prereq --- helgrind/tests/tc23_bogus_condwait.vgtest | 1 + 1 file changed, 1 insertion(+) diff --git a/helgrind/tests/tc23_bogus_condwait.vgtest b/helgrind/tests/tc23_bogus_condwait.vgtest index 918cd86e4..09ca6a65b 100644 --- a/helgrind/tests/tc23_bogus_condwait.vgtest +++ b/helgrind/tests/tc23_bogus_condwait.vgtest @@ -1,3 +1,4 @@ +prereq: ../../drd/tests/supported_sem_init prog: tc23_bogus_condwait vgopts: -q --check-cond-signal-mutex=yes From 6b50f4829230328a0aa5659ab826f89c4ed1ce21 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 19:00:48 +0100 Subject: [PATCH 194/502] Darwin: revert change for async signal termination message --- coregrind/m_signals.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index cb0afc9c0..1b0200287 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -1887,10 +1887,7 @@ static void default_action(const vki_siginfo_t *info, ThreadId tid) } if ( VG_(clo_verbosity) >= 1 -#if !defined(VGO_darwin) - // Can't tell apart sync and async signals on Darwin || (could_core && is_signal_from_kernel(tid, sigNo, info->si_code)) -#endif || VG_(clo_xml) ) { if (VG_(clo_xml)) { VG_(printf_xml)("\n"); From ea251064d1a25a3be0bd3e8582520cf8d2ca5458 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 19:01:27 +0100 Subject: [PATCH 195/502] Darwin regtest: add prereq for massif/tests/pages_as_heap Darwin has brk() but all it does is return ENOMEM. --- massif/tests/pages_as_heap.vgtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/massif/tests/pages_as_heap.vgtest b/massif/tests/pages_as_heap.vgtest index 480c6b6b5..56230ea9a 100644 --- a/massif/tests/pages_as_heap.vgtest +++ b/massif/tests/pages_as_heap.vgtest @@ -1,4 +1,4 @@ -prereq: test -e ./pages_as_heap +prereq: test -e ./pages_as_heap && ! ../../tests/os_test darwin prog: pages_as_heap vgopts: --stacks=no --time-unit=B --heap-admin=0 --pages-as-heap=yes --massif-out-file=massif.out --detailed-freq=3 vgopts: --ignore-fn=mmap From 49c4a70bb2f67c5bdc1268843c9ff70eff747779 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 23 Dec 2025 21:22:17 +0100 Subject: [PATCH 196/502] Darwin mmap: use ARG5 for VG_(di_notify_mmap) The fix for bug280965 (a long long time ago) changed VG_(di_notify_mmap) so that instead of opening a new fd to peek at the ELF header it would reuse the same mmap fd with pread() to avoid resetting fcntl flags. Except that the patch was applied to mmap in syswrap-generic but not to the mmap in syswrap-darwin. So the problem remained there on Darwin for 14 years. --- coregrind/m_syswrap/syswrap-darwin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 25ac11eac..1fa1de542 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -4682,7 +4682,7 @@ POST(mmap) ML_(notify_core_and_tool_of_mmap)(RES, ARG2, ARG3, ARG4, ARG5, ARG6); // Try to load symbols from the region VG_(di_notify_mmap)( (Addr)RES, False/*allow_SkFileV*/, - -1/*don't use_fd*/ ); + ARG5 ); ML_(sync_mappings)("after", "mmap", 0); } } From 738cb901f77338fe15668813eeff13b2c7b212b1 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 24 Dec 2025 11:38:23 +0100 Subject: [PATCH 197/502] Solaris regtest: update for drd/tests/tc22_exit_w_lock I removed -q so that the test passes with Darwin. That only caused the test to fail on illumos. Ho hum. --- drd/tests/Makefile.am | 1 + drd/tests/tc22_exit_w_lock.stderr.exp-solaris | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 drd/tests/tc22_exit_w_lock.stderr.exp-solaris diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index f076ce18a..151b114df 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -363,6 +363,7 @@ EXTRA_DIST = \ tc21_pthonce.vgtest \ tc22_exit_w_lock.stderr.exp-32bit \ tc22_exit_w_lock.stderr.exp-64bit \ + tc22_exit_w_lock.stderr.exp-solaris \ tc22_exit_w_lock.vgtest \ tc23_bogus_condwait.stderr.exp-linux-x86 \ tc23_bogus_condwait.stderr.exp-linux-ppc \ diff --git a/drd/tests/tc22_exit_w_lock.stderr.exp-solaris b/drd/tests/tc22_exit_w_lock.stderr.exp-solaris new file mode 100644 index 000000000..93c257511 --- /dev/null +++ b/drd/tests/tc22_exit_w_lock.stderr.exp-solaris @@ -0,0 +1,15 @@ + +Mutex still locked at thread exit: mutex 0x........, recursion count 1, owner 3. + at 0x........: pthread_join (drd_pthread_intercepts.c:?) + by 0x........: main (tc22_exit_w_lock.c:43) +mutex 0x........ was first observed at: + at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?) + by 0x........: child_fn1 (tc22_exit_w_lock.c:18) + by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) + + +Process terminating with default action of signal 6 (SIGABRT) + at 0x........: (below main) + by 0x........: (below main) + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) From ff435bb437a6e7db32fc4d0aa7a5bd172257bee5 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 24 Dec 2025 11:43:44 +0100 Subject: [PATCH 198/502] Darwin suppressions: add another for getaddrinfo On macOS 10.15 --- darwin-drd.supp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/darwin-drd.supp b/darwin-drd.supp index ec0957139..622c0988d 100644 --- a/darwin-drd.supp +++ b/darwin-drd.supp @@ -442,6 +442,13 @@ fun:ds_user_byuid } +{ + macOS1015:_xpc_bundle_resolve + drd:ConflictingAccess + ... + fun:_xpc_bundle_resolve +} + { macOS1100:_os_semaphore_wait.cold.1 drd:ConflictingAccess From 7e77fe49cc2097f1cd6c472dab4b7530cbfafb4c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 24 Dec 2025 13:18:36 +0100 Subject: [PATCH 199/502] DRD regtest: delete tc22_exit_w_lock 32bit variant, rename 64bit one The 32bit one isn't used by FreeBSD x86. In the event that it is needed by some platform I'll put it back. --- drd/tests/Makefile.am | 3 +- ....exp-64bit => tc22_exit_w_lock.stderr.exp} | 0 drd/tests/tc22_exit_w_lock.stderr.exp-32bit | 137 ------------------ 3 files changed, 1 insertion(+), 139 deletions(-) rename drd/tests/{tc22_exit_w_lock.stderr.exp-64bit => tc22_exit_w_lock.stderr.exp} (100%) delete mode 100644 drd/tests/tc22_exit_w_lock.stderr.exp-32bit diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 151b114df..257edeef3 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -361,8 +361,7 @@ EXTRA_DIST = \ tc21_pthonce.stderr.exp \ tc21_pthonce.stdout.exp \ tc21_pthonce.vgtest \ - tc22_exit_w_lock.stderr.exp-32bit \ - tc22_exit_w_lock.stderr.exp-64bit \ + tc22_exit_w_lock.stderr.exp \ tc22_exit_w_lock.stderr.exp-solaris \ tc22_exit_w_lock.vgtest \ tc23_bogus_condwait.stderr.exp-linux-x86 \ diff --git a/drd/tests/tc22_exit_w_lock.stderr.exp-64bit b/drd/tests/tc22_exit_w_lock.stderr.exp similarity index 100% rename from drd/tests/tc22_exit_w_lock.stderr.exp-64bit rename to drd/tests/tc22_exit_w_lock.stderr.exp diff --git a/drd/tests/tc22_exit_w_lock.stderr.exp-32bit b/drd/tests/tc22_exit_w_lock.stderr.exp-32bit deleted file mode 100644 index 556312643..000000000 --- a/drd/tests/tc22_exit_w_lock.stderr.exp-32bit +++ /dev/null @@ -1,137 +0,0 @@ - -Conflicting load by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_used (offset 4, size 8) in libpthread-?.?.so, libpthread.so.0:Data -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_used (offset 0, size 8) in libpthread-?.?.so, libpthread.so.0:Data -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting load by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache (offset 0, size 8) in libpthread-?.?.so, libpthread.so.0:Data -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache (offset 4, size 8) in libpthread-?.?.so, libpthread.so.0:Data -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting load by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache_actsize (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache (offset 0, size 8) in libpthread-?.?.so, libpthread.so.0:Data -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache_actsize (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting load by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Conflicting store by thread 1 at 0x........ size 4 - at 0x........: __deallocate_stack (in libpthread-?.?.so) - by 0x........: __free_tcb (in libpthread-?.?.so) - by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) -Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS -Other segment start (thread 2) - (thread finished, call stack no longer available) -Other segment end (thread 2) - (thread finished, call stack no longer available) - -Mutex still locked at thread exit: address 0x........, recursion count 1, owner 3. - at 0x........: pthread_join (drd_pthread_intercepts.c:?) - by 0x........: main (tc22_exit_w_lock.c:43) - From 68ce22acc7f128df11202e69d3ff651a5033f78d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 24 Dec 2025 14:29:14 +0100 Subject: [PATCH 200/502] DRD regtest: half fix tc22_exit_w_lock on macOS 10.15 Still has (below main) like Solaris (but unlike macOS 10.14) --- drd/tests/filter_stderr.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drd/tests/filter_stderr.in b/drd/tests/filter_stderr.in index bde4e597a..5504e64f7 100644 --- a/drd/tests/filter_stderr.in +++ b/drd/tests/filter_stderr.in @@ -51,7 +51,8 @@ $SED \ -e "s/\( name [^ ]*\)-[0-9]*\( oflag \)/\1\2/" \ -e "s/??? (in \/[A-Za-z0-9_/-]*)/???/" \ -e '/^ by 0x[0-9a-fA-F]*: process_dl_debug (in \/lib[0-9]*\/ld-[0-9.]*\.so)$/d' \ --e "/^For lists of detected and suppressed errors, rerun with: -s$/d" | +-e "/^For lists of detected and suppressed errors, rerun with: -s$/d" \ +-e "s/__kill/kill/" | # Remove the message that more than hundred errors have been detected # (consists of two lines) and also the empty line above it. From 1d48f6d4ecb7c099aa63c38261ca9bca3c7c16ed Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 24 Dec 2025 17:15:49 +0100 Subject: [PATCH 201/502] Darwin syswrap: 1st arg of posix_spawn can be NULL --- coregrind/m_syswrap/syswrap-darwin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 1fa1de542..9d8ba22a3 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -3852,7 +3852,9 @@ PRE(posix_spawn) PRE_REG_READ5(int, "posix_spawn", vki_pid_t*, pid, char*, path, void*, file_actions, char**, argv, char**, envp ); - PRE_MEM_WRITE("posix_spawn(pid)", ARG1, sizeof(vki_pid_t) ); + if (ARG1 != 0) { + PRE_MEM_WRITE("posix_spawn(pid)", ARG1, sizeof(vki_pid_t) ); + } PRE_MEM_RASCIIZ("posix_spawn(path)", ARG2); // DDD: check file_actions if (ARG4 != 0) From bd417daf8b5a615ae63250b28fda1b94caf2f493 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 24 Dec 2025 17:36:11 +0100 Subject: [PATCH 202/502] Bug 513636 - Support macOS 12.0 (Monterey) Intel only for the moment. --- configure.ac | 4 +++ coregrind/m_syswrap/priv_syswrap-darwin.h | 4 +++ coregrind/m_syswrap/syswrap-darwin.c | 25 +++++++++++++--- darwin.supp | 23 +++++++++++++++ include/vki/vki-scnums-darwin.h | 5 ++++ massif/tests/alloc-fns-A.vgtest | 2 ++ massif/tests/alloc-fns-B.vgtest | 2 ++ massif/tests/basic.vgtest | 2 ++ massif/tests/basic2.vgtest | 2 ++ massif/tests/big-alloc.vgtest | 2 ++ massif/tests/bug469146.vgtest | 2 ++ massif/tests/culling1.stderr.exp | 1 + massif/tests/culling1.vgtest | 2 ++ massif/tests/culling2.vgtest | 2 ++ massif/tests/custom_alloc.vgtest | 2 ++ massif/tests/deep-A.vgtest | 2 ++ massif/tests/deep-B.stderr.exp | 1 + massif/tests/deep-B.vgtest | 2 ++ massif/tests/deep-C.stderr.exp | 1 + massif/tests/deep-C.vgtest | 2 ++ massif/tests/deep-D.vgtest | 2 ++ massif/tests/ignored.vgtest | 2 ++ massif/tests/ignoring.vgtest | 2 ++ massif/tests/insig.vgtest | 2 ++ massif/tests/long-names.vgtest | 2 ++ massif/tests/long-time.vgtest | 2 ++ massif/tests/new-cpp.vgtest | 2 ++ massif/tests/null.vgtest | 2 ++ massif/tests/one.vgtest | 2 ++ massif/tests/overloaded-new.vgtest | 2 ++ massif/tests/peak.vgtest | 2 ++ massif/tests/peak2.stderr.exp | 1 + massif/tests/peak2.vgtest | 2 ++ massif/tests/realloc.stderr.exp | 1 + massif/tests/realloc.vgtest | 2 ++ massif/tests/thresholds_0_0.vgtest | 2 ++ massif/tests/thresholds_0_10.vgtest | 2 ++ massif/tests/thresholds_10_0.vgtest | 2 ++ massif/tests/thresholds_10_10.vgtest | 2 ++ massif/tests/thresholds_5_0.vgtest | 2 ++ massif/tests/thresholds_5_10.vgtest | 2 ++ massif/tests/zero1.vgtest | 2 ++ massif/tests/zero2.vgtest | 2 ++ memcheck/tests/darwin.supp | 21 ++++++++++++++ none/tests/amd64-darwin/bug341419.c | 22 ++++++++++++-- none/tests/darwin/apple-main-arg.c | 35 ++++++++++++++++++++++- 46 files changed, 202 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 528e44b30..bca2b1902 100644 --- a/configure.ac +++ b/configure.ac @@ -554,6 +554,10 @@ case "${host_os}" in AC_MSG_RESULT([Darwin 20.x (${kernel}) / macOS 11 Big Sur]) DARWIN_VERS=$DARWIN_11_00 ;; + 21.*) + AC_MSG_RESULT([Darwin 21.x (${kernel}) / macOS 12 Monterey]) + DARWIN_VERS=$DARWIN_12_00 + ;; *) AC_MSG_RESULT([unsupported (${darwin_platform} ${kernel})]) AC_MSG_ERROR([Valgrind works on Darwin 12.x-19.x (Mac OS X 10.8-10.11, macOS 10.12-10.15)]) diff --git a/coregrind/m_syswrap/priv_syswrap-darwin.h b/coregrind/m_syswrap/priv_syswrap-darwin.h index f30136e29..f80b007fa 100644 --- a/coregrind/m_syswrap/priv_syswrap-darwin.h +++ b/coregrind/m_syswrap/priv_syswrap-darwin.h @@ -672,6 +672,10 @@ DECL_TEMPLATE(darwin, task_read_for_pid); // 539 DECL_TEMPLATE(darwin, ulock_wait2); // 544 // NYI proc_info_extended_id // 545 #endif +#if DARWIN_VERS >= DARWIN_12_00 +// NYI tracker_action // 546 +// NYI debug_syscall_reject // 547 +#endif // Mach message helpers DECL_TEMPLATE(darwin, mach_port_set_context); diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 9d8ba22a3..2784105af 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -77,6 +77,12 @@ typedef HChar name_t[BOOTSTRAP_MAX_NAME_LEN]; typedef uint64_t mig_addr_t; +// Apple started using more inclusive language in Xcode 12+ and macOS 12+ +#if !defined(HOST_IO_MAIN_PORT) +#define HOST_IO_MAIN_PORT HOST_IO_MASTER_PORT +#endif + + // Saved ports static mach_port_t vg_host_port = 0; @@ -5566,8 +5572,8 @@ PRE(host_get_special_port) PRINT("host_get_special_port(%s, HOST_PRIV_PORT)", name_for_port(MACH_REMOTE)); break; - case HOST_IO_MASTER_PORT: - PRINT("host_get_special_port(%s, HOST_IO_MASTER_PORT)", + case HOST_IO_MAIN_PORT: + PRINT("host_get_special_port(%s, HOST_IO_MAIN_PORT)", name_for_port(MACH_REMOTE)); break; // Not provided by kernel @@ -5628,7 +5634,7 @@ POST(host_get_special_port) case HOST_PRIV_PORT: assign_port_name(reply->port.name, "priv-%p"); break; - case HOST_IO_MASTER_PORT: + case HOST_IO_MAIN_PORT: assign_port_name(reply->port.name, "io-master-%p"); break; // Not provided by kernel @@ -11212,6 +11218,14 @@ PRE(objc_bp_assist_cfg_np) #endif /* DARWIN_VERS >= DARWIN_11_00 */ +/* --------------------------------------------------------------------- + Added for macOS 12.0 (Monterey) + ------------------------------------------------------------------ */ + +#if DARWIN_VERS >= DARWIN_12_00 + +#endif /* DARWIN_VERS >= DARWIN_12_00 */ + /* --------------------------------------------------------------------- syscall tables ------------------------------------------------------------------ */ @@ -11863,7 +11877,10 @@ const SyscallTableEntry ML_(syscall_table)[] = { MACX_(__NR_ulock_wait2, ulock_wait2), // 544 // _____(__NR_proc_info_extended_id), // 545 #endif - +#if DARWIN_VERS >= DARWIN_12_00 +// _____(__NR_tracker_action), // 546 +// _____(__NR_debug_syscall_reject), // 547 +#endif MACX_(__NR_darwin_fake_sigreturn, fake_sigreturn) }; diff --git a/darwin.supp b/darwin.supp index 1e05044fa..b53ea9359 100644 --- a/darwin.supp +++ b/darwin.supp @@ -796,6 +796,8 @@ fun:_mh_execute_header } +# FIXME PJF all these Addr* issues looks like problems with memory mapping + { macOS1100:_dyld_start Memcheck:Addr8 @@ -823,3 +825,24 @@ fun:_dyld_start } +{ + macOS1200:#dyld4::ProcessConfig::ProcessConfig(dyld4::KernelArgs const*, dyld4::SyscallDelegate&) + Memcheck:Addr1 + ... + fun:_ZN5dyld413ProcessConfigC2EPKNS_10KernelArgsERNS_15SyscallDelegateE +} + +{ + macOS1200:#dyld4::ProcessConfig::ProcessConfig(dyld4::KernelArgs const*, dyld4::SyscallDelegate&) + Memcheck:Addr8 + ... + fun:_ZN5dyld413ProcessConfigC2EPKNS_10KernelArgsERNS_15SyscallDelegateE +} + +{ + macOS1200:#dyld4::ProcessConfig::ProcessConfig(dyld4::KernelArgs const*, dyld4::SyscallDelegate&) + Memcheck:Addr4 + ... + fun:_ZN5dyld413ProcessConfigC2EPKNS_10KernelArgsERNS_15SyscallDelegateE +} + diff --git a/include/vki/vki-scnums-darwin.h b/include/vki/vki-scnums-darwin.h index 89f7fd386..d6cfe56e6 100644 --- a/include/vki/vki-scnums-darwin.h +++ b/include/vki/vki-scnums-darwin.h @@ -884,6 +884,11 @@ #define __NR_proc_info_extended_id VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(545) #endif +#if DARWIN_VERS >= DARWIN_12_00 +#define __NR_tracker_action VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(546) +#define __NR_debug_syscall_reject VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(547) +#endif + #define __NR_darwin_fake_sigreturn VG_DARWIN_SYSCALL_CONSTRUCT_UNIX(1000) #endif diff --git a/massif/tests/alloc-fns-A.vgtest b/massif/tests/alloc-fns-A.vgtest index ba3e87d19..09f729557 100644 --- a/massif/tests/alloc-fns-A.vgtest +++ b/massif/tests/alloc-fns-A.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc 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.vgtest b/massif/tests/alloc-fns-B.vgtest index 2456604c6..f00c768b5 100644 --- a/massif/tests/alloc-fns-B.vgtest +++ b/massif/tests/alloc-fns-B.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic.vgtest b/massif/tests/basic.vgtest index 0a3bc1054..fc3858175 100644 --- a/massif/tests/basic.vgtest +++ b/massif/tests/basic.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/basic2.vgtest b/massif/tests/basic2.vgtest index 950b57e5b..97442dfae 100644 --- a/massif/tests/basic2.vgtest +++ b/massif/tests/basic2.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/big-alloc.vgtest b/massif/tests/big-alloc.vgtest index b2520b997..0e9e73218 100644 --- a/massif/tests/big-alloc.vgtest +++ b/massif/tests/big-alloc.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/bug469146.vgtest b/massif/tests/bug469146.vgtest index 2004bf268..ad5408347 100644 --- a/massif/tests/bug469146.vgtest +++ b/massif/tests/bug469146.vgtest @@ -10,5 +10,7 @@ vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_n vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc 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/culling1.stderr.exp b/massif/tests/culling1.stderr.exp index eaa4e7294..859c840a1 100644 --- a/massif/tests/culling1.stderr.exp +++ b/massif/tests/culling1.stderr.exp @@ -44,6 +44,7 @@ Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc stderr_filter: filter_verbose cleanup: rm massif.out diff --git a/massif/tests/culling2.vgtest b/massif/tests/culling2.vgtest index a5b4771a7..b9bfe81d1 100644 --- a/massif/tests/culling2.vgtest +++ b/massif/tests/culling2.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc stderr_filter: filter_verbose cleanup: rm massif.out diff --git a/massif/tests/custom_alloc.vgtest b/massif/tests/custom_alloc.vgtest index 6db7e483b..07e5ad18c 100644 --- a/massif/tests/custom_alloc.vgtest +++ b/massif/tests/custom_alloc.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-A.vgtest b/massif/tests/deep-A.vgtest index cd80c108d..5d90b8a65 100644 --- a/massif/tests/deep-A.vgtest +++ b/massif/tests/deep-A.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-B.stderr.exp b/massif/tests/deep-B.stderr.exp index f3fd39d2a..56f1339f3 100644 --- a/massif/tests/deep-B.stderr.exp +++ b/massif/tests/deep-B.stderr.exp @@ -51,6 +51,7 @@ Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-C.stderr.exp b/massif/tests/deep-C.stderr.exp index 154c757c2..7402601ea 100644 --- a/massif/tests/deep-C.stderr.exp +++ b/massif/tests/deep-C.stderr.exp @@ -54,6 +54,7 @@ Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc stderr_filter: filter_verbose post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/deep-D.vgtest b/massif/tests/deep-D.vgtest index d669fdf9a..59f4ae09b 100644 --- a/massif/tests/deep-D.vgtest +++ b/massif/tests/deep-D.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc 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.vgtest b/massif/tests/ignored.vgtest index 805a36eb4..7b9fa4120 100644 --- a/massif/tests/ignored.vgtest +++ b/massif/tests/ignored.vgtest @@ -8,5 +8,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/ignoring.vgtest b/massif/tests/ignoring.vgtest index c3d7a1365..9faf24d82 100644 --- a/massif/tests/ignoring.vgtest +++ b/massif/tests/ignoring.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/insig.vgtest b/massif/tests/insig.vgtest index ba307adab..de1bc0bce 100644 --- a/massif/tests/insig.vgtest +++ b/massif/tests/insig.vgtest @@ -8,5 +8,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-names.vgtest b/massif/tests/long-names.vgtest index 09ce4f507..d05336f1e 100644 --- a/massif/tests/long-names.vgtest +++ b/massif/tests/long-names.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/long-time.vgtest b/massif/tests/long-time.vgtest index d7d9ead29..cb0215a46 100644 --- a/massif/tests/long-time.vgtest +++ b/massif/tests/long-time.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/new-cpp.vgtest b/massif/tests/new-cpp.vgtest index 2cc809cd1..19148c705 100644 --- a/massif/tests/new-cpp.vgtest +++ b/massif/tests/new-cpp.vgtest @@ -9,5 +9,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc 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/null.vgtest b/massif/tests/null.vgtest index 7f9555bf0..b6396675f 100644 --- a/massif/tests/null.vgtest +++ b/massif/tests/null.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/one.vgtest b/massif/tests/one.vgtest index d6a61dfa4..29b24d4c3 100644 --- a/massif/tests/one.vgtest +++ b/massif/tests/one.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index 969d9791f..e99ce8b64 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -10,5 +10,7 @@ vgopts: --ignore-fn="allocBuckets(void*, unsigned int)" --ignore-fn=map_images_n vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | sed 's/gcc[0-9]*/gcc/' | ./filter_new_aligned | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/peak.vgtest b/massif/tests/peak.vgtest index c4f79dfff..df2403e10 100644 --- a/massif/tests/peak.vgtest +++ b/massif/tests/peak.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/peak2.stderr.exp b/massif/tests/peak2.stderr.exp index 8ebb43667..8b34572f2 100644 --- a/massif/tests/peak2.stderr.exp +++ b/massif/tests/peak2.stderr.exp @@ -44,6 +44,7 @@ Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" stderr_filter: filter_verbose +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/realloc.stderr.exp b/massif/tests/realloc.stderr.exp index 180e3ec8e..483c1dbe0 100644 --- a/massif/tests/realloc.stderr.exp +++ b/massif/tests/realloc.stderr.exp @@ -44,6 +44,7 @@ Massif: 20: objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" stderr_filter: filter_verbose +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_0_0.vgtest b/massif/tests/thresholds_0_0.vgtest index 4334d036e..49c4553a1 100644 --- a/massif/tests/thresholds_0_0.vgtest +++ b/massif/tests/thresholds_0_0.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_0_10.vgtest b/massif/tests/thresholds_0_10.vgtest index 83d05b565..a87b7efe7 100644 --- a/massif/tests/thresholds_0_10.vgtest +++ b/massif/tests/thresholds_0_10.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_0.vgtest b/massif/tests/thresholds_10_0.vgtest index f0c38526b..bc1d6fad4 100644 --- a/massif/tests/thresholds_10_0.vgtest +++ b/massif/tests/thresholds_10_0.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_10_10.vgtest b/massif/tests/thresholds_10_10.vgtest index 4af556954..77e87611e 100644 --- a/massif/tests/thresholds_10_10.vgtest +++ b/massif/tests/thresholds_10_10.vgtest @@ -7,6 +7,8 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_0.vgtest b/massif/tests/thresholds_5_0.vgtest index de8bf93f2..729f84f99 100644 --- a/massif/tests/thresholds_5_0.vgtest +++ b/massif/tests/thresholds_5_0.vgtest @@ -7,6 +7,8 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out --threshold=0 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/thresholds_5_10.vgtest b/massif/tests/thresholds_5_10.vgtest index 895fe2f1c..9176d7ccd 100644 --- a/massif/tests/thresholds_5_10.vgtest +++ b/massif/tests/thresholds_5_10.vgtest @@ -7,6 +7,8 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out --threshold=10 | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/zero1.vgtest b/massif/tests/zero1.vgtest index 2fe02a6a3..d8ebb2f48 100644 --- a/massif/tests/zero1.vgtest +++ b/massif/tests/zero1.vgtest @@ -7,6 +7,8 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print --threshold=0 massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/massif/tests/zero2.vgtest b/massif/tests/zero2.vgtest index 933f6a345..27079d64e 100644 --- a/massif/tests/zero2.vgtest +++ b/massif/tests/zero2.vgtest @@ -7,5 +7,7 @@ vgopts: --alloc-fn=_xpc_malloc --ignore-fn=_xpc_dictionary_insert --ignore-fn=ma vgopts: --ignore-fn="_NXMapRehash(_NXMapTable*)" --ignore-fn=arc4_init --ignore-fn="realizeClassWithoutSwift(objc_class*)" # Darwin ignore functions, for macOS 10.15 vgopts: --ignore-fn=_objc_init --ignore-fn-"objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="objc::DenseMap, objc::DenseMapInfo, objc::detail::DenseSetPair >::grow(unsigned int)" --ignore-fn="realizeClassWithoutSwift(objc_class*, objc_class*)" --ignore-fn="schedule_class_load(objc_class*)" --ignore-fn="objc::SafeRanges::add(unsigned long, unsigned long)" +# Darwin ignore functions, for macOS 12 +vgopts: --ignore-fn=_xpc_alloc post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ./filter_ignore_fn cleanup: rm massif.out diff --git a/memcheck/tests/darwin.supp b/memcheck/tests/darwin.supp index 2f9c530b6..6d16d22eb 100644 --- a/memcheck/tests/darwin.supp +++ b/memcheck/tests/darwin.supp @@ -32,3 +32,24 @@ fun:_ZN4dyldL10loadPhase1EPKcS1_RKNS_11LoadContextERjPNSt3__16vectorIS1_NS6_9allocatorIS1_EEEE } +{ + + Memcheck:Addr8 + fun:_ZNK15DyldSharedCache5slideEv + fun:_ZN5dyld3L18reuseExistingCacheERKNS_18SharedCacheOptionsEPNS_19SharedCacheLoadInfoE +} + +{ + + Memcheck:Addr4 + fun:_ZNK15DyldSharedCache5slideEv + fun:_ZN5dyld3L18reuseExistingCacheERKNS_18SharedCacheOptionsEPNS_19SharedCacheLoadInfoE +} + +{ + + Memcheck:Addr1 + ... + fun:_ZN5dyld3L18reuseExistingCacheERKNS_18SharedCacheOptionsEPNS_19SharedCacheLoadInfoE +} + diff --git a/none/tests/amd64-darwin/bug341419.c b/none/tests/amd64-darwin/bug341419.c index e4fdacddb..511cab3e3 100644 --- a/none/tests/amd64-darwin/bug341419.c +++ b/none/tests/amd64-darwin/bug341419.c @@ -6,6 +6,7 @@ #include #include #include +#include "config.h" #define offsetof(type, fld) ((unsigned long)&((type *)0)->fld) #define stringify(x) #x @@ -59,12 +60,17 @@ void this_function_halts(unsigned long long a0, unsigned long long a1, /* Set up registers with known values which will be tested in the signal handler */ __asm__ volatile("movq $0xfeed01010101cafe,%rax"); - __asm__ volatile("movq $0xfeed02020202cafe,%rbx"); __asm__ volatile("movq $0xfeed03030303cafe,%r10"); __asm__ volatile("movq $0xfeed04040404cafe,%r11"); __asm__ volatile("movq $0xfeed05050505cafe,%r12"); __asm__ volatile("movq $0xfeed06060606cafe,%r13"); +// Starting with macOS 12.0, dyld uses r14 for its own purposes, +// changing it crashes the process outside of main. +// FIXME: Suddenly, rbx stopped working but only in the Github GI on macOS 12.0 +#if DARWIN_VERS < DARWIN_12_00 + __asm__ volatile("movq $0xfeed02020202cafe,%rbx"); __asm__ volatile("movq $0xfeed07070707cafe,%r14"); +#endif __asm__ volatile("movq $0xfeed08080808cafe,%r15"); __asm__ volatile("hlt"); ran_after_fault++; @@ -79,12 +85,17 @@ void this_function_int3s(unsigned long long a0, unsigned long long a1, /* Set up registers with known values which will be tested in the signal handler */ __asm__ volatile("movq $0xfeed01010101cafe,%rax"); - __asm__ volatile("movq $0xfeed02020202cafe,%rbx"); __asm__ volatile("movq $0xfeed03030303cafe,%r10"); __asm__ volatile("movq $0xfeed04040404cafe,%r11"); __asm__ volatile("movq $0xfeed05050505cafe,%r12"); __asm__ volatile("movq $0xfeed06060606cafe,%r13"); +// Starting with macOS 12.0, dyld uses r14 for its own purposes, +// changing it crashes the process outside of main. +// FIXME: Suddenly, rbx stopped working but only in the Github GI on macOS 12.0 +#if DARWIN_VERS < DARWIN_12_00 + __asm__ volatile("movq $0xfeed02020202cafe,%rbx"); __asm__ volatile("movq $0xfeed07070707cafe,%r14"); +#endif __asm__ volatile("movq $0xfeed08080808cafe,%r15"); __asm__ volatile("int $3"); ran_after_fault++; @@ -147,12 +158,17 @@ handle_signal(int sig, siginfo_t *si, void *vuc) ASSERT_GTE(uc->uc_mcontext->__ss.__rip, calling_fn); ASSERT_LTE(uc->uc_mcontext->__ss.__rip, calling_fn+400); - ASSERT_EQ(uc->uc_mcontext->__ss.__rbx, 0xfeed02020202cafe); ASSERT_EQ(uc->uc_mcontext->__ss.__r10, 0xfeed03030303cafe); ASSERT_EQ(uc->uc_mcontext->__ss.__r11, 0xfeed04040404cafe); ASSERT_EQ(uc->uc_mcontext->__ss.__r12, 0xfeed05050505cafe); ASSERT_EQ(uc->uc_mcontext->__ss.__r13, 0xfeed06060606cafe); +// Starting with macOS 12.0, dyld uses r14 for its own purposes, +// changing it crashes the process outside of main. +// FIXME: Suddenly, rbx stopped working but only in the Github GI on macOS 12.0 +#if DARWIN_VERS < DARWIN_12_00 + ASSERT_EQ(uc->uc_mcontext->__ss.__rbx, 0xfeed02020202cafe); ASSERT_EQ(uc->uc_mcontext->__ss.__r14, 0xfeed07070707cafe); +#endif ASSERT_EQ(uc->uc_mcontext->__ss.__r15, 0xfeed08080808cafe); /* printf(" RFLAGS 0x%016llx\n", (unsigned long long)uc->uc_mcontext->__ss.__rflags); diff --git a/none/tests/darwin/apple-main-arg.c b/none/tests/darwin/apple-main-arg.c index d7f275aee..6f7d96d0f 100644 --- a/none/tests/darwin/apple-main-arg.c +++ b/none/tests/darwin/apple-main-arg.c @@ -20,7 +20,40 @@ int main(int argc, char *argv[], char *envp[], char *apple[]) ; // envp[i]==NULL; envp[i+1]==apple[0]==executable_path - assert(envp[i+1] == apple[0]); + //assert(envp[i+1] == apple[0]); + fprintf(stderr, "DEBUG: apple %p\n", apple); + fprintf(stderr, "DEBUG: envp[i+1] %p apple[0] %p\n", envp[i+1], apple[0]); + fprintf(stderr, "DEBUG: apple[-1] %p\n", apple[-1]); + fprintf(stderr, "DEBUG: apple[-2] %p\n", apple[-2]); + fprintf(stderr, "DEBUG: apple[-3] %p\n", apple[-3]); + fprintf(stderr, "DEBUG: apple[+1] %p\n", apple[+1]); + fprintf(stderr, "DEBUG: apple[+2] %p\n", apple[+2]); + fprintf(stderr, "DEBUG: &envp[i+1] %p &apple[0] %p\n", &envp[i+1], &apple[0]); + if (envp[i+1] != apple[0]) { + fprintf(stderr, "DEBUG: oh shit\n"); + if (apple[0]) { + fprintf(stderr, "DEBUG: apple zero is %s\n", apple[0]); + } else { + fprintf(stderr, "DEBUG: apple zero is NULL\n"); + if (apple[-1]) { + fprintf(stderr, "DEBUG: apple minus one is %p %s\n", apple[-1], apple[-1]); + } else { + fprintf(stderr, "DEBUG: apple minus one is NULL\n"); + } + if (apple[-2]) { + fprintf(stderr, "DEBUG: apple minus two is %p %s\n", apple[-2], apple[-2]); + } else { + fprintf(stderr, "DEBUG: apple minus two is NULL\n"); + } + } + if (envp[i+1]) { + fprintf(stderr, "DEBUG: after NULL after envp is %s\n", envp[i+1]); + } else { + fprintf(stderr, "DEBUG: after NULL after envp is NULL\n"); + } + } + + return 0; // Make sure realpath(argv[0]) == realpath(apple[0]). (realpath resolves // symlinks.) From af48d8363723296c18e68435f2b374e4b3b0a125 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 25 Dec 2025 09:02:33 +0100 Subject: [PATCH 203/502] Clean up a few loose ends from previous commit adding Darwin 21 support. Update NEWS, one missed expected update and left over debug printfs in a newly failing Darwin testcase. --- NEWS | 5 +++-- massif/tests/culling2.stderr.exp | 1 + none/tests/darwin/apple-main-arg.c | 35 +----------------------------- 3 files changed, 5 insertions(+), 36 deletions(-) diff --git a/NEWS b/NEWS index 51f0b301a..5650083a1 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,7 @@ PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, RISCV64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support -for nanoMIPS/Linux. macOS is supported up to version 11 Big Sur (amd64 only). +for nanoMIPS/Linux. macOS is supported up to version 12 Monterey (amd64 only). * ==================== CORE CHANGES =================== @@ -18,7 +18,8 @@ Support for the following macOS versions has been added 10,13 High Sierra (bug fixes) 10.14 Mojave 10.15 Calalina -11.0 Big Sur +11.0 Big Sur (Intel only) +12.0 Monterey (intel only) * ==================== TOOL CHANGES =================== diff --git a/massif/tests/culling2.stderr.exp b/massif/tests/culling2.stderr.exp index 2d77d0461..5d227a126 100644 --- a/massif/tests/culling2.stderr.exp +++ b/massif/tests/culling2.stderr.exp @@ -44,6 +44,7 @@ Massif: 20: objc::DenseMap Date: Thu, 25 Dec 2025 09:22:48 +0100 Subject: [PATCH 204/502] Regtest: add a filter for syscall -> in libc --- tests/filter_libc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/filter_libc b/tests/filter_libc index d3c875d90..f3ee01626 100755 --- a/tests/filter_libc +++ b/tests/filter_libc @@ -14,6 +14,9 @@ while (<>) s/\(in \/.*(libc|libSystem|libsystem|libsocket|libsys).*\)$/(in \/...libc...)/; s/\(within \/.*(libc|libSystem|libsystem|libsocket).*\)$/(within \/...libc...)/; + # From assembler functions + s/\(syscall-template.S:.*\)$/(in \/...libc...)/; + # Filter out dynamic loader s/ \(in \/.*ld-.*so\)$//; From c3339bae0e25b65a65e31c625563bfdf6a7953bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Wed, 17 Dec 2025 06:59:19 -0500 Subject: [PATCH 205/502] Add SSE4.1 PMULLD instruction for x86 32 bit Support pmulld (packed multiply 32-bit doubleword integers) instruction in guest_x86_toIR.c and host_x86_isel.c. Add test function to sse4-common.h and update none/tests/x86/sse4-x86.c to test the instruction. BZ: https://bugs.kde.org/show_bug.cgi?id=513475 --- NEWS | 1 + VEX/priv/guest_x86_toIR.c | 32 ++++++++++++++++++++++++++++++ VEX/priv/host_x86_isel.c | 3 +++ none/tests/amd64/sse4-64.c | 12 ----------- none/tests/sse4-common.h | 11 ++++++++++ none/tests/x86/sse4-x86.c | 1 + none/tests/x86/sse4-x86.stdout.exp | 20 +++++++++++++++++++ 7 files changed, 68 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 5650083a1..4a2593eaf 100644 --- a/NEWS +++ b/NEWS @@ -54,6 +54,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 513257 Add missing syswraps for lsm_list_modules 513522 m_libcassert.c: 'ordered comparison of pointer with integer zero' compiler warning +513475 Add SSE4.1 PMULLD instruction for x86 32 bit To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c index af4edf21e..bd4ccd54b 100644 --- a/VEX/priv/guest_x86_toIR.c +++ b/VEX/priv/guest_x86_toIR.c @@ -13069,6 +13069,38 @@ DisResult disInstr_X86_WRK ( goto decode_success; } + /* 66 0F 38 40 /r - PMULLD xmm1, xmm2/m128 + 32x4 integer multiply from xmm2/m128 to xmm1 */ + if (sz == 2 + && insn[0] == 0x0F && insn[1] == 0x38 && insn[2] == 0x40) { + + modrm = insn[3]; + + IRTemp argL = newTemp(Ity_V128); + IRTemp argR = newTemp(Ity_V128); + + if (epartIsReg(modrm)) { + assign( argL, getXMMReg( eregOfRM(modrm) ) ); + delta += 3+1; + DIP( "pmulld %s,%s\n", + nameXMMReg( eregOfRM(modrm) ), + nameXMMReg( gregOfRM(modrm) ) ); + } else { + addr = disAMode( &alen, sorb, delta+3, dis_buf ); + assign( argL, loadLE( Ity_V128, mkexpr(addr) )); + delta += 3+alen; + DIP( "pmulld %s,%s\n", + dis_buf, nameXMMReg( gregOfRM(modrm) ) ); + } + + assign(argR, getXMMReg( gregOfRM(modrm) )); + + putXMMReg( gregOfRM(modrm), + binop( Iop_Mul32x4, mkexpr(argL), mkexpr(argR)) ); + + 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.) diff --git a/VEX/priv/host_x86_isel.c b/VEX/priv/host_x86_isel.c index 22a5702c0..773235cda 100644 --- a/VEX/priv/host_x86_isel.c +++ b/VEX/priv/host_x86_isel.c @@ -3891,6 +3891,9 @@ static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e ) case Iop_Min32Ux4: fn = (HWord)h_generic_calc_Min32Ux4; goto do_SseAssistedBinary; + case Iop_Mul32x4: + fn = (HWord)h_generic_calc_Mul32x4; + 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 f4207b858..a4614016e 100644 --- a/none/tests/amd64/sse4-64.c +++ b/none/tests/amd64/sse4-64.c @@ -1637,18 +1637,6 @@ void test_PMULDQ ( void ) } -void test_PMULLD ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_mandr_r("pmulld", src, dst); - } -} - - void test_POPCNTQ ( void ) { ULong block[4]; diff --git a/none/tests/sse4-common.h b/none/tests/sse4-common.h index 1191d4bb0..5576c1f73 100644 --- a/none/tests/sse4-common.h +++ b/none/tests/sse4-common.h @@ -340,4 +340,15 @@ static inline void test_PMINUW ( void ) } } +static inline void test_PMULLD ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_mandr_r("pmulld", src, dst); + } +} + #endif /* __SSE4_COMMON_H */ diff --git a/none/tests/x86/sse4-x86.c b/none/tests/x86/sse4-x86.c index 664235775..f65e6467d 100644 --- a/none/tests/x86/sse4-x86.c +++ b/none/tests/x86/sse4-x86.c @@ -112,6 +112,7 @@ int main(void) test_PMINSD(); test_PMINUD(); test_PMINUW(); + test_PMULLD(); return 0; } diff --git a/none/tests/x86/sse4-x86.stdout.exp b/none/tests/x86/sse4-x86.stdout.exp index 515c22766..de3810a0e 100644 --- a/none/tests/x86/sse4-x86.stdout.exp +++ b/none/tests/x86/sse4-x86.stdout.exp @@ -166,3 +166,23 @@ r pminuw 9f043af6a1aed58f1ee978efa4b054d2 76f140aa4182b4e706a17746411ab40c 7 m pminuw 9f043af6a1aed58f1ee978efa4b054d2 76f140aa4182b4e706a17746411ab40c 76f13af64182b4e706a17746411a54d2 r pminuw 5e58aa8b4c88ae0d34fa174f9ce927c4 51f2275707e17ae4b3fd9698098ef5b0 51f2275707e17ae434fa174f098e27c4 m pminuw 5e58aa8b4c88ae0d34fa174f9ce927c4 51f2275707e17ae4b3fd9698098ef5b0 51f2275707e17ae434fa174f098e27c4 +r pmulld 2ad7482a960fb2b27014160ebbdb47e4 a7837c83faf3cb1d360794fec60222d6 869c457ee570642a5f0ff9e410a26098 +m pmulld 2ad7482a960fb2b27014160ebbdb47e4 a7837c83faf3cb1d360794fec60222d6 869c457ee570642a5f0ff9e410a26098 +r pmulld 61cd123e19cf1e2bb001f1161e946f5c d5f13a9ab645e140698bec649583f5aa 0ddd054c30e255c077f47498e538ff18 +m pmulld 61cd123e19cf1e2bb001f1161e946f5c d5f13a9ab645e140698bec649583f5aa 0ddd054c30e255c077f47498e538ff18 +r pmulld 5e86033374552e23ce8e2455e0205c58 37885d08d662faf92a541ab7911c2b5a 4b71a098414e0e0bf5309ac32c833ef0 +m pmulld 5e86033374552e23ce8e2455e0205c58 37885d08d662faf92a541ab7911c2b5a 4b71a098414e0e0bf5309ac32c833ef0 +r pmulld 7c4e1775412d1d47a8872cb61d8aca05 2993e139f7d64ff4532f9ae1d7da8010 85300e0d0562d0aca71dc7f678f12050 +m pmulld 7c4e1775412d1d47a8872cb61d8aca05 2993e139f7d64ff4532f9ae1d7da8010 85300e0d0562d0aca71dc7f678f12050 +r pmulld 19714a711ce1284318b88425f2de758f 0760c299b42e1fdcc2e9e9cf82c7aff8 107f1f896d68b6943d2586eb5a07a388 +m pmulld 19714a711ce1284318b88425f2de758f 0760c299b42e1fdcc2e9e9cf82c7aff8 107f1f896d68b6943d2586eb5a07a388 +r pmulld 8f3a9991a2ff8bc2fceca88e7b281821 2d39fd95a9f5a45d514c816eaff2763f f528ae65bf080d7ae6c7fb04282f261f +m pmulld 8f3a9991a2ff8bc2fceca88e7b281821 2d39fd95a9f5a45d514c816eaff2763f f528ae65bf080d7ae6c7fb04282f261f +r pmulld 3cf6fe426e1281712ef114ddd37570e8 f76b8d9773b81b24de24e0a879648e11 f35052ee3a791ee4558b1108f20d2f68 +m pmulld 3cf6fe426e1281712ef114ddd37570e8 f76b8d9773b81b24de24e0a879648e11 f35052ee3a791ee4558b1108f20d2f68 +r pmulld 7af177f11da748fc8b9145fe16d0390f c1426e0dae01c0dd433f816bfd2bb699 9ceea53da123018c3d7f3f2a1387c3f7 +m pmulld 7af177f11da748fc8b9145fe16d0390f c1426e0dae01c0dd433f816bfd2bb699 9ceea53da123018c3d7f3f2a1387c3f7 +r pmulld a77700084a491a0ef099b6dd61462ec3 e70a9c61f55fce335d68e1a25652a804 306be308b0b974caedc5f4da103eb30c +m pmulld a77700084a491a0ef099b6dd61462ec3 e70a9c61f55fce335d68e1a25652a804 306be308b0b974caedc5f4da103eb30c +r pmulld 1dd493f59184345437d5e366d0e20c30 c50f1401e45b82d3086a7a39a1e6217d edbeb7f57c65c93cb53a3db645122370 +m pmulld 1dd493f59184345437d5e366d0e20c30 c50f1401e45b82d3086a7a39a1e6217d edbeb7f57c65c93cb53a3db645122370 From db47a91c49ce711679399da080fc901615aad791 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 26 Dec 2025 10:19:53 +0100 Subject: [PATCH 206/502] Darwin redir: add a replacement for memmem Of course, a bit different from the existing one. --- shared/vg_replace_strmem.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index aed02d151..a944bda44 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -1856,10 +1856,44 @@ static inline void my_exit ( int x ) return NULL; \ } +#define MEMMEM_DARWIN(soname, fnname) \ + void* VG_REPLACE_FUNCTION_EZU(20460,soname,fnname) \ + (const void* big, SizeT big_len, const void* little, SizeT little_len); \ + void* VG_REPLACE_FUNCTION_EZU(20460,soname,fnname) \ + (const void* big, SizeT big_len, const void* little, SizeT little_len) \ + { \ + const HChar* h = big; \ + const HChar* n = little; \ + \ + if (big_len < little_len) return NULL; \ + if (little_len == 0) return NULL; \ + \ + HChar n0 = n[0]; \ + \ + for (; big_len >= little_len; big_len--, h++) { \ + if (h[0] != n0) continue; \ + \ + UWord i; \ + for (i = 1; i < little_len; i++) { \ + if (n[i] != h[i]) \ + break; \ + } \ + if (i == little_len) \ + return CONST_CAST(HChar *,h); \ + \ + } \ + return NULL; \ + } + + #if defined(VGP_s390x_linux) MEMMEM(VG_Z_LIBC_SONAME, memmem) #endif +#if defined(VGO_darwin) + MEMMEM_DARWIN(VG_Z_LIBSYSTEM_C_SONAME, memmem) +#endif + /*---------------------- strpbrk ----------------------*/ From cfd2926a3491ed1681a71491a394b67b13491ecc Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 26 Dec 2025 13:20:15 +0100 Subject: [PATCH 207/502] Darwin memcmp redir: fix platform related issue Replacing just _platform_memcmp results in crashes when returning from the call. Instead on macOS 12 we need to replace the variant(s?). --- shared/vg_replace_strmem.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index a944bda44..24ea6c37b 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -1182,7 +1182,6 @@ static inline void my_exit ( int x ) #endif - /*---------------------- memcmp ----------------------*/ #define MEMCMP(soname, fnname) \ @@ -1240,9 +1239,15 @@ static inline void my_exit ( int x ) MEMCMP(VG_Z_LIBC_SONAME, timingsafe_bcmp) #elif defined(VGO_darwin) -# if DARWIN_VERS >= DARWIN_10_9 +# if DARWIN_VERS < DARWIN_12_00 MEMCMP(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memcmp) -# endif +# else + // PJF I'm not sure what is going on with macOS 12 Intel + // I was getting crashes here in Valgrind. This was in the + // return from the _platform_memcmp redir where there's a + // rip-relative jump but the dest address is NULL + MEMCMP(VG_Z_LIBSYSTEM_PLATFORM_SONAME, _platform_memcmp$VARIANT$Base) +#endif #elif defined(VGO_solaris) MEMCMP(VG_Z_LIBC_SONAME, memcmp) From 2911ddad67b7e6bce832a57842c308961f077c62 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 26 Dec 2025 13:30:41 +0100 Subject: [PATCH 208/502] Darwin regtest: update a filter following the previous commit --- memcheck/tests/filter_libc_variants | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/filter_libc_variants b/memcheck/tests/filter_libc_variants index 3ecf1fb80..fde1d8be6 100755 --- a/memcheck/tests/filter_libc_variants +++ b/memcheck/tests/filter_libc_variants @@ -2,4 +2,4 @@ ./filter_stderr "$@" | -sed 's/ _platform_memcmp / memcmp /;s/ bcmp / memcmp /;s/ _platform_memccpy / memccpy /;s/ __memccpy_chk / memccpy /;s/ __strncat_chk / strncat /;s/ __strncpy_chk / strncpy /;s/ __strcpy_chk / strcpy /' +sed 's/ _platform_memcmp / memcmp /;s/ bcmp / memcmp /;s/ _platform_memccpy / memccpy /;s/ __memccpy_chk / memccpy /;s/ __strncat_chk / strncat /;s/ __strncpy_chk / strncpy /;s/ __strcpy_chk / strcpy /;s/_platform_memcmp\$VARIANT\$Base/memcmp/' From 6f06c0aec8e65bf0428395aff256221a3ed78e2f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 26 Dec 2025 14:20:34 +0100 Subject: [PATCH 209/502] Darwin regtest: ensure no stdout output for memcheck/tests/darwin/deep_badparam The test was doing a write of an uninit ilocal 32byte char buffer. This has started outputting junk resulting in a stdout diff. So make sure that the buffer only contains zeros (but still uninit). Hope the compiler doesn't get too smart. --- memcheck/tests/darwin/deep_badparam.c | 2 ++ memcheck/tests/darwin/deep_badparam.stderr.exp | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/memcheck/tests/darwin/deep_badparam.c b/memcheck/tests/darwin/deep_badparam.c index 9f1268370..e86762747 100644 --- a/memcheck/tests/darwin/deep_badparam.c +++ b/memcheck/tests/darwin/deep_badparam.c @@ -5,6 +5,8 @@ int func_six(int x) { char b[32]; + for (int i = 0; i < sizeof(b); ++i) + b[i] /= 256; int r = write(1, b, sizeof(b)); return x; } diff --git a/memcheck/tests/darwin/deep_badparam.stderr.exp b/memcheck/tests/darwin/deep_badparam.stderr.exp index 3eeddc70c..165c7dbb0 100644 --- a/memcheck/tests/darwin/deep_badparam.stderr.exp +++ b/memcheck/tests/darwin/deep_badparam.stderr.exp @@ -1,12 +1,12 @@ Syscall param write(buf) points to uninitialised byte(s) ... - by 0x........: func_six (deep_badparam.c:8) - by 0x........: func_five (deep_badparam.c:14) - by 0x........: func_four (deep_badparam.c:19) - by 0x........: func_three (deep_badparam.c:24) - by 0x........: func_two (deep_badparam.c:29) - by 0x........: func_one (deep_badparam.c:34) - by 0x........: main (deep_badparam.c:39) + by 0x........: func_six (deep_badparam.c:10) + by 0x........: func_five (deep_badparam.c:16) + by 0x........: func_four (deep_badparam.c:21) + by 0x........: func_three (deep_badparam.c:26) + by 0x........: func_two (deep_badparam.c:31) + by 0x........: func_one (deep_badparam.c:36) + by 0x........: main (deep_badparam.c:41) Address 0x........ is on thread 1's stack in frame #1, created by func_six (deep_badparam.c:6) From f0baae48d17f1d9d5236a8e9a7609d01518f90ee Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 26 Dec 2025 20:24:50 +0000 Subject: [PATCH 210/502] VEX: Add function vex_vsprintf. Small pre-patch for objdump-based disassembly. Part of fixing https://bugs.kde.org/show_bug.cgi?id=510840 --- VEX/priv/main_util.c | 23 +++++++++++++---------- VEX/priv/main_util.h | 6 ++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/VEX/priv/main_util.c b/VEX/priv/main_util.c index 8d99eab83..3d7ccb168 100644 --- a/VEX/priv/main_util.c +++ b/VEX/priv/main_util.c @@ -258,10 +258,6 @@ void vpanic ( const HChar* str ) /*--- vex_printf ---*/ /*---------------------------------------------------------*/ -/* This should be the only <...> include in the entire VEX library. - New code for vex_util.c should go above this point. */ -#include - SizeT vex_strlen ( const HChar* str ) { SizeT i = 0; @@ -609,18 +605,25 @@ static void add_to_vg_sprintf_buf ( HChar c ) *vg_sprintf_ptr++ = c; } -UInt vex_sprintf ( HChar* buf, const HChar *format, ... ) +UInt vex_vsprintf ( HChar* buf, const HChar* format, va_list vargs ) { - Int ret; - va_list vargs; + UInt ret; vg_sprintf_ptr = buf; + ret = vprintf_wrk(add_to_vg_sprintf_buf, format, vargs); + add_to_vg_sprintf_buf('\0'); - va_start(vargs,format); + vassert(vex_strlen(buf) == ret); + return ret; +} - ret = vprintf_wrk ( add_to_vg_sprintf_buf, format, vargs ); - add_to_vg_sprintf_buf(0); +UInt vex_sprintf ( HChar* buf, const HChar *format, ... ) +{ + UInt ret; + va_list vargs; + va_start(vargs,format); + ret = vex_vsprintf(buf, format, vargs); va_end(vargs); vassert(vex_strlen(buf) == ret); diff --git a/VEX/priv/main_util.h b/VEX/priv/main_util.h index 4abae5440..9d278305f 100644 --- a/VEX/priv/main_util.h +++ b/VEX/priv/main_util.h @@ -34,6 +34,9 @@ #ifndef __VEX_MAIN_UTIL_H #define __VEX_MAIN_UTIL_H +/* This should be the only <...> include in the entire VEX library. */ +#include + #include "libvex_basictypes.h" #include "libvex_inner.h" @@ -92,6 +95,9 @@ extern UInt vex_printf ( const HChar *format, ... ); __attribute__ ((format (printf, 2, 3))) extern UInt vex_sprintf ( HChar* buf, const HChar *format, ... ); +__attribute__ ((format (printf, 2, 0))) +extern UInt vex_vsprintf ( HChar* buf, const HChar* format, va_list vargs ); + /* String ops */ From 937c2e74d0701676c91a64c5b62a35d015d0335d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 27 Dec 2025 18:48:28 +0100 Subject: [PATCH 211/502] Regtest: increase the 'unused' fd value in none use_after_close Darwin 22 dyld seems to use 9 fds. We were using 7 as the 'unused' value but that will soon be no longer true on all platforms. --- none/tests/use_after_close.c | 2 +- none/tests/use_after_close.stderr.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/none/tests/use_after_close.c b/none/tests/use_after_close.c index deb4e6888..d17f7cc84 100644 --- a/none/tests/use_after_close.c +++ b/none/tests/use_after_close.c @@ -16,7 +16,7 @@ int main(void) write(fd, string, 4); /* Never created. */ - write(7, string, 4); + write(10, string, 4); /* Invalid. */ write(-7, string, 4); diff --git a/none/tests/use_after_close.stderr.exp b/none/tests/use_after_close.stderr.exp index 620a6b8d2..71c65c5ff 100644 --- a/none/tests/use_after_close.stderr.exp +++ b/none/tests/use_after_close.stderr.exp @@ -8,7 +8,7 @@ File descriptor was closed already Originally opened at 0x........: dup (in /...libc...) by 0x........: main -File descriptor 7 was never created +File descriptor 10 was never created at 0x........: write (in /...libc...) by 0x........: main File descriptor -7 Invalid file descriptor From 48ff6038d0609f0133bd46b258c335205579a11e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 27 Dec 2025 18:56:39 +0100 Subject: [PATCH 212/502] Regtest: another test that needs to increase the value for an 'unused' fd. --- none/tests/track_bad.c | 2 +- none/tests/track_bad.stderr.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/none/tests/track_bad.c b/none/tests/track_bad.c index b1674d648..721702e50 100644 --- a/none/tests/track_bad.c +++ b/none/tests/track_bad.c @@ -17,7 +17,7 @@ int main(void) write(fd, string, 4); /* Never created. */ - write(7, string, 4); + write(10, string, 4); /* Invalid. */ write(-7, string, 4); diff --git a/none/tests/track_bad.stderr.exp b/none/tests/track_bad.stderr.exp index 620a6b8d2..71c65c5ff 100644 --- a/none/tests/track_bad.stderr.exp +++ b/none/tests/track_bad.stderr.exp @@ -8,7 +8,7 @@ File descriptor was closed already Originally opened at 0x........: dup (in /...libc...) by 0x........: main -File descriptor 7 was never created +File descriptor 10 was never created at 0x........: write (in /...libc...) by 0x........: main File descriptor -7 Invalid file descriptor From b35aa82658b0e20c773cd13345284ce8d6476a83 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 28 Dec 2025 11:34:38 +0100 Subject: [PATCH 213/502] Regtest: use basic stderr filter for none/tests/iropt-test This was doing no filtering. macOS needs filtering in every directory otherwise there wioll be a failure with a diff from dsymutil like +--49940-- run: /usr/bin/dsymutil "./iropt-test-sec" --- none/tests/iropt-test/filter_stderr | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/none/tests/iropt-test/filter_stderr b/none/tests/iropt-test/filter_stderr index 5337954d0..6d046ca6f 100755 --- a/none/tests/iropt-test/filter_stderr +++ b/none/tests/iropt-test/filter_stderr @@ -1,4 +1,6 @@ #!/bin/sh -# Nothing to filter. -sed 's/BLA/BLA/' +dir=`dirname $0` + +$dir/../../../tests/filter_stderr_basic + From 7cb9b9bcfa590d6233b00533b47a733c4a271238 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 31 Dec 2025 18:48:13 +0000 Subject: [PATCH 214/502] VEX: Support %i format Small pre-patch for objdump-based disassembly. Part of fixing https://bugs.kde.org/show_bug.cgi?id=510840 --- VEX/priv/main_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/VEX/priv/main_util.c b/VEX/priv/main_util.c index 3d7ccb168..5d40ca0f9 100644 --- a/VEX/priv/main_util.c +++ b/VEX/priv/main_util.c @@ -462,6 +462,7 @@ UInt vprintf_wrk ( void(*sink)(HChar), PAD(len1); PUTSTR(str); PAD(len3); break; } + case 'i': case 'd': { Long l; vassert(is_sizet == False); // %zd is obscure; we don't allow it From 26a2ed8106cca5355a5a05fb18d7669c57a47104 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 31 Dec 2025 18:55:37 +0000 Subject: [PATCH 215/502] s390 disasm-test: Add --all-except-exrl command line option. EX and EXRL need special scaffolding and treatment. Part of fixing https://bugs.kde.org/show_bug.cgi?id=510840 --- none/tests/s390x/disasm-test/README | 13 ++++++++++--- none/tests/s390x/disasm-test/disasm-test.post.exp | 4 ++-- none/tests/s390x/disasm-test/disasm-test.vgtest | 2 +- none/tests/s390x/disasm-test/main.c | 8 +++++++- none/tests/s390x/disasm-test/vex.c | 5 +++-- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/none/tests/s390x/disasm-test/README b/none/tests/s390x/disasm-test/README index a3b4ea4e2..ef8904323 100644 --- a/none/tests/s390x/disasm-test/README +++ b/none/tests/s390x/disasm-test/README @@ -24,7 +24,10 @@ See disasm-test --help for the most up-to-date instructions. disasm-test --all For all opcodes known to disasm-test, generate testcases and - verify the disassembly. This is how disasm-test is invoked + verify the disassembly. + +disasm-test --all-except-exrl + As the option name suggests. This is how disasm-test is invoked during regression testing. disasm-test --generate OPCODE_NAMEs @@ -147,8 +150,8 @@ Status All opcodes which are implemented in valgrind are considered. -TODO ----- +NOTES +----- (1) Testcase generation for the "Rotate and ..." family of opcodes needs to be improved. Several interesting cases involving the T- and Z-bit are not considered. @@ -179,3 +182,7 @@ TODO (5) For D20XB and D12XB operands add a test with B == X and B != 0 Not exactly easy to do. + +(6) For objdump-based disassembly the offset in the EXRL insn is expected + to denote a decodable insn. This is obviously not the case here and + therefore causing a miscompare. diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index bd8790855..2e0d1b893 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,4 +1,4 @@ -Total: 148764 tests generated -Total: 148672 insns verified +Total: 148757 tests generated +Total: 148665 insns verified Total: 0 disassembly mismatches Total: 92 specification exceptions diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index 9f7f9997b..9def1926c 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -4,4 +4,4 @@ # prereq: ./disasm-test --check-prereq prog: /bin/true -post: ./disasm-test --all --summary +post: ./disasm-test --all-except-exrl --summary diff --git a/none/tests/s390x/disasm-test/main.c b/none/tests/s390x/disasm-test/main.c index 7805a1859..6d8f8353b 100644 --- a/none/tests/s390x/disasm-test/main.c +++ b/none/tests/s390x/disasm-test/main.c @@ -84,7 +84,7 @@ static int summary = 0; int main(int argc, char *argv[]) { - int all = 0, verify = 0, generate = 0, unit_test = 0; + int all = 0, verify = 0, generate = 0, unit_test = 0, all_except_exrl = 0; int num_clargs = 0; int run = 0, check_prereq = 0; const char *clargs[argc]; @@ -105,6 +105,9 @@ main(int argc, char *argv[]) verify = 1; } else if (CHECK_CLO(clo, "--generate")) { generate = 1; + } else if (CHECK_CLO(clo, "--all-except-exrl")) { + all = 1; + all_except_exrl = 1; } else if (CHECK_CLO(clo, "--all")) { all = 1; } else if (CHECK_CLO(clo, "--verbose")) { @@ -230,6 +233,9 @@ main(int argc, char *argv[]) for (int i = 0; i < num_opcodes; ++i) { opcode *opc = get_opcode_by_index(i); // never NULL + if (all_except_exrl && strcmp(opc->name, "exrl") == 0) + continue; + if (opcode_has_errors(opc)) { error("Opcode '%s' ignored due to syntax errors\n", opc->name); diff --git a/none/tests/s390x/disasm-test/vex.c b/none/tests/s390x/disasm-test/vex.c index 7d80ceadd..bb850b8eb 100644 --- a/none/tests/s390x/disasm-test/vex.c +++ b/none/tests/s390x/disasm-test/vex.c @@ -119,8 +119,9 @@ vex_reset(void) dis_irsb = emptyIRSB(); } - /* Otherwise we won't make it through s390_irgen_EXRL. */ - last_execute_target = 42; + /* Otherwise we won't make it through s390_irgen_EX. */ +#define Invalid_execute_target 1 + last_execute_target = Invalid_execute_target; } From aa03f7e8d19b46ce40ae7aca2b31d897466b1726 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 1 Jan 2026 09:56:54 +0100 Subject: [PATCH 216/502] Update AUTHORS Add an entry for Louis Brunner describing his macOS work. Update my own entry to match the one for the 'developers' page on valgrind.org. --- AUTHORS | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index cff2c893d..e27725b5d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -86,8 +86,12 @@ s390. Rhys Kidd updated and maintains the macOS port. -Paul Floyd maintains the FreeBSD port and occasionally fixes Solaris -and macOS issues. +Paul Floyd maintains the FreeBSD and illumos ports and generally +tries to deal with issues related to threading, C++, ELF reading +and the Darwin port. + +Louis Brunner updated and maintains the macOS port from +macOS 10.12 onwards. Many, many people sent bug reports, patches, and helpful feedback. From 3ed264869c2b64cdbc02ee97807fa56c65d8ffad Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 1 Jan 2026 18:56:28 +0100 Subject: [PATCH 217/502] libcfile VG_(lstat): make the #else #elif darwin and add a proper #else with a #error, which was missing --- coregrind/m_libcfile.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index a84f22ffd..c4e7dddc1 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -711,12 +711,16 @@ struct vki_stat buf; res = VG_(do_syscall4)(__NR_fstatat, VKI_AT_FDCWD, (UWord)file_name, (UWord)&buf, VKI_AT_SYMLINK_NOFOLLOW); #endif -#else +#elif defined(VGO_darwin) /* check this on Darwin */ struct vki_stat buf; res = VG_(do_syscall2)(__NR_lstat, (UWord)file_name, (UWord)&buf); +#else + +#error Unknown OS + #endif if (!sr_isError(res)) { From 370531396ad180a30332caa6a22bb08e836e266b Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 2 Jan 2026 16:44:49 +0000 Subject: [PATCH 218/502] s390: Use objdump machinery to disassemble insns New directory VEX/priv/objdump to contain the bits and pieces needed from binutils. s390_disasm.c removed as the S390_DISASM machinery is no longer needed. host_s390_defs.c and guest_s390_toIR.c adjusted accordingly. Part of fixing https://bugs.kde.org/show_bug.cgi?id=510840 --- .gitignore | 4 + Makefile.vex.am | 12 +- NEWS | 3 +- VEX/priv/guest_s390_toIR.c | 5386 +++++++++++---------------------- VEX/priv/host_s390_defs.c | 1111 +------ VEX/priv/objdump/README | 16 + VEX/priv/objdump/dis-asm.h | 502 +++ VEX/priv/objdump/dis-init.c | 56 + VEX/priv/objdump/s390-dis.c | 701 +++++ VEX/priv/objdump/s390-opc.c | 814 +++++ VEX/priv/objdump/s390-opc.tab | 2793 +++++++++++++++++ VEX/priv/objdump/s390.h | 197 ++ VEX/priv/objdump/stubs.h | 49 + VEX/priv/s390_disasm.c | 1267 -------- VEX/priv/s390_disasm.h | 109 +- 15 files changed, 6849 insertions(+), 6171 deletions(-) create mode 100644 VEX/priv/objdump/README create mode 100644 VEX/priv/objdump/dis-asm.h create mode 100644 VEX/priv/objdump/dis-init.c create mode 100644 VEX/priv/objdump/s390-dis.c create mode 100644 VEX/priv/objdump/s390-opc.c create mode 100644 VEX/priv/objdump/s390-opc.tab create mode 100644 VEX/priv/objdump/s390.h create mode 100644 VEX/priv/objdump/stubs.h delete mode 100644 VEX/priv/s390_disasm.c diff --git a/.gitignore b/.gitignore index 7bdac9edf..039ce52a9 100644 --- a/.gitignore +++ b/.gitignore @@ -2538,6 +2538,10 @@ none/tests/freebsd/bug499212 /VEX/priv/.deps /VEX/priv/.dirstamp +# /VEX/priv/objdump +/VEX/priv/objdump/.deps +/VEX/priv/objdump/.dirstamp + # /VEX/pub/ /VEX/pub/libvex_guest_offsets.h diff --git a/Makefile.vex.am b/Makefile.vex.am index f75e9b4c6..437053e03 100644 --- a/Makefile.vex.am +++ b/Makefile.vex.am @@ -68,7 +68,10 @@ noinst_HEADERS = \ priv/host_mips_defs.h \ priv/host_nanomips_defs.h \ priv/common_nanomips_defs.h \ - priv/host_riscv64_defs.h + priv/host_riscv64_defs.h \ + priv/objdump/dis-asm.h \ + priv/objdump/s390.h \ + priv/objdump/stubs.h BUILT_SOURCES = pub/libvex_guest_offsets.h CLEANFILES = pub/libvex_guest_offsets.h @@ -178,13 +181,16 @@ LIBVEX_SOURCES_COMMON = \ priv/host_arm64_isel.c \ priv/host_s390_defs.c \ priv/host_s390_isel.c \ - priv/s390_disasm.c \ priv/host_mips_defs.c \ priv/host_nanomips_defs.c \ priv/host_mips_isel.c \ priv/host_nanomips_isel.c \ priv/host_riscv64_defs.c \ - priv/host_riscv64_isel.c + priv/host_riscv64_isel.c \ + priv/objdump/dis-init.c \ + priv/objdump/s390-dis.c \ + priv/objdump/s390-opc.c \ + priv/objdump/s390-opc.tab LIBVEXMULTIARCH_SOURCES = priv/multiarch_main_main.c diff --git a/NEWS b/NEWS index 4a2593eaf..e0bdc122c 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,7 @@ X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support for nanoMIPS/Linux. macOS is supported up to version 12 Monterey (amd64 only). -* ==================== CORE CHANGES =================== + ==================== CORE CHANGES =================== * ================== PLATFORM CHANGES ================= @@ -1121,6 +1121,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 506211 Constant folding improvements 506453 Unexpected behaviour with IR injection and vex-guest-chase=yes 509157 riscv64: Shift instructions can behave wrong +510840 Use objdump for disassembly in VEX (s390x only) To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 9e850b78f..11c50dc00 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -49,17 +49,6 @@ static UInt s390_decode_and_irgen(const UChar *, UInt, DisResult *); static void s390_irgen_xonc(IROp, IRTemp, IRTemp, IRTemp); static void s390_irgen_CLC_EX(IRTemp, IRTemp, IRTemp); -static const HChar *s390_irgen_BIC(UChar, IRTemp); -static const HChar *s390_irgen_VPDI(UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_VFLR(UChar, UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_VFI(UChar, UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_VFPSO(UChar, UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_VCGD(UChar, UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_VCDG(UChar, UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_VCDLG(UChar, UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_VCLGD(UChar, UChar, UChar, UChar, UChar); -static const HChar *s390_irgen_KMA(UChar, UChar, UChar); -static const HChar *s390_irgen_KMCTR(UChar, UChar, UChar); /*------------------------------------------------------------*/ /*--- Globals ---*/ @@ -661,12 +650,12 @@ yield_if(IRExpr *condition) /* Convenience macro to yield a specification exception if the given condition is not met. Used to pass this type of decoding error up through the call chain. */ -#define s390_insn_assert(mnm, cond) \ +#define s390_insn_assert(cond) \ do { \ if (!(cond)) { \ dis_res->whatNext = Dis_StopHere; \ dis_res->jk_StopHere = Ijk_NoDecode; \ - return (mnm); \ + return; \ } \ } while (0) @@ -2716,622 +2705,440 @@ convert_vex_dfpcc_to_s390(IRTemp vex_cc) /*--- Build IR for formats ---*/ /*------------------------------------------------------------*/ static void -s390_format_I(const HChar *(*irgen)(UChar i), +s390_format_I(void (*irgen)(UChar i), UChar i) { - const HChar *mnm = irgen(i); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UINT(i)); + irgen(i); } static void -s390_format_IE(const HChar *(*irgen)(UChar i1, UChar i2), +s390_format_IE(void (*irgen)(UChar i1, UChar i2), UChar i1, UChar i2) { - const HChar *mnm = irgen(i1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UINT(i1), UINT(i2)); + irgen(i1, i2); } static void -s390_format_E(const HChar *(*irgen)(void)) +s390_format_E(void (*irgen)(void)) { - const HChar *mnm = irgen(); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm)); + irgen(); } static void -s390_format_MII_UPP(const HChar *(*irgen)(UChar m1, UShort i2, UInt i3), +s390_format_MII_UPP(void (*irgen)(UChar m1, UShort i2, UInt i3), UChar m1, UShort i2, UInt i3) { - const HChar *mnm; - - mnm = irgen(m1, i2, i3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UINT(m1), PCREL((Int)((Short)(i2 << 4) >> 4)), - PCREL((Int)(i3 << 8) >> 8)); + irgen(m1, i2, i3); } static void -s390_format_RI(const HChar *(*irgen)(UChar r1, UShort i2), +s390_format_RI(void (*irgen)(UChar r1, UShort i2), UChar r1, UShort i2) { irgen(r1, i2); } static void -s390_format_RI_RU(const HChar *(*irgen)(UChar r1, UShort i2), +s390_format_RI_RU(void (*irgen)(UChar r1, UShort i2), UChar r1, UShort i2) { - const HChar *mnm = irgen(r1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), UINT(i2)); + irgen(r1, i2); } static void -s390_format_RI_RI(const HChar *(*irgen)(UChar r1, UShort i2), +s390_format_RI_RI(void (*irgen)(UChar r1, UShort i2), UChar r1, UShort i2) { - const HChar *mnm = irgen(r1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), INT((Int)(Short)i2)); + irgen(r1, i2); } static void -s390_format_RI_RP(const HChar *(*irgen)(UChar r1, UShort i2), +s390_format_RI_RP(void (*irgen)(UChar r1, UShort i2), UChar r1, UShort i2) { - const HChar *mnm = irgen(r1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), PCREL((Int)(Short)i2)); + irgen(r1, i2); } static void -s390_format_RIE_RRP(const HChar *(*irgen)(UChar r1, UChar r3, UShort i2), +s390_format_RIE_RRP(void (*irgen)(UChar r1, UChar r3, UShort i2), UChar r1, UChar r3, UShort i2) { - const HChar *mnm = irgen(r1, r3, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r3), PCREL((Int)(Short)i2)); + irgen(r1, r3, i2); } static void -s390_format_RIE_RRI0(const HChar *(*irgen)(UChar r1, UChar r3, UShort i2), +s390_format_RIE_RRI0(void (*irgen)(UChar r1, UChar r3, UShort i2), UChar r1, UChar r3, UShort i2) { - const HChar *mnm = irgen(r1, r3, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r3), INT((Int)(Short)i2)); + irgen(r1, r3, i2); } static void -s390_format_RIE_RRUUU(const HChar *(*irgen)(UChar r1, UChar r2, UChar i3, - UChar i4, UChar i5), +s390_format_RIE_RRUUU(void (*irgen)(UChar r1, UChar r2, UChar i3, + UChar i4, UChar i5), UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { - const HChar *mnm = irgen(r1, r2, i3, i4, i5); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, rotate_disasm), GPR(r1), GPR(r2), MASK(i3), MASK(i4), MASK(i5)); + irgen(r1, r2, i3, i4, i5); } static void -s390_format_R0UU(const HChar *(*irgen)(UChar r1, UShort i2, UChar m3), +s390_format_R0UU(void (*irgen)(UChar r1, UShort i2, UChar m3), UChar r1, UShort i2, UChar m3) { - const HChar *mnm = irgen(r1, i2, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), INT(i2), MASK(m3)); + irgen(r1, i2, m3); } static void -s390_format_R0IU(const HChar *(*irgen)(UChar r1, UShort i2, UChar m3), +s390_format_R0IU(void (*irgen)(UChar r1, UShort i2, UChar m3), UChar r1, UShort i2, UChar m3) { - const HChar *mnm = irgen(r1, i2, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), INT((Int)(Short)i2), MASK(m3)); + irgen(r1, i2, m3); } static void -s390_format_RIE_RRPU(const HChar *(*irgen)(UChar r1, UChar r2, UShort i4, - UChar m3), +s390_format_RIE_RRPU(void (*irgen)(UChar r1, UChar r2, UShort i4, UChar m3), UChar r1, UChar r2, UShort i4, UChar m3) { - const HChar *mnm = irgen(r1, r2, i4, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), GPR(r2), MASK(m3), PCREL((Int)(Short)i4)); + irgen(r1, r2, i4, m3); } static void -s390_format_RIE_RUPU(const HChar *(*irgen)(UChar r1, UChar m3, UShort i4, - UChar i2), +s390_format_RIE_RUPU(void (*irgen)(UChar r1, UChar m3, UShort i4, UChar i2), UChar r1, UChar m3, UShort i4, UChar i2) { - const HChar *mnm = irgen(r1, m3, i4, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), UINT(i2), MASK(m3), PCREL((Int)(Short)i4)); + irgen(r1, m3, i4, i2); } static void -s390_format_RIE_RUPI(const HChar *(*irgen)(UChar r1, UChar m3, UShort i4, - UChar i2), +s390_format_RIE_RUPI(void (*irgen)(UChar r1, UChar m3, UShort i4, UChar i2), UChar r1, UChar m3, UShort i4, UChar i2) { - const HChar *mnm = irgen(r1, m3, i4, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), INT((Int)(Char)i2), MASK(m3), PCREL((Int)(Short)i4)); + irgen(r1, m3, i4, i2); } static void -s390_format_RIE_RUPIX(const HChar *(*irgen)(UChar r1, UChar m3, UShort i2), +s390_format_RIE_RUPIX(void (*irgen)(UChar r1, UChar m3, UShort i2), UChar r1, UChar m3, UShort i2) { - const HChar *mnm = irgen(r1, m3, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cls_disasm), GPR(r1), INT((Int)(Short)i2), MASK(m3)); + irgen(r1, m3, i2); } static void -s390_format_RIL(const HChar *(*irgen)(UChar r1, UInt i2), +s390_format_RIL(void (*irgen)(UChar r1, UInt i2), UChar r1, UInt i2) { irgen(r1, i2); } static void -s390_format_RIL_RU(const HChar *(*irgen)(UChar r1, UInt i2), +s390_format_RIL_RU(void (*irgen)(UChar r1, UInt i2), UChar r1, UInt i2) { - const HChar *mnm = irgen(r1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), UINT(i2)); + irgen(r1, i2); } static void -s390_format_RIL_RI(const HChar *(*irgen)(UChar r1, UInt i2), +s390_format_RIL_RI(void (*irgen)(UChar r1, UInt i2), UChar r1, UInt i2) { - const HChar *mnm = irgen(r1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), INT(i2)); + irgen(r1, i2); } static void -s390_format_RIL_RP(const HChar *(*irgen)(UChar r1, UInt i2), +s390_format_RIL_RP(void (*irgen)(UChar r1, UInt i2), UChar r1, UInt i2) { - const HChar *mnm = irgen(r1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), PCREL(i2)); + irgen(r1, i2); } static void -s390_format_RIL_UP(const HChar *(*irgen)(void), - UChar r1, UInt i2) +s390_format_RIL_UP(void (*irgen)(void), + UChar r1 __attribute__((unused)), + UInt i2 __attribute__((unused))) { - const HChar *mnm = irgen(); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UINT(r1), PCREL(i2)); + irgen(); } static void -s390_format_RIS_RURDI(const HChar *(*irgen)(UChar r1, UChar m3, UChar i2, - IRTemp op4addr), +s390_format_RIS_RURDI(void (*irgen)(UChar r1, UChar m3, UChar i2, + IRTemp op4addr), UChar r1, UChar m3, UChar b4, UShort d4, UChar i2) { - const HChar *mnm; IRTemp op4addr = newTemp(Ity_I64); assign(op4addr, binop(Iop_Add64, mkU64(d4), b4 != 0 ? get_gpr_dw0(b4) : mkU64(0))); - mnm = irgen(r1, m3, i2, op4addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), INT((Int)(Char)i2), MASK(m3), UDXB(d4, 0, b4)); + irgen(r1, m3, i2, op4addr); } static void -s390_format_RIS_RURDU(const HChar *(*irgen)(UChar r1, UChar m3, UChar i2, - IRTemp op4addr), +s390_format_RIS_RURDU(void (*irgen)(UChar r1, UChar m3, UChar i2, + IRTemp op4addr), UChar r1, UChar m3, UChar b4, UShort d4, UChar i2) { - const HChar *mnm; IRTemp op4addr = newTemp(Ity_I64); assign(op4addr, binop(Iop_Add64, mkU64(d4), b4 != 0 ? get_gpr_dw0(b4) : mkU64(0))); - mnm = irgen(r1, m3, i2, op4addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), UINT(i2), MASK(m3), UDXB(d4, 0, b4)); + irgen(r1, m3, i2, op4addr); } static void -s390_format_RR(const HChar *(*irgen)(UChar r1, UChar r2), +s390_format_RR(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) { irgen(r1, r2); } static void -s390_format_RR_RR(const HChar *(*irgen)(UChar r1, UChar r2), +s390_format_RR_RR(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) { - const HChar *mnm = irgen(r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r2)); + irgen(r1, r2); } static void -s390_format_RR_FF(const HChar *(*irgen)(UChar r1, UChar r2), +s390_format_RR_FF(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) { - const HChar *mnm = irgen(r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r2)); + irgen(r1, r2); } static void -s390_format_RRE(const HChar *(*irgen)(UChar r1, UChar r2), +s390_format_RRE(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) { irgen(r1, r2); } static void -s390_format_RRE_RR(const HChar *(*irgen)(UChar r1, UChar r2), +s390_format_RRE_RR(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) { - const HChar *mnm = irgen(r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r2)); + irgen(r1, r2); } static void -s390_format_RRE_FF(const HChar *(*irgen)(UChar r1, UChar r2), +s390_format_RRE_FF(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) { - const HChar *mnm = irgen(r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r2)); + irgen(r1, r2); } static void -s390_format_RRE_RF(const HChar *(*irgen)(UChar, UChar), +s390_format_RRE_RF(void (*irgen)(UChar, UChar), UChar r1, UChar r2) { - const HChar *mnm = irgen(r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), FPR(r2)); + irgen(r1, r2); } static void -s390_format_RRE_FR(const HChar *(*irgen)(UChar r1, UChar r2), +s390_format_RRE_FR(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) { - const HChar *mnm = irgen(r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), GPR(r2)); + irgen(r1, r2); } static void -s390_format_RRE_R0(const HChar *(*irgen)(UChar r1), +s390_format_RRE_R0(void (*irgen)(UChar r1), UChar r1) { - const HChar *mnm = irgen(r1); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1)); + irgen(r1); } static void -s390_format_RRE_F0(const HChar *(*irgen)(UChar r1), +s390_format_RRE_F0(void (*irgen)(UChar r1), UChar r1) { - const HChar *mnm = irgen(r1); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1)); + irgen(r1); } static void -s390_format_RRF_M0RERE(const HChar *(*irgen)(UChar m3, UChar r1, UChar r2), +s390_format_RRF_M0RERE(void (*irgen)(UChar m3, UChar r1, UChar r2), UChar m3, UChar r1, UChar r2) { - const HChar *mnm = irgen(m3, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, mask0_disasm), GPR(r1), GPR(r2), MASK(m3)); + irgen(m3, r1, r2); } static void -s390_format_RRF_F0FF(const HChar *(*irgen)(UChar, UChar, UChar), +s390_format_RRF_F0FF(void (*irgen)(UChar, UChar, UChar), UChar r1, UChar r3, UChar r2) { - const HChar *mnm = irgen(r1, r3, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r3), FPR(r2)); + irgen(r1, r3, r2); } static void -s390_format_RRF_F0FR(const HChar *(*irgen)(UChar, UChar, UChar), +s390_format_RRF_F0FR(void (*irgen)(UChar, UChar, UChar), UChar r3, UChar r1, UChar r2) { - const HChar *mnm = irgen(r3, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r3), GPR(r2)); + irgen(r3, r1, r2); } static void -s390_format_RRF_UUFF(const HChar *(*irgen)(UChar m3, UChar m4, UChar r1, - UChar r2), +s390_format_RRF_UUFF(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), UChar m3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(m3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); + irgen(m3, m4, r1, r2); } static void -s390_format_RRF_UUFF2(const HChar *(*irgen)(UChar m3, UChar m4, UChar r1, - UChar r2), +s390_format_RRF_UUFF2(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), UChar m3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(m3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, fp_convt_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); + irgen(m3, m4, r1, r2); } static void -s390_format_RRF_0UFF(const HChar *(*irgen)(UChar m4, UChar r1, UChar r2), +s390_format_RRF_0UFF(void (*irgen)(UChar m4, UChar r1, UChar r2), UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r2), UINT(m4)); + irgen(m4, r1, r2); } static void -s390_format_RRF_UUFR(const HChar *(*irgen)(UChar m3, UChar m4, UChar r1, - UChar r2), +s390_format_RRF_UUFR(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), UChar m3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(m3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); + irgen(m3, m4, r1, r2); } static void -s390_format_RRF_UURF(const HChar *(*irgen)(UChar m3, UChar m4, UChar r1, - UChar r2), +s390_format_RRF_UURF(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), UChar m3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(m3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); + irgen(m3, m4, r1, r2); } static void -s390_format_RRF_U0RR(const HChar *(*irgen)(UChar m3, UChar r1, UChar r2), - UChar m3, UChar r1, UChar r2, HChar *(*handler)(const s390_opnd *, HChar *)) +s390_format_RRF_U0RR(void (*irgen)(UChar m3, UChar r1, UChar r2), + UChar m3, UChar r1, UChar r2) { - const HChar *mnm = irgen(m3, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, handler), GPR(r1), GPR(r2), MASK(m3)); + irgen(m3, r1, r2); } static void -s390_format_RRFa_U0RR(const HChar *(*irgen)(UChar m3, UChar r1, UChar r2), +s390_format_RRFa_U0RR(void (*irgen)(UChar m3, UChar r1, UChar r2), UChar m3, UChar r1, UChar r2) { - const HChar *mnm = irgen(m3, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) { - if (m3 != 0) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r2), UINT(m3)); - else - S390_DISASM(MNM(mnm), GPR(r1), GPR(r2)); - } + irgen(m3, r1, r2); } static void -s390_format_RRF_F0FF2(const HChar *(*irgen)(UChar, UChar, UChar), +s390_format_RRF_F0FF2(void (*irgen)(UChar, UChar, UChar), UChar r3, UChar r1, UChar r2) { - const HChar *mnm = irgen(r3, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r3), FPR(r2)); + irgen(r3, r1, r2); } static void -s390_format_RRF_FFRU(const HChar *(*irgen)(UChar, UChar, UChar, UChar), +s390_format_RRF_FFRU(void (*irgen)(UChar, UChar, UChar, UChar), UChar r3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(r3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r3), GPR(r2), UINT(m4)); + irgen(r3, m4, r1, r2); } static void -s390_format_RRF_FUFF(const HChar *(*irgen)(UChar, UChar, UChar, UChar), +s390_format_RRF_FUFF(void (*irgen)(UChar, UChar, UChar, UChar), UChar r3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(r3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r3), FPR(r2), UINT(m4)); + irgen(r3, m4, r1, r2); } static void -s390_format_RRF_FUFF2(const HChar *(*irgen)(UChar, UChar, UChar, UChar), +s390_format_RRF_FUFF2(void (*irgen)(UChar, UChar, UChar, UChar), UChar r3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(r3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); + irgen(r3, m4, r1, r2); } static void -s390_format_RRF_RURR(const HChar *(*irgen)(UChar, UChar, UChar, UChar), +s390_format_RRF_RURR(void (*irgen)(UChar, UChar, UChar, UChar), UChar r3, UChar m4, UChar r1, UChar r2) { - const HChar *mnm = irgen(r3, m4, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cls_disasm), GPR(r1), GPR(r2), GPR(r3), MASK(m4)); + irgen(r3, m4, r1, r2); } static void -s390_format_RRF_R0RR2(const HChar *(*irgen)(UChar r3, UChar r1, UChar r2), +s390_format_RRF_R0RR2(void (*irgen)(UChar r3, UChar r1, UChar r2), UChar r3, UChar r1, UChar r2) { - const HChar *mnm = irgen(r3, r1, r2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) { - if (irgen == s390_irgen_KMA || irgen == s390_irgen_KMCTR) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r3), GPR(r2)); - else - S390_DISASM(MNM(mnm), GPR(r1), GPR(r2), GPR(r3)); - } + irgen(r3, r1, r2); } static void -s390_format_RRS(const HChar *(*irgen)(UChar r1, UChar r2, UChar m3, - IRTemp op4addr), +s390_format_RRS(void (*irgen)(UChar r1, UChar r2, UChar m3, IRTemp op4addr), UChar r1, UChar r2, UChar b4, UShort d4, UChar m3) { - const HChar *mnm; IRTemp op4addr = newTemp(Ity_I64); assign(op4addr, binop(Iop_Add64, mkU64(d4), b4 != 0 ? get_gpr_dw0(b4) : mkU64(0))); - mnm = irgen(r1, r2, m3, op4addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), GPR(r2), MASK(m3), UDXB(d4, 0, b4)); + irgen(r1, r2, m3, op4addr); } static void -s390_format_RS_R0RD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), +s390_format_RS_R0RD(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), UDXB(d2, 0, b2)); + irgen(r1, op2addr); } static void -s390_format_RS_RRRD(const HChar *(*irgen)(UChar r1, UChar r3, IRTemp op2addr), +s390_format_RS_RRRD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), UChar r1, UChar r3, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, r3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r3), UDXB(d2, 0, b2)); + irgen(r1, r3, op2addr); } static void -s390_format_RS_RURD(const HChar *(*irgen)(UChar r1, UChar r3, IRTemp op2addr), +s390_format_RS_RURD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), UChar r1, UChar r3, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, r3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), UINT(r3), UDXB(d2, 0, b2)); + irgen(r1, r3, op2addr); } static void -s390_format_RS_AARD(const HChar *(*irgen)(UChar, UChar, IRTemp), +s390_format_RS_AARD(void (*irgen)(UChar, UChar, IRTemp), UChar r1, UChar r3, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, r3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), AR(r1), AR(r3), UDXB(d2, 0, b2)); + irgen(r1, r3, op2addr); } static void -s390_format_RSI_RRP(const HChar *(*irgen)(UChar r1, UChar r3, UShort i2), +s390_format_RSI_RRP(void (*irgen)(UChar r1, UChar r3, UShort i2), UChar r1, UChar r3, UShort i2) { - const HChar *mnm = irgen(r1, r3, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r3), PCREL((Int)(Short)i2)); + irgen(r1, r3, i2); } static void -s390_format_RSY_RRRD(const HChar *(*irgen)(UChar r1, UChar r3, IRTemp op2addr), +s390_format_RSY_RRRD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -3339,17 +3146,13 @@ s390_format_RSY_RRRD(const HChar *(*irgen)(UChar r1, UChar r3, IRTemp op2addr), assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, r3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); + irgen(r1, r3, op2addr); } static void -s390_format_RSY_AARD(const HChar *(*irgen)(UChar, UChar, IRTemp), +s390_format_RSY_AARD(void (*irgen)(UChar, UChar, IRTemp), UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -3357,17 +3160,13 @@ s390_format_RSY_AARD(const HChar *(*irgen)(UChar, UChar, IRTemp), assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, r3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), AR(r1), AR(r3), SDXB(dh2, dl2, 0, b2)); + irgen(r1, r3, op2addr); } static void -s390_format_RSY_RURD(const HChar *(*irgen)(UChar r1, UChar m3, IRTemp op2addr), +s390_format_RSY_RURD(void (*irgen)(UChar r1, UChar m3, IRTemp op2addr), UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -3375,17 +3174,13 @@ s390_format_RSY_RURD(const HChar *(*irgen)(UChar r1, UChar m3, IRTemp op2addr), assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, m3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), UINT(m3), SDXB(dh2, dl2, 0, b2)); + irgen(r1, m3, op2addr); } static void -s390_format_RSY_R0RD(const HChar *(*irgen)(UChar r1, UChar m3, IRTemp op2addr), +s390_format_RSY_R0RD(void (*irgen)(UChar r1, UChar m3, IRTemp op2addr), UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -3393,14 +3188,11 @@ s390_format_RSY_R0RD(const HChar *(*irgen)(UChar r1, UChar m3, IRTemp op2addr), assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(r1, m3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cabt_disasm), GPR(r1), MASK(m3), SDXB(dh2, dl2, 0, b2)); + irgen(r1, m3, op2addr); } static void -s390_format_RSY_RDRM(const HChar *(*irgen)(UChar r1, IRTemp op2addr), +s390_format_RSY_RDRM(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) { IRTemp op2addr = newTemp(Ity_I64); @@ -3412,17 +3204,14 @@ s390_format_RSY_RDRM(const HChar *(*irgen)(UChar r1, IRTemp op2addr), assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - const HChar *mnm = irgen(r1, op2addr); + irgen(r1, op2addr); vassert(dis_res->whatNext == Dis_Continue); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, cls_disasm), GPR(r1), SDXB(dh2, dl2, 0, b2), MASK(m3)); } static void -s390_format_RX(const HChar *(*irgen)(UChar r1, UChar x2, UChar b2, UShort d2, - IRTemp op2addr), +s390_format_RX(void (*irgen)(UChar r1, UChar x2, UChar b2, UShort d2, + IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort d2) { IRTemp op2addr = newTemp(Ity_I64); @@ -3435,95 +3224,74 @@ s390_format_RX(const HChar *(*irgen)(UChar r1, UChar x2, UChar b2, UShort d2, } static void -s390_format_RX_RRRD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), +s390_format_RX_RRRD(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - mnm = irgen(r1, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), UDXB(d2, x2, b2)); + irgen(r1, op2addr); } static void -s390_format_RX_FRRD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), +s390_format_RX_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - mnm = irgen(r1, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), UDXB(d2, x2, b2)); + irgen(r1, op2addr); } static void -s390_format_RXE_FRRD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), +s390_format_RXE_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - mnm = irgen(r1, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), UDXB(d2, x2, b2)); + irgen(r1, op2addr); } static void -s390_format_RXE_RRRDR(const HChar *(*irgen)(UChar r1, IRTemp op2addr, UChar m3), - UChar r1, UChar x2, UChar b2, UShort d2, UChar m3) +s390_format_RXE_RRRDR(void (*irgen)(UChar r1, IRTemp op2addr, UChar m3), + UChar r1, UChar x2, UChar b2, UShort d2, UChar m3) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - mnm = irgen(r1, op2addr, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), GPR(r1), UDXB(d2, x2, b2), UINT(m3)); + irgen(r1, op2addr, m3); } static void -s390_format_RXF_FRRDF(const HChar *(*irgen)(UChar, IRTemp, UChar), +s390_format_RXF_FRRDF(void (*irgen)(UChar, IRTemp, UChar), UChar r3, UChar x2, UChar b2, UShort d2, UChar r1) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - mnm = irgen(r3, op2addr, r1); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), FPR(r3), UDXB(d2, x2, b2)); + irgen(r3, op2addr, r1); } static void -s390_format_RXY_RRRD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), +s390_format_RXY_RRRD(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -3532,21 +3300,13 @@ s390_format_RXY_RRRD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - mnm = irgen(r1, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) { - if (irgen == s390_irgen_BIC) - S390_DISASM(XMNM(mnm, bic_disasm), MASK(r1), SDXB(dh2, dl2, x2, b2)); - else - S390_DISASM(MNM(mnm), GPR(r1), SDXB(dh2, dl2, x2, b2)); - } + irgen(r1, op2addr); } static void -s390_format_RXY_FRRD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), +s390_format_RXY_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -3555,80 +3315,55 @@ s390_format_RXY_FRRD(const HChar *(*irgen)(UChar r1, IRTemp op2addr), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - mnm = irgen(r1, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), FPR(r1), SDXB(dh2, dl2, x2, b2)); + irgen(r1, op2addr); } static void -s390_format_RXY_URRD(const HChar *(*irgen)(void), - UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) +s390_format_RXY_URRD(void (*irgen)(void), + UChar r1 __attribute__((unused)), + UChar x2 __attribute__((unused)), + UChar b2 __attribute__((unused)), + UShort dl2 __attribute__((unused)), + UChar dh2 __attribute__((unused))) { - const HChar *mnm; - IRTemp op2addr = newTemp(Ity_I64); - IRTemp d2 = newTemp(Ity_I64); - - assign(d2, mkU64(((ULong)(Long)(Char)dh2 << 12) | ((ULong)dl2))); - assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkexpr(d2), - b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : - mkU64(0))); - - mnm = irgen(); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UINT(r1), SDXB(dh2, dl2, x2, b2)); + irgen(); } static void -s390_format_S_RD(const HChar *(*irgen)(IRTemp op2addr), +s390_format_S_RD(void (*irgen)(IRTemp op2addr), UChar b2, UShort d2) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UDXB(d2, 0, b2)); + irgen(op2addr); } static void -s390_format_S_RD_raw(const HChar *(*irgen)(UChar b2, UShort d2), +s390_format_S_RD_raw(void (*irgen)(UChar b2, UShort d2), UChar b2, UShort d2) { - const HChar *mnm; - - mnm = irgen(b2, d2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UDXB(d2, 0, b2)); + irgen(b2, d2); } static void -s390_format_SI_URD(const HChar *(*irgen)(UChar i2, IRTemp op1addr), +s390_format_SI_URD(void (*irgen)(UChar i2, IRTemp op1addr), UChar i2, UChar b1, UShort d1) { - const HChar *mnm; IRTemp op1addr = newTemp(Ity_I64); assign(op1addr, binop(Iop_Add64, mkU64(d1), b1 != 0 ? get_gpr_dw0(b1) : mkU64(0))); - mnm = irgen(i2, op1addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UDXB(d1, 0, b1), UINT(i2)); + irgen(i2, op1addr); } static void -s390_format_SIY_URD(const HChar *(*irgen)(UChar i2, IRTemp op1addr), +s390_format_SIY_URD(void (*irgen)(UChar i2, IRTemp op1addr), UChar i2, UChar b1, UShort dl1, UChar dh1) { - const HChar *mnm; IRTemp op1addr = newTemp(Ity_I64); IRTemp d1 = newTemp(Ity_I64); @@ -3636,17 +3371,13 @@ s390_format_SIY_URD(const HChar *(*irgen)(UChar i2, IRTemp op1addr), assign(op1addr, binop(Iop_Add64, mkexpr(d1), b1 != 0 ? get_gpr_dw0(b1) : mkU64(0))); - mnm = irgen(i2, op1addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), SDXB(dh1, dl1, 0, b1), UINT(i2)); + irgen(i2, op1addr); } static void -s390_format_SIY_IRD(const HChar *(*irgen)(UChar i2, IRTemp op1addr), +s390_format_SIY_IRD(void (*irgen)(UChar i2, IRTemp op1addr), UChar i2, UChar b1, UShort dl1, UChar dh1) { - const HChar *mnm; IRTemp op1addr = newTemp(Ity_I64); IRTemp d1 = newTemp(Ity_I64); @@ -3654,33 +3385,25 @@ s390_format_SIY_IRD(const HChar *(*irgen)(UChar i2, IRTemp op1addr), assign(op1addr, binop(Iop_Add64, mkexpr(d1), b1 != 0 ? get_gpr_dw0(b1) : mkU64(0))); - mnm = irgen(i2, op1addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), SDXB(dh1, dl1, 0, b1), INT((Int)(Char)i2)); + irgen(i2, op1addr); } static void -s390_format_SMI_U0RDP(const HChar *(*irgen)(UChar m1, UShort i2, IRTemp op3addr), +s390_format_SMI_U0RDP(void (*irgen)(UChar m1, UShort i2, IRTemp op3addr), UChar m1, UShort i2, UChar b3, UShort d3) { - const HChar *mnm; IRTemp op3addr = newTemp(Ity_I64); assign(op3addr, binop(Iop_Add64, mkU64(d3), b3 != 0 ? get_gpr_dw0(b3) : mkU64(0))); - mnm = irgen(m1, i2, op3addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UINT(m1), PCREL((Int)(Short)i2), UDXB(d3, 0, b3)); + irgen(m1, i2, op3addr); } static void -s390_format_SS_L0RDRD(const HChar *(*irgen)(UChar, IRTemp, IRTemp), +s390_format_SS_L0RDRD(void (*irgen)(UChar, IRTemp, IRTemp), UChar l, UChar b1, UShort d1, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op1addr = newTemp(Ity_I64); IRTemp op2addr = newTemp(Ity_I64); @@ -3689,17 +3412,13 @@ s390_format_SS_L0RDRD(const HChar *(*irgen)(UChar, IRTemp, IRTemp), assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(l, op1addr, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UDLB(d1, l, b1), UDXB(d2, 0, b2)); + irgen(l, op1addr, op2addr); } static void -s390_format_SSE_RDRD(const HChar *(*irgen)(IRTemp, IRTemp), +s390_format_SSE_RDRD(void (*irgen)(IRTemp, IRTemp), UChar b1, UShort d1, UChar b2, UShort d2) { - const HChar *mnm; IRTemp op1addr = newTemp(Ity_I64); IRTemp op2addr = newTemp(Ity_I64); @@ -3708,49 +3427,37 @@ s390_format_SSE_RDRD(const HChar *(*irgen)(IRTemp, IRTemp), assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(op1addr, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UDXB(d1, 0, b1), UDXB(d2, 0, b2)); + irgen(op1addr, op2addr); } static void -s390_format_SIL_RDI(const HChar *(*irgen)(UShort i2, IRTemp op1addr), +s390_format_SIL_RDI(void (*irgen)(UShort i2, IRTemp op1addr), UChar b1, UShort d1, UShort i2) { - const HChar *mnm; IRTemp op1addr = newTemp(Ity_I64); assign(op1addr, binop(Iop_Add64, mkU64(d1), b1 != 0 ? get_gpr_dw0(b1) : mkU64(0))); - mnm = irgen(i2, op1addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UDXB(d1, 0, b1), INT((Int)(Short)i2)); + irgen(i2, op1addr); } static void -s390_format_SIL_RDU(const HChar *(*irgen)(UShort i2, IRTemp op1addr), +s390_format_SIL_RDU(void (*irgen)(UShort i2, IRTemp op1addr), UChar b1, UShort d1, UShort i2) { - const HChar *mnm; IRTemp op1addr = newTemp(Ity_I64); assign(op1addr, binop(Iop_Add64, mkU64(d1), b1 != 0 ? get_gpr_dw0(b1) : mkU64(0))); - mnm = irgen(i2, op1addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), UDXB(d1, 0, b1), UINT(i2)); + irgen(i2, op1addr); } static void -s390_format_VRX_VRRD(const HChar *(*irgen)(UChar v1, IRTemp op2addr), +s390_format_VRX_VRRD(void (*irgen)(UChar v1, IRTemp op2addr), UChar v1, UChar x2, UChar b2, UShort d2, UChar m3, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3763,19 +3470,15 @@ s390_format_VRX_VRRD(const HChar *(*irgen)(UChar v1, IRTemp op2addr), mkU64(0))); v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, mask0_disasm), VR(v1), UDXB(d2, x2, b2), MASK(m3)); + irgen(v1, op2addr); } static void -s390_format_VRX_VRRDM(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar m3), - UChar v1, UChar x2, UChar b2, UShort d2, UChar m3, UChar rxb, - HChar *(*handler)(const s390_opnd *, HChar *)) +s390_format_VRX_VRRDM(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), + UChar v1, UChar x2, UChar b2, UShort d2, UChar m3, + UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3788,23 +3491,14 @@ s390_format_VRX_VRRDM(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar m3), mkU64(0))); v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, op2addr, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) { - if (handler) - S390_DISASM(XMNM(mnm, handler), VR(v1), UDXB(d2, x2, b2), MASK(m3)); - else - S390_DISASM(MNM(mnm), VR(v1), UDXB(d2, x2, b2), UINT(m3)); - } + irgen(v1, op2addr, m3); } static void -s390_format_VRR_VV(const HChar *(*irgen)(UChar v1, UChar v2), - UChar v1, UChar v2, UChar rxb) +s390_format_VRR_VV(void (*irgen)(UChar v1, UChar v2), + UChar v1, UChar v2, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3812,19 +3506,14 @@ s390_format_VRR_VV(const HChar *(*irgen)(UChar v1, UChar v2), v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); - mnm = irgen(v1, v2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), VR(v2)); + irgen(v1, v2); } static void -s390_format_VRR_VVV(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3), +s390_format_VRR_VVV(void (*irgen)(UChar v1, UChar v2, UChar v3), UChar v1, UChar v2, UChar v3, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3833,19 +3522,14 @@ s390_format_VRR_VVV(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3), v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), VR(v2), VR(v3)); + irgen(v1, v2, v3); } static void -s390_format_VRR_VVVM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, UChar m4), - UChar v1, UChar v2, UChar v3, UChar m4, UChar rxb) +s390_format_VRR_VVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4), + UChar v1, UChar v2, UChar v3, UChar m4, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3854,24 +3538,14 @@ s390_format_VRR_VVVM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, UChar m v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3, m4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) { - if (irgen == s390_irgen_VPDI) - S390_DISASM(MNM(mnm), VR(v1), VR(v2), VR(v3), UINT(m4)); - else - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - } + irgen(v1, v2, v3, m4); } static void -s390_format_VRR_VVVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5), - UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar rxb, - HChar *(*handler)(const s390_opnd *, HChar *)) +s390_format_VRR_VVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5), + UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3880,19 +3554,14 @@ s390_format_VRR_VVVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, UChar v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3, m4, m5); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, handler), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(m5)); + irgen(v1, v2, v3, m4, m5); } static void -s390_format_VRR_VVVV(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, UChar v4), - UChar v1, UChar v2, UChar v3, UChar v4, UChar rxb) +s390_format_VRR_VVVV(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4), + UChar v1, UChar v2, UChar v3, UChar v4, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3902,38 +3571,28 @@ s390_format_VRR_VVVV(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, UChar v v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); v4 = s390_vr_getVRindex(v4, 4, rxb); - mnm = irgen(v1, v2, v3, v4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), VR(v2), VR(v3), VR(v4)); + irgen(v1, v2, v3, v4); } static void -s390_format_VRR_VRR(const HChar *(*irgen)(UChar v1, UChar r2, UChar r3), +s390_format_VRR_VRR(void (*irgen)(UChar v1, UChar r2, UChar r3), UChar v1, UChar r2, UChar r3, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; } v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, r2, r3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), GPR(r2), GPR(r3)); + irgen(v1, r2, r3); } static void -s390_format_VRR_VVM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3), +s390_format_VRR_VVM(void (*irgen)(UChar v1, UChar v2, UChar m3), UChar v1, UChar v2, UChar m3, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3941,97 +3600,70 @@ s390_format_VRR_VVM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3), v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); - mnm = irgen(v1, v2, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), VR(v2), MASK(m3)); + irgen(v1, v2, m3); } static void -s390_format_VRI_V0U(const HChar *(*irgen)(UChar v1, UShort i2), - UChar v1, UShort i2, UChar rxb, - HChar *(*handler)(const s390_opnd *, HChar *)) +s390_format_VRI_V0U(void (*irgen)(UChar v1, UShort i2), + UChar v1, UShort i2, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; } v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, i2); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, handler), VR(v1), UINT(i2)); + irgen(v1, i2); } static void -s390_format_VRI_V0UUU(const HChar *(*irgen)(UChar v1, UChar i2, UChar i3, - UChar m4), +s390_format_VRI_V0UUU(void (*irgen)(UChar v1, UChar i2, UChar i3, UChar m4), UChar v1, UChar i2, UChar i3, UChar m4, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; } v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, i2, i3, m4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), UINT(i2), UINT(i3), MASK(m4)); + irgen(v1, i2, i3, m4); } static void -s390_format_VRI_V0IU(const HChar *(*irgen)(UChar v1, UShort i2, UChar m3), +s390_format_VRI_V0IU(void (*irgen)(UChar v1, UShort i2, UChar m3), UChar v1, UShort i2, UChar m3, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; } v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, i2, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), INT((Short)i2), MASK(m3)); + irgen(v1, i2, m3); } static void -s390_format_VRI_VIM(const HChar *(*irgen)(UChar v1, UShort i2, UChar m3), +s390_format_VRI_VIM(void (*irgen)(UChar v1, UShort i2, UChar m3), UChar v1, UShort i2, UChar m3, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; } v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, i2, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), INT((Short)i2), UINT(m3)); + irgen(v1, i2, m3); } static void -s390_format_VRI_VVIM(const HChar *(*irgen)(UChar v1, UChar v3, UShort i2, UChar m4), - UChar v1, UChar v3, UShort i2, UChar m4, UChar rxb) +s390_format_VRI_VVIM(void (*irgen)(UChar v1, UChar v3, UShort i2, UChar m4), + UChar v1, UChar v3, UShort i2, UChar m4, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4039,20 +3671,15 @@ s390_format_VRI_VVIM(const HChar *(*irgen)(UChar v1, UChar v3, UShort i2, UChar v1 = s390_vr_getVRindex(v1, 1, rxb); v3 = s390_vr_getVRindex(v3, 2, rxb); - mnm = irgen(v1, v3, i2, m4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), VR(v3), UINT(i2), MASK(m4)); + irgen(v1, v3, i2, m4); } static void -s390_format_VRI_VVIMM(const HChar *(*irgen)(UChar v1, UChar v2, UShort i3, - UChar m4, UChar m5), +s390_format_VRI_VVIMM(void (*irgen)(UChar v1, UChar v2, UShort i3, + UChar m4, UChar m5), UChar v1, UChar v2, UShort i3, UChar m4, UChar m5, UChar rxb) { - const HChar *mnm; - if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4060,18 +3687,14 @@ s390_format_VRI_VVIMM(const HChar *(*irgen)(UChar v1, UChar v2, UShort i3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); - mnm = irgen(v1, v2, i3, m4, m5); - - if (vex_traceflags & VEX_TRACE_FE) - S390_DISASM(XMNM(mnm, vfmix_like_disasm), VR(v1), VR(v2), UINT(i3), MASK(m4), MASK(m5)); + irgen(v1, v2, i3, m4, m5); } static void -s390_format_VRS_RRDVM(const HChar *(*irgen)(UChar r1, IRTemp op2addr, UChar v3, +s390_format_VRS_RRDVM(void (*irgen)(UChar r1, IRTemp op2addr, UChar v3, UChar m4), UChar r1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -4083,17 +3706,13 @@ s390_format_VRS_RRDVM(const HChar *(*irgen)(UChar r1, IRTemp op2addr, UChar v3, mkU64(0))); v3 = s390_vr_getVRindex(v3, 2, rxb); - mnm = irgen(r1, op2addr, v3, m4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), GPR(r1), VR(v3), UDXB(d2, 0, b2), MASK(m4)); + irgen(r1, op2addr, v3, m4); } static void -s390_format_VRS_RRDV(const HChar *(*irgen)(UChar v1, UChar r3, IRTemp op2addr), +s390_format_VRS_RRDV(void (*irgen)(UChar v1, UChar r3, IRTemp op2addr), UChar v1, UChar r3, UChar b2, UShort d2, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -4105,19 +3724,15 @@ s390_format_VRS_RRDV(const HChar *(*irgen)(UChar v1, UChar r3, IRTemp op2addr), mkU64(0))); v1 = s390_vr_getVRindex(v1, 4, rxb); - mnm = irgen(v1, r3, op2addr); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), GPR(r3), UDXB(d2, 0, b2)); + irgen(v1, r3, op2addr); } static void -s390_format_VRS_VRDVM(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar v3, +s390_format_VRS_VRDVM(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3, UChar m4), UChar v1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -4130,18 +3745,14 @@ s390_format_VRS_VRDVM(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar v3, v1 = s390_vr_getVRindex(v1, 1, rxb); v3 = s390_vr_getVRindex(v3, 2, rxb); - mnm = irgen(v1, op2addr, v3, m4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), VR(v3), UDXB(d2, 0, b2), MASK(m4)); + irgen(v1, op2addr, v3, m4); } static void -s390_format_VRS_VRDV(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar v3), +s390_format_VRS_VRDV(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3), UChar v1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -4154,19 +3765,15 @@ s390_format_VRS_VRDV(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar v3), v1 = s390_vr_getVRindex(v1, 1, rxb); v3 = s390_vr_getVRindex(v3, 2, rxb); - mnm = irgen(v1, op2addr, v3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, mask0_disasm), VR(v1), VR(v3), UDXB(d2, 0, b2), MASK(m4)); + irgen(v1, op2addr, v3); } static void -s390_format_VRS_VRRDM(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar r3, - UChar m4), - UChar v1, UChar b2, UShort d2, UChar r3, UChar m4, UChar rxb) +s390_format_VRS_VRRDM(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3, + UChar m4), + UChar v1, UChar b2, UShort d2, UChar r3, UChar m4, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -4178,18 +3785,14 @@ s390_format_VRS_VRRDM(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar r3, mkU64(0))); v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, op2addr, r3, m4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), GPR(r3), UDXB(d2, 0, b2), MASK(m4)); + irgen(v1, op2addr, r3, m4); } static void -s390_format_VRS_VRRD(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar r3), +s390_format_VRS_VRRD(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3), UChar v1, UChar b2, UShort d2, UChar r3, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -4201,19 +3804,15 @@ s390_format_VRS_VRRD(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar r3), mkU64(0))); v1 = s390_vr_getVRindex(v1, 1, rxb); - mnm = irgen(v1, op2addr, r3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), GPR(r3), UDXB(d2, 0, b2)); + irgen(v1, op2addr, r3); } static void -s390_format_VRV_VVRDMT(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar m3), +s390_format_VRV_VVRDMT(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), UChar v1, UChar v2, UChar b2, UShort d2, UChar m3, UChar rxb, IRType type) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -4235,22 +3834,16 @@ s390_format_VRV_VVRDMT(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar m3) assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2)); - mnm = irgen(v1, op2addr, m3); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), UDVB(d2, v2, b2), UINT(m3)); + irgen(v1, op2addr, m3); } static void -s390_format_VRR_VVVVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, - UChar v4, UChar m5, UChar m6), +s390_format_VRR_VVVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, + UChar v4, UChar m5, UChar m6), UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, - UChar m6, UChar rxb, - HChar *(*handler)(const s390_opnd *, HChar *)) + UChar m6, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4260,20 +3853,15 @@ s390_format_VRR_VVVVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); v4 = s390_vr_getVRindex(v4, 4, rxb); - mnm = irgen(v1, v2, v3, v4, m5, m6); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, handler), VR(v1), VR(v2), VR(v3), VR(v4), MASK(m5), MASK(m6)); + irgen(v1, v2, v3, v4, m5, m6); } static void -s390_format_VRR_VVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3, - UChar m5), +s390_format_VRR_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, + UChar m5), UChar v1, UChar v2, UChar m3, UChar m5, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4281,21 +3869,16 @@ s390_format_VRR_VVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); - mnm = irgen(v1, v2, m3, m5); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, vch_like_disasm), VR(v1), VR(v2), MASK(m3), MASK(m5)); + irgen(v1, v2, m3, m5); } static void -s390_format_VRId_VVVIM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, - UChar i4, UChar m5), +s390_format_VRId_VVVIM(void (*irgen)(UChar v1, UChar v2, UChar v3, + UChar i4, UChar m5), UChar v1, UChar v2, UChar v3, UChar i4, UChar m5, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4304,20 +3887,15 @@ s390_format_VRId_VVVIM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3, i4, m5); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), VR(v2), VR(v3), UINT(i4), MASK(m5)); + irgen(v1, v2, v3, i4, m5); } static void -s390_format_VRId_VVVI(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, - UChar i4), +s390_format_VRId_VVVI(void (*irgen)(UChar v1, UChar v2, UChar v3, + UChar i4), UChar v1, UChar v2, UChar v3, UChar i4, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4326,21 +3904,16 @@ s390_format_VRId_VVVI(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3, i4); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM(mnm), VR(v1), VR(v2), VR(v3), UINT(i4)); + irgen(v1, v2, v3, i4); } static void -s390_format_VRRd_VVVVM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, - UChar v4, UChar m5), +s390_format_VRRd_VVVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, + UChar v4, UChar m5), UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar rxb) { - const HChar *mnm; - if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4350,21 +3923,16 @@ s390_format_VRRd_VVVVM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); v4 = s390_vr_getVRindex(v4, 4, rxb); - mnm = irgen(v1, v2, v3, v4, m5); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM(mnm, va_like_disasm), VR(v1), VR(v2), VR(v3), VR(v4), MASK(m5)); + irgen(v1, v2, v3, v4, m5); } static void -s390_format_VRRa_VVMMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3, - UChar m4, UChar m5), +s390_format_VRRa_VVMMM(void (*irgen)(UChar v1, UChar v2, UChar m3, + UChar m4, UChar m5), UChar v1, UChar v2, UChar m3, UChar m4, UChar m5, UChar rxb) { - const HChar *mnm; - if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4372,36 +3940,15 @@ s390_format_VRRa_VVMMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); - mnm = irgen(v1, v2, m3, m4, m5); - - if (vex_traceflags & VEX_TRACE_FE) { - if (irgen == s390_irgen_VFLR) - S390_DISASM(XMNM(mnm, vflr_disasm), VR(v1), VR(v2), MASK(m3), MASK(m4), UINT(m5)); - else if (irgen == s390_irgen_VFI) - S390_DISASM(XMNM(mnm, vfi_disasm), VR(v1), VR(v2), MASK(m3), MASK(m4), UINT(m5)); - else if (irgen == s390_irgen_VFPSO) - S390_DISASM(XMNM(mnm, vfpso_disasm), VR(v1), VR(v2), MASK(m3), MASK(m4), MASK(m5)); - else if (irgen == s390_irgen_VCGD) - S390_DISASM(XMNM(mnm, vcgd_disasm), VR(v1), VR(v2), MASK(m3), MASK(m4), MASK(m5)); - else if (irgen == s390_irgen_VCDG) - S390_DISASM(XMNM(mnm, vcdg_disasm), VR(v1), VR(v2), MASK(m3), MASK(m4), MASK(m5)); - else if (irgen == s390_irgen_VCLGD) - S390_DISASM(XMNM(mnm, vclgd_disasm), VR(v1), VR(v2), MASK(m3), MASK(m4), MASK(m5)); - else if (irgen == s390_irgen_VCDLG) - S390_DISASM(XMNM(mnm, vcgld_disasm), VR(v1), VR(v2), MASK(m3), MASK(m4), MASK(m5)); - else - S390_DISASM(MNM(mnm), VR(v1), VR(v2), UINT(m3), UINT(m4), UINT(m5)); - } + irgen(v1, v2, m3, m4, m5); } static void -s390_format_VRRa_VVVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, - UChar m4, UChar m5), +s390_format_VRRa_VVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, + UChar m4, UChar m5), UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, - UChar rxb, HChar *(*handler)(const s390_opnd *, HChar *)) + UChar rxb) { - const HChar *mnm; - if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4410,24 +3957,14 @@ s390_format_VRRa_VVVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3, m4, m5); - - if (vex_traceflags & VEX_TRACE_FE) { - if (handler) - S390_DISASM(XMNM(mnm, handler), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(m5)); - else - S390_DISASM(MNM(mnm), VR(v1), VR(v2), VR(v3), UINT(m4), UINT(m5)); - } + irgen(v1, v2, v3, m4, m5); } static void -s390_format_VRRa_VVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3, +s390_format_VRRa_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m4), - UChar v1, UChar v2, UChar m3, UChar m4, UChar rxb, - HChar *(*handler)(const s390_opnd *, HChar *)) + UChar v1, UChar v2, UChar m3, UChar m4, UChar rxb) { - const HChar *mnm; - if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4435,24 +3972,15 @@ s390_format_VRRa_VVMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar m3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); - mnm = irgen(v1, v2, m3, m4); - - if (vex_traceflags & VEX_TRACE_FE) { - if (handler) - S390_DISASM(XMNM(mnm, handler), VR(v1), VR(v2), MASK(m3), MASK(m4)); - else - S390_DISASM(MNM(mnm), VR(v1), VR(v2), UINT(m3), UINT(m4)); - } + irgen(v1, v2, m3, m4); } static void -s390_format_VRRa_VVVMMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, - UChar m4, UChar m5, UChar m6), +s390_format_VRRa_VVVMMM(void (*irgen)(UChar v1, UChar v2, UChar v3, + UChar m4, UChar m5, UChar m6), UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6, UChar rxb) { - const HChar *mnm; - if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4461,21 +3989,16 @@ s390_format_VRRa_VVVMMM(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3, m4, m5, m6); - - if (vex_traceflags & VEX_TRACE_FE) - S390_DISASM(XMNM(mnm, vfce_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(m5), MASK(m6)); + irgen(v1, v2, v3, m4, m5, m6); } static void -s390_format_VRRa_VVVMMM2(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, - UChar m4, UChar m5, UChar m6), +s390_format_VRRa_VVVMMM2(void (*irgen)(UChar v1, UChar v2, UChar v3, + UChar m4, UChar m5, UChar m6), UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6, UChar rxb) { - const HChar *mnm; - if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -4484,17 +4007,13 @@ s390_format_VRRa_VVVMMM2(const HChar *(*irgen)(UChar v1, UChar v2, UChar v3, v1 = s390_vr_getVRindex(v1, 1, rxb); v2 = s390_vr_getVRindex(v2, 2, rxb); v3 = s390_vr_getVRindex(v3, 3, rxb); - mnm = irgen(v1, v2, v3, m4, m5, m6); - - if (vex_traceflags & VEX_TRACE_FE) - S390_DISASM(XMNM(mnm, vfmix_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(m5), UINT(m6)); + irgen(v1, v2, v3, m4, m5, m6); } static void -s390_format_VSI_URDV(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar i3), +s390_format_VSI_URDV(void (*irgen)(UChar v1, IRTemp op2addr, UChar i3), UChar v1, UChar b2, UShort d2, UChar i3, UChar rxb) { - const HChar *mnm; IRTemp op2addr = newTemp(Ity_I64); if (!s390_host_has_vx) { @@ -4507,17 +4026,14 @@ s390_format_VSI_URDV(const HChar *(*irgen)(UChar v1, IRTemp op2addr, UChar i3), assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : mkU64(0))); - mnm = irgen(v1, op2addr, i3); - - if (vex_traceflags & VEX_TRACE_FE) - S390_DISASM(MNM(mnm), VR(v1), UDXB(d2, 0, b2), UINT(i3)); + irgen(v1, op2addr, i3); } /*------------------------------------------------------------*/ /*--- Build IR for opcodes ---*/ /*------------------------------------------------------------*/ -static const HChar * +static void s390_irgen_AR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -4529,11 +4045,9 @@ s390_irgen_AR(UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "ar"; } -static const HChar * +static void s390_irgen_AGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -4545,11 +4059,9 @@ s390_irgen_AGR(UChar r1, UChar r2) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "agr"; } -static const HChar * +static void s390_irgen_AGFR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -4561,11 +4073,9 @@ s390_irgen_AGFR(UChar r1, UChar r2) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "agfr"; } -static const HChar * +static void s390_irgen_ARK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -4577,11 +4087,9 @@ s390_irgen_ARK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op2, op3); put_gpr_w1(r1, mkexpr(result)); - - return "ark"; } -static const HChar * +static void s390_irgen_AGRK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -4593,11 +4101,9 @@ s390_irgen_AGRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add64, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op2, op3); put_gpr_dw0(r1, mkexpr(result)); - - return "agrk"; } -static const HChar * +static void s390_irgen_A(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -4609,11 +4115,9 @@ s390_irgen_A(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "a"; } -static const HChar * +static void s390_irgen_AY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -4625,11 +4129,9 @@ s390_irgen_AY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "ay"; } -static const HChar * +static void s390_irgen_AG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -4641,11 +4143,9 @@ s390_irgen_AG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "ag"; } -static const HChar * +static void s390_irgen_AGF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -4657,11 +4157,9 @@ s390_irgen_AGF(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "agf"; } -static const HChar * +static void s390_irgen_AFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -4674,11 +4172,9 @@ s390_irgen_AFI(UChar r1, UInt i2) s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, mktemp(Ity_I32, mkU32((UInt)op2))); put_gpr_w1(r1, mkexpr(result)); - - return "afi"; } -static const HChar * +static void s390_irgen_AGFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -4691,11 +4187,9 @@ s390_irgen_AGFI(UChar r1, UInt i2) s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, mktemp(Ity_I64, mkU64((ULong)op2))); put_gpr_dw0(r1, mkexpr(result)); - - return "agfi"; } -static const HChar * +static void s390_irgen_AHIK(UChar r1, UChar r3, UShort i2) { Int op2; @@ -4708,11 +4202,9 @@ s390_irgen_AHIK(UChar r1, UChar r3, UShort i2) s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, mktemp(Ity_I32, mkU32((UInt) op2)), op3); put_gpr_w1(r1, mkexpr(result)); - - return "ahik"; } -static const HChar * +static void s390_irgen_AGH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -4724,11 +4216,9 @@ s390_irgen_AGH(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "agh"; } -static const HChar * +static void s390_irgen_AGHIK(UChar r1, UChar r3, UShort i2) { Long op2; @@ -4741,11 +4231,9 @@ s390_irgen_AGHIK(UChar r1, UChar r3, UShort i2) s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, mktemp(Ity_I64, mkU64((ULong) op2)), op3); put_gpr_dw0(r1, mkexpr(result)); - - return "aghik"; } -static const HChar * +static void s390_irgen_ASI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I32); @@ -4758,11 +4246,9 @@ s390_irgen_ASI(UChar i2, IRTemp op1addr) store(mkexpr(op1addr), mkexpr(result)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, mktemp(Ity_I32, mkU32((UInt)op2))); - - return "asi"; } -static const HChar * +static void s390_irgen_AGSI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I64); @@ -4775,11 +4261,9 @@ s390_irgen_AGSI(UChar i2, IRTemp op1addr) store(mkexpr(op1addr), mkexpr(result)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, mktemp(Ity_I64, mkU64((ULong)op2))); - - return "agsi"; } -static const HChar * +static void s390_irgen_AH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -4791,11 +4275,9 @@ s390_irgen_AH(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "ah"; } -static const HChar * +static void s390_irgen_AHY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -4807,11 +4289,9 @@ s390_irgen_AHY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "ahy"; } -static const HChar * +static void s390_irgen_AHI(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I32); @@ -4824,11 +4304,9 @@ s390_irgen_AHI(UChar r1, UShort i2) s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, mktemp(Ity_I32, mkU32((UInt)op2))); put_gpr_w1(r1, mkexpr(result)); - - return "ahi"; } -static const HChar * +static void s390_irgen_AGHI(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I64); @@ -4841,11 +4319,9 @@ s390_irgen_AGHI(UChar r1, UShort i2) s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_64, op1, mktemp(Ity_I64, mkU64((ULong)op2))); put_gpr_dw0(r1, mkexpr(result)); - - return "aghi"; } -static const HChar * +static void s390_irgen_AHHHR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -4857,11 +4333,9 @@ s390_irgen_AHHHR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "ahhhr"; } -static const HChar * +static void s390_irgen_AHHLR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -4873,11 +4347,9 @@ s390_irgen_AHHLR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "ahhlr"; } -static const HChar * +static void s390_irgen_AIH(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -4890,11 +4362,9 @@ s390_irgen_AIH(UChar r1, UInt i2) s390_cc_thunk_putSS(S390_CC_OP_SIGNED_ADD_32, op1, mktemp(Ity_I32, mkU32((UInt)op2))); put_gpr_w0(r1, mkexpr(result)); - - return "aih"; } -static const HChar * +static void s390_irgen_ALR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -4906,11 +4376,9 @@ s390_irgen_ALR(UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "alr"; } -static const HChar * +static void s390_irgen_ALGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -4922,11 +4390,9 @@ s390_irgen_ALGR(UChar r1, UChar r2) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "algr"; } -static const HChar * +static void s390_irgen_ALGFR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -4938,11 +4404,9 @@ s390_irgen_ALGFR(UChar r1, UChar r2) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "algfr"; } -static const HChar * +static void s390_irgen_ALRK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -4954,11 +4418,9 @@ s390_irgen_ALRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op2, op3); put_gpr_w1(r1, mkexpr(result)); - - return "alrk"; } -static const HChar * +static void s390_irgen_ALGRK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -4970,11 +4432,9 @@ s390_irgen_ALGRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add64, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, op2, op3); put_gpr_dw0(r1, mkexpr(result)); - - return "algrk"; } -static const HChar * +static void s390_irgen_AL(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -4986,11 +4446,9 @@ s390_irgen_AL(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "al"; } -static const HChar * +static void s390_irgen_ALY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -5002,11 +4460,9 @@ s390_irgen_ALY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "aly"; } -static const HChar * +static void s390_irgen_ALG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -5018,11 +4474,9 @@ s390_irgen_ALG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "alg"; } -static const HChar * +static void s390_irgen_ALGF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -5034,11 +4488,9 @@ s390_irgen_ALGF(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Add64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "algf"; } -static const HChar * +static void s390_irgen_ALFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -5051,11 +4503,9 @@ s390_irgen_ALFI(UChar r1, UInt i2) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op1, mktemp(Ity_I32, mkU32(op2))); put_gpr_w1(r1, mkexpr(result)); - - return "alfi"; } -static const HChar * +static void s390_irgen_ALGFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -5068,11 +4518,9 @@ s390_irgen_ALGFI(UChar r1, UInt i2) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, op1, mktemp(Ity_I64, mkU64(op2))); put_gpr_dw0(r1, mkexpr(result)); - - return "algfi"; } -static const HChar * +static void s390_irgen_ALHHHR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -5084,11 +4532,9 @@ s390_irgen_ALHHHR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "alhhhr"; } -static const HChar * +static void s390_irgen_ALHHLR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -5100,11 +4546,9 @@ s390_irgen_ALHHLR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Add32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "alhhlr"; } -static const HChar * +static void s390_irgen_ALCR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -5119,11 +4563,9 @@ s390_irgen_ALCR(UChar r1, UChar r2) mkexpr(carry_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_ADDC_32, op1, op2, carry_in); put_gpr_w1(r1, mkexpr(result)); - - return "alcr"; } -static const HChar * +static void s390_irgen_ALCGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -5139,11 +4581,9 @@ s390_irgen_ALCGR(UChar r1, UChar r2) mkexpr(carry_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_ADDC_64, op1, op2, carry_in); put_gpr_dw0(r1, mkexpr(result)); - - return "alcgr"; } -static const HChar * +static void s390_irgen_ALC(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -5158,11 +4598,9 @@ s390_irgen_ALC(UChar r1, IRTemp op2addr) mkexpr(carry_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_ADDC_32, op1, op2, carry_in); put_gpr_w1(r1, mkexpr(result)); - - return "alc"; } -static const HChar * +static void s390_irgen_ALCG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -5178,11 +4616,9 @@ s390_irgen_ALCG(UChar r1, IRTemp op2addr) mkexpr(carry_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_ADDC_64, op1, op2, carry_in); put_gpr_dw0(r1, mkexpr(result)); - - return "alcg"; } -static const HChar * +static void s390_irgen_ALSI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I32); @@ -5195,11 +4631,9 @@ s390_irgen_ALSI(UChar i2, IRTemp op1addr) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op1, mktemp(Ity_I32, mkU32(op2))); store(mkexpr(op1addr), mkexpr(result)); - - return "alsi"; } -static const HChar * +static void s390_irgen_ALGSI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I64); @@ -5212,11 +4646,9 @@ s390_irgen_ALGSI(UChar i2, IRTemp op1addr) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, op1, mktemp(Ity_I64, mkU64(op2))); store(mkexpr(op1addr), mkexpr(result)); - - return "algsi"; } -static const HChar * +static void s390_irgen_ALHSIK(UChar r1, UChar r3, UShort i2) { UInt op2; @@ -5229,11 +4661,9 @@ s390_irgen_ALHSIK(UChar r1, UChar r3, UShort i2) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, mktemp(Ity_I32, mkU32(op2)), op3); put_gpr_w1(r1, mkexpr(result)); - - return "alhsik"; } -static const HChar * +static void s390_irgen_ALGHSIK(UChar r1, UChar r3, UShort i2) { ULong op2; @@ -5246,11 +4676,9 @@ s390_irgen_ALGHSIK(UChar r1, UChar r3, UShort i2) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_64, mktemp(Ity_I64, mkU64(op2)), op3); put_gpr_dw0(r1, mkexpr(result)); - - return "alghsik"; } -static const HChar * +static void s390_irgen_ALSIH(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -5263,11 +4691,9 @@ s390_irgen_ALSIH(UChar r1, UInt i2) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_ADD_32, op1, mktemp(Ity_I32, mkU32(op2))); put_gpr_w0(r1, mkexpr(result)); - - return "alsih"; } -static const HChar * +static void s390_irgen_ALSIHN(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -5278,11 +4704,9 @@ s390_irgen_ALSIHN(UChar r1, UInt i2) op2 = i2; assign(result, binop(Iop_Add32, mkexpr(op1), mkU32(op2))); put_gpr_w0(r1, mkexpr(result)); - - return "alsihn"; } -static const HChar * +static void s390_irgen_NR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -5294,11 +4718,9 @@ s390_irgen_NR(UChar r1, UChar r2) assign(result, binop(Iop_And32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "nr"; } -static const HChar * +static void s390_irgen_NGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -5310,16 +4732,14 @@ s390_irgen_NGR(UChar r1, UChar r2) assign(result, binop(Iop_And64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_dw0(r1, mkexpr(result)); - - return "ngr"; } /* Helper for bitwise logical instructions with two 32-bit input operands and a 32-bit output operand. `inv3' and `inv' indicate whether to invert (build bitwise complement of) operand 3 or the result, respectively. */ -static const HChar * +static void s390_irgen_logicalK32(UChar r3, UChar r1, UChar r2, - const HChar *mnem, IROp op, Bool inv3, Bool inv) + IROp op, Bool inv3, Bool inv) { IRTemp op2 = newTemp(Ity_I32); IRTemp op3 = newTemp(Ity_I32); @@ -5332,14 +4752,12 @@ s390_irgen_logicalK32(UChar r3, UChar r1, UChar r2, assign(result, inv ? unop(Iop_Not32, tmp) : tmp); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return mnem; } /* Same as s390_irgen_logicalK32, but for 64-bit operands. */ -static const HChar * +static void s390_irgen_logicalK64(UChar r3, UChar r1, UChar r2, - const HChar *mnem, IROp op, Bool inv3, Bool inv) + IROp op, Bool inv3, Bool inv) { IRTemp op2 = newTemp(Ity_I64); IRTemp op3 = newTemp(Ity_I64); @@ -5352,47 +4770,45 @@ s390_irgen_logicalK64(UChar r3, UChar r1, UChar r2, assign(result, inv ? unop(Iop_Not64, tmp) : tmp); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_dw0(r1, mkexpr(result)); - - return mnem; } -static const HChar * +static void s390_irgen_NRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "nrk", Iop_And32, False, False); + s390_irgen_logicalK32(r3, r1, r2, Iop_And32, False, False); } -static const HChar * +static void s390_irgen_NGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "ngrk", Iop_And64, False, False); + s390_irgen_logicalK64(r3, r1, r2, Iop_And64, False, False); } -static const HChar * +static void s390_irgen_NCRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "ncrk", Iop_And32, True, False); + s390_irgen_logicalK32(r3, r1, r2, Iop_And32, True, False); } -static const HChar * +static void s390_irgen_NCGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "ncgrk", Iop_And64, True, False); + s390_irgen_logicalK64(r3, r1, r2, Iop_And64, True, False); } -static const HChar * +static void s390_irgen_NNRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "nnrk", Iop_And32, False, True); + s390_irgen_logicalK32(r3, r1, r2, Iop_And32, False, True); } -static const HChar * +static void s390_irgen_NNGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "nngrk", Iop_And64, False, True); + s390_irgen_logicalK64(r3, r1, r2, Iop_And64, False, True); } -static const HChar * +static void s390_irgen_N(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -5404,11 +4820,9 @@ s390_irgen_N(UChar r1, IRTemp op2addr) assign(result, binop(Iop_And32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "n"; } -static const HChar * +static void s390_irgen_NY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -5420,11 +4834,9 @@ s390_irgen_NY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_And32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "ny"; } -static const HChar * +static void s390_irgen_NG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -5436,11 +4848,9 @@ s390_irgen_NG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_And64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_dw0(r1, mkexpr(result)); - - return "ng"; } -static const HChar * +static void s390_irgen_NI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -5452,11 +4862,9 @@ s390_irgen_NI(UChar i2, IRTemp op1addr) assign(result, binop(Iop_And8, mkexpr(op1), mkU8(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); store(mkexpr(op1addr), mkexpr(result)); - - return "ni"; } -static const HChar * +static void s390_irgen_NIY(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -5468,11 +4876,9 @@ s390_irgen_NIY(UChar i2, IRTemp op1addr) assign(result, binop(Iop_And8, mkexpr(op1), mkU8(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); store(mkexpr(op1addr), mkexpr(result)); - - return "niy"; } -static const HChar * +static void s390_irgen_NIHF(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -5484,11 +4890,9 @@ s390_irgen_NIHF(UChar r1, UInt i2) assign(result, binop(Iop_And32, mkexpr(op1), mkU32(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w0(r1, mkexpr(result)); - - return "nihf"; } -static const HChar * +static void s390_irgen_NIHH(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -5500,11 +4904,9 @@ s390_irgen_NIHH(UChar r1, UShort i2) assign(result, binop(Iop_And16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw0(r1, mkexpr(result)); - - return "nihh"; } -static const HChar * +static void s390_irgen_NIHL(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -5516,11 +4918,9 @@ s390_irgen_NIHL(UChar r1, UShort i2) assign(result, binop(Iop_And16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw1(r1, mkexpr(result)); - - return "nihl"; } -static const HChar * +static void s390_irgen_NILF(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -5532,11 +4932,9 @@ s390_irgen_NILF(UChar r1, UInt i2) assign(result, binop(Iop_And32, mkexpr(op1), mkU32(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "nilf"; } -static const HChar * +static void s390_irgen_NILH(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -5548,11 +4946,9 @@ s390_irgen_NILH(UChar r1, UShort i2) assign(result, binop(Iop_And16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw2(r1, mkexpr(result)); - - return "nilh"; } -static const HChar * +static void s390_irgen_NILL(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -5564,11 +4960,9 @@ s390_irgen_NILL(UChar r1, UShort i2) assign(result, binop(Iop_And16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw3(r1, mkexpr(result)); - - return "nill"; } -static const HChar * +static void s390_irgen_BASR(UChar r1, UChar r2) { IRTemp target = newTemp(Ity_I64); @@ -5585,11 +4979,9 @@ s390_irgen_BASR(UChar r1, UChar r2) call_function(mkexpr(target)); } } - - return "basr"; } -static const HChar * +static void s390_irgen_BAS(UChar r1, IRTemp op2addr) { IRTemp target = newTemp(Ity_I64); @@ -5597,11 +4989,9 @@ s390_irgen_BAS(UChar r1, IRTemp op2addr) put_gpr_dw0(r1, mkU64(guest_IA_next_instr)); assign(target, mkexpr(op2addr)); call_function(mkexpr(target)); - - return "bas"; } -static const HChar * +static void s390_irgen_BCR(UChar m1, UChar r2) { IRTemp cond = newTemp(Ity_I32); @@ -5620,13 +5010,9 @@ s390_irgen_BCR(UChar m1, UChar r2) get_gpr_dw0(r2)); } } - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM("bcr", bcr_disasm), MASK(m1), GPR(r2)); - - return "bcr"; } -static const HChar * +static void s390_irgen_BC(UChar m1, UChar x2, UChar b2, UShort d2, IRTemp op2addr) { IRTemp cond = newTemp(Ity_I32); @@ -5641,13 +5027,9 @@ s390_irgen_BC(UChar m1, UChar x2, UChar b2, UShort d2, IRTemp op2addr) mkexpr(op2addr)); } } - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM("bc", bc_disasm), MASK(m1), UDXB(d2, x2, b2)); - - return "bc"; } -static const HChar * +static void s390_irgen_BCTR(UChar r1, UChar r2) { put_gpr_w1(r1, binop(Iop_Sub32, get_gpr_w1(r1), mkU32(1))); @@ -5655,11 +5037,9 @@ s390_irgen_BCTR(UChar r1, UChar r2) if_condition_goto_computed(binop(Iop_CmpNE32, get_gpr_w1(r1), mkU32(0)), get_gpr_dw0(r2)); } - - return "bctr"; } -static const HChar * +static void s390_irgen_BCTGR(UChar r1, UChar r2) { put_gpr_dw0(r1, binop(Iop_Sub64, get_gpr_dw0(r1), mkU64(1))); @@ -5667,31 +5047,25 @@ s390_irgen_BCTGR(UChar r1, UChar r2) if_condition_goto_computed(binop(Iop_CmpNE64, get_gpr_dw0(r1), mkU64(0)), get_gpr_dw0(r2)); } - - return "bctgr"; } -static const HChar * +static void s390_irgen_BCT(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, binop(Iop_Sub32, get_gpr_w1(r1), mkU32(1))); if_condition_goto_computed(binop(Iop_CmpNE32, get_gpr_w1(r1), mkU32(0)), mkexpr(op2addr)); - - return "bct"; } -static const HChar * +static void s390_irgen_BCTG(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, binop(Iop_Sub64, get_gpr_dw0(r1), mkU64(1))); if_condition_goto_computed(binop(Iop_CmpNE64, get_gpr_dw0(r1), mkU64(0)), mkexpr(op2addr)); - - return "bctg"; } -static const HChar * +static void s390_irgen_BIC(UChar r1, IRTemp op2addr) { IRTemp cond = newTemp(Ity_I32); @@ -5705,11 +5079,9 @@ s390_irgen_BIC(UChar r1, IRTemp op2addr) if_condition_goto_computed(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), load(Ity_I64, mkexpr(op2addr))); } - - return "bic"; } -static const HChar * +static void s390_irgen_BXH(UChar r1, UChar r3, IRTemp op2addr) { IRTemp value = newTemp(Ity_I32); @@ -5718,11 +5090,9 @@ s390_irgen_BXH(UChar r1, UChar r3, IRTemp op2addr) put_gpr_w1(r1, binop(Iop_Add32, get_gpr_w1(r1), get_gpr_w1(r3))); if_condition_goto_computed(binop(Iop_CmpLT32S, mkexpr(value), get_gpr_w1(r1)), mkexpr(op2addr)); - - return "bxh"; } -static const HChar * +static void s390_irgen_BXHG(UChar r1, UChar r3, IRTemp op2addr) { IRTemp value = newTemp(Ity_I64); @@ -5731,11 +5101,9 @@ s390_irgen_BXHG(UChar r1, UChar r3, IRTemp op2addr) put_gpr_dw0(r1, binop(Iop_Add64, get_gpr_dw0(r1), get_gpr_dw0(r3))); if_condition_goto_computed(binop(Iop_CmpLT64S, mkexpr(value), get_gpr_dw0(r1)), mkexpr(op2addr)); - - return "bxhg"; } -static const HChar * +static void s390_irgen_BXLE(UChar r1, UChar r3, IRTemp op2addr) { IRTemp value = newTemp(Ity_I32); @@ -5744,11 +5112,9 @@ s390_irgen_BXLE(UChar r1, UChar r3, IRTemp op2addr) put_gpr_w1(r1, binop(Iop_Add32, get_gpr_w1(r1), get_gpr_w1(r3))); if_condition_goto_computed(binop(Iop_CmpLE32S, get_gpr_w1(r1), mkexpr(value)), mkexpr(op2addr)); - - return "bxle"; } -static const HChar * +static void s390_irgen_BXLEG(UChar r1, UChar r3, IRTemp op2addr) { IRTemp value = newTemp(Ity_I64); @@ -5757,29 +5123,23 @@ s390_irgen_BXLEG(UChar r1, UChar r3, IRTemp op2addr) put_gpr_dw0(r1, binop(Iop_Add64, get_gpr_dw0(r1), get_gpr_dw0(r3))); if_condition_goto_computed(binop(Iop_CmpLE64S, get_gpr_dw0(r1), mkexpr(value)), mkexpr(op2addr)); - - return "bxleg"; } -static const HChar * +static void s390_irgen_BRAS(UChar r1, UShort i2) { put_gpr_dw0(r1, mkU64(guest_IA_next_instr)); call_function(mkaddr_expr(addr_relative(i2))); - - return "bras"; } -static const HChar * +static void s390_irgen_BRASL(UChar r1, UInt i2) { put_gpr_dw0(r1, mkU64(guest_IA_next_instr)); call_function(mkaddr_expr(addr_rel_long(i2))); - - return "brasl"; } -static const HChar * +static void s390_irgen_BRC(UChar m1, UShort i2) { IRTemp cond = newTemp(Ity_I32); @@ -5795,13 +5155,9 @@ s390_irgen_BRC(UChar m1, UShort i2) } } - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM("brc", brc_disasm), MASK(m1), PCREL((Int)(Short)i2)); - - return "brc"; } -static const HChar * +static void s390_irgen_BRCL(UChar m1, UInt i2) { IRTemp cond = newTemp(Ity_I32); @@ -5816,43 +5172,33 @@ s390_irgen_BRCL(UChar m1, UInt i2) addr_rel_long(i2)); } } - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(XMNM("brcl", brcl_disasm), MASK(m1), PCREL(i2)); - - return "brcl"; } -static const HChar * +static void s390_irgen_BRCT(UChar r1, UShort i2) { put_gpr_w1(r1, binop(Iop_Sub32, get_gpr_w1(r1), mkU32(1))); if_condition_goto(binop(Iop_CmpNE32, get_gpr_w1(r1), mkU32(0)), addr_relative(i2)); - - return "brct"; } -static const HChar * +static void s390_irgen_BRCTH(UChar r1, UInt i2) { put_gpr_w0(r1, binop(Iop_Sub32, get_gpr_w0(r1), mkU32(1))); if_condition_goto(binop(Iop_CmpNE32, get_gpr_w0(r1), mkU32(0)), addr_relative(i2)); - - return "brcth"; } -static const HChar * +static void s390_irgen_BRCTG(UChar r1, UShort i2) { put_gpr_dw0(r1, binop(Iop_Sub64, get_gpr_dw0(r1), mkU64(1))); if_condition_goto(binop(Iop_CmpNE64, get_gpr_dw0(r1), mkU64(0)), addr_relative(i2)); - - return "brctg"; } -static const HChar * +static void s390_irgen_BRXH(UChar r1, UChar r3, UShort i2) { IRTemp value = newTemp(Ity_I32); @@ -5861,11 +5207,9 @@ s390_irgen_BRXH(UChar r1, UChar r3, UShort i2) put_gpr_w1(r1, binop(Iop_Add32, get_gpr_w1(r1), get_gpr_w1(r3))); if_condition_goto(binop(Iop_CmpLT32S, mkexpr(value), get_gpr_w1(r1)), addr_relative(i2)); - - return "brxh"; } -static const HChar * +static void s390_irgen_BRXHG(UChar r1, UChar r3, UShort i2) { IRTemp value = newTemp(Ity_I64); @@ -5874,11 +5218,9 @@ s390_irgen_BRXHG(UChar r1, UChar r3, UShort i2) put_gpr_dw0(r1, binop(Iop_Add64, get_gpr_dw0(r1), get_gpr_dw0(r3))); if_condition_goto(binop(Iop_CmpLT64S, mkexpr(value), get_gpr_dw0(r1)), addr_relative(i2)); - - return "brxhg"; } -static const HChar * +static void s390_irgen_BRXLE(UChar r1, UChar r3, UShort i2) { IRTemp value = newTemp(Ity_I32); @@ -5887,11 +5229,9 @@ s390_irgen_BRXLE(UChar r1, UChar r3, UShort i2) put_gpr_w1(r1, binop(Iop_Add32, get_gpr_w1(r1), get_gpr_w1(r3))); if_condition_goto(binop(Iop_CmpLE32S, get_gpr_w1(r1), mkexpr(value)), addr_relative(i2)); - - return "brxle"; } -static const HChar * +static void s390_irgen_BRXLG(UChar r1, UChar r3, UShort i2) { IRTemp value = newTemp(Ity_I64); @@ -5900,11 +5240,9 @@ s390_irgen_BRXLG(UChar r1, UChar r3, UShort i2) put_gpr_dw0(r1, binop(Iop_Add64, get_gpr_dw0(r1), get_gpr_dw0(r3))); if_condition_goto(binop(Iop_CmpLE64S, get_gpr_dw0(r1), mkexpr(value)), addr_relative(i2)); - - return "brxlg"; } -static const HChar * +static void s390_irgen_CR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -5913,11 +5251,9 @@ s390_irgen_CR(UChar r1, UChar r2) assign(op1, get_gpr_w1(r1)); assign(op2, get_gpr_w1(r2)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cr"; } -static const HChar * +static void s390_irgen_CGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -5926,11 +5262,9 @@ s390_irgen_CGR(UChar r1, UChar r2) assign(op1, get_gpr_dw0(r1)); assign(op2, get_gpr_dw0(r2)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cgr"; } -static const HChar * +static void s390_irgen_CGFR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -5939,11 +5273,9 @@ s390_irgen_CGFR(UChar r1, UChar r2) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_32Sto64, get_gpr_w1(r2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cgfr"; } -static const HChar * +static void s390_irgen_C(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -5952,11 +5284,9 @@ s390_irgen_C(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w1(r1)); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "c"; } -static const HChar * +static void s390_irgen_CY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -5965,11 +5295,9 @@ s390_irgen_CY(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w1(r1)); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cy"; } -static const HChar * +static void s390_irgen_CG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -5978,11 +5306,9 @@ s390_irgen_CG(UChar r1, IRTemp op2addr) assign(op1, get_gpr_dw0(r1)); assign(op2, load(Ity_I64, mkexpr(op2addr))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cg"; } -static const HChar * +static void s390_irgen_CGF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -5991,11 +5317,9 @@ s390_irgen_CGF(UChar r1, IRTemp op2addr) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_32Sto64, load(Ity_I32, mkexpr(op2addr)))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cgf"; } -static const HChar * +static void s390_irgen_CFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6005,11 +5329,9 @@ s390_irgen_CFI(UChar r1, UInt i2) op2 = (Int)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I32, mkU32((UInt)op2))); - - return "cfi"; } -static const HChar * +static void s390_irgen_CGFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6019,11 +5341,9 @@ s390_irgen_CGFI(UChar r1, UInt i2) op2 = (Long)(Int)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I64, mkU64((ULong)op2))); - - return "cgfi"; } -static const HChar * +static void s390_irgen_CRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6032,11 +5352,9 @@ s390_irgen_CRL(UChar r1, UInt i2) assign(op1, get_gpr_w1(r1)); assign(op2, load(Ity_I32, mkU64(addr_rel_long(i2)))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "crl"; } -static const HChar * +static void s390_irgen_CGRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6045,11 +5363,9 @@ s390_irgen_CGRL(UChar r1, UInt i2) assign(op1, get_gpr_dw0(r1)); assign(op2, load(Ity_I64, mkU64(addr_rel_long(i2)))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cgrl"; } -static const HChar * +static void s390_irgen_CGFRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6058,11 +5374,9 @@ s390_irgen_CGFRL(UChar r1, UInt i2) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_32Sto64, load(Ity_I32, mkU64(addr_rel_long(i2))))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cgfrl"; } -static const HChar * +static void s390_irgen_CRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6082,11 +5396,9 @@ s390_irgen_CRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) mkU32(0)), mkexpr(op4addr)); } } - - return "crb"; } -static const HChar * +static void s390_irgen_CGRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6106,11 +5418,9 @@ s390_irgen_CGRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) mkU32(0)), mkexpr(op4addr)); } } - - return "cgrb"; } -static const HChar * +static void s390_irgen_CRJ(UChar r1, UChar r2, UShort i4, UChar m3) { IRTemp op1 = newTemp(Ity_I32); @@ -6128,14 +5438,11 @@ s390_irgen_CRJ(UChar r1, UChar r2, UShort i4, UChar m3) op1, op2)); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "crj"; } -static const HChar * +static void s390_irgen_CGRJ(UChar r1, UChar r2, UShort i4, UChar m3) { IRTemp op1 = newTemp(Ity_I64); @@ -6153,14 +5460,11 @@ s390_irgen_CGRJ(UChar r1, UChar r2, UShort i4, UChar m3) op1, op2)); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "cgrj"; } -static const HChar * +static void s390_irgen_CIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6180,11 +5484,9 @@ s390_irgen_CIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) mkexpr(op4addr)); } } - - return "cib"; } -static const HChar * +static void s390_irgen_CGIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6204,11 +5506,9 @@ s390_irgen_CGIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) mkexpr(op4addr)); } } - - return "cgib"; } -static const HChar * +static void s390_irgen_CIJ(UChar r1, UChar m3, UShort i4, UChar i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6226,14 +5526,11 @@ s390_irgen_CIJ(UChar r1, UChar m3, UShort i4, UChar i2) mktemp(Ity_I32, mkU32((UInt)op2)))); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "cij"; } -static const HChar * +static void s390_irgen_CGIJ(UChar r1, UChar m3, UShort i4, UChar i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6251,14 +5548,11 @@ s390_irgen_CGIJ(UChar r1, UChar m3, UShort i4, UChar i2) mktemp(Ity_I64, mkU64((ULong)op2)))); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "cgij"; } -static const HChar * +static void s390_irgen_CH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6267,11 +5561,9 @@ s390_irgen_CH(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w1(r1)); assign(op2, unop(Iop_16Sto32, load(Ity_I16, mkexpr(op2addr)))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "ch"; } -static const HChar * +static void s390_irgen_CHY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6280,11 +5572,9 @@ s390_irgen_CHY(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w1(r1)); assign(op2, unop(Iop_16Sto32, load(Ity_I16, mkexpr(op2addr)))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "chy"; } -static const HChar * +static void s390_irgen_CGH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6293,11 +5583,9 @@ s390_irgen_CGH(UChar r1, IRTemp op2addr) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_16Sto64, load(Ity_I16, mkexpr(op2addr)))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cgh"; } -static const HChar * +static void s390_irgen_CHI(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6307,11 +5595,9 @@ s390_irgen_CHI(UChar r1, UShort i2) op2 = (Int)(Short)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I32, mkU32((UInt)op2))); - - return "chi"; } -static const HChar * +static void s390_irgen_CGHI(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6321,11 +5607,9 @@ s390_irgen_CGHI(UChar r1, UShort i2) op2 = (Long)(Short)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I64, mkU64((ULong)op2))); - - return "cghi"; } -static const HChar * +static void s390_irgen_CHHSI(UShort i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I16); @@ -6335,11 +5619,9 @@ s390_irgen_CHHSI(UShort i2, IRTemp op1addr) op2 = (Short)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I16, mkU16((UShort)op2))); - - return "chhsi"; } -static const HChar * +static void s390_irgen_CHSI(UShort i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6349,11 +5631,9 @@ s390_irgen_CHSI(UShort i2, IRTemp op1addr) op2 = (Int)(Short)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I32, mkU32((UInt)op2))); - - return "chsi"; } -static const HChar * +static void s390_irgen_CGHSI(UShort i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6363,11 +5643,9 @@ s390_irgen_CGHSI(UShort i2, IRTemp op1addr) op2 = (Long)(Short)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I64, mkU64((ULong)op2))); - - return "cghsi"; } -static const HChar * +static void s390_irgen_CHRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6376,11 +5654,9 @@ s390_irgen_CHRL(UChar r1, UInt i2) assign(op1, get_gpr_w1(r1)); assign(op2, unop(Iop_16Sto32, load(Ity_I16, mkU64(addr_rel_long(i2))))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "chrl"; } -static const HChar * +static void s390_irgen_CGHRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6389,11 +5665,9 @@ s390_irgen_CGHRL(UChar r1, UInt i2) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_16Sto64, load(Ity_I16, mkU64(addr_rel_long(i2))))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "cghrl"; } -static const HChar * +static void s390_irgen_CHHR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -6402,11 +5676,9 @@ s390_irgen_CHHR(UChar r1, UChar r2) assign(op1, get_gpr_w0(r1)); assign(op2, get_gpr_w0(r2)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "chhr"; } -static const HChar * +static void s390_irgen_CHLR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -6415,11 +5687,9 @@ s390_irgen_CHLR(UChar r1, UChar r2) assign(op1, get_gpr_w0(r1)); assign(op2, get_gpr_w1(r2)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "chlr"; } -static const HChar * +static void s390_irgen_CHF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6428,11 +5698,9 @@ s390_irgen_CHF(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w0(r1)); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "chf"; } -static const HChar * +static void s390_irgen_CIH(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6442,11 +5710,9 @@ s390_irgen_CIH(UChar r1, UInt i2) op2 = (Int)i2; s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, mktemp(Ity_I32, mkU32((UInt)op2))); - - return "cih"; } -static const HChar * +static void s390_irgen_CLR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -6455,11 +5721,9 @@ s390_irgen_CLR(UChar r1, UChar r2) assign(op1, get_gpr_w1(r1)); assign(op2, get_gpr_w1(r2)); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clr"; } -static const HChar * +static void s390_irgen_CLGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -6468,11 +5732,9 @@ s390_irgen_CLGR(UChar r1, UChar r2) assign(op1, get_gpr_dw0(r1)); assign(op2, get_gpr_dw0(r2)); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clgr"; } -static const HChar * +static void s390_irgen_CLGFR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -6481,11 +5743,9 @@ s390_irgen_CLGFR(UChar r1, UChar r2) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_32Uto64, get_gpr_w1(r2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clgfr"; } -static const HChar * +static void s390_irgen_CL(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6494,11 +5754,9 @@ s390_irgen_CL(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w1(r1)); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "cl"; } -static const HChar * +static void s390_irgen_CLY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6507,11 +5765,9 @@ s390_irgen_CLY(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w1(r1)); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "cly"; } -static const HChar * +static void s390_irgen_CLG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6520,11 +5776,9 @@ s390_irgen_CLG(UChar r1, IRTemp op2addr) assign(op1, get_gpr_dw0(r1)); assign(op2, load(Ity_I64, mkexpr(op2addr))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clg"; } -static const HChar * +static void s390_irgen_CLGF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6533,11 +5787,9 @@ s390_irgen_CLGF(UChar r1, IRTemp op2addr) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_32Uto64, load(Ity_I32, mkexpr(op2addr)))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clgf"; } -static const HChar * +static void s390_irgen_CLFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6547,11 +5799,9 @@ s390_irgen_CLFI(UChar r1, UInt i2) op2 = i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I32, mkU32(op2))); - - return "clfi"; } -static const HChar * +static void s390_irgen_CLGFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6561,11 +5811,9 @@ s390_irgen_CLGFI(UChar r1, UInt i2) op2 = (ULong)i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I64, mkU64(op2))); - - return "clgfi"; } -static const HChar * +static void s390_irgen_CLI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -6575,11 +5823,9 @@ s390_irgen_CLI(UChar i2, IRTemp op1addr) op2 = i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I8, mkU8(op2))); - - return "cli"; } -static const HChar * +static void s390_irgen_CLIY(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -6589,11 +5835,9 @@ s390_irgen_CLIY(UChar i2, IRTemp op1addr) op2 = i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I8, mkU8(op2))); - - return "cliy"; } -static const HChar * +static void s390_irgen_CLFHSI(UShort i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6603,11 +5847,9 @@ s390_irgen_CLFHSI(UShort i2, IRTemp op1addr) op2 = (UInt)i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I32, mkU32(op2))); - - return "clfhsi"; } -static const HChar * +static void s390_irgen_CLGHSI(UShort i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6617,11 +5859,9 @@ s390_irgen_CLGHSI(UShort i2, IRTemp op1addr) op2 = (ULong)i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I64, mkU64(op2))); - - return "clghsi"; } -static const HChar * +static void s390_irgen_CLHHSI(UShort i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I16); @@ -6631,11 +5871,9 @@ s390_irgen_CLHHSI(UShort i2, IRTemp op1addr) op2 = i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I16, mkU16(op2))); - - return "clhhsi"; } -static const HChar * +static void s390_irgen_CLRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6644,11 +5882,9 @@ s390_irgen_CLRL(UChar r1, UInt i2) assign(op1, get_gpr_w1(r1)); assign(op2, load(Ity_I32, mkU64(addr_rel_long(i2)))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clrl"; } -static const HChar * +static void s390_irgen_CLGRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6657,11 +5893,9 @@ s390_irgen_CLGRL(UChar r1, UInt i2) assign(op1, get_gpr_dw0(r1)); assign(op2, load(Ity_I64, mkU64(addr_rel_long(i2)))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clgrl"; } -static const HChar * +static void s390_irgen_CLGFRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6670,11 +5904,9 @@ s390_irgen_CLGFRL(UChar r1, UInt i2) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_32Uto64, load(Ity_I32, mkU64(addr_rel_long(i2))))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clgfrl"; } -static const HChar * +static void s390_irgen_CLHRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -6683,11 +5915,9 @@ s390_irgen_CLHRL(UChar r1, UInt i2) assign(op1, get_gpr_w1(r1)); assign(op2, unop(Iop_16Uto32, load(Ity_I16, mkU64(addr_rel_long(i2))))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clhrl"; } -static const HChar * +static void s390_irgen_CLGHRL(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -6696,11 +5926,9 @@ s390_irgen_CLGHRL(UChar r1, UInt i2) assign(op1, get_gpr_dw0(r1)); assign(op2, unop(Iop_16Uto64, load(Ity_I16, mkU64(addr_rel_long(i2))))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clghrl"; } -static const HChar * +static void s390_irgen_CLRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I32); @@ -6720,11 +5948,9 @@ s390_irgen_CLRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) mkexpr(op4addr)); } } - - return "clrb"; } -static const HChar * +static void s390_irgen_CLGRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I64); @@ -6744,8 +5970,6 @@ s390_irgen_CLGRB(UChar r1, UChar r2, UChar m3, IRTemp op4addr) mkexpr(op4addr)); } } - - return "clgrb"; } /* Raise the appropriate signal for a compare-and-trap-instruction data @@ -6781,32 +6005,28 @@ s390_irgen_CxRT(UChar m3, UChar r1, UChar r2, IRType type, UInt opc) s390_trap_on_condition(cond); } -static const HChar * +static void s390_irgen_CGRT(UChar m3, UChar r1, UChar r2) { s390_irgen_CxRT(m3, r1, r2, Ity_I64, S390_CC_OP_SIGNED_COMPARE); - return "cgrt"; } -static const HChar * +static void s390_irgen_CRT(UChar m3, UChar r1, UChar r2) { s390_irgen_CxRT(m3, r1, r2, Ity_I32, S390_CC_OP_SIGNED_COMPARE); - return "crt"; } -static const HChar * +static void s390_irgen_CLGRT(UChar m3, UChar r1, UChar r2) { s390_irgen_CxRT(m3, r1, r2, Ity_I64, S390_CC_OP_UNSIGNED_COMPARE); - return "clgrt"; } -static const HChar * +static void s390_irgen_CLRT(UChar m3, UChar r1, UChar r2) { s390_irgen_CxRT(m3, r1, r2, Ity_I32, S390_CC_OP_UNSIGNED_COMPARE); - return "clrt"; } /* Handle the various flavors of compare (logical) immediate and trap. */ @@ -6839,32 +6059,28 @@ s390_irgen_CxIT(UChar m3, UChar r1, UShort i2, IRType type, UInt opc) s390_trap_on_condition(cond); } -static const HChar * +static void s390_irgen_CGIT(UChar r1, UShort i2, UChar m3) { s390_irgen_CxIT(m3, r1, i2, Ity_I64, S390_CC_OP_SIGNED_COMPARE); - return "cgit"; } -static const HChar * +static void s390_irgen_CIT(UChar r1, UShort i2, UChar m3) { s390_irgen_CxIT(m3, r1, i2, Ity_I32, S390_CC_OP_SIGNED_COMPARE); - return "cit"; } -static const HChar * +static void s390_irgen_CLGIT(UChar r1, UShort i2, UChar m3) { s390_irgen_CxIT(m3, r1, i2, Ity_I64, S390_CC_OP_UNSIGNED_COMPARE); - return "clgit"; } -static const HChar * +static void s390_irgen_CLFIT(UChar r1, UShort i2, UChar m3) { s390_irgen_CxIT(m3, r1, i2, Ity_I32, S390_CC_OP_UNSIGNED_COMPARE); - return "clfit"; } /* Handle the variants of compare logical and trap with memory operand. */ @@ -6891,61 +6107,55 @@ s390_irgen_CLxT(UChar r1, UChar m3, IRTemp op2addr, IRType type, UInt opc) s390_trap_on_condition(cond); } -static const HChar * +static void s390_irgen_CLT(UChar r1, UChar m3, IRTemp op2addr) { s390_irgen_CLxT(r1, m3, op2addr, Ity_I32, S390_CC_OP_UNSIGNED_COMPARE); - return "clt"; } -static const HChar * +static void s390_irgen_CLGT(UChar r1, UChar m3, IRTemp op2addr) { s390_irgen_CLxT(r1, m3, op2addr, Ity_I64, S390_CC_OP_UNSIGNED_COMPARE); - return "clgt"; } -static const HChar * +static void s390_irgen_LAT(UChar r1, IRTemp op2addr) { IRTemp val = newTemp(Ity_I32); assign(val, load(Ity_I32, mkexpr(op2addr))); put_gpr_w1(r1, mkexpr(val)); s390_trap_on_condition(binop(Iop_CmpEQ32, mkexpr(val), mkU32(0))); - return "lat"; } -static const HChar * +static void s390_irgen_LGAT(UChar r1, IRTemp op2addr) { IRTemp val = newTemp(Ity_I64); assign(val, load(Ity_I64, mkexpr(op2addr))); put_gpr_dw0(r1, mkexpr(val)); s390_trap_on_condition(binop(Iop_CmpEQ64, mkexpr(val), mkU64(0))); - return "lgat"; } -static const HChar * +static void s390_irgen_LFHAT(UChar r1, IRTemp op2addr) { IRTemp val = newTemp(Ity_I32); assign(val, load(Ity_I32, mkexpr(op2addr))); put_gpr_w0(r1, mkexpr(val)); s390_trap_on_condition(binop(Iop_CmpEQ32, mkexpr(val), mkU32(0))); - return "lfhat"; } -static const HChar * +static void s390_irgen_LLGFAT(UChar r1, IRTemp op2addr) { IRTemp val = newTemp(Ity_I64); assign(val, unop(Iop_32Uto64, load(Ity_I32, mkexpr(op2addr)))); put_gpr_dw0(r1, mkexpr(val)); s390_trap_on_condition(binop(Iop_CmpEQ64, mkexpr(val), mkU64(0))); - return "llgfat"; } -static const HChar * +static void s390_irgen_LLGTAT(UChar r1, IRTemp op2addr) { IRTemp val = newTemp(Ity_I64); @@ -6953,10 +6163,9 @@ s390_irgen_LLGTAT(UChar r1, IRTemp op2addr) unop(Iop_32Uto64, load(Ity_I32, mkexpr(op2addr))))); put_gpr_dw0(r1, mkexpr(val)); s390_trap_on_condition(binop(Iop_CmpEQ64, mkexpr(val), mkU64(0))); - return "llgtat"; } -static const HChar * +static void s390_irgen_CLRJ(UChar r1, UChar r2, UShort i4, UChar m3) { IRTemp op1 = newTemp(Ity_I32); @@ -6974,14 +6183,11 @@ s390_irgen_CLRJ(UChar r1, UChar r2, UShort i4, UChar m3) op1, op2)); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "clrj"; } -static const HChar * +static void s390_irgen_CLGRJ(UChar r1, UChar r2, UShort i4, UChar m3) { IRTemp op1 = newTemp(Ity_I64); @@ -6999,14 +6205,11 @@ s390_irgen_CLGRJ(UChar r1, UChar r2, UShort i4, UChar m3) op1, op2)); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "clgrj"; } -static const HChar * +static void s390_irgen_CLIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I32); @@ -7026,11 +6229,9 @@ s390_irgen_CLIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) mkexpr(op4addr)); } } - - return "clib"; } -static const HChar * +static void s390_irgen_CLGIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) { IRTemp op1 = newTemp(Ity_I64); @@ -7050,11 +6251,9 @@ s390_irgen_CLGIB(UChar r1, UChar m3, UChar i2, IRTemp op4addr) mkexpr(op4addr)); } } - - return "clgib"; } -static const HChar * +static void s390_irgen_CLIJ(UChar r1, UChar m3, UShort i4, UChar i2) { IRTemp op1 = newTemp(Ity_I32); @@ -7072,14 +6271,11 @@ s390_irgen_CLIJ(UChar r1, UChar m3, UShort i4, UChar i2) mktemp(Ity_I32, mkU32(op2)))); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "clij"; } -static const HChar * +static void s390_irgen_CLGIJ(UChar r1, UChar m3, UShort i4, UChar i2) { IRTemp op1 = newTemp(Ity_I64); @@ -7097,14 +6293,11 @@ s390_irgen_CLGIJ(UChar r1, UChar m3, UShort i4, UChar i2) mktemp(Ity_I64, mkU64(op2)))); if_condition_goto(binop(Iop_CmpNE32, mkexpr(cond), mkU32(0)), addr_relative(i4)); - } } - - return "clgij"; } -static const HChar * +static void s390_irgen_CLM(UChar r1, UChar r3, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -7162,11 +6355,9 @@ s390_irgen_CLM(UChar r1, UChar r3, IRTemp op2addr) mkexpr(c0), mkU8(24)), binop(Iop_Shl32, mkexpr(c1), mkU8(16))), binop(Iop_Shl32, mkexpr(c2), mkU8(8))), mkexpr(c3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clm"; } -static const HChar * +static void s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -7224,11 +6415,9 @@ s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) mkexpr(c0), mkU8(24)), binop(Iop_Shl32, mkexpr(c1), mkU8(16))), binop(Iop_Shl32, mkexpr(c2), mkU8(8))), mkexpr(c3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clmy"; } -static const HChar * +static void s390_irgen_CLMH(UChar r1, UChar r3, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -7286,11 +6475,9 @@ s390_irgen_CLMH(UChar r1, UChar r3, IRTemp op2addr) mkexpr(c0), mkU8(24)), binop(Iop_Shl32, mkexpr(c1), mkU8(16))), binop(Iop_Shl32, mkexpr(c2), mkU8(8))), mkexpr(c3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clmh"; } -static const HChar * +static void s390_irgen_CLHHR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -7299,11 +6486,9 @@ s390_irgen_CLHHR(UChar r1, UChar r2) assign(op1, get_gpr_w0(r1)); assign(op2, get_gpr_w0(r2)); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clhhr"; } -static const HChar * +static void s390_irgen_CLHLR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -7312,11 +6497,9 @@ s390_irgen_CLHLR(UChar r1, UChar r2) assign(op1, get_gpr_w0(r1)); assign(op2, get_gpr_w1(r2)); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clhlr"; } -static const HChar * +static void s390_irgen_CLHF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -7325,11 +6508,9 @@ s390_irgen_CLHF(UChar r1, IRTemp op2addr) assign(op1, get_gpr_w0(r1)); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "clhf"; } -static const HChar * +static void s390_irgen_CLIH(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -7339,21 +6520,15 @@ s390_irgen_CLIH(UChar r1, UInt i2) op2 = i2; s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, mktemp(Ity_I32, mkU32(op2))); - - return "clih"; } -static const HChar * +static void s390_irgen_CPYA(UChar r1, UChar r2) { put_ar_w0(r1, get_ar_w0(r2)); - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM("cpya"), AR(r1), AR(r2)); - - return "cpya"; } -static const HChar * +static void s390_irgen_XR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -7369,11 +6544,9 @@ s390_irgen_XR(UChar r1, UChar r2) } s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "xr"; } -static const HChar * +static void s390_irgen_XGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -7389,35 +6562,33 @@ s390_irgen_XGR(UChar r1, UChar r2) } s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_dw0(r1, mkexpr(result)); - - return "xgr"; } -static const HChar * +static void s390_irgen_XRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "xrk", Iop_Xor32, False, False); + s390_irgen_logicalK32(r3, r1, r2, Iop_Xor32, False, False); } -static const HChar * +static void s390_irgen_XGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "xgrk", Iop_Xor64, False, False); + s390_irgen_logicalK64(r3, r1, r2, Iop_Xor64, False, False); } -static const HChar * +static void s390_irgen_NXRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "nxrk", Iop_Xor32, False, True); + s390_irgen_logicalK32(r3, r1, r2, Iop_Xor32, False, True); } -static const HChar * +static void s390_irgen_NXGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "nxgrk", Iop_Xor64, False, True); + s390_irgen_logicalK64(r3, r1, r2, Iop_Xor64, False, True); } -static const HChar * +static void s390_irgen_X(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -7429,11 +6600,9 @@ s390_irgen_X(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Xor32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "x"; } -static const HChar * +static void s390_irgen_XY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -7445,11 +6614,9 @@ s390_irgen_XY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Xor32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "xy"; } -static const HChar * +static void s390_irgen_XG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -7461,11 +6628,9 @@ s390_irgen_XG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Xor64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_dw0(r1, mkexpr(result)); - - return "xg"; } -static const HChar * +static void s390_irgen_XI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -7477,11 +6642,9 @@ s390_irgen_XI(UChar i2, IRTemp op1addr) assign(result, binop(Iop_Xor8, mkexpr(op1), mkU8(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); store(mkexpr(op1addr), mkexpr(result)); - - return "xi"; } -static const HChar * +static void s390_irgen_XIY(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -7493,11 +6656,9 @@ s390_irgen_XIY(UChar i2, IRTemp op1addr) assign(result, binop(Iop_Xor8, mkexpr(op1), mkU8(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); store(mkexpr(op1addr), mkexpr(result)); - - return "xiy"; } -static const HChar * +static void s390_irgen_XIHF(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -7509,11 +6670,9 @@ s390_irgen_XIHF(UChar r1, UInt i2) assign(result, binop(Iop_Xor32, mkexpr(op1), mkU32(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w0(r1, mkexpr(result)); - - return "xihf"; } -static const HChar * +static void s390_irgen_XILF(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -7525,37 +6684,27 @@ s390_irgen_XILF(UChar r1, UInt i2) assign(result, binop(Iop_Xor32, mkexpr(op1), mkU32(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "xilf"; } -static const HChar * +static void s390_irgen_EAR(UChar r1, UChar r2) { put_gpr_w1(r1, get_ar_w0(r2)); - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM("ear"), GPR(r1), AR(r2)); - - return "ear"; } -static const HChar * +static void s390_irgen_IC(UChar r1, IRTemp op2addr) { put_gpr_b7(r1, load(Ity_I8, mkexpr(op2addr))); - - return "ic"; } -static const HChar * +static void s390_irgen_ICY(UChar r1, IRTemp op2addr) { put_gpr_b7(r1, load(Ity_I8, mkexpr(op2addr))); - - return "icy"; } -static const HChar * +static void s390_irgen_ICM(UChar r1, UChar r3, IRTemp op2addr) { UChar n; @@ -7586,11 +6735,9 @@ s390_irgen_ICM(UChar r1, UChar r3, IRTemp op2addr) assign(result, get_gpr_w1(r1)); s390_cc_thunk_putZZ(S390_CC_OP_INSERT_CHAR_MASK_32, result, mktemp(Ity_I32, mkU32(mask))); - - return "icm"; } -static const HChar * +static void s390_irgen_ICMY(UChar r1, UChar r3, IRTemp op2addr) { UChar n; @@ -7621,11 +6768,9 @@ s390_irgen_ICMY(UChar r1, UChar r3, IRTemp op2addr) assign(result, get_gpr_w1(r1)); s390_cc_thunk_putZZ(S390_CC_OP_INSERT_CHAR_MASK_32, result, mktemp(Ity_I32, mkU32(mask))); - - return "icmy"; } -static const HChar * +static void s390_irgen_ICMH(UChar r1, UChar r3, IRTemp op2addr) { UChar n; @@ -7656,184 +6801,138 @@ s390_irgen_ICMH(UChar r1, UChar r3, IRTemp op2addr) assign(result, get_gpr_w0(r1)); s390_cc_thunk_putZZ(S390_CC_OP_INSERT_CHAR_MASK_32, result, mktemp(Ity_I32, mkU32(mask))); - - return "icmh"; } -static const HChar * +static void s390_irgen_IIHF(UChar r1, UInt i2) { put_gpr_w0(r1, mkU32(i2)); - - return "iihf"; } -static const HChar * +static void s390_irgen_IIHH(UChar r1, UShort i2) { put_gpr_hw0(r1, mkU16(i2)); - - return "iihh"; } -static const HChar * +static void s390_irgen_IIHL(UChar r1, UShort i2) { put_gpr_hw1(r1, mkU16(i2)); - - return "iihl"; } -static const HChar * +static void s390_irgen_IILF(UChar r1, UInt i2) { put_gpr_w1(r1, mkU32(i2)); - - return "iilf"; } -static const HChar * +static void s390_irgen_IILH(UChar r1, UShort i2) { put_gpr_hw2(r1, mkU16(i2)); - - return "iilh"; } -static const HChar * +static void s390_irgen_IILL(UChar r1, UShort i2) { put_gpr_hw3(r1, mkU16(i2)); - - return "iill"; } -static const HChar * +static void s390_irgen_LR(UChar r1, UChar r2) { put_gpr_w1(r1, get_gpr_w1(r2)); - - return "lr"; } -static const HChar * +static void s390_irgen_LGR(UChar r1, UChar r2) { put_gpr_dw0(r1, get_gpr_dw0(r2)); - - return "lgr"; } -static const HChar * +static void s390_irgen_LGFR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_32Sto64, get_gpr_w1(r2))); - - return "lgfr"; } -static const HChar * +static void s390_irgen_L(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, load(Ity_I32, mkexpr(op2addr))); - - return "l"; } -static const HChar * +static void s390_irgen_LY(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, load(Ity_I32, mkexpr(op2addr))); - - return "ly"; } -static const HChar * +static void s390_irgen_LG(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, load(Ity_I64, mkexpr(op2addr))); - - return "lg"; } -static const HChar * +static void s390_irgen_LGF(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, unop(Iop_32Sto64, load(Ity_I32, mkexpr(op2addr)))); - - return "lgf"; } -static const HChar * +static void s390_irgen_LGFI(UChar r1, UInt i2) { put_gpr_dw0(r1, mkU64((ULong)(Long)(Int)i2)); - - return "lgfi"; } -static const HChar * +static void s390_irgen_LRL(UChar r1, UInt i2) { put_gpr_w1(r1, load(Ity_I32, mkU64(addr_rel_long(i2)))); - - return "lrl"; } -static const HChar * +static void s390_irgen_LGRL(UChar r1, UInt i2) { put_gpr_dw0(r1, load(Ity_I64, mkU64(addr_rel_long(i2)))); - - return "lgrl"; } -static const HChar * +static void s390_irgen_LGFRL(UChar r1, UInt i2) { put_gpr_dw0(r1, unop(Iop_32Sto64, load(Ity_I32, mkU64(addr_rel_long(i2))))); - - return "lgfrl"; } -static const HChar * +static void s390_irgen_LA(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, mkexpr(op2addr)); - - return "la"; } -static const HChar * +static void s390_irgen_LAY(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, mkexpr(op2addr)); - - return "lay"; } -static const HChar * +static void s390_irgen_LAE(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, mkexpr(op2addr)); - - return "lae"; } -static const HChar * +static void s390_irgen_LAEY(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, mkexpr(op2addr)); - - return "laey"; } -static const HChar * +static void s390_irgen_LARL(UChar r1, UInt i2) { put_gpr_dw0(r1, mkU64(addr_rel_long(i2))); - - return "larl"; } /* The IR representation of LAA and friends is an approximation of what @@ -7969,87 +7068,67 @@ s390_irgen_load_and_bitwise64(UChar r1, UChar r3, IRTemp op2addr, IROp op) put_gpr_dw0(r1, mkexpr(old_mem)); } -static const HChar * +static void s390_irgen_LAA(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_add32(r1, r3, op2addr, True /* is_signed */); - - return "laa"; } -static const HChar * +static void s390_irgen_LAAG(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_add64(r1, r3, op2addr, True /* is_signed */); - - return "laag"; } -static const HChar * +static void s390_irgen_LAAL(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_add32(r1, r3, op2addr, False /* is_signed */); - - return "laal"; } -static const HChar * +static void s390_irgen_LAALG(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_add64(r1, r3, op2addr, False /* is_signed */); - - return "laalg"; } -static const HChar * +static void s390_irgen_LAN(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_bitwise32(r1, r3, op2addr, Iop_And32); - - return "lan"; } -static const HChar * +static void s390_irgen_LANG(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_bitwise64(r1, r3, op2addr, Iop_And64); - - return "lang"; } -static const HChar * +static void s390_irgen_LAX(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_bitwise32(r1, r3, op2addr, Iop_Xor32); - - return "lax"; } -static const HChar * +static void s390_irgen_LAXG(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_bitwise64(r1, r3, op2addr, Iop_Xor64); - - return "laxg"; } -static const HChar * +static void s390_irgen_LAO(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_bitwise32(r1, r3, op2addr, Iop_Or32); - - return "lao"; } -static const HChar * +static void s390_irgen_LAOG(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_and_bitwise64(r1, r3, op2addr, Iop_Or64); - - return "laog"; } -static const HChar * +static void s390_irgen_LTR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -8057,11 +7136,9 @@ s390_irgen_LTR(UChar r1, UChar r2) assign(op2, get_gpr_w1(r2)); put_gpr_w1(r1, mkexpr(op2)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, op2); - - return "ltr"; } -static const HChar * +static void s390_irgen_LTGR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -8069,11 +7146,9 @@ s390_irgen_LTGR(UChar r1, UChar r2) assign(op2, get_gpr_dw0(r2)); put_gpr_dw0(r1, mkexpr(op2)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, op2); - - return "ltgr"; } -static const HChar * +static void s390_irgen_LTGFR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -8081,11 +7156,9 @@ s390_irgen_LTGFR(UChar r1, UChar r2) assign(op2, unop(Iop_32Sto64, get_gpr_w1(r2))); put_gpr_dw0(r1, mkexpr(op2)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, op2); - - return "ltgfr"; } -static const HChar * +static void s390_irgen_LT(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I32); @@ -8093,11 +7166,9 @@ s390_irgen_LT(UChar r1, IRTemp op2addr) assign(op2, load(Ity_I32, mkexpr(op2addr))); put_gpr_w1(r1, mkexpr(op2)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, op2); - - return "lt"; } -static const HChar * +static void s390_irgen_LTG(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I64); @@ -8105,11 +7176,9 @@ s390_irgen_LTG(UChar r1, IRTemp op2addr) assign(op2, load(Ity_I64, mkexpr(op2addr))); put_gpr_dw0(r1, mkexpr(op2)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, op2); - - return "ltg"; } -static const HChar * +static void s390_irgen_LTGF(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I64); @@ -8117,51 +7186,39 @@ s390_irgen_LTGF(UChar r1, IRTemp op2addr) assign(op2, unop(Iop_32Sto64, load(Ity_I32, mkexpr(op2addr)))); put_gpr_dw0(r1, mkexpr(op2)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, op2); - - return "ltgf"; } -static const HChar * +static void s390_irgen_LBR(UChar r1, UChar r2) { put_gpr_w1(r1, unop(Iop_8Sto32, get_gpr_b7(r2))); - - return "lbr"; } -static const HChar * +static void s390_irgen_LGBR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_8Sto64, get_gpr_b7(r2))); - - return "lgbr"; } -static const HChar * +static void s390_irgen_LB(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, unop(Iop_8Sto32, load(Ity_I8, mkexpr(op2addr)))); - - return "lb"; } -static const HChar * +static void s390_irgen_LGB(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, unop(Iop_8Sto64, load(Ity_I8, mkexpr(op2addr)))); - - return "lgb"; } -static const HChar * +static void s390_irgen_LBH(UChar r1, IRTemp op2addr) { put_gpr_w0(r1, unop(Iop_8Sto32, load(Ity_I8, mkexpr(op2addr)))); - - return "lbh"; } -static const HChar * +static void s390_irgen_LCR(UChar r1, UChar r2) { Int op1; @@ -8174,11 +7231,9 @@ s390_irgen_LCR(UChar r1, UChar r2) put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, mktemp(Ity_I32, mkU32((UInt) op1)), op2); - - return "lcr"; } -static const HChar * +static void s390_irgen_LCGR(UChar r1, UChar r2) { Long op1; @@ -8191,11 +7246,9 @@ s390_irgen_LCGR(UChar r1, UChar r2) put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, mktemp(Ity_I64, mkU64((ULong) op1)), op2); - - return "lcgr"; } -static const HChar * +static void s390_irgen_LCGFR(UChar r1, UChar r2) { Long op1; @@ -8208,285 +7261,215 @@ s390_irgen_LCGFR(UChar r1, UChar r2) put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, mktemp(Ity_I64, mkU64((ULong) op1)), op2); - - return "lcgfr"; } -static const HChar * +static void s390_irgen_LHR(UChar r1, UChar r2) { put_gpr_w1(r1, unop(Iop_16Sto32, get_gpr_hw3(r2))); - - return "lhr"; } -static const HChar * +static void s390_irgen_LGHR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_16Sto64, get_gpr_hw3(r2))); - - return "lghr"; } -static const HChar * +static void s390_irgen_LH(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, unop(Iop_16Sto32, load(Ity_I16, mkexpr(op2addr)))); - - return "lh"; } -static const HChar * +static void s390_irgen_LHY(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, unop(Iop_16Sto32, load(Ity_I16, mkexpr(op2addr)))); - - return "lhy"; } -static const HChar * +static void s390_irgen_LGH(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, unop(Iop_16Sto64, load(Ity_I16, mkexpr(op2addr)))); - - return "lgh"; } -static const HChar * +static void s390_irgen_LHI(UChar r1, UShort i2) { put_gpr_w1(r1, mkU32((UInt)(Int)(Short)i2)); - - return "lhi"; } -static const HChar * +static void s390_irgen_LGHI(UChar r1, UShort i2) { put_gpr_dw0(r1, mkU64((ULong)(Long)(Short)i2)); - - return "lghi"; } -static const HChar * +static void s390_irgen_LHRL(UChar r1, UInt i2) { put_gpr_w1(r1, unop(Iop_16Sto32, load(Ity_I16, mkU64(addr_rel_long(i2))))); - - return "lhrl"; } -static const HChar * +static void s390_irgen_LGHRL(UChar r1, UInt i2) { put_gpr_dw0(r1, unop(Iop_16Sto64, load(Ity_I16, mkU64(addr_rel_long(i2))))); - - return "lghrl"; } -static const HChar * +static void s390_irgen_LHH(UChar r1, IRTemp op2addr) { put_gpr_w0(r1, unop(Iop_16Sto32, load(Ity_I16, mkexpr(op2addr)))); - - return "lhh"; } -static const HChar * +static void s390_irgen_LFH(UChar r1, IRTemp op2addr) { put_gpr_w0(r1, load(Ity_I32, mkexpr(op2addr))); - - return "lfh"; } -static const HChar * +static void s390_irgen_LLGFR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_32Uto64, get_gpr_w1(r2))); - - return "llgfr"; } -static const HChar * +static void s390_irgen_LLGF(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, unop(Iop_32Uto64, load(Ity_I32, mkexpr(op2addr)))); - - return "llgf"; } -static const HChar * +static void s390_irgen_LLGFRL(UChar r1, UInt i2) { put_gpr_dw0(r1, unop(Iop_32Uto64, load(Ity_I32, mkU64(addr_rel_long(i2))))); - - return "llgfrl"; } -static const HChar * +static void s390_irgen_LLCR(UChar r1, UChar r2) { put_gpr_w1(r1, unop(Iop_8Uto32, get_gpr_b7(r2))); - - return "llcr"; } -static const HChar * +static void s390_irgen_LLGCR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_8Uto64, get_gpr_b7(r2))); - - return "llgcr"; } -static const HChar * +static void s390_irgen_LLC(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, unop(Iop_8Uto32, load(Ity_I8, mkexpr(op2addr)))); - - return "llc"; } -static const HChar * +static void s390_irgen_LLGC(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, unop(Iop_8Uto64, load(Ity_I8, mkexpr(op2addr)))); - - return "llgc"; } -static const HChar * +static void s390_irgen_LLCH(UChar r1, IRTemp op2addr) { put_gpr_w0(r1, unop(Iop_8Uto32, load(Ity_I8, mkexpr(op2addr)))); - - return "llch"; } -static const HChar * +static void s390_irgen_LLHR(UChar r1, UChar r2) { put_gpr_w1(r1, unop(Iop_16Uto32, get_gpr_hw3(r2))); - - return "llhr"; } -static const HChar * +static void s390_irgen_LLGHR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_16Uto64, get_gpr_hw3(r2))); - - return "llghr"; } -static const HChar * +static void s390_irgen_LLH(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, unop(Iop_16Uto32, load(Ity_I16, mkexpr(op2addr)))); - - return "llh"; } -static const HChar * +static void s390_irgen_LLGH(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, unop(Iop_16Uto64, load(Ity_I16, mkexpr(op2addr)))); - - return "llgh"; } -static const HChar * +static void s390_irgen_LLHRL(UChar r1, UInt i2) { put_gpr_w1(r1, unop(Iop_16Uto32, load(Ity_I16, mkU64(addr_rel_long(i2))))); - - return "llhrl"; } -static const HChar * +static void s390_irgen_LLGHRL(UChar r1, UInt i2) { put_gpr_dw0(r1, unop(Iop_16Uto64, load(Ity_I16, mkU64(addr_rel_long(i2))))); - - return "llghrl"; } -static const HChar * +static void s390_irgen_LLHH(UChar r1, IRTemp op2addr) { put_gpr_w0(r1, unop(Iop_16Uto32, load(Ity_I16, mkexpr(op2addr)))); - - return "llhh"; } -static const HChar * +static void s390_irgen_LLIHF(UChar r1, UInt i2) { put_gpr_dw0(r1, mkU64(((ULong)i2) << 32)); - - return "llihf"; } -static const HChar * +static void s390_irgen_LLIHH(UChar r1, UShort i2) { put_gpr_dw0(r1, mkU64(((ULong)i2) << 48)); - - return "llihh"; } -static const HChar * +static void s390_irgen_LLIHL(UChar r1, UShort i2) { put_gpr_dw0(r1, mkU64(((ULong)i2) << 32)); - - return "llihl"; } -static const HChar * +static void s390_irgen_LLILF(UChar r1, UInt i2) { put_gpr_dw0(r1, mkU64(i2)); - - return "llilf"; } -static const HChar * +static void s390_irgen_LLILH(UChar r1, UShort i2) { put_gpr_dw0(r1, mkU64(((ULong)i2) << 16)); - - return "llilh"; } -static const HChar * +static void s390_irgen_LLILL(UChar r1, UShort i2) { put_gpr_dw0(r1, mkU64(i2)); - - return "llill"; } -static const HChar * +static void s390_irgen_LLGTR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_32Uto64, binop(Iop_And32, get_gpr_w1(r2), mkU32(2147483647)))); - - return "llgtr"; } -static const HChar * +static void s390_irgen_LLGT(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, unop(Iop_32Uto64, binop(Iop_And32, load(Ity_I32, mkexpr(op2addr)), mkU32(2147483647)))); - - return "llgt"; } -static const HChar * +static void s390_irgen_LNR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -8497,11 +7480,9 @@ s390_irgen_LNR(UChar r1, UChar r2) binop(Iop_Sub32, mkU32(0), mkexpr(op2)))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_BITWISE, result); - - return "lnr"; } -static const HChar * +static void s390_irgen_LNGR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -8512,11 +7493,9 @@ s390_irgen_LNGR(UChar r1, UChar r2) binop(Iop_Sub64, mkU64(0), mkexpr(op2)))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_BITWISE, result); - - return "lngr"; } -static const HChar * +static void s390_irgen_LNGFR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -8527,59 +7506,47 @@ s390_irgen_LNGFR(UChar r1, UChar r2) binop(Iop_Sub64, mkU64(0), mkexpr(op2)))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_BITWISE, result); - - return "lngfr"; } -static const HChar * +static void s390_irgen_LOCR(UChar m3, UChar r1, UChar r2) { next_insn_if(binop(Iop_CmpEQ32, s390_call_calculate_cond(m3), mkU32(0))); put_gpr_w1(r1, get_gpr_w1(r2)); - - return "locr"; } -static const HChar * +static void s390_irgen_LOCGR(UChar m3, UChar r1, UChar r2) { next_insn_if(binop(Iop_CmpEQ32, s390_call_calculate_cond(m3), mkU32(0))); put_gpr_dw0(r1, get_gpr_dw0(r2)); - - return "locgr"; } -static const HChar * +static void s390_irgen_LOC(UChar r1, IRTemp op2addr) { /* condition is checked in format handler */ put_gpr_w1(r1, load(Ity_I32, mkexpr(op2addr))); - - return "loc"; } -static const HChar * +static void s390_irgen_LOCG(UChar r1, IRTemp op2addr) { /* condition is checked in format handler */ put_gpr_dw0(r1, load(Ity_I64, mkexpr(op2addr))); - - return "locg"; } -static const HChar * +static void s390_irgen_LPQ(UChar r1, IRTemp op2addr) { - s390_insn_assert("lpq", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); put_gpr_dw0(r1, load(Ity_I64, mkexpr(op2addr))); put_gpr_dw0(r1 + 1, load(Ity_I64, binop(Iop_Add64, mkexpr(op2addr), mkU64(8)) )); - - return "lpq"; } -static const HChar * +static void s390_irgen_LPR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -8590,11 +7557,9 @@ s390_irgen_LPR(UChar r1, UChar r2) binop(Iop_Sub32, mkU32(0), mkexpr(op2)), mkexpr(op2))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_LOAD_POSITIVE_32, op2); - - return "lpr"; } -static const HChar * +static void s390_irgen_LPGR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -8605,11 +7570,9 @@ s390_irgen_LPGR(UChar r1, UChar r2) binop(Iop_Sub64, mkU64(0), mkexpr(op2)), mkexpr(op2))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_LOAD_POSITIVE_64, op2); - - return "lpgr"; } -static const HChar * +static void s390_irgen_LPGFR(UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -8620,11 +7583,9 @@ s390_irgen_LPGFR(UChar r1, UChar r2) binop(Iop_Sub64, mkU64(0), mkexpr(op2)), mkexpr(op2))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_LOAD_POSITIVE_64, op2); - - return "lpgfr"; } -static const HChar * +static void s390_irgen_LRVR(UChar r1, UChar r2) { IRTemp b0 = newTemp(Ity_I8); @@ -8640,11 +7601,9 @@ s390_irgen_LRVR(UChar r1, UChar r2) put_gpr_b5(r1, mkexpr(b2)); put_gpr_b6(r1, mkexpr(b1)); put_gpr_b7(r1, mkexpr(b0)); - - return "lrvr"; } -static const HChar * +static void s390_irgen_LRVGR(UChar r1, UChar r2) { IRTemp b0 = newTemp(Ity_I8); @@ -8672,11 +7631,9 @@ s390_irgen_LRVGR(UChar r1, UChar r2) put_gpr_b5(r1, mkexpr(b2)); put_gpr_b6(r1, mkexpr(b1)); put_gpr_b7(r1, mkexpr(b0)); - - return "lrvgr"; } -static const HChar * +static void s390_irgen_LRVH(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I16); @@ -8684,11 +7641,9 @@ s390_irgen_LRVH(UChar r1, IRTemp op2addr) assign(op2, load(Ity_I16, mkexpr(op2addr))); put_gpr_b6(r1, unop(Iop_16to8, mkexpr(op2))); put_gpr_b7(r1, unop(Iop_16HIto8, mkexpr(op2))); - - return "lrvh"; } -static const HChar * +static void s390_irgen_LRV(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I32); @@ -8701,11 +7656,9 @@ s390_irgen_LRV(UChar r1, IRTemp op2addr) mkU8(16)), mkU32(255)))); put_gpr_b7(r1, unop(Iop_32to8, binop(Iop_And32, binop(Iop_Shr32, mkexpr(op2), mkU8(24)), mkU32(255)))); - - return "lrv"; } -static const HChar * +static void s390_irgen_LRVG(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I64); @@ -8726,54 +7679,42 @@ s390_irgen_LRVG(UChar r1, IRTemp op2addr) mkU8(48)), mkU64(255)))); put_gpr_b7(r1, unop(Iop_64to8, binop(Iop_And64, binop(Iop_Shr64, mkexpr(op2), mkU8(56)), mkU64(255)))); - - return "lrvg"; } -static const HChar * +static void s390_irgen_MVHHI(UShort i2, IRTemp op1addr) { store(mkexpr(op1addr), mkU16(i2)); - - return "mvhhi"; } -static const HChar * +static void s390_irgen_MVHI(UShort i2, IRTemp op1addr) { store(mkexpr(op1addr), mkU32((UInt)(Int)(Short)i2)); - - return "mvhi"; } -static const HChar * +static void s390_irgen_MVGHI(UShort i2, IRTemp op1addr) { store(mkexpr(op1addr), mkU64((ULong)(Long)(Short)i2)); - - return "mvghi"; } -static const HChar * +static void s390_irgen_MVI(UChar i2, IRTemp op1addr) { store(mkexpr(op1addr), mkU8(i2)); - - return "mvi"; } -static const HChar * +static void s390_irgen_MVIY(UChar i2, IRTemp op1addr) { store(mkexpr(op1addr), mkU8(i2)); - - return "mviy"; } -static const HChar * +static void s390_irgen_MR(UChar r1, UChar r2) { - s390_insn_assert("mr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); @@ -8784,14 +7725,12 @@ s390_irgen_MR(UChar r1, UChar r2) assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2))); put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); - - return "mr"; } -static const HChar * +static void s390_irgen_M(UChar r1, IRTemp op2addr) { - s390_insn_assert("m", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); @@ -8802,14 +7741,12 @@ s390_irgen_M(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2))); put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); - - return "m"; } -static const HChar * +static void s390_irgen_MFY(UChar r1, IRTemp op2addr) { - s390_insn_assert("mfy", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); @@ -8820,14 +7757,12 @@ s390_irgen_MFY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullS32, mkexpr(op1), mkexpr(op2))); put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); - - return "mfy"; } -static const HChar * +static void s390_irgen_MG(UChar r1, IRTemp op2addr) { - s390_insn_assert("mg", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I64); IRTemp op2 = newTemp(Ity_I64); @@ -8838,11 +7773,9 @@ s390_irgen_MG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullS64, mkexpr(op1), mkexpr(op2))); put_gpr_dw0(r1, unop(Iop_128HIto64, mkexpr(result))); put_gpr_dw0(r1 + 1, unop(Iop_128to64, mkexpr(result))); - - return "mg"; } -static const HChar * +static void s390_irgen_MGH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -8854,14 +7787,12 @@ s390_irgen_MGH(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_16Sto64, mkexpr(op2)) )); put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); - - return "mgh"; } -static const HChar * +static void s390_irgen_MGRK(UChar r3, UChar r1, UChar r2) { - s390_insn_assert("mgrk", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I64); IRTemp op3 = newTemp(Ity_I64); @@ -8872,11 +7803,9 @@ s390_irgen_MGRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_MullS64, mkexpr(op2), mkexpr(op3))); put_gpr_dw0(r1, unop(Iop_128HIto64, mkexpr(result))); put_gpr_dw0(r1 + 1, unop(Iop_128to64, mkexpr(result))); - - return "mgrk"; } -static const HChar * +static void s390_irgen_MH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -8888,11 +7817,9 @@ s390_irgen_MH(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullS32, mkexpr(op1), unop(Iop_16Sto32, mkexpr(op2)) )); put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); - - return "mh"; } -static const HChar * +static void s390_irgen_MHY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -8904,11 +7831,9 @@ s390_irgen_MHY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullS32, mkexpr(op1), unop(Iop_16Sto32, mkexpr(op2)) )); put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); - - return "mhy"; } -static const HChar * +static void s390_irgen_MHI(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I32); @@ -8920,11 +7845,9 @@ s390_irgen_MHI(UChar r1, UShort i2) assign(result, binop(Iop_MullS32, mkexpr(op1), unop(Iop_16Sto32, mkU16((UShort)op2)))); put_gpr_w1(r1, unop(Iop_64to32, mkexpr(result))); - - return "mhi"; } -static const HChar * +static void s390_irgen_MGHI(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I64); @@ -8936,14 +7859,12 @@ s390_irgen_MGHI(UChar r1, UShort i2) assign(result, binop(Iop_MullS64, mkexpr(op1), unop(Iop_16Sto64, mkU16((UShort)op2)))); put_gpr_dw0(r1, unop(Iop_128to64, mkexpr(result))); - - return "mghi"; } -static const HChar * +static void s390_irgen_MLR(UChar r1, UChar r2) { - s390_insn_assert("mlr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); @@ -8954,14 +7875,12 @@ s390_irgen_MLR(UChar r1, UChar r2) assign(result, binop(Iop_MullU32, mkexpr(op1), mkexpr(op2))); put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); - - return "mlr"; } -static const HChar * +static void s390_irgen_MLGR(UChar r1, UChar r2) { - s390_insn_assert("mlgr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I64); IRTemp op2 = newTemp(Ity_I64); @@ -8972,14 +7891,12 @@ s390_irgen_MLGR(UChar r1, UChar r2) assign(result, binop(Iop_MullU64, mkexpr(op1), mkexpr(op2))); put_gpr_dw0(r1, unop(Iop_128HIto64, mkexpr(result))); put_gpr_dw0(r1 + 1, unop(Iop_128to64, mkexpr(result))); - - return "mlgr"; } -static const HChar * +static void s390_irgen_ML(UChar r1, IRTemp op2addr) { - s390_insn_assert("ml", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); @@ -8990,14 +7907,12 @@ s390_irgen_ML(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullU32, mkexpr(op1), mkexpr(op2))); put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); - - return "ml"; } -static const HChar * +static void s390_irgen_MLG(UChar r1, IRTemp op2addr) { - s390_insn_assert("mlg", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op1 = newTemp(Ity_I64); IRTemp op2 = newTemp(Ity_I64); @@ -9008,45 +7923,35 @@ s390_irgen_MLG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_MullU64, mkexpr(op1), mkexpr(op2))); put_gpr_dw0(r1, unop(Iop_128HIto64, mkexpr(result))); put_gpr_dw0(r1 + 1, unop(Iop_128to64, mkexpr(result))); - - return "mlg"; } -static const HChar * +static void s390_irgen_MSR(UChar r1, UChar r2) { put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), get_gpr_w1(r2))); - - return "msr"; } -static const HChar * +static void s390_irgen_MSGR(UChar r1, UChar r2) { put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), get_gpr_dw0(r2))); - - return "msgr"; } -static const HChar * +static void s390_irgen_MSGFR(UChar r1, UChar r2) { put_gpr_dw0( r1, binop(Iop_Mul64, get_gpr_dw0(r1), unop(Iop_32Sto64, get_gpr_w1(r2)))); - - return "msgfr"; } -static const HChar * +static void s390_irgen_MS(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), load(Ity_I32, mkexpr(op2addr)))); - - return "ms"; } -static const HChar * +static void s390_irgen_MSC(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -9056,11 +7961,9 @@ s390_irgen_MSC(UChar r1, IRTemp op2addr) assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_cc_thunk_putSS(S390_CC_OP_MUL_32, op1, op2); put_gpr_w1(r1, binop(Iop_Mul32, mkexpr(op1), mkexpr(op2))); - - return "msc"; } -static const HChar * +static void s390_irgen_MSRKC(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -9070,29 +7973,23 @@ s390_irgen_MSRKC(UChar r3, UChar r1, UChar r2) assign(op3, get_gpr_w1(r3)); s390_cc_thunk_putSS(S390_CC_OP_MUL_32, op2, op3); put_gpr_w1(r1, binop(Iop_Mul32, mkexpr(op2), mkexpr(op3))); - - return "msrkc"; } -static const HChar * +static void s390_irgen_MSY(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), load(Ity_I32, mkexpr(op2addr)))); - - return "msy"; } -static const HChar * +static void s390_irgen_MSG(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), load(Ity_I64, mkexpr(op2addr)))); - - return "msg"; } -static const HChar * +static void s390_irgen_MSGC(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -9102,37 +7999,29 @@ s390_irgen_MSGC(UChar r1, IRTemp op2addr) assign(op2, load(Ity_I64, mkexpr(op2addr))); s390_cc_thunk_putSS(S390_CC_OP_MUL_64, op1, op2); put_gpr_dw0(r1, binop(Iop_Mul64, mkexpr(op1), mkexpr(op2))); - - return "msgc"; } -static const HChar * +static void s390_irgen_MSGF(UChar r1, IRTemp op2addr) { put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), unop(Iop_32Sto64, load(Ity_I32, mkexpr(op2addr))))); - - return "msgf"; } -static const HChar * +static void s390_irgen_MSFI(UChar r1, UInt i2) { put_gpr_w1(r1, binop(Iop_Mul32, get_gpr_w1(r1), mkU32(i2))); - - return "msfi"; } -static const HChar * +static void s390_irgen_MSGFI(UChar r1, UInt i2) { ULong op2 = (ULong)i2 - (((ULong)i2 & (1 << 31)) << 1); put_gpr_dw0(r1, binop(Iop_Mul64, get_gpr_dw0(r1), mkU64(op2))); - - return "msgfi"; } -static const HChar * +static void s390_irgen_MSGRKC(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -9142,11 +8031,9 @@ s390_irgen_MSGRKC(UChar r3, UChar r1, UChar r2) assign(op3, get_gpr_dw0(r3)); s390_cc_thunk_putSS(S390_CC_OP_MUL_64, op2, op3); put_gpr_dw0(r1, binop(Iop_Mul64, mkexpr(op2), mkexpr(op3))); - - return "msgrkc"; } -static const HChar * +static void s390_irgen_OR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -9158,11 +8045,9 @@ s390_irgen_OR(UChar r1, UChar r2) assign(result, binop(Iop_Or32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "or"; } -static const HChar * +static void s390_irgen_OGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -9174,47 +8059,45 @@ s390_irgen_OGR(UChar r1, UChar r2) assign(result, binop(Iop_Or64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_dw0(r1, mkexpr(result)); - - return "ogr"; } -static const HChar * +static void s390_irgen_ORK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "ork", Iop_Or32, False, False); + s390_irgen_logicalK32(r3, r1, r2, Iop_Or32, False, False); } -static const HChar * +static void s390_irgen_OGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "ogrk", Iop_Or64, False, False); + s390_irgen_logicalK64(r3, r1, r2, Iop_Or64, False, False); } -static const HChar * +static void s390_irgen_OCRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "ocrk", Iop_Or32, True, False); + s390_irgen_logicalK32(r3, r1, r2, Iop_Or32, True, False); } -static const HChar * +static void s390_irgen_OCGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "ocgrk", Iop_Or64, True, False); + s390_irgen_logicalK64(r3, r1, r2, Iop_Or64, True, False); } -static const HChar * +static void s390_irgen_NORK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK32(r3, r1, r2, "nork", Iop_Or32, False, True); + s390_irgen_logicalK32(r3, r1, r2, Iop_Or32, False, True); } -static const HChar * +static void s390_irgen_NOGRK(UChar r3, UChar r1, UChar r2) { - return s390_irgen_logicalK64(r3, r1, r2, "nogrk", Iop_Or64, False, True); + s390_irgen_logicalK64(r3, r1, r2, Iop_Or64, False, True); } -static const HChar * +static void s390_irgen_O(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -9226,11 +8109,9 @@ s390_irgen_O(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Or32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "o"; } -static const HChar * +static void s390_irgen_OY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -9242,11 +8123,9 @@ s390_irgen_OY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Or32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "oy"; } -static const HChar * +static void s390_irgen_OG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -9258,11 +8137,9 @@ s390_irgen_OG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Or64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_dw0(r1, mkexpr(result)); - - return "og"; } -static const HChar * +static void s390_irgen_OI(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -9274,11 +8151,9 @@ s390_irgen_OI(UChar i2, IRTemp op1addr) assign(result, binop(Iop_Or8, mkexpr(op1), mkU8(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); store(mkexpr(op1addr), mkexpr(result)); - - return "oi"; } -static const HChar * +static void s390_irgen_OIY(UChar i2, IRTemp op1addr) { IRTemp op1 = newTemp(Ity_I8); @@ -9290,11 +8165,9 @@ s390_irgen_OIY(UChar i2, IRTemp op1addr) assign(result, binop(Iop_Or8, mkexpr(op1), mkU8(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); store(mkexpr(op1addr), mkexpr(result)); - - return "oiy"; } -static const HChar * +static void s390_irgen_OIHF(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -9306,11 +8179,9 @@ s390_irgen_OIHF(UChar r1, UInt i2) assign(result, binop(Iop_Or32, mkexpr(op1), mkU32(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w0(r1, mkexpr(result)); - - return "oihf"; } -static const HChar * +static void s390_irgen_OIHH(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -9322,11 +8193,9 @@ s390_irgen_OIHH(UChar r1, UShort i2) assign(result, binop(Iop_Or16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw0(r1, mkexpr(result)); - - return "oihh"; } -static const HChar * +static void s390_irgen_OIHL(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -9338,11 +8207,9 @@ s390_irgen_OIHL(UChar r1, UShort i2) assign(result, binop(Iop_Or16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw1(r1, mkexpr(result)); - - return "oihl"; } -static const HChar * +static void s390_irgen_OILF(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -9354,11 +8221,9 @@ s390_irgen_OILF(UChar r1, UInt i2) assign(result, binop(Iop_Or32, mkexpr(op1), mkU32(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_w1(r1, mkexpr(result)); - - return "oilf"; } -static const HChar * +static void s390_irgen_OILH(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -9370,11 +8235,9 @@ s390_irgen_OILH(UChar r1, UShort i2) assign(result, binop(Iop_Or16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw2(r1, mkexpr(result)); - - return "oilh"; } -static const HChar * +static void s390_irgen_OILL(UChar r1, UShort i2) { IRTemp op1 = newTemp(Ity_I16); @@ -9386,22 +8249,18 @@ s390_irgen_OILL(UChar r1, UShort i2) assign(result, binop(Iop_Or16, mkexpr(op1), mkU16(op2))); s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); put_gpr_hw3(r1, mkexpr(result)); - - return "oill"; } -static const HChar * +static void s390_irgen_PFD(void) { - - return "pfd"; + /* Treat as a no-op */ } -static const HChar * +static void s390_irgen_PFDRL(void) { - - return "pfdrl"; + /* Treat as a no-op */ } static IRExpr * @@ -9459,7 +8318,7 @@ s390_call_pfpo_helper(IRExpr *gr0) return call; } -static const HChar * +static void s390_irgen_PFPO(void) { IRTemp gr0 = newTemp(Ity_I32); /* word 1 [32:63] of GR 0 */ @@ -9680,11 +8539,9 @@ s390_irgen_PFPO(void) put_gpr_w1(1, mkU32(0x0)); s390_cc_thunk_put1d128Z(S390_CC_OP_PFPO_128, src18, gr0); next_insn_if(binop(Iop_CmpEQ32, mkexpr(fn), mkU32(S390_PFPO_D128_TO_F128))); - - return "pfpo"; } -static const HChar * +static void s390_irgen_RLL(UChar r1, UChar r3, IRTemp op2addr) { IRTemp amount = newTemp(Ity_I64); @@ -9695,11 +8552,9 @@ s390_irgen_RLL(UChar r1, UChar r3, IRTemp op2addr) put_gpr_w1(r1, binop(Iop_Or32, binop(Iop_Shl32, mkexpr(op), unop(Iop_64to8, mkexpr(amount))), binop(Iop_Shr32, mkexpr(op), unop(Iop_64to8, binop(Iop_Sub64, mkU64(32), mkexpr(amount)))))); - - return "rll"; } -static const HChar * +static void s390_irgen_RLLG(UChar r1, UChar r3, IRTemp op2addr) { IRTemp amount = newTemp(Ity_I64); @@ -9710,11 +8565,9 @@ s390_irgen_RLLG(UChar r1, UChar r3, IRTemp op2addr) put_gpr_dw0(r1, binop(Iop_Or64, binop(Iop_Shl64, mkexpr(op), unop(Iop_64to8, mkexpr(amount))), binop(Iop_Shr64, mkexpr(op), unop(Iop_64to8, binop(Iop_Sub64, mkU64(64), mkexpr(amount)))))); - - return "rllg"; } -static const HChar * +static void s390_irgen_RNSBG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { UChar from; @@ -9749,11 +8602,9 @@ s390_irgen_RNSBG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) mkU64(maskc)), mkexpr(result))); } s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); - - return "rnsbg"; } -static const HChar * +static void s390_irgen_RXSBG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { UChar from; @@ -9788,11 +8639,9 @@ s390_irgen_RXSBG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) mkU64(maskc)), mkexpr(result))); } s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); - - return "rxsbg"; } -static const HChar * +static void s390_irgen_ROSBG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { UChar from; @@ -9827,11 +8676,9 @@ s390_irgen_ROSBG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) mkU64(maskc)), mkexpr(result))); } s390_cc_thunk_putZ(S390_CC_OP_BITWISE, result); - - return "rosbg"; } -static const HChar * +static void s390_irgen_RISBGx(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5, Bool set_cc) { @@ -9869,22 +8716,19 @@ s390_irgen_RISBGx(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5, assign(result, get_gpr_dw0(r1)); if (set_cc) { s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, result); - return "risbg"; - } - - return "risbgn"; + } } -static const HChar * +static void s390_irgen_RISBG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { - return s390_irgen_RISBGx(r1, r2, i3, i4, i5, True); + s390_irgen_RISBGx(r1, r2, i3, i4, i5, True); } -static const HChar * +static void s390_irgen_RISBGN(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { - return s390_irgen_RISBGx(r1, r2, i3, i4, i5, False); + s390_irgen_RISBGx(r1, r2, i3, i4, i5, False); } static IRExpr * @@ -9932,34 +8776,28 @@ s390_irgen_RISBxG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5, binop(Iop_And32, mkexpr(op2), mkU32(mask))); } -static const HChar * +static void s390_irgen_RISBHG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { put_gpr_w0(r1, s390_irgen_RISBxG(r1, r2, i3, i4, i5, True)); - return "risbhg"; } -static const HChar * +static void s390_irgen_RISBLG(UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) { put_gpr_w1(r1, s390_irgen_RISBxG(r1, r2, i3, i4, i5, False)); - return "risblg"; } -static const HChar * +static void s390_irgen_SAR(UChar r1, UChar r2) { put_ar_w0(r1, get_gpr_w1(r2)); - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM("sar"), AR(r1), GPR(r2)); - - return "sar"; } -static const HChar * +static void s390_irgen_SLDA(UChar r1, IRTemp op2addr) { - s390_insn_assert("slda", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp p1 = newTemp(Ity_I64); IRTemp p2 = newTemp(Ity_I64); @@ -9980,14 +8818,12 @@ s390_irgen_SLDA(UChar r1, IRTemp op2addr) put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); s390_cc_thunk_putZZ(S390_CC_OP_SHIFT_LEFT_64, op, shift_amount); - - return "slda"; } -static const HChar * +static void s390_irgen_SLDL(UChar r1, IRTemp op2addr) { - s390_insn_assert("sldl", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp p1 = newTemp(Ity_I64); IRTemp p2 = newTemp(Ity_I64); @@ -10000,11 +8836,9 @@ s390_irgen_SLDL(UChar r1, IRTemp op2addr) mkexpr(op2addr), mkU64(63))))); put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); - - return "sldl"; } -static const HChar * +static void s390_irgen_SLA(UChar r1, IRTemp op2addr) { IRTemp uop = newTemp(Ity_I32); @@ -10022,11 +8856,9 @@ s390_irgen_SLA(UChar r1, IRTemp op2addr) binop(Iop_And32, mkexpr(uop), mkU32(sign_mask)))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putZZ(S390_CC_OP_SHIFT_LEFT_32, op, shift_amount); - - return "sla"; } -static const HChar * +static void s390_irgen_SLAK(UChar r1, UChar r3, IRTemp op2addr) { IRTemp uop = newTemp(Ity_I32); @@ -10044,11 +8876,9 @@ s390_irgen_SLAK(UChar r1, UChar r3, IRTemp op2addr) binop(Iop_And32, mkexpr(uop), mkU32(sign_mask)))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putZZ(S390_CC_OP_SHIFT_LEFT_32, op, shift_amount); - - return "slak"; } -static const HChar * +static void s390_irgen_SLAG(UChar r1, UChar r3, IRTemp op2addr) { IRTemp uop = newTemp(Ity_I64); @@ -10066,41 +8896,33 @@ s390_irgen_SLAG(UChar r1, UChar r3, IRTemp op2addr) binop(Iop_And64, mkexpr(uop), mkU64(sign_mask)))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putZZ(S390_CC_OP_SHIFT_LEFT_64, op, shift_amount); - - return "slag"; } -static const HChar * +static void s390_irgen_SLL(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, binop(Iop_Shl32, get_gpr_w1(r1), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - - return "sll"; } -static const HChar * +static void s390_irgen_SLLK(UChar r1, UChar r3, IRTemp op2addr) { put_gpr_w1(r1, binop(Iop_Shl32, get_gpr_w1(r3), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - - return "sllk"; } -static const HChar * +static void s390_irgen_SLLG(UChar r1, UChar r3, IRTemp op2addr) { put_gpr_dw0(r1, binop(Iop_Shl64, get_gpr_dw0(r3), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - - return "sllg"; } -static const HChar * +static void s390_irgen_SRDA(UChar r1, IRTemp op2addr) { - s390_insn_assert("srda", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp p1 = newTemp(Ity_I64); IRTemp p2 = newTemp(Ity_I64); @@ -10114,14 +8936,12 @@ s390_irgen_SRDA(UChar r1, IRTemp op2addr) put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, result); - - return "srda"; } -static const HChar * +static void s390_irgen_SRDL(UChar r1, IRTemp op2addr) { - s390_insn_assert("srdl", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp p1 = newTemp(Ity_I64); IRTemp p2 = newTemp(Ity_I64); @@ -10134,11 +8954,9 @@ s390_irgen_SRDL(UChar r1, IRTemp op2addr) mkexpr(op2addr), mkU64(63))))); put_gpr_w1(r1, unop(Iop_64HIto32, mkexpr(result))); put_gpr_w1(r1 + 1, unop(Iop_64to32, mkexpr(result))); - - return "srdl"; } -static const HChar * +static void s390_irgen_SRA(UChar r1, IRTemp op2addr) { IRTemp result = newTemp(Ity_I32); @@ -10149,11 +8967,9 @@ s390_irgen_SRA(UChar r1, IRTemp op2addr) mkexpr(op2addr), mkU64(63))))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, result); - - return "sra"; } -static const HChar * +static void s390_irgen_SRAK(UChar r1, UChar r3, IRTemp op2addr) { IRTemp result = newTemp(Ity_I32); @@ -10164,11 +8980,9 @@ s390_irgen_SRAK(UChar r1, UChar r3, IRTemp op2addr) mkexpr(op2addr), mkU64(63))))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, result); - - return "srak"; } -static const HChar * +static void s390_irgen_SRAG(UChar r1, UChar r3, IRTemp op2addr) { IRTemp result = newTemp(Ity_I64); @@ -10179,11 +8993,9 @@ s390_irgen_SRAG(UChar r1, UChar r3, IRTemp op2addr) mkexpr(op2addr), mkU64(63))))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putS(S390_CC_OP_LOAD_AND_TEST, result); - - return "srag"; } -static const HChar * +static void s390_irgen_SRL(UChar r1, IRTemp op2addr) { IRTemp op = newTemp(Ity_I32); @@ -10191,11 +9003,9 @@ s390_irgen_SRL(UChar r1, IRTemp op2addr) assign(op, get_gpr_w1(r1)); put_gpr_w1(r1, binop(Iop_Shr32, mkexpr(op), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - - return "srl"; } -static const HChar * +static void s390_irgen_SRLK(UChar r1, UChar r3, IRTemp op2addr) { IRTemp op = newTemp(Ity_I32); @@ -10203,11 +9013,9 @@ s390_irgen_SRLK(UChar r1, UChar r3, IRTemp op2addr) assign(op, get_gpr_w1(r3)); put_gpr_w1(r1, binop(Iop_Shr32, mkexpr(op), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - - return "srlk"; } -static const HChar * +static void s390_irgen_SRLG(UChar r1, UChar r3, IRTemp op2addr) { IRTemp op = newTemp(Ity_I64); @@ -10215,75 +9023,57 @@ s390_irgen_SRLG(UChar r1, UChar r3, IRTemp op2addr) assign(op, get_gpr_dw0(r3)); put_gpr_dw0(r1, binop(Iop_Shr64, mkexpr(op), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - - return "srlg"; } -static const HChar * +static void s390_irgen_ST(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_w1(r1)); - - return "st"; } -static const HChar * +static void s390_irgen_STY(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_w1(r1)); - - return "sty"; } -static const HChar * +static void s390_irgen_STG(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_dw0(r1)); - - return "stg"; } -static const HChar * +static void s390_irgen_STRL(UChar r1, UInt i2) { store(mkU64(addr_rel_long(i2)), get_gpr_w1(r1)); - - return "strl"; } -static const HChar * +static void s390_irgen_STGRL(UChar r1, UInt i2) { store(mkU64(addr_rel_long(i2)), get_gpr_dw0(r1)); - - return "stgrl"; } -static const HChar * +static void s390_irgen_STC(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_b7(r1)); - - return "stc"; } -static const HChar * +static void s390_irgen_STCY(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_b7(r1)); - - return "stcy"; } -static const HChar * +static void s390_irgen_STCH(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_b3(r1)); - - return "stch"; } -static const HChar * +static void s390_irgen_STCM(UChar r1, UChar r3, IRTemp op2addr) { UChar mask; @@ -10306,11 +9096,9 @@ s390_irgen_STCM(UChar r1, UChar r3, IRTemp op2addr) if ((mask & 1) != 0) { store(binop(Iop_Add64, mkexpr(op2addr), mkU64(n)), get_gpr_b7(r1)); } - - return "stcm"; } -static const HChar * +static void s390_irgen_STCMY(UChar r1, UChar r3, IRTemp op2addr) { UChar mask; @@ -10333,11 +9121,9 @@ s390_irgen_STCMY(UChar r1, UChar r3, IRTemp op2addr) if ((mask & 1) != 0) { store(binop(Iop_Add64, mkexpr(op2addr), mkU64(n)), get_gpr_b7(r1)); } - - return "stcmy"; } -static const HChar * +static void s390_irgen_STCMH(UChar r1, UChar r3, IRTemp op2addr) { UChar mask; @@ -10360,100 +9146,78 @@ s390_irgen_STCMH(UChar r1, UChar r3, IRTemp op2addr) if ((mask & 1) != 0) { store(binop(Iop_Add64, mkexpr(op2addr), mkU64(n)), get_gpr_b3(r1)); } - - return "stcmh"; } -static const HChar * +static void s390_irgen_STH(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_hw3(r1)); - - return "sth"; } -static const HChar * +static void s390_irgen_STHY(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_hw3(r1)); - - return "sthy"; } -static const HChar * +static void s390_irgen_STHRL(UChar r1, UInt i2) { store(mkU64(addr_rel_long(i2)), get_gpr_hw3(r1)); - - return "sthrl"; } -static const HChar * +static void s390_irgen_STHH(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_hw1(r1)); - - return "sthh"; } -static const HChar * +static void s390_irgen_STFH(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_w0(r1)); - - return "stfh"; } -static const HChar * +static void s390_irgen_STOC(UChar r1, IRTemp op2addr) { /* condition is checked in format handler */ store(mkexpr(op2addr), get_gpr_w1(r1)); - - return "stoc"; } -static const HChar * +static void s390_irgen_STOCG(UChar r1, IRTemp op2addr) { /* condition is checked in format handler */ store(mkexpr(op2addr), get_gpr_dw0(r1)); - - return "stocg"; } -static const HChar * +static void s390_irgen_STPQ(UChar r1, IRTemp op2addr) { - s390_insn_assert("stpq", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); store(mkexpr(op2addr), get_gpr_dw0(r1)); store(binop(Iop_Add64, mkexpr(op2addr), mkU64(8)), get_gpr_dw0(r1 + 1)); - - return "stpq"; } -static const HChar * +static void s390_irgen_STRVH(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_b7(r1)); store(binop(Iop_Add64, mkexpr(op2addr), mkU64(1)), get_gpr_b6(r1)); - - return "strvh"; } -static const HChar * +static void s390_irgen_STRV(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_b7(r1)); store(binop(Iop_Add64, mkexpr(op2addr), mkU64(1)), get_gpr_b6(r1)); store(binop(Iop_Add64, mkexpr(op2addr), mkU64(2)), get_gpr_b5(r1)); store(binop(Iop_Add64, mkexpr(op2addr), mkU64(3)), get_gpr_b4(r1)); - - return "strv"; } -static const HChar * +static void s390_irgen_STRVG(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_gpr_b7(r1)); @@ -10464,11 +9228,9 @@ s390_irgen_STRVG(UChar r1, IRTemp op2addr) store(binop(Iop_Add64, mkexpr(op2addr), mkU64(5)), get_gpr_b2(r1)); store(binop(Iop_Add64, mkexpr(op2addr), mkU64(6)), get_gpr_b1(r1)); store(binop(Iop_Add64, mkexpr(op2addr), mkU64(7)), get_gpr_b0(r1)); - - return "strvg"; } -static const HChar * +static void s390_irgen_SR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -10480,11 +9242,9 @@ s390_irgen_SR(UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "sr"; } -static const HChar * +static void s390_irgen_SGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -10496,11 +9256,9 @@ s390_irgen_SGR(UChar r1, UChar r2) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "sgr"; } -static const HChar * +static void s390_irgen_SGFR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -10512,11 +9270,9 @@ s390_irgen_SGFR(UChar r1, UChar r2) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "sgfr"; } -static const HChar * +static void s390_irgen_SRK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -10528,11 +9284,9 @@ s390_irgen_SRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op2, op3); put_gpr_w1(r1, mkexpr(result)); - - return "srk"; } -static const HChar * +static void s390_irgen_SGRK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -10544,11 +9298,9 @@ s390_irgen_SGRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub64, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, op2, op3); put_gpr_dw0(r1, mkexpr(result)); - - return "sgrk"; } -static const HChar * +static void s390_irgen_S(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -10560,11 +9312,9 @@ s390_irgen_S(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "s"; } -static const HChar * +static void s390_irgen_SY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -10576,11 +9326,9 @@ s390_irgen_SY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "sy"; } -static const HChar * +static void s390_irgen_SG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -10592,11 +9340,9 @@ s390_irgen_SG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "sg"; } -static const HChar * +static void s390_irgen_SGF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -10608,11 +9354,9 @@ s390_irgen_SGF(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "sgf"; } -static const HChar * +static void s390_irgen_SGH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -10624,11 +9368,9 @@ s390_irgen_SGH(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "sgh"; } -static const HChar * +static void s390_irgen_SH(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -10640,11 +9382,9 @@ s390_irgen_SH(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "sh"; } -static const HChar * +static void s390_irgen_SHY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -10656,11 +9396,9 @@ s390_irgen_SHY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "shy"; } -static const HChar * +static void s390_irgen_SHHHR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -10672,11 +9410,9 @@ s390_irgen_SHHHR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "shhhr"; } -static const HChar * +static void s390_irgen_SHHLR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -10688,11 +9424,9 @@ s390_irgen_SHHLR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putSS(S390_CC_OP_SIGNED_SUB_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "shhlr"; } -static const HChar * +static void s390_irgen_SLR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -10704,11 +9438,9 @@ s390_irgen_SLR(UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "slr"; } -static const HChar * +static void s390_irgen_SLGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -10720,11 +9452,9 @@ s390_irgen_SLGR(UChar r1, UChar r2) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "slgr"; } -static const HChar * +static void s390_irgen_SLGFR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -10736,11 +9466,9 @@ s390_irgen_SLGFR(UChar r1, UChar r2) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "slgfr"; } -static const HChar * +static void s390_irgen_SLRK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -10752,11 +9480,9 @@ s390_irgen_SLRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_32, op2, op3); put_gpr_w1(r1, mkexpr(result)); - - return "slrk"; } -static const HChar * +static void s390_irgen_SLGRK(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -10768,11 +9494,9 @@ s390_irgen_SLGRK(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub64, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_64, op2, op3); put_gpr_dw0(r1, mkexpr(result)); - - return "slgrk"; } -static const HChar * +static void s390_irgen_SL(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -10784,11 +9508,9 @@ s390_irgen_SL(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "sl"; } -static const HChar * +static void s390_irgen_SLY(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -10800,11 +9522,9 @@ s390_irgen_SLY(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub32, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_32, op1, op2); put_gpr_w1(r1, mkexpr(result)); - - return "sly"; } -static const HChar * +static void s390_irgen_SLG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -10816,11 +9536,9 @@ s390_irgen_SLG(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "slg"; } -static const HChar * +static void s390_irgen_SLGF(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -10832,11 +9550,9 @@ s390_irgen_SLGF(UChar r1, IRTemp op2addr) assign(result, binop(Iop_Sub64, mkexpr(op1), mkexpr(op2))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_64, op1, op2); put_gpr_dw0(r1, mkexpr(result)); - - return "slgf"; } -static const HChar * +static void s390_irgen_SLFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I32); @@ -10849,11 +9565,9 @@ s390_irgen_SLFI(UChar r1, UInt i2) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_32, op1, mktemp(Ity_I32, mkU32(op2))); put_gpr_w1(r1, mkexpr(result)); - - return "slfi"; } -static const HChar * +static void s390_irgen_SLGFI(UChar r1, UInt i2) { IRTemp op1 = newTemp(Ity_I64); @@ -10866,11 +9580,9 @@ s390_irgen_SLGFI(UChar r1, UInt i2) s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_64, op1, mktemp(Ity_I64, mkU64(op2))); put_gpr_dw0(r1, mkexpr(result)); - - return "slgfi"; } -static const HChar * +static void s390_irgen_SLHHHR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -10882,11 +9594,9 @@ s390_irgen_SLHHHR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "slhhhr"; } -static const HChar * +static void s390_irgen_SLHHLR(UChar r3, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I32); @@ -10898,11 +9608,9 @@ s390_irgen_SLHHLR(UChar r3, UChar r1, UChar r2) assign(result, binop(Iop_Sub32, mkexpr(op2), mkexpr(op3))); s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_SUB_32, op2, op3); put_gpr_w0(r1, mkexpr(result)); - - return "slhhlr"; } -static const HChar * +static void s390_irgen_SLBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I32); @@ -10918,11 +9626,9 @@ s390_irgen_SLBR(UChar r1, UChar r2) mkexpr(borrow_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_SUBB_32, op1, op2, borrow_in); put_gpr_w1(r1, mkexpr(result)); - - return "slbr"; } -static const HChar * +static void s390_irgen_SLBGR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -10938,11 +9644,9 @@ s390_irgen_SLBGR(UChar r1, UChar r2) mkexpr(borrow_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_SUBB_64, op1, op2, borrow_in); put_gpr_dw0(r1, mkexpr(result)); - - return "slbgr"; } -static const HChar * +static void s390_irgen_SLB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); @@ -10958,11 +9662,9 @@ s390_irgen_SLB(UChar r1, IRTemp op2addr) mkexpr(borrow_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_SUBB_32, op1, op2, borrow_in); put_gpr_w1(r1, mkexpr(result)); - - return "slb"; } -static const HChar * +static void s390_irgen_SLBG(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I64); @@ -10978,11 +9680,9 @@ s390_irgen_SLBG(UChar r1, IRTemp op2addr) mkexpr(borrow_in))); s390_cc_thunk_putZZZ(S390_CC_OP_UNSIGNED_SUBB_64, op1, op2, borrow_in); put_gpr_dw0(r1, mkexpr(result)); - - return "slbg"; } -static const HChar * +static void s390_irgen_SVC(UChar i) { IRTemp sysno = newTemp(Ity_I64); @@ -10993,39 +9693,36 @@ s390_irgen_SVC(UChar i) assign(sysno, unop(Iop_32Uto64, get_gpr_w1(1))); } system_call(mkexpr(sysno)); - - return "svc"; } -static const HChar * -s390_irgen_TMx(const HChar *mnem, UChar mask, IRTemp op1addr) +static void +s390_irgen_TMx(UChar mask, IRTemp op1addr) { IRTemp masked = newTemp(Ity_I8); assign(masked, binop(Iop_And8, load(Ity_I8, mkexpr(op1addr)), mkU8(mask))); s390_cc_thunk_putZZ(S390_CC_OP_TEST_UNDER_MASK_8, masked, mktemp(Ity_I8, mkU8(mask))); - return mnem; } -static const HChar * +static void s390_irgen_TM(UChar i2, IRTemp op1addr) { - return s390_irgen_TMx("tm", i2, op1addr); + s390_irgen_TMx(i2, op1addr); } -static const HChar * +static void s390_irgen_TMY(UChar i2, IRTemp op1addr) { - return s390_irgen_TMx("tmy", i2, op1addr); + s390_irgen_TMx( i2, op1addr); } -static const HChar * -s390_irgen_TMxx(const HChar *mnem, UChar r1, UShort mask, UChar offs) +static void +s390_irgen_TMxx(UChar r1, UShort mask, UChar offs) { if (mask == 0) { s390_cc_set_val(0); - return mnem; + return; } IRExpr* masked; @@ -11042,155 +9739,126 @@ s390_irgen_TMxx(const HChar *mnem, UChar r1, UShort mask, UChar offs) mktemp(Ity_I64, masked), mktemp(Ity_I64, mkU64(mask))); } - return mnem; } -static const HChar * +static void s390_irgen_TMHH(UChar r1, UShort i2) { - return s390_irgen_TMxx("tmhh", r1, i2, 48); + s390_irgen_TMxx( r1, i2, 48); } -static const HChar * +static void s390_irgen_TMHL(UChar r1, UShort i2) { - return s390_irgen_TMxx("tmhl", r1, i2, 32); + s390_irgen_TMxx(r1, i2, 32); } -static const HChar * +static void s390_irgen_TMLH(UChar r1, UShort i2) { - return s390_irgen_TMxx("tmlh", r1, i2, 16); + s390_irgen_TMxx(r1, i2, 16); } -static const HChar * +static void s390_irgen_TMLL(UChar r1, UShort i2) { - return s390_irgen_TMxx("tmll", r1, i2, 0); + s390_irgen_TMxx(r1, i2, 0); } -static const HChar * +static void s390_irgen_EFPC(UChar r1) { put_gpr_w1(r1, get_fpc_w0()); - - return "efpc"; } -static const HChar * +static void s390_irgen_LER(UChar r1, UChar r2) { put_fpr_w0(r1, get_fpr_w0(r2)); - - return "ler"; } -static const HChar * +static void s390_irgen_LDR(UChar r1, UChar r2) { put_fpr_dw0(r1, get_fpr_dw0(r2)); - - return "ldr"; } -static const HChar * +static void s390_irgen_LDER(UChar r1, UChar r2) { put_fpr_dw0(r1, mkF64i(0x0)); put_fpr_w0(r1, get_fpr_w0(r2)); - - return "lder"; } -static const HChar * +static void s390_irgen_LXR(UChar r1, UChar r2) { - s390_insn_assert("lxr", is_valid_fpr_pair(r1)); - s390_insn_assert("lxr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); put_fpr_dw0(r1, get_fpr_dw0(r2)); put_fpr_dw0(r1 + 2, get_fpr_dw0(r2 + 2)); - - return "lxr"; } -static const HChar * +static void s390_irgen_LE(UChar r1, IRTemp op2addr) { put_fpr_w0(r1, load(Ity_F32, mkexpr(op2addr))); - - return "le"; } -static const HChar * +static void s390_irgen_LD(UChar r1, IRTemp op2addr) { put_fpr_dw0(r1, load(Ity_F64, mkexpr(op2addr))); - - return "ld"; } -static const HChar * +static void s390_irgen_LDE(UChar r1, IRTemp op2addr) { put_fpr_dw0(r1, mkF64i(0x0)); put_fpr_w0(r1, load(Ity_F32, mkexpr(op2addr))); - - return "lde"; } -static const HChar * +static void s390_irgen_LEY(UChar r1, IRTemp op2addr) { put_fpr_w0(r1, load(Ity_F32, mkexpr(op2addr))); - - return "ley"; } -static const HChar * +static void s390_irgen_LDY(UChar r1, IRTemp op2addr) { put_fpr_dw0(r1, load(Ity_F64, mkexpr(op2addr))); - - return "ldy"; } -static const HChar * +static void s390_irgen_LFPC(IRTemp op2addr) { put_fpc_w0(load(Ity_I32, mkexpr(op2addr))); - - return "lfpc"; } -static const HChar * +static void s390_irgen_LZER(UChar r1) { put_fpr_w0(r1, mkF32i(0x0)); - - return "lzer"; } -static const HChar * +static void s390_irgen_LZDR(UChar r1) { put_fpr_dw0(r1, mkF64i(0x0)); - - return "lzdr"; } -static const HChar * +static void s390_irgen_LZXR(UChar r1) { - s390_insn_assert("lzxr", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); put_fpr_dw0(r1, mkF64i(0x0)); put_fpr_dw0(r1 + 2, mkF64i(0x0)); - - return "lzxr"; } -static const HChar * +static void s390_irgen_SRNM(IRTemp op2addr) { UInt input_mask, fpc_mask; @@ -11202,15 +9870,14 @@ s390_irgen_SRNM(IRTemp op2addr) binop(Iop_And32, get_fpc_w0(), mkU32(~fpc_mask)), binop(Iop_And32, unop(Iop_64to32, mkexpr(op2addr)), mkU32(input_mask)))); - return "srnm"; } -static const HChar * +static void s390_irgen_SRNMB(UChar b2, UShort d2) { /* Can only check at IR generation time when b2 == 0 */ if (b2 == 0) { - s390_insn_assert("srnmb", d2 <= 3 || d2 == 7); // valid rounding mode + s390_insn_assert(d2 <= 3 || d2 == 7); // valid rounding mode } IRTemp op2addr = newTemp(Ity_I64); @@ -11224,12 +9891,11 @@ s390_irgen_SRNMB(UChar b2, UShort d2) binop(Iop_And32, get_fpc_w0(), mkU32(~fpc_mask)), binop(Iop_And32, unop(Iop_64to32, mkexpr(op2addr)), mkU32(input_mask)))); - return "srnmb"; } /* All 8 values in op2addr[61:63] correspond to a valid DFP rounding mode */ -static const HChar * +static void s390_irgen_SRNMT(IRTemp op2addr) { UInt input_mask, fpc_mask; @@ -11243,59 +9909,46 @@ s390_irgen_SRNMT(IRTemp op2addr) binop(Iop_Shl32, binop(Iop_And32, unop(Iop_64to32, mkexpr(op2addr)), mkU32(input_mask)), mkU8(4)))); - return "srnmt"; } -static const HChar * +static void s390_irgen_SFPC(UChar r1) { put_fpc_w0(get_gpr_w1(r1)); - - return "sfpc"; } -static const HChar * +static void s390_irgen_STE(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_fpr_w0(r1)); - - return "ste"; } -static const HChar * +static void s390_irgen_STD(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_fpr_dw0(r1)); - - return "std"; } -static const HChar * +static void s390_irgen_STEY(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_fpr_w0(r1)); - - return "stey"; } -static const HChar * +static void s390_irgen_STDY(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), get_fpr_dw0(r1)); - - return "stdy"; } -static const HChar * +static void s390_irgen_STFPC(IRTemp op2addr) { store(mkexpr(op2addr), get_fpc_w0()); - - return "stfpc"; } -static const HChar * +static void s390_irgen_AEBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F32); @@ -11309,11 +9962,9 @@ s390_irgen_AEBR(UChar r1, UChar r2) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_32, result); put_fpr_w0(r1, mkexpr(result)); - - return "aebr"; } -static const HChar * +static void s390_irgen_ADBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F64); @@ -11327,11 +9978,9 @@ s390_irgen_ADBR(UChar r1, UChar r2) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_64, result); put_fpr_dw0(r1, mkexpr(result)); - - return "adbr"; } -static const HChar * +static void s390_irgen_AEB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F32); @@ -11345,11 +9994,9 @@ s390_irgen_AEB(UChar r1, IRTemp op2addr) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_32, result); put_fpr_w0(r1, mkexpr(result)); - - return "aeb"; } -static const HChar * +static void s390_irgen_ADB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F64); @@ -11363,30 +10010,26 @@ s390_irgen_ADB(UChar r1, IRTemp op2addr) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_64, result); put_fpr_dw0(r1, mkexpr(result)); - - return "adb"; } -static const HChar * +static void s390_irgen_CEFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); - s390_insn_assert("cefbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); IRTemp op2 = newTemp(Ity_I32); assign(op2, get_gpr_w1(r2)); put_fpr_w0(r1, binop(Iop_I32StoF32, mkexpr(encode_bfp_rounding_mode(m3)), mkexpr(op2))); - - return "cefbra"; } -static const HChar * +static void s390_irgen_CDFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cdfbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11394,46 +10037,40 @@ s390_irgen_CDFBRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_w1(r2)); put_fpr_dw0(r1, unop(Iop_I32StoF64, mkexpr(op2))); - - return "cdfbra"; } -static const HChar * +static void s390_irgen_CEGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); - s390_insn_assert("cegbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); IRTemp op2 = newTemp(Ity_I64); assign(op2, get_gpr_dw0(r2)); put_fpr_w0(r1, binop(Iop_I64StoF32, mkexpr(encode_bfp_rounding_mode(m3)), mkexpr(op2))); - - return "cegbra"; } -static const HChar * +static void s390_irgen_CDGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); - s390_insn_assert("cdgbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); IRTemp op2 = newTemp(Ity_I64); assign(op2, get_gpr_dw0(r2)); put_fpr_dw0(r1, binop(Iop_I64StoF64, mkexpr(encode_bfp_rounding_mode(m3)), mkexpr(op2))); - - return "cdgbra"; } -static const HChar * +static void s390_irgen_CELFBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("celfbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11442,13 +10079,12 @@ s390_irgen_CELFBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_w1(r2)); put_fpr_w0(r1, binop(Iop_I32UtoF32, mkexpr(encode_bfp_rounding_mode(m3)), mkexpr(op2))); - return "celfbr"; } -static const HChar * +static void s390_irgen_CDLFBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cdlfbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11456,13 +10092,12 @@ s390_irgen_CDLFBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_w1(r2)); put_fpr_dw0(r1, unop(Iop_I32UtoF64, mkexpr(op2))); - return "cdlfbr"; } -static const HChar * +static void s390_irgen_CELGBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("celgbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11471,13 +10106,12 @@ s390_irgen_CELGBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_dw0(r2)); put_fpr_w0(r1, binop(Iop_I64UtoF32, mkexpr(encode_bfp_rounding_mode(m3)), mkexpr(op2))); - return "celgbr"; } -static const HChar * +static void s390_irgen_CDLGBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cdlgbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11487,13 +10121,12 @@ s390_irgen_CDLGBR(UChar m3, UChar m4, UChar r1, UChar r2) put_fpr_dw0(r1, binop(Iop_I64UtoF64, mkexpr(encode_bfp_rounding_mode(m3)), mkexpr(op2))); - return "cdlgbr"; } -static const HChar * +static void s390_irgen_CLFEBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clfebr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11505,13 +10138,12 @@ s390_irgen_CLFEBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_F32toI32U, mkexpr(rounding_mode), mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_32, op, rounding_mode); - return "clfebr"; } -static const HChar * +static void s390_irgen_CLFDBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clfdbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11523,13 +10155,12 @@ s390_irgen_CLFDBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_F64toI32U, mkexpr(rounding_mode), mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_32, op, rounding_mode); - return "clfdbr"; } -static const HChar * +static void s390_irgen_CLGEBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clgebr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11541,13 +10172,12 @@ s390_irgen_CLGEBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_F32toI64U, mkexpr(rounding_mode), mkexpr(op))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_UINT_64, op, rounding_mode); - return "clgebr"; } -static const HChar * +static void s390_irgen_CLGDBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clgdbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11560,13 +10190,12 @@ s390_irgen_CLGDBR(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_UINT_64, op, rounding_mode); - return "clgdbr"; } -static const HChar * +static void s390_irgen_CFEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cfebra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11579,14 +10208,12 @@ s390_irgen_CFEBRA(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_INT_32, op, rounding_mode); - - return "cfebra"; } -static const HChar * +static void s390_irgen_CFDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cfdbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11599,14 +10226,12 @@ s390_irgen_CFDBRA(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_INT_32, op, rounding_mode); - - return "cfdbra"; } -static const HChar * +static void s390_irgen_CGEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cgebra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11619,14 +10244,12 @@ s390_irgen_CGEBRA(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_32_TO_INT_64, op, rounding_mode); - - return "cgebra"; } -static const HChar * +static void s390_irgen_CGDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cgdbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -11639,11 +10262,9 @@ s390_irgen_CGDBRA(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_64_TO_INT_64, op, rounding_mode); - - return "cgdbra"; } -static const HChar * +static void s390_irgen_DEBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F32); @@ -11656,11 +10277,9 @@ s390_irgen_DEBR(UChar r1, UChar r2) assign(result, triop(Iop_DivF32, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_w0(r1, mkexpr(result)); - - return "debr"; } -static const HChar * +static void s390_irgen_DDBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F64); @@ -11673,11 +10292,9 @@ s390_irgen_DDBR(UChar r1, UChar r2) assign(result, triop(Iop_DivF64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_dw0(r1, mkexpr(result)); - - return "ddbr"; } -static const HChar * +static void s390_irgen_DEB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F32); @@ -11690,11 +10307,9 @@ s390_irgen_DEB(UChar r1, IRTemp op2addr) assign(result, triop(Iop_DivF32, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_w0(r1, mkexpr(result)); - - return "deb"; } -static const HChar * +static void s390_irgen_DDB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F64); @@ -11707,11 +10322,9 @@ s390_irgen_DDB(UChar r1, IRTemp op2addr) assign(result, triop(Iop_DivF64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_dw0(r1, mkexpr(result)); - - return "ddb"; } -static const HChar * +static void s390_irgen_LTEBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F32); @@ -11719,11 +10332,9 @@ s390_irgen_LTEBR(UChar r1, UChar r2) assign(result, get_fpr_w0(r2)); put_fpr_w0(r1, mkexpr(result)); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_32, result); - - return "ltebr"; } -static const HChar * +static void s390_irgen_LTDBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); @@ -11731,11 +10342,9 @@ s390_irgen_LTDBR(UChar r1, UChar r2) assign(result, get_fpr_dw0(r2)); put_fpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_64, result); - - return "ltdbr"; } -static const HChar * +static void s390_irgen_LCEBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F32); @@ -11743,11 +10352,9 @@ s390_irgen_LCEBR(UChar r1, UChar r2) assign(result, unop(Iop_NegF32, get_fpr_w0(r2))); put_fpr_w0(r1, mkexpr(result)); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_32, result); - - return "lcebr"; } -static const HChar * +static void s390_irgen_LCDBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); @@ -11755,49 +10362,41 @@ s390_irgen_LCDBR(UChar r1, UChar r2) assign(result, unop(Iop_NegF64, get_fpr_dw0(r2))); put_fpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_64, result); - - return "lcdbr"; } -static const HChar * +static void s390_irgen_LDEBR(UChar r1, UChar r2) { IRTemp op = newTemp(Ity_F32); assign(op, get_fpr_w0(r2)); put_fpr_dw0(r1, unop(Iop_F32toF64, mkexpr(op))); - - return "ldebr"; } -static const HChar * +static void s390_irgen_LDEB(UChar r1, IRTemp op2addr) { IRTemp op = newTemp(Ity_F32); assign(op, load(Ity_F32, mkexpr(op2addr))); put_fpr_dw0(r1, unop(Iop_F32toF64, mkexpr(op))); - - return "ldeb"; } -static const HChar * +static void s390_irgen_LEDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); - s390_insn_assert("ledbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); IRTemp op = newTemp(Ity_F64); assign(op, get_fpr_dw0(r2)); put_fpr_w0(r1, binop(Iop_F64toF32, mkexpr(encode_bfp_rounding_mode(m3)), mkexpr(op))); - - return "ledbra"; } -static const HChar * +static void s390_irgen_MEEBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F32); @@ -11811,11 +10410,9 @@ s390_irgen_MEEBR(UChar r1, UChar r2) assign(result, triop(Iop_MulF32, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_w0(r1, mkexpr(result)); - - return "meebr"; } -static const HChar * +static void s390_irgen_MDBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F64); @@ -11828,11 +10425,9 @@ s390_irgen_MDBR(UChar r1, UChar r2) assign(result, triop(Iop_MulF64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_dw0(r1, mkexpr(result)); - - return "mdbr"; } -static const HChar * +static void s390_irgen_MEEB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F32); @@ -11845,11 +10440,9 @@ s390_irgen_MEEB(UChar r1, IRTemp op2addr) assign(result, triop(Iop_MulF32, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_w0(r1, mkexpr(result)); - - return "meeb"; } -static const HChar * +static void s390_irgen_MDB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F64); @@ -11862,11 +10455,9 @@ s390_irgen_MDB(UChar r1, IRTemp op2addr) assign(result, triop(Iop_MulF64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_dw0(r1, mkexpr(result)); - - return "mdb"; } -static const HChar * +static void s390_irgen_SEBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F32); @@ -11880,11 +10471,9 @@ s390_irgen_SEBR(UChar r1, UChar r2) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_32, result); put_fpr_w0(r1, mkexpr(result)); - - return "sebr"; } -static const HChar * +static void s390_irgen_SDBR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_F64); @@ -11898,11 +10487,9 @@ s390_irgen_SDBR(UChar r1, UChar r2) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_64, result); put_fpr_dw0(r1, mkexpr(result)); - - return "sdbr"; } -static const HChar * +static void s390_irgen_SEB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F32); @@ -11916,11 +10503,9 @@ s390_irgen_SEB(UChar r1, IRTemp op2addr) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_32, result); put_fpr_w0(r1, mkexpr(result)); - - return "seb"; } -static const HChar * +static void s390_irgen_SDB(UChar r1, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_F64); @@ -11934,11 +10519,9 @@ s390_irgen_SDB(UChar r1, IRTemp op2addr) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_BFP_RESULT_64, result); put_fpr_dw0(r1, mkexpr(result)); - - return "sdb"; } -static const HChar * +static void s390_irgen_ADTRA(UChar r3, UChar m4, UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_D64); @@ -11953,15 +10536,14 @@ s390_irgen_ADTRA(UChar r3, UChar m4, UChar r1, UChar r2) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); put_dpr_dw0(r1, mkexpr(result)); - return "adtra"; } -static const HChar * +static void s390_irgen_AXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("axtra", is_valid_fpr_pair(r1)); - s390_insn_assert("axtra", is_valid_fpr_pair(r2)); - s390_insn_assert("axtra", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op1 = newTemp(Ity_D128); IRTemp op2 = newTemp(Ity_D128); @@ -11976,10 +10558,9 @@ s390_irgen_AXTRA(UChar r3, UChar m4, UChar r1, UChar r2) put_dpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); - return "axtra"; } -static const HChar * +static void s390_irgen_CDTR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_D64); @@ -11993,15 +10574,13 @@ s390_irgen_CDTR(UChar r1, UChar r2) assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - - return "cdtr"; } -static const HChar * +static void s390_irgen_CXTR(UChar r1, UChar r2) { - s390_insn_assert("cxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("cxtr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp op1 = newTemp(Ity_D128); IRTemp op2 = newTemp(Ity_D128); @@ -12014,11 +10593,9 @@ s390_irgen_CXTR(UChar r1, UChar r2) assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - - return "cxtr"; } -static const HChar * +static void s390_irgen_CDFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { @@ -12028,14 +10605,13 @@ s390_irgen_CDFTR(UChar m3 __attribute__((unused)), assign(op2, get_gpr_w1(r2)); put_dpr_dw0(r1, unop(Iop_I32StoD64, mkexpr(op2))); - return "cdftr"; } -static const HChar * +static void s390_irgen_CXFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxftr", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12043,10 +10619,9 @@ s390_irgen_CXFTR(UChar m3 __attribute__((unused)), assign(op2, get_gpr_w1(r2)); put_dpr_pair(r1, unop(Iop_I32StoD128, mkexpr(op2))); - return "cxftr"; } -static const HChar * +static void s390_irgen_CDGTRA(UChar m3, UChar m4, UChar r1, UChar r2) { IRTemp op2 = newTemp(Ity_I64); @@ -12057,14 +10632,13 @@ s390_irgen_CDGTRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_dw0(r2)); put_dpr_dw0(r1, binop(Iop_I64StoD64, mkexpr(encode_dfp_rounding_mode(m3)), mkexpr(op2))); - return "cdgtra"; } -static const HChar * +static void s390_irgen_CXGTRA(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxgtra", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12072,10 +10646,9 @@ s390_irgen_CXGTRA(UChar m3 __attribute__((unused)), assign(op2, get_gpr_dw0(r2)); put_dpr_pair(r1, unop(Iop_I64StoD128, mkexpr(op2))); - return "cxgtra"; } -static const HChar * +static void s390_irgen_CDLFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { @@ -12085,14 +10658,13 @@ s390_irgen_CDLFTR(UChar m3 __attribute__((unused)), assign(op2, get_gpr_w1(r2)); put_dpr_dw0(r1, unop(Iop_I32UtoD64, mkexpr(op2))); - return "cdlftr"; } -static const HChar * +static void s390_irgen_CXLFTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxlftr", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12100,10 +10672,9 @@ s390_irgen_CXLFTR(UChar m3 __attribute__((unused)), assign(op2, get_gpr_w1(r2)); put_dpr_pair(r1, unop(Iop_I32UtoD128, mkexpr(op2))); - return "cxlftr"; } -static const HChar * +static void s390_irgen_CDLGTR(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) @@ -12113,14 +10684,13 @@ s390_irgen_CDLGTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_dw0(r2)); put_dpr_dw0(r1, binop(Iop_I64UtoD64, mkexpr(encode_dfp_rounding_mode(m3)), mkexpr(op2))); - return "cdlgtr"; } -static const HChar * +static void s390_irgen_CXLGTR(UChar m3 __attribute__((unused)), UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxlgtr", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12128,10 +10698,9 @@ s390_irgen_CXLGTR(UChar m3 __attribute__((unused)), assign(op2, get_gpr_dw0(r2)); put_dpr_pair(r1, unop(Iop_I64UtoD128, mkexpr(op2))); - return "cxlgtr"; } -static const HChar * +static void s390_irgen_CFDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) @@ -12144,13 +10713,12 @@ s390_irgen_CFDTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_D64toI32S, mkexpr(rounding_mode), mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_32, op, rounding_mode); - return "cfdtr"; } -static const HChar * +static void s390_irgen_CFXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cfxtr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r2)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12162,10 +10730,9 @@ s390_irgen_CFXTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_D128toI32S, mkexpr(rounding_mode), mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_32, op, rounding_mode); - return "cfxtr"; } -static const HChar * +static void s390_irgen_CGDTRA(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) @@ -12176,13 +10743,12 @@ s390_irgen_CGDTRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(op, get_dpr_dw0(r2)); put_gpr_dw0(r1, binop(Iop_D64toI64S, mkexpr(rounding_mode), mkexpr(op))); s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_INT_64, op, rounding_mode); - return "cgdtra"; } -static const HChar * +static void s390_irgen_CGXTRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cgxtra", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r2)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12192,10 +10758,9 @@ s390_irgen_CGXTRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(op, get_dpr_pair(r2)); put_gpr_dw0(r1, binop(Iop_D128toI64S, mkexpr(rounding_mode), mkexpr(op))); s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_INT_64, op, rounding_mode); - return "cgxtra"; } -static const HChar * +static void s390_irgen_CEDTR(UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_D64); @@ -12209,14 +10774,13 @@ s390_irgen_CEDTR(UChar r1, UChar r2) assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - return "cedtr"; } -static const HChar * +static void s390_irgen_CEXTR(UChar r1, UChar r2) { - s390_insn_assert("cextr", is_valid_fpr_pair(r1)); - s390_insn_assert("cextr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp op1 = newTemp(Ity_D128); IRTemp op2 = newTemp(Ity_D128); @@ -12229,10 +10793,9 @@ s390_irgen_CEXTR(UChar r1, UChar r2) assign(cc_s390, convert_vex_dfpcc_to_s390(cc_vex)); s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - return "cextr"; } -static const HChar * +static void s390_irgen_CLFDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) @@ -12245,13 +10808,12 @@ s390_irgen_CLFDTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_D64toI32U, mkexpr(rounding_mode), mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_32, op, rounding_mode); - return "clfdtr"; } -static const HChar * +static void s390_irgen_CLFXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clfxtr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r2)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12263,10 +10825,9 @@ s390_irgen_CLFXTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_D128toI32U, mkexpr(rounding_mode), mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_32, op, rounding_mode); - return "clfxtr"; } -static const HChar * +static void s390_irgen_CLGDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) @@ -12279,13 +10840,12 @@ s390_irgen_CLGDTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_D64toI64U, mkexpr(rounding_mode), mkexpr(op))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putFZ(S390_CC_OP_DFP_64_TO_UINT_64, op, rounding_mode); - return "clgdtr"; } -static const HChar * +static void s390_irgen_CLGXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clgxtr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r2)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -12297,10 +10857,9 @@ s390_irgen_CLGXTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_D128toI64U, mkexpr(rounding_mode), mkexpr(op))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_128_TO_UINT_64, op, rounding_mode); - return "clgxtr"; } -static const HChar * +static void s390_irgen_DDTRA(UChar r3, UChar m4, UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_D64); @@ -12314,15 +10873,14 @@ s390_irgen_DDTRA(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_DivD64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_dw0(r1, mkexpr(result)); - return "ddtra"; } -static const HChar * +static void s390_irgen_DXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("dxtra", is_valid_fpr_pair(r1)); - s390_insn_assert("dxtra", is_valid_fpr_pair(r2)); - s390_insn_assert("dxtra", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op1 = newTemp(Ity_D128); IRTemp op2 = newTemp(Ity_D128); @@ -12335,42 +10893,37 @@ s390_irgen_DXTRA(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_DivD128, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_pair(r1, mkexpr(result)); - return "dxtra"; } -static const HChar * +static void s390_irgen_EEDTR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_ExtractExpD64, get_dpr_dw0(r2))); - return "eedtr"; } -static const HChar * +static void s390_irgen_EEXTR(UChar r1, UChar r2) { - s390_insn_assert("eextr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r2)); put_gpr_dw0(r1, unop(Iop_ExtractExpD128, get_dpr_pair(r2))); - return "eextr"; } -static const HChar * +static void s390_irgen_ESDTR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_ExtractSigD64, get_dpr_dw0(r2))); - return "esdtr"; } -static const HChar * +static void s390_irgen_ESXTR(UChar r1, UChar r2) { - s390_insn_assert("esxtr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r2)); put_gpr_dw0(r1, unop(Iop_ExtractSigD128, get_dpr_pair(r2))); - return "esxtr"; } -static const HChar * +static void s390_irgen_IEDTR(UChar r3, UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I64); @@ -12381,14 +10934,13 @@ s390_irgen_IEDTR(UChar r3, UChar r1, UChar r2) assign(op2, get_dpr_dw0(r3)); assign(result, binop(Iop_InsertExpD64, mkexpr(op1), mkexpr(op2))); put_dpr_dw0(r1, mkexpr(result)); - return "iedtr"; } -static const HChar * +static void s390_irgen_IEXTR(UChar r3, UChar r1, UChar r2) { - s390_insn_assert("iextr", is_valid_fpr_pair(r1)); - s390_insn_assert("iextr", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op1 = newTemp(Ity_I64); IRTemp op2 = newTemp(Ity_D128); @@ -12398,10 +10950,9 @@ s390_irgen_IEXTR(UChar r3, UChar r1, UChar r2) assign(op2, get_dpr_pair(r3)); assign(result, binop(Iop_InsertExpD128, mkexpr(op1), mkexpr(op2))); put_dpr_pair(r1, mkexpr(result)); - return "iextr"; } -static const HChar * +static void s390_irgen_LDETR(UChar m4, UChar r1, UChar r2) { if ((m4 & 0x8) != 0) @@ -12410,28 +10961,26 @@ s390_irgen_LDETR(UChar m4, UChar r1, UChar r2) assign(op, get_dpr_w0(r2)); put_dpr_dw0(r1, unop(Iop_D32toD64, mkexpr(op))); - return "ldetr"; } -static const HChar * +static void s390_irgen_LXDTR(UChar m4, UChar r1, UChar r2) { if ((m4 & 0x8) != 0) emulation_warning(EmWarn_S390X_XiC_not_zero); - s390_insn_assert("lxdtr", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp op = newTemp(Ity_D64); assign(op, get_dpr_dw0(r2)); put_dpr_pair(r1, unop(Iop_D64toD128, mkexpr(op))); - return "lxdtr"; } -static const HChar * +static void s390_irgen_LDXTR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("ldxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("ldxtr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); if ((m4 & 0x8) != 0) emulation_warning(EmWarn_S390X_XiC_not_zero); @@ -12442,10 +10991,9 @@ s390_irgen_LDXTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_D128toD64, mkexpr(encode_dfp_rounding_mode(m3)), get_dpr_pair(r2))); put_dpr_dw0(r1, mkexpr(result)); - return "ldxtr"; } -static const HChar * +static void s390_irgen_LEDTR(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x8) != 0) @@ -12457,10 +11005,9 @@ s390_irgen_LEDTR(UChar m3, UChar m4, UChar r1, UChar r2) assign(op, get_dpr_dw0(r2)); put_dpr_w0(r1, binop(Iop_D64toD32, mkexpr(encode_dfp_rounding_mode(m3)), mkexpr(op))); - return "ledtr"; } -static const HChar * +static void s390_irgen_LTDTR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_D64); @@ -12468,24 +11015,22 @@ s390_irgen_LTDTR(UChar r1, UChar r2) assign(result, get_dpr_dw0(r2)); put_dpr_dw0(r1, mkexpr(result)); s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); - return "ltdtr"; } -static const HChar * +static void s390_irgen_LTXTR(UChar r1, UChar r2) { - s390_insn_assert("ltxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("ltxtr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp result = newTemp(Ity_D128); assign(result, get_dpr_pair(r2)); put_dpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); - return "ltxtr"; } -static const HChar * +static void s390_irgen_MDTRA(UChar r3, UChar m4, UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_D64); @@ -12499,15 +11044,14 @@ s390_irgen_MDTRA(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_MulD64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_dw0(r1, mkexpr(result)); - return "mdtra"; } -static const HChar * +static void s390_irgen_MXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("mxtra", is_valid_fpr_pair(r1)); - s390_insn_assert("mxtra", is_valid_fpr_pair(r2)); - s390_insn_assert("mxtra", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op1 = newTemp(Ity_D128); IRTemp op2 = newTemp(Ity_D128); @@ -12520,10 +11064,9 @@ s390_irgen_MXTRA(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_MulD128, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_pair(r1, mkexpr(result)); - return "mxtra"; } -static const HChar * +static void s390_irgen_QADTR(UChar r3, UChar m4, UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_D64); @@ -12537,15 +11080,14 @@ s390_irgen_QADTR(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_QuantizeD64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_dw0(r1, mkexpr(result)); - return "qadtr"; } -static const HChar * +static void s390_irgen_QAXTR(UChar r3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("qaxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("qaxtr", is_valid_fpr_pair(r2)); - s390_insn_assert("qaxtr", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op1 = newTemp(Ity_D128); IRTemp op2 = newTemp(Ity_D128); @@ -12558,10 +11100,9 @@ s390_irgen_QAXTR(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_QuantizeD128, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_pair(r1, mkexpr(result)); - return "qaxtr"; } -static const HChar * +static void s390_irgen_RRDTR(UChar r3, UChar m4, UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_I8); @@ -12575,14 +11116,13 @@ s390_irgen_RRDTR(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_SignificanceRoundD64, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_dw0(r1, mkexpr(result)); - return "rrdtr"; } -static const HChar * +static void s390_irgen_RRXTR(UChar r3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("rrxtr", is_valid_fpr_pair(r1)); - s390_insn_assert("rrxtr", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op1 = newTemp(Ity_I8); IRTemp op2 = newTemp(Ity_D128); @@ -12595,10 +11135,9 @@ s390_irgen_RRXTR(UChar r3, UChar m4, UChar r1, UChar r2) assign(result, triop(Iop_SignificanceRoundD128, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_dpr_pair(r1, mkexpr(result)); - return "rrxtr"; } -static const HChar * +static void s390_irgen_SDTRA(UChar r3, UChar m4, UChar r1, UChar r2) { IRTemp op1 = newTemp(Ity_D64); @@ -12613,15 +11152,14 @@ s390_irgen_SDTRA(UChar r3, UChar m4, UChar r1, UChar r2) mkexpr(op2))); s390_cc_thunk_putF(S390_CC_OP_DFP_RESULT_64, result); put_dpr_dw0(r1, mkexpr(result)); - return "sdtra"; } -static const HChar * +static void s390_irgen_SXTRA(UChar r3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("sxtra", is_valid_fpr_pair(r1)); - s390_insn_assert("sxtra", is_valid_fpr_pair(r2)); - s390_insn_assert("sxtra", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op1 = newTemp(Ity_D128); IRTemp op2 = newTemp(Ity_D128); @@ -12635,10 +11173,9 @@ s390_irgen_SXTRA(UChar r3, UChar m4, UChar r1, UChar r2) mkexpr(op2))); put_dpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1d128(S390_CC_OP_DFP_RESULT_128, result); - return "sxtra"; } -static const HChar * +static void s390_irgen_SLDT(UChar r3, IRTemp op2addr, UChar r1) { IRTemp op = newTemp(Ity_D64); @@ -12647,14 +11184,13 @@ s390_irgen_SLDT(UChar r3, IRTemp op2addr, UChar r1) put_dpr_dw0(r1, binop(Iop_ShlD64, mkexpr(op), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - return "sldt"; } -static const HChar * +static void s390_irgen_SLXT(UChar r3, IRTemp op2addr, UChar r1) { - s390_insn_assert("slxt", is_valid_fpr_pair(r1)); - s390_insn_assert("slxt", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op = newTemp(Ity_D128); @@ -12662,10 +11198,9 @@ s390_irgen_SLXT(UChar r3, IRTemp op2addr, UChar r1) put_dpr_pair(r1, binop(Iop_ShlD128, mkexpr(op), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - return "slxt"; } -static const HChar * +static void s390_irgen_SRDT(UChar r3, IRTemp op2addr, UChar r1) { IRTemp op = newTemp(Ity_D64); @@ -12674,14 +11209,13 @@ s390_irgen_SRDT(UChar r3, IRTemp op2addr, UChar r1) put_dpr_dw0(r1, binop(Iop_ShrD64, mkexpr(op), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - return "srdt"; } -static const HChar * +static void s390_irgen_SRXT(UChar r3, IRTemp op2addr, UChar r1) { - s390_insn_assert("srxt", is_valid_fpr_pair(r1)); - s390_insn_assert("srxt", is_valid_fpr_pair(r3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r3)); IRTemp op = newTemp(Ity_D128); @@ -12689,10 +11223,9 @@ s390_irgen_SRXT(UChar r3, IRTemp op2addr, UChar r1) put_dpr_pair(r1, binop(Iop_ShrD128, mkexpr(op), unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(63))))); - return "srxt"; } -static const HChar * +static void s390_irgen_TDCET(UChar r1, IRTemp op2addr) { IRTemp value = newTemp(Ity_D32); @@ -12700,10 +11233,9 @@ s390_irgen_TDCET(UChar r1, IRTemp op2addr) assign(value, get_dpr_w0(r1)); s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_32, value, op2addr); - return "tdcet"; } -static const HChar * +static void s390_irgen_TDCDT(UChar r1, IRTemp op2addr) { IRTemp value = newTemp(Ity_D64); @@ -12711,23 +11243,21 @@ s390_irgen_TDCDT(UChar r1, IRTemp op2addr) assign(value, get_dpr_dw0(r1)); s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDC_64, value, op2addr); - return "tdcdt"; } -static const HChar * +static void s390_irgen_TDCXT(UChar r1, IRTemp op2addr) { - s390_insn_assert("tdcxt", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp value = newTemp(Ity_D128); assign(value, get_dpr_pair(r1)); s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDC_128, value, op2addr); - return "tdcxt"; } -static const HChar * +static void s390_irgen_TDGET(UChar r1, IRTemp op2addr) { IRTemp value = newTemp(Ity_D32); @@ -12735,10 +11265,9 @@ s390_irgen_TDGET(UChar r1, IRTemp op2addr) assign(value, get_dpr_w0(r1)); s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_32, value, op2addr); - return "tdget"; } -static const HChar * +static void s390_irgen_TDGDT(UChar r1, IRTemp op2addr) { IRTemp value = newTemp(Ity_D64); @@ -12746,23 +11275,21 @@ s390_irgen_TDGDT(UChar r1, IRTemp op2addr) assign(value, get_dpr_dw0(r1)); s390_cc_thunk_putFZ(S390_CC_OP_DFP_TDG_64, value, op2addr); - return "tdgdt"; } -static const HChar * +static void s390_irgen_TDGXT(UChar r1, IRTemp op2addr) { - s390_insn_assert("tdgxt", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp value = newTemp(Ity_D128); assign(value, get_dpr_pair(r1)); s390_cc_thunk_put1d128Z(S390_CC_OP_DFP_TDG_128, value, op2addr); - return "tdgxt"; } -static const HChar * +static void s390_irgen_CLC(UChar length, IRTemp start1, IRTemp start2) { IRType ty; @@ -12787,14 +11314,13 @@ s390_irgen_CLC(UChar length, IRTemp start1, IRTemp start2) assign(len, mkU64(length)); s390_irgen_CLC_EX(len, start1, start2); } - return "clc"; } -static const HChar * +static void s390_irgen_CLCL(UChar r1, UChar r2) { - s390_insn_assert("clcl", is_valid_gpr_pair(r1)); - s390_insn_assert("clcl", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); IRTemp addr1 = newTemp(Ity_I64); IRTemp addr2 = newTemp(Ity_I64); @@ -12869,15 +11395,13 @@ s390_irgen_CLCL(UChar r1, UChar r2) binop(Iop_Sub32, mkexpr(r2p1), mkU32(1)))); iterate(); - - return "clcl"; } -static const HChar * +static void s390_irgen_CLCLE(UChar r1, UChar r3, IRTemp pad2) { - s390_insn_assert("clcle", is_valid_gpr_pair(r1)); - s390_insn_assert("clcle", is_valid_gpr_pair(r3)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r3)); IRTemp addr1, addr3, addr1_load, addr3_load, len1, len3, single1, single3; @@ -12946,8 +11470,6 @@ s390_irgen_CLCLE(UChar r1, UChar r3, IRTemp pad2) mkU64(0), binop(Iop_Sub64, mkexpr(len3), mkU64(1)))); iterate(); - - return "clcle"; } @@ -13096,7 +11618,7 @@ s390_irgen_EX_SS(UChar r, IRTemp addr2, IRTemp torun, last_execute_target = Invalid_execute_target; } -static const HChar * +static void s390_irgen_EX(UChar r1, IRTemp addr2) { IRTemp insn0, unmodified_insn; @@ -13135,44 +11657,44 @@ s390_irgen_EX(UChar r1, IRTemp addr2) put_IA(mkaddr_expr(guest_IA_next_instr)); dis_res->whatNext = Dis_StopHere; dis_res->jk_StopHere = Ijk_InvalICache; - return "ex"; + return; } switch (last_execute_target & 0xff00000000000000ULL) { case 0xd200000000000000ULL: /* special case MVC */ s390_irgen_EX_SS(r1, addr2, unmodified_insn, s390_irgen_MVC_EX, 64); - return "ex@mvc"; + return; case 0xd500000000000000ULL: /* special case CLC */ s390_irgen_EX_SS(r1, addr2, unmodified_insn, s390_irgen_CLC_EX, 64); - return "ex@clc"; + return; case 0xd700000000000000ULL: /* special case XC */ s390_irgen_EX_SS(r1, addr2, unmodified_insn, s390_irgen_XC_EX, 32); - return "ex@xc"; + return; case 0xd600000000000000ULL: /* special case OC */ s390_irgen_EX_SS(r1, addr2, unmodified_insn, s390_irgen_OC_EX, 32); - return "ex@oc"; + return; case 0xd400000000000000ULL: /* special case NC */ s390_irgen_EX_SS(r1, addr2, unmodified_insn, s390_irgen_NC_EX, 32); - return "ex@nc"; + return; case 0xdc00000000000000ULL: /* special case TR */ s390_irgen_EX_SS(r1, addr2, unmodified_insn, s390_irgen_TR_EX, 64); - return "ex@tr"; + return; case 0xe800000000000000ULL: /* special case MVCIN */ s390_irgen_EX_SS(r1, addr2, unmodified_insn, s390_irgen_MVCIN_EX, 64); - return "ex@mvcin"; + return; default: { @@ -13218,16 +11740,13 @@ s390_irgen_EX(UChar r1, IRTemp addr2) bytes = (UChar *) &last_execute_target; s390_decode_and_irgen(bytes, ((((bytes[0] >> 6) + 1) >> 1) + 1) << 1, dis_res); - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - vex_printf(" which was executed by\n"); /* dont make useless translations in the next execute */ last_execute_target = Invalid_execute_target; } } - return "ex"; } -static const HChar * +static void s390_irgen_EXRL(UChar r1, UInt offset) { IRTemp addr = newTemp(Ity_I64); @@ -13247,21 +11766,18 @@ s390_irgen_EXRL(UChar r1, UInt offset) bytes_addr = guest_IA_rel_base; assign(addr, mkU64(bytes_addr)); s390_irgen_EX(r1, addr); - return "exrl"; } -static const HChar * +static void s390_irgen_IPM(UChar r1) { // As long as we dont support SPM, lets just assume 0 as program mask put_gpr_b4(r1, unop(Iop_32to8, binop(Iop_Or32, mkU32(0 /* program mask */), binop(Iop_Shl32, s390_call_calculate_cc(), mkU8(4))))); - - return "ipm"; } -static const HChar * +static void s390_irgen_SRST(UChar r1, UChar r2) { IRTemp address = newTemp(Ity_I64); @@ -13295,11 +11811,9 @@ s390_irgen_SRST(UChar r1, UChar r2) put_gpr_dw0(r2, binop(Iop_Add64, mkexpr(address), mkU64(1))); iterate(); - - return "srst"; } -static const HChar * +static void s390_irgen_CLST(UChar r1, UChar r2) { IRTemp address1 = newTemp(Ity_I64); @@ -13353,8 +11867,6 @@ s390_irgen_CLST(UChar r1, UChar r2) put_gpr_dw0(r2, binop(Iop_Add64, get_gpr_dw0(r2), mkU64(1))); iterate(); - - return "clst"; } static void @@ -13376,23 +11888,19 @@ s390_irgen_load_multiple_32bit(UChar r1, UChar r3, IRTemp op2addr) } while (reg != (r3 + 1)); } -static const HChar * +static void s390_irgen_LM(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_multiple_32bit(r1, r3, op2addr); - - return "lm"; } -static const HChar * +static void s390_irgen_LMY(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_multiple_32bit(r1, r3, op2addr); - - return "lmy"; } -static const HChar * +static void s390_irgen_LMH(UChar r1, UChar r3, IRTemp op2addr) { UChar reg; @@ -13409,11 +11917,9 @@ s390_irgen_LMH(UChar r1, UChar r3, IRTemp op2addr) assign(addr, binop(Iop_Add64, mkexpr(old), mkU64(4))); reg++; } while (reg != (r3 + 1)); - - return "lmh"; } -static const HChar * +static void s390_irgen_LMG(UChar r1, UChar r3, IRTemp op2addr) { UChar reg; @@ -13430,8 +11936,6 @@ s390_irgen_LMG(UChar r1, UChar r3, IRTemp op2addr) assign(addr, binop(Iop_Add64, mkexpr(old), mkU64(8))); reg++; } while (reg != (r3 + 1)); - - return "lmg"; } static void @@ -13453,23 +11957,19 @@ s390_irgen_store_multiple_32bit(UChar r1, UChar r3, IRTemp op2addr) } while( reg != (r3 + 1)); } -static const HChar * +static void s390_irgen_STM(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_store_multiple_32bit(r1, r3, op2addr); - - return "stm"; } -static const HChar * +static void s390_irgen_STMY(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_store_multiple_32bit(r1, r3, op2addr); - - return "stmy"; } -static const HChar * +static void s390_irgen_STMH(UChar r1, UChar r3, IRTemp op2addr) { UChar reg; @@ -13486,11 +11986,9 @@ s390_irgen_STMH(UChar r1, UChar r3, IRTemp op2addr) assign(addr, binop(Iop_Add64, mkexpr(old), mkU64(4))); reg++; } while( reg != (r3 + 1)); - - return "stmh"; } -static const HChar * +static void s390_irgen_STMG(UChar r1, UChar r3, IRTemp op2addr) { UChar reg; @@ -13507,8 +12005,6 @@ s390_irgen_STMG(UChar r1, UChar r3, IRTemp op2addr) assign(addr, binop(Iop_Add64, mkexpr(old), mkU64(8))); reg++; } while( reg != (r3 + 1)); - - return "stmg"; } static void @@ -13548,15 +12044,13 @@ s390_irgen_xonc(IROp op, IRTemp length, IRTemp start1, IRTemp start2) put_counter_dw0(mkU64(0)); } -static const HChar * +static void s390_irgen_XC(UChar length, IRTemp start1, IRTemp start2) { IRTemp len = newTemp(Ity_I32); assign(len, mkU32(length)); s390_irgen_xonc(Iop_Xor8, len, start1, start2); - - return "xc"; } static void @@ -13592,57 +12086,46 @@ s390_irgen_XC_sameloc(UChar length, UChar b, UShort d) } s390_cc_set_val(0); - - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - S390_DISASM(MNM("xc"), UDLB(d, length, b), UDXB(d, 0, b)); } -static const HChar * +static void s390_irgen_NC(UChar length, IRTemp start1, IRTemp start2) { IRTemp len = newTemp(Ity_I32); assign(len, mkU32(length)); s390_irgen_xonc(Iop_And8, len, start1, start2); - - return "nc"; } -static const HChar * +static void s390_irgen_OC(UChar length, IRTemp start1, IRTemp start2) { IRTemp len = newTemp(Ity_I32); assign(len, mkU32(length)); s390_irgen_xonc(Iop_Or8, len, start1, start2); - - return "oc"; } -static const HChar * +static void s390_irgen_MVC(UChar length, IRTemp start1, IRTemp start2) { IRTemp len = newTemp(Ity_I64); assign(len, mkU64(length)); s390_irgen_MVC_EX(len, start1, start2); - - return "mvc"; } -static const HChar * +static void s390_irgen_MVCIN(UChar length, IRTemp start1, IRTemp start2) { IRTemp len = newTemp(Ity_I64); assign(len, mkU64(length)); s390_irgen_MVCIN_EX(len, start1, start2); - - return "mvcin"; } -static const HChar * +static void s390_irgen_MVCRL(IRTemp op1addr, IRTemp op2addr) { IRTemp counter = newTemp(Ity_I64); @@ -13663,15 +12146,13 @@ s390_irgen_MVCRL(IRTemp op1addr, IRTemp op2addr) put_counter_dw0(binop(Iop_Add64, mkexpr(counter), mkU64(1))); iterate_if(binop(Iop_CmpNE64, mkexpr(offset), mkU64(0))); put_counter_dw0(mkU64(0)); - - return "mvcrl"; } -static const HChar * +static void s390_irgen_MVCL(UChar r1, UChar r2) { - s390_insn_assert("mvcl", is_valid_gpr_pair(r1)); - s390_insn_assert("mvcl", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); IRTemp addr1 = newTemp(Ity_I64); IRTemp addr2 = newTemp(Ity_I64); @@ -13748,16 +12229,14 @@ s390_irgen_MVCL(UChar r1, UChar r2) s390_cc_thunk_put2(S390_CC_OP_UNSIGNED_COMPARE, len1, len2, False); iterate_if(binop(Iop_CmpNE32, mkexpr(len1), mkU32(1))); - - return "mvcl"; } -static const HChar * +static void s390_irgen_MVCLE(UChar r1, UChar r3, IRTemp pad2) { - s390_insn_assert("mvcle", is_valid_gpr_pair(r1)); - s390_insn_assert("mvcle", is_valid_gpr_pair(r3)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r3)); IRTemp addr1, addr3, addr3_load, len1, len3, single; @@ -13805,11 +12284,9 @@ s390_irgen_MVCLE(UChar r1, UChar r3, IRTemp pad2) s390_cc_thunk_put2(S390_CC_OP_UNSIGNED_COMPARE, len1, len3, False); iterate_if(binop(Iop_CmpNE64, mkexpr(len1), mkU64(1))); - - return "mvcle"; } -static const HChar * +static void s390_irgen_MVST(UChar r1, UChar r2) { IRTemp addr1 = newTemp(Ity_I64); @@ -13833,8 +12310,6 @@ s390_irgen_MVST(UChar r1, UChar r2) s390_cc_set_val(1); put_gpr_dw0(r1, binop(Iop_Add64, mkexpr(addr1), mkexpr(counter))); put_counter_dw0(mkU64(0)); - - return "mvst"; } static void @@ -13877,144 +12352,124 @@ s390_irgen_divide_64to64(IROp op, UChar r1, IRTemp op2) put_gpr_dw0(r1 + 1, unop(Iop_128to64, mkexpr(result))); // quotient } -static const HChar * +static void s390_irgen_DR(UChar r1, UChar r2) { - s390_insn_assert("dr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I32); assign(op2, get_gpr_w1(r2)); s390_irgen_divide_64to32(Iop_DivModS64to32, r1, op2); - - return "dr"; } -static const HChar * +static void s390_irgen_D(UChar r1, IRTemp op2addr) { - s390_insn_assert("d", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I32); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_irgen_divide_64to32(Iop_DivModS64to32, r1, op2); - - return "d"; } -static const HChar * +static void s390_irgen_DLR(UChar r1, UChar r2) { - s390_insn_assert("dlr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I32); assign(op2, get_gpr_w1(r2)); s390_irgen_divide_64to32(Iop_DivModU64to32, r1, op2); - - return "dlr"; } -static const HChar * +static void s390_irgen_DL(UChar r1, IRTemp op2addr) { - s390_insn_assert("dl", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I32); assign(op2, load(Ity_I32, mkexpr(op2addr))); s390_irgen_divide_64to32(Iop_DivModU64to32, r1, op2); - - return "dl"; } -static const HChar * +static void s390_irgen_DLG(UChar r1, IRTemp op2addr) { - s390_insn_assert("dlg", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I64); assign(op2, load(Ity_I64, mkexpr(op2addr))); s390_irgen_divide_128to64(Iop_DivModU128to64, r1, op2); - - return "dlg"; } -static const HChar * +static void s390_irgen_DLGR(UChar r1, UChar r2) { - s390_insn_assert("dlgr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I64); assign(op2, get_gpr_dw0(r2)); s390_irgen_divide_128to64(Iop_DivModU128to64, r1, op2); - - return "dlgr"; } -static const HChar * +static void s390_irgen_DSGR(UChar r1, UChar r2) { - s390_insn_assert("dsgr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I64); assign(op2, get_gpr_dw0(r2)); s390_irgen_divide_64to64(Iop_DivModS64to64, r1, op2); - - return "dsgr"; } -static const HChar * +static void s390_irgen_DSG(UChar r1, IRTemp op2addr) { - s390_insn_assert("dsg", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I64); assign(op2, load(Ity_I64, mkexpr(op2addr))); s390_irgen_divide_64to64(Iop_DivModS64to64, r1, op2); - - return "dsg"; } -static const HChar * +static void s390_irgen_DSGFR(UChar r1, UChar r2) { - s390_insn_assert("dsgfr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I64); assign(op2, unop(Iop_32Sto64, get_gpr_w1(r2))); s390_irgen_divide_64to64(Iop_DivModS64to64, r1, op2); - - return "dsgfr"; } -static const HChar * +static void s390_irgen_DSGF(UChar r1, IRTemp op2addr) { - s390_insn_assert("dsgf", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp op2 = newTemp(Ity_I64); assign(op2, unop(Iop_32Sto64, load(Ity_I32, mkexpr(op2addr)))); s390_irgen_divide_64to64(Iop_DivModS64to64, r1, op2); - - return "dsgf"; } static void @@ -14036,20 +12491,16 @@ s390_irgen_load_ar_multiple(UChar r1, UChar r3, IRTemp op2addr) } while (reg != (r3 + 1)); } -static const HChar * +static void s390_irgen_LAM(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_ar_multiple(r1, r3, op2addr); - - return "lam"; } -static const HChar * +static void s390_irgen_LAMY(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_load_ar_multiple(r1, r3, op2addr); - - return "lamy"; } static void @@ -14071,20 +12522,16 @@ s390_irgen_store_ar_multiple(UChar r1, UChar r3, IRTemp op2addr) } while (reg != (r3 + 1)); } -static const HChar * +static void s390_irgen_STAM(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_store_ar_multiple(r1, r3, op2addr); - - return "stam"; } -static const HChar * +static void s390_irgen_STAMY(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_store_ar_multiple(r1, r3, op2addr); - - return "stamy"; } @@ -14119,23 +12566,19 @@ s390_irgen_cas_32(UChar r1, UChar r3, IRTemp op2addr) yield_if(mkexpr(nequal)); } -static const HChar * +static void s390_irgen_CS(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_cas_32(r1, r3, op2addr); - - return "cs"; } -static const HChar * +static void s390_irgen_CSY(UChar r1, UChar r3, IRTemp op2addr) { s390_irgen_cas_32(r1, r3, op2addr); - - return "csy"; } -static const HChar * +static void s390_irgen_CSG(UChar r1, UChar r3, IRTemp op2addr) { IRCAS *cas; @@ -14163,8 +12606,6 @@ s390_irgen_CSG(UChar r1, UChar r3, IRTemp op2addr) Otherwise, store the old_value from memory in r1 and yield. */ put_gpr_dw0(r1, mkite(mkexpr(nequal), mkexpr(old_mem), mkexpr(op1))); yield_if(mkexpr(nequal)); - - return "csg"; } /* Implementation for 32-bit compare-double-and-swap */ @@ -14210,31 +12651,27 @@ s390_irgen_cdas_32(UChar r1, UChar r3, IRTemp op2addr) yield_if(mkexpr(nequal)); } -static const HChar * +static void s390_irgen_CDS(UChar r1, UChar r3, IRTemp op2addr) { - s390_insn_assert("cds", is_valid_gpr_pair(r1)); - s390_insn_assert("cds", is_valid_gpr_pair(r3)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r3)); s390_irgen_cdas_32(r1, r3, op2addr); - - return "cds"; } -static const HChar * +static void s390_irgen_CDSY(UChar r1, UChar r3, IRTemp op2addr) { - s390_insn_assert("cdsy", is_valid_gpr_pair(r1)); - s390_insn_assert("cdsy", is_valid_gpr_pair(r3)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r3)); s390_irgen_cdas_32(r1, r3, op2addr); - - return "cdsy"; } -static const HChar * +static void s390_irgen_CDSG(UChar r1, UChar r3, IRTemp op2addr) { - s390_insn_assert("cdsg", is_valid_gpr_pair(r1)); - s390_insn_assert("cdsg", is_valid_gpr_pair(r3)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r3)); IRCAS *cas; IRTemp op1_high = newTemp(Ity_I64); @@ -14275,18 +12712,16 @@ s390_irgen_CDSG(UChar r1, UChar r3, IRTemp op2addr) put_gpr_dw0(r1, mkite(mkexpr(nequal), mkexpr(old_mem_high), mkexpr(op1_high))); put_gpr_dw0(r1+1, mkite(mkexpr(nequal), mkexpr(old_mem_low), mkexpr(op1_low))); yield_if(mkexpr(nequal)); - - return "cdsg"; } /* Binary floating point */ -static const HChar * +static void s390_irgen_AXBR(UChar r1, UChar r2) { - s390_insn_assert("axbr", is_valid_fpr_pair(r1)); - s390_insn_assert("axbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp op1 = newTemp(Ity_F128); IRTemp op2 = newTemp(Ity_F128); @@ -14300,14 +12735,12 @@ s390_irgen_AXBR(UChar r1, UChar r2) put_fpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1f128(S390_CC_OP_BFP_RESULT_128, result); - - return "axbr"; } /* Helper for "compare" insns CEBR, CDBR, CXBR, and their signalling counterparts. */ -static const HChar * -s390_irgen_CxBR(const HChar *mnem, UChar r1, UChar r2, IRType type, IROp cmp_op) +static void +s390_irgen_CxBR(UChar r1, UChar r2, IRType type, IROp cmp_op) { IRTemp op1 = newTemp(type); IRTemp op2 = newTemp(type); @@ -14320,54 +12753,53 @@ s390_irgen_CxBR(const HChar *mnem, UChar r1, UChar r2, IRType type, IROp cmp_op) assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex)); s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - return mnem; } -static const HChar * +static void s390_irgen_CEBR(UChar r1, UChar r2) { - return s390_irgen_CxBR("cebr", r1, r2, Ity_F32, Iop_CmpF32); + s390_irgen_CxBR(r1, r2, Ity_F32, Iop_CmpF32); } -static const HChar * +static void s390_irgen_KEBR(UChar r1, UChar r2) { - return s390_irgen_CxBR("kebr", r1, r2, Ity_F32, Iop_CmpF32); + s390_irgen_CxBR(r1, r2, Ity_F32, Iop_CmpF32); } -static const HChar * +static void s390_irgen_CDBR(UChar r1, UChar r2) { - return s390_irgen_CxBR("cdbr", r1, r2, Ity_F64, Iop_CmpF64); + s390_irgen_CxBR(r1, r2, Ity_F64, Iop_CmpF64); } -static const HChar * +static void s390_irgen_KDBR(UChar r1, UChar r2) { - return s390_irgen_CxBR("kdbr", r1, r2, Ity_F64, Iop_CmpF64); + s390_irgen_CxBR(r1, r2, Ity_F64, Iop_CmpF64); } -static const HChar * +static void s390_irgen_CXBR(UChar r1, UChar r2) { - s390_insn_assert("cxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("cxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); - return s390_irgen_CxBR("cxbr", r1, r2, Ity_F128, Iop_CmpF128); + s390_irgen_CxBR(r1, r2, Ity_F128, Iop_CmpF128); } -static const HChar * +static void s390_irgen_KXBR(UChar r1, UChar r2) { - s390_insn_assert("kxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("kxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); - return s390_irgen_CxBR("kxbr", r1, r2, Ity_F128, Iop_CmpF128); + s390_irgen_CxBR(r1, r2, Ity_F128, Iop_CmpF128); } /* Helper for "compare" insns CEB, CDB, and their signalling counterparts. */ -static const HChar * -s390_irgen_CxB(const HChar *mnem, UChar r1, IRTemp op2addr, IRType type, +static void +s390_irgen_CxB(UChar r1, IRTemp op2addr, IRType type, IROp cmp_op) { IRTemp op1 = newTemp(type); @@ -14381,38 +12813,37 @@ s390_irgen_CxB(const HChar *mnem, UChar r1, IRTemp op2addr, IRType type, assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex)); s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - return mnem; } -static const HChar * +static void s390_irgen_CEB(UChar r1, IRTemp op2addr) { - return s390_irgen_CxB("ceb", r1, op2addr, Ity_F32, Iop_CmpF32); + s390_irgen_CxB(r1, op2addr, Ity_F32, Iop_CmpF32); } -static const HChar * +static void s390_irgen_KEB(UChar r1, IRTemp op2addr) { - return s390_irgen_CxB("keb", r1, op2addr, Ity_F32, Iop_CmpF32); + s390_irgen_CxB(r1, op2addr, Ity_F32, Iop_CmpF32); } -static const HChar * +static void s390_irgen_CDB(UChar r1, IRTemp op2addr) { - return s390_irgen_CxB("cdb", r1, op2addr, Ity_F64, Iop_CmpF64); + s390_irgen_CxB(r1, op2addr, Ity_F64, Iop_CmpF64); } -static const HChar * +static void s390_irgen_KDB(UChar r1, IRTemp op2addr) { - return s390_irgen_CxB("kdb", r1, op2addr, Ity_F64, Iop_CmpF64); + s390_irgen_CxB(r1, op2addr, Ity_F64, Iop_CmpF64); } -static const HChar * +static void s390_irgen_CXFBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxfbra", is_valid_fpr_pair(r1)); - s390_insn_assert("cxfbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14420,15 +12851,13 @@ s390_irgen_CXFBRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_w1(r2)); put_fpr_pair(r1, unop(Iop_I32StoF128, mkexpr(op2))); - - return "cxfbra"; } -static const HChar * +static void s390_irgen_CXLFBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxlfbr", is_valid_fpr_pair(r1)); - s390_insn_assert("cxlfbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14436,15 +12865,14 @@ s390_irgen_CXLFBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_w1(r2)); put_fpr_pair(r1, unop(Iop_I32UtoF128, mkexpr(op2))); - return "cxlfbr"; } -static const HChar * +static void s390_irgen_CXGBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxgbra", is_valid_fpr_pair(r1)); - s390_insn_assert("cxgbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14452,15 +12880,13 @@ s390_irgen_CXGBRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_dw0(r2)); put_fpr_pair(r1, unop(Iop_I64StoF128, mkexpr(op2))); - - return "cxgbra"; } -static const HChar * +static void s390_irgen_CXLGBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cxlgbr", is_valid_fpr_pair(r1)); - s390_insn_assert("cxlgbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14468,14 +12894,13 @@ s390_irgen_CXLGBR(UChar m3, UChar m4, UChar r1, UChar r2) assign(op2, get_gpr_dw0(r2)); put_fpr_pair(r1, unop(Iop_I64UtoF128, mkexpr(op2))); - return "cxlgbr"; } -static const HChar * +static void s390_irgen_CFXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cfxbra", is_valid_fpr_pair(r2)); - s390_insn_assert("cfxbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14488,15 +12913,13 @@ s390_irgen_CFXBRA(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_INT_32, op, rounding_mode); - - return "cfxbra"; } -static const HChar * +static void s390_irgen_CLFXBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clfxbr", is_valid_fpr_pair(r2)); - s390_insn_assert("clfxbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14509,15 +12932,14 @@ s390_irgen_CLFXBR(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_w1(r1, mkexpr(result)); s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_32, op, rounding_mode); - return "clfxbr"; } -static const HChar * +static void s390_irgen_CGXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("cgxbra", is_valid_fpr_pair(r2)); - s390_insn_assert("cgxbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14530,15 +12952,13 @@ s390_irgen_CGXBRA(UChar m3, UChar m4, UChar r1, UChar r2) mkexpr(op))); put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_INT_64, op, rounding_mode); - - return "cgxbra"; } -static const HChar * +static void s390_irgen_CLGXBR(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("clgxbr", is_valid_fpr_pair(r2)); - s390_insn_assert("clgxbr", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14552,14 +12972,13 @@ s390_irgen_CLGXBR(UChar m3, UChar m4, UChar r1, UChar r2) put_gpr_dw0(r1, mkexpr(result)); s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_128_TO_UINT_64, op, rounding_mode); - return "clgxbr"; } -static const HChar * +static void s390_irgen_DXBR(UChar r1, UChar r2) { - s390_insn_assert("dxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("dxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp op1 = newTemp(Ity_F128); IRTemp op2 = newTemp(Ity_F128); @@ -14571,96 +12990,82 @@ s390_irgen_DXBR(UChar r1, UChar r2) assign(result, triop(Iop_DivF128, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_pair(r1, mkexpr(result)); - - return "dxbr"; } -static const HChar * +static void s390_irgen_LTXBR(UChar r1, UChar r2) { - s390_insn_assert("ltxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("ltxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp result = newTemp(Ity_F128); assign(result, get_fpr_pair(r2)); put_fpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1f128(S390_CC_OP_BFP_RESULT_128, result); - - return "ltxbr"; } -static const HChar * +static void s390_irgen_LCXBR(UChar r1, UChar r2) { - s390_insn_assert("lcxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("lcxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp result = newTemp(Ity_F128); assign(result, unop(Iop_NegF128, get_fpr_pair(r2))); put_fpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1f128(S390_CC_OP_BFP_RESULT_128, result); - - return "lcxbr"; } -static const HChar * +static void s390_irgen_LXDBR(UChar r1, UChar r2) { - s390_insn_assert("lxdbr", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp op = newTemp(Ity_F64); assign(op, get_fpr_dw0(r2)); put_fpr_pair(r1, unop(Iop_F64toF128, mkexpr(op))); - - return "lxdbr"; } -static const HChar * +static void s390_irgen_LXEBR(UChar r1, UChar r2) { - s390_insn_assert("lxebr", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp op = newTemp(Ity_F32); assign(op, get_fpr_w0(r2)); put_fpr_pair(r1, unop(Iop_F32toF128, mkexpr(op))); - - return "lxebr"; } -static const HChar * +static void s390_irgen_LXDB(UChar r1, IRTemp op2addr) { - s390_insn_assert("lxdb", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp op = newTemp(Ity_F64); assign(op, load(Ity_F64, mkexpr(op2addr))); put_fpr_pair(r1, unop(Iop_F64toF128, mkexpr(op))); - - return "lxdb"; } -static const HChar * +static void s390_irgen_LXEB(UChar r1, IRTemp op2addr) { - s390_insn_assert("lxeb", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp op = newTemp(Ity_F32); assign(op, load(Ity_F32, mkexpr(op2addr))); put_fpr_pair(r1, unop(Iop_F32toF128, mkexpr(op))); - - return "lxeb"; } -static const HChar * +static void s390_irgen_FIEBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("fiebra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14669,14 +13074,12 @@ s390_irgen_FIEBRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_RoundF32toInt, mkexpr(encode_bfp_rounding_mode(m3)), get_fpr_w0(r2))); put_fpr_w0(r1, mkexpr(result)); - - return "fiebra"; } -static const HChar * +static void s390_irgen_FIDBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("fidbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14685,16 +13088,14 @@ s390_irgen_FIDBRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_RoundF64toInt, mkexpr(encode_bfp_rounding_mode(m3)), get_fpr_dw0(r2))); put_fpr_dw0(r1, mkexpr(result)); - - return "fidbra"; } -static const HChar * +static void s390_irgen_FIXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { - s390_insn_assert("fixbra", is_valid_fpr_pair(r1)); - s390_insn_assert("fixbra", is_valid_fpr_pair(r2)); - s390_insn_assert("fixbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_rounding_mode(m3)); if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); @@ -14703,11 +13104,9 @@ s390_irgen_FIXBRA(UChar m3, UChar m4, UChar r1, UChar r2) assign(result, binop(Iop_RoundF128toInt, mkexpr(encode_bfp_rounding_mode(m3)), get_fpr_pair(r2))); put_fpr_pair(r1, mkexpr(result)); - - return "fixbra"; } -static const HChar * +static void s390_irgen_LNEBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F32); @@ -14715,11 +13114,9 @@ s390_irgen_LNEBR(UChar r1, UChar r2) assign(result, unop(Iop_NegF32, unop(Iop_AbsF32, get_fpr_w0(r2)))); put_fpr_w0(r1, mkexpr(result)); s390_cc_thunk_put1f(S390_CC_OP_BFP_RESULT_32, result); - - return "lnebr"; } -static const HChar * +static void s390_irgen_LNDBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); @@ -14727,26 +13124,22 @@ s390_irgen_LNDBR(UChar r1, UChar r2) assign(result, unop(Iop_NegF64, unop(Iop_AbsF64, get_fpr_dw0(r2)))); put_fpr_dw0(r1, mkexpr(result)); s390_cc_thunk_put1f(S390_CC_OP_BFP_RESULT_64, result); - - return "lndbr"; } -static const HChar * +static void s390_irgen_LNXBR(UChar r1, UChar r2) { - s390_insn_assert("lnxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("lnxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp result = newTemp(Ity_F128); assign(result, unop(Iop_NegF128, unop(Iop_AbsF128, get_fpr_pair(r2)))); put_fpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1f128(S390_CC_OP_BFP_RESULT_128, result); - - return "lnxbr"; } -static const HChar * +static void s390_irgen_LPEBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F32); @@ -14754,11 +13147,9 @@ s390_irgen_LPEBR(UChar r1, UChar r2) assign(result, unop(Iop_AbsF32, get_fpr_w0(r2))); put_fpr_w0(r1, mkexpr(result)); s390_cc_thunk_put1f(S390_CC_OP_BFP_RESULT_32, result); - - return "lpebr"; } -static const HChar * +static void s390_irgen_LPDBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); @@ -14766,66 +13157,58 @@ s390_irgen_LPDBR(UChar r1, UChar r2) assign(result, unop(Iop_AbsF64, get_fpr_dw0(r2))); put_fpr_dw0(r1, mkexpr(result)); s390_cc_thunk_put1f(S390_CC_OP_BFP_RESULT_64, result); - - return "lpdbr"; } -static const HChar * +static void s390_irgen_LPXBR(UChar r1, UChar r2) { - s390_insn_assert("lpxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("lpxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp result = newTemp(Ity_F128); assign(result, unop(Iop_AbsF128, get_fpr_pair(r2))); put_fpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1f128(S390_CC_OP_BFP_RESULT_128, result); - - return "lpxbr"; } -static const HChar * +static void s390_irgen_LDXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); - s390_insn_assert("ldxbra", is_valid_fpr_pair(r1)); - s390_insn_assert("ldxbra", is_valid_fpr_pair(r2)); - s390_insn_assert("ldxbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_rounding_mode(m3)); IRTemp result = newTemp(Ity_F64); assign(result, binop(Iop_F128toF64, mkexpr(encode_bfp_rounding_mode(m3)), get_fpr_pair(r2))); put_fpr_dw0(r1, mkexpr(result)); - - return "ldxbra"; } -static const HChar * +static void s390_irgen_LEXBRA(UChar m3, UChar m4, UChar r1, UChar r2) { if ((m4 & 0x4) != 0) emulation_warning(EmWarn_S390X_XxC_not_zero); - s390_insn_assert("lexbra", is_valid_fpr_pair(r1)); - s390_insn_assert("lexbra", is_valid_fpr_pair(r2)); - s390_insn_assert("lexbra", is_valid_rounding_mode(m3)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_rounding_mode(m3)); IRTemp result = newTemp(Ity_F32); assign(result, binop(Iop_F128toF32, mkexpr(encode_bfp_rounding_mode(m3)), get_fpr_pair(r2))); put_fpr_w0(r1, mkexpr(result)); - - return "lexbra"; } -static const HChar * +static void s390_irgen_MXBR(UChar r1, UChar r2) { - s390_insn_assert("mxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("mxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp op1 = newTemp(Ity_F128); IRTemp op2 = newTemp(Ity_F128); @@ -14837,33 +13220,27 @@ s390_irgen_MXBR(UChar r1, UChar r2) assign(result, triop(Iop_MulF128, mkexpr(rounding_mode), mkexpr(op1), mkexpr(op2))); put_fpr_pair(r1, mkexpr(result)); - - return "mxbr"; } -static const HChar * +static void s390_irgen_MAEBR(UChar r1, UChar r3, UChar r2) { IRTemp rounding_mode = encode_bfp_rounding_mode(S390_BFP_ROUND_PER_FPC); put_fpr_w0(r1, qop(Iop_MAddF32, mkexpr(rounding_mode), get_fpr_w0(r3), get_fpr_w0(r2), get_fpr_w0(r1))); - - return "maebr"; } -static const HChar * +static void s390_irgen_MADBR(UChar r1, UChar r3, UChar r2) { IRTemp rounding_mode = encode_bfp_rounding_mode(S390_BFP_ROUND_PER_FPC); put_fpr_dw0(r1, qop(Iop_MAddF64, mkexpr(rounding_mode), get_fpr_dw0(r3), get_fpr_dw0(r2), get_fpr_dw0(r1))); - - return "madbr"; } -static const HChar * +static void s390_irgen_MAEB(UChar r3, IRTemp op2addr, UChar r1) { IRExpr *op2 = load(Ity_F32, mkexpr(op2addr)); @@ -14871,11 +13248,9 @@ s390_irgen_MAEB(UChar r3, IRTemp op2addr, UChar r1) put_fpr_w0(r1, qop(Iop_MAddF32, mkexpr(rounding_mode), get_fpr_w0(r3), op2, get_fpr_w0(r1))); - - return "maeb"; } -static const HChar * +static void s390_irgen_MADB(UChar r3, IRTemp op2addr, UChar r1) { IRExpr *op2 = load(Ity_F64, mkexpr(op2addr)); @@ -14883,33 +13258,27 @@ s390_irgen_MADB(UChar r3, IRTemp op2addr, UChar r1) put_fpr_dw0(r1, qop(Iop_MAddF64, mkexpr(rounding_mode), get_fpr_dw0(r3), op2, get_fpr_dw0(r1))); - - return "madb"; } -static const HChar * +static void s390_irgen_MSEBR(UChar r1, UChar r3, UChar r2) { IRTemp rounding_mode = encode_bfp_rounding_mode(S390_BFP_ROUND_PER_FPC); put_fpr_w0(r1, qop(Iop_MSubF32, mkexpr(rounding_mode), get_fpr_w0(r3), get_fpr_w0(r2), get_fpr_w0(r1))); - - return "msebr"; } -static const HChar * +static void s390_irgen_MSDBR(UChar r1, UChar r3, UChar r2) { IRTemp rounding_mode = encode_bfp_rounding_mode(S390_BFP_ROUND_PER_FPC); put_fpr_dw0(r1, qop(Iop_MSubF64, mkexpr(rounding_mode), get_fpr_dw0(r3), get_fpr_dw0(r2), get_fpr_dw0(r1))); - - return "msdbr"; } -static const HChar * +static void s390_irgen_MSEB(UChar r3, IRTemp op2addr, UChar r1) { IRExpr *op2 = load(Ity_F32, mkexpr(op2addr)); @@ -14917,11 +13286,9 @@ s390_irgen_MSEB(UChar r3, IRTemp op2addr, UChar r1) put_fpr_w0(r1, qop(Iop_MSubF32, mkexpr(rounding_mode), get_fpr_w0(r3), op2, get_fpr_w0(r1))); - - return "mseb"; } -static const HChar * +static void s390_irgen_MSDB(UChar r3, IRTemp op2addr, UChar r1) { IRExpr *op2 = load(Ity_F64, mkexpr(op2addr)); @@ -14929,11 +13296,9 @@ s390_irgen_MSDB(UChar r3, IRTemp op2addr, UChar r1) put_fpr_dw0(r1, qop(Iop_MSubF64, mkexpr(rounding_mode), get_fpr_dw0(r3), op2, get_fpr_dw0(r1))); - - return "msdb"; } -static const HChar * +static void s390_irgen_SQEBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F32); @@ -14941,11 +13306,9 @@ s390_irgen_SQEBR(UChar r1, UChar r2) assign(result, binop(Iop_SqrtF32, mkexpr(rounding_mode), get_fpr_w0(r2))); put_fpr_w0(r1, mkexpr(result)); - - return "sqebr"; } -static const HChar * +static void s390_irgen_SQDBR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); @@ -14953,15 +13316,13 @@ s390_irgen_SQDBR(UChar r1, UChar r2) assign(result, binop(Iop_SqrtF64, mkexpr(rounding_mode), get_fpr_dw0(r2))); put_fpr_dw0(r1, mkexpr(result)); - - return "sqdbr"; } -static const HChar * +static void s390_irgen_SQXBR(UChar r1, UChar r2) { - s390_insn_assert("sqxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("sqxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp result = newTemp(Ity_F128); IRTemp rounding_mode = encode_bfp_rounding_mode(S390_BFP_ROUND_PER_FPC); @@ -14969,11 +13330,9 @@ s390_irgen_SQXBR(UChar r1, UChar r2) assign(result, binop(Iop_SqrtF128, mkexpr(rounding_mode), get_fpr_pair(r2))); put_fpr_pair(r1, mkexpr(result)); - - return "sqxbr"; } -static const HChar * +static void s390_irgen_SQEB(UChar r1, IRTemp op2addr) { IRTemp op = newTemp(Ity_F32); @@ -14981,11 +13340,9 @@ s390_irgen_SQEB(UChar r1, IRTemp op2addr) assign(op, load(Ity_F32, mkexpr(op2addr))); put_fpr_w0(r1, binop(Iop_SqrtF32, mkexpr(rounding_mode), mkexpr(op))); - - return "sqeb"; } -static const HChar * +static void s390_irgen_SQDB(UChar r1, IRTemp op2addr) { IRTemp op = newTemp(Ity_F64); @@ -14993,15 +13350,13 @@ s390_irgen_SQDB(UChar r1, IRTemp op2addr) assign(op, load(Ity_F64, mkexpr(op2addr))); put_fpr_dw0(r1, binop(Iop_SqrtF64, mkexpr(rounding_mode), mkexpr(op))); - - return "sqdb"; } -static const HChar * +static void s390_irgen_SXBR(UChar r1, UChar r2) { - s390_insn_assert("sxbr", is_valid_fpr_pair(r1)); - s390_insn_assert("sxbr", is_valid_fpr_pair(r2)); + s390_insn_assert(is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r2)); IRTemp op1 = newTemp(Ity_F128); IRTemp op2 = newTemp(Ity_F128); @@ -15014,11 +13369,9 @@ s390_irgen_SXBR(UChar r1, UChar r2) mkexpr(op2))); put_fpr_pair(r1, mkexpr(result)); s390_cc_thunk_put1f128(S390_CC_OP_BFP_RESULT_128, result); - - return "sxbr"; } -static const HChar * +static void s390_irgen_TCEB(UChar r1, IRTemp op2addr) { IRTemp value = newTemp(Ity_F32); @@ -15026,11 +13379,9 @@ s390_irgen_TCEB(UChar r1, IRTemp op2addr) assign(value, get_fpr_w0(r1)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_TDC_32, value, op2addr); - - return "tceb"; } -static const HChar * +static void s390_irgen_TCDB(UChar r1, IRTemp op2addr) { IRTemp value = newTemp(Ity_F64); @@ -15038,75 +13389,61 @@ s390_irgen_TCDB(UChar r1, IRTemp op2addr) assign(value, get_fpr_dw0(r1)); s390_cc_thunk_putFZ(S390_CC_OP_BFP_TDC_64, value, op2addr); - - return "tcdb"; } -static const HChar * +static void s390_irgen_TCXB(UChar r1, IRTemp op2addr) { - s390_insn_assert("tcxb", is_valid_fpr_pair(r1)); + s390_insn_assert(is_valid_fpr_pair(r1)); IRTemp value = newTemp(Ity_F128); assign(value, get_fpr_pair(r1)); s390_cc_thunk_put1f128Z(S390_CC_OP_BFP_TDC_128, value, op2addr); - - return "tcxb"; } -static const HChar * +static void s390_irgen_LCDFR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); assign(result, unop(Iop_NegF64, get_fpr_dw0(r2))); put_fpr_dw0(r1, mkexpr(result)); - - return "lcdfr"; } -static const HChar * +static void s390_irgen_LNDFR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); assign(result, unop(Iop_NegF64, unop(Iop_AbsF64, get_fpr_dw0(r2)))); put_fpr_dw0(r1, mkexpr(result)); - - return "lndfr"; } -static const HChar * +static void s390_irgen_LPDFR(UChar r1, UChar r2) { IRTemp result = newTemp(Ity_F64); assign(result, unop(Iop_AbsF64, get_fpr_dw0(r2))); put_fpr_dw0(r1, mkexpr(result)); - - return "lpdfr"; } -static const HChar * +static void s390_irgen_LDGR(UChar r1, UChar r2) { put_fpr_dw0(r1, unop(Iop_ReinterpI64asF64, get_gpr_dw0(r2))); - - return "ldgr"; } -static const HChar * +static void s390_irgen_LGDR(UChar r1, UChar r2) { put_gpr_dw0(r1, unop(Iop_ReinterpF64asI64, get_fpr_dw0(r2))); - - return "lgdr"; } -static const HChar * +static void s390_irgen_CPSDR(UChar r3, UChar r1, UChar r2) { IRTemp sign = newTemp(Ity_I64); @@ -15118,8 +13455,6 @@ s390_irgen_CPSDR(UChar r3, UChar r1, UChar r2) mkU64((1ULL << 63) - 1))); put_fpr_dw0(r1, unop(Iop_ReinterpI64asF64, binop(Iop_Or64, mkexpr(value), mkexpr(sign)))); - - return "cpsdr"; } @@ -15138,20 +13473,16 @@ s390_call_cvb(IRExpr *in) return call; } -static const HChar * +static void s390_irgen_CVB(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, s390_call_cvb(load(Ity_I64, mkexpr(op2addr)))); - - return "cvb"; } -static const HChar * +static void s390_irgen_CVBY(UChar r1, IRTemp op2addr) { put_gpr_w1(r1, s390_call_cvb(load(Ity_I64, mkexpr(op2addr)))); - - return "cvby"; } @@ -15170,26 +13501,22 @@ s390_call_cvd(IRExpr *in) return call; } -static const HChar * +static void s390_irgen_CVD(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), s390_call_cvd(unop(Iop_32Uto64, get_gpr_w1(r1)))); - - return "cvd"; } -static const HChar * +static void s390_irgen_CVDY(UChar r1, IRTemp op2addr) { store(mkexpr(op2addr), s390_call_cvd(get_gpr_w1(r1))); - - return "cvdy"; } -static const HChar * +static void s390_irgen_FLOGR(UChar r1, UChar r2) { - s390_insn_assert("flogr", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp input = newTemp(Ity_I64); IRTemp num = newTemp(Ity_I64); @@ -15227,14 +13554,12 @@ s390_irgen_FLOGR(UChar r1, UChar r2) /* Compare the original value as an unsigned integer with 0. */ s390_cc_thunk_put2(S390_CC_OP_UNSIGNED_COMPARE, input, mktemp(Ity_I64, mkU64(0)), False); - - return "flogr"; } -static const HChar * +static void s390_irgen_POPCNT(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("popcnt", (m3 & 7) == 0); + s390_insn_assert((m3 & 7) == 0); static const ULong masks[] = { 0x5555555555555555, 0x3333333333333333, 0x0F0F0F0F0F0F0F0F, @@ -15262,10 +13587,9 @@ s390_irgen_POPCNT(UChar m3, UChar r1, UChar r2) } s390_cc_thunk_putZ(S390_CC_OP_BITWISE, val); put_gpr_dw0(r1, mkexpr(val)); - return "popcnt"; } -static const HChar * +static void s390_irgen_STCK(IRTemp op2addr) { IRDirty *d; @@ -15279,10 +13603,9 @@ s390_irgen_STCK(IRTemp op2addr) d->mSize = 8; stmt(IRStmt_Dirty(d)); s390_cc_set(cc); - return "stck"; } -static const HChar * +static void s390_irgen_STCKF(IRTemp op2addr) { IRTemp cc = newTemp(Ity_I64); @@ -15295,10 +13618,9 @@ s390_irgen_STCKF(IRTemp op2addr) d->mSize = 8; stmt(IRStmt_Dirty(d)); s390_cc_set(cc); - return "stckf"; } -static const HChar * +static void s390_irgen_STCKE(IRTemp op2addr) { IRDirty *d; @@ -15312,20 +13634,18 @@ s390_irgen_STCKE(IRTemp op2addr) d->mSize = 16; stmt(IRStmt_Dirty(d)); s390_cc_set(cc); - return "stcke"; } -static const HChar * +static void s390_irgen_STFLE(UChar b2, UShort d2) { extension(S390_EXT_STFLE, b2 | (d2 << 8)); - return "stfle"; } -static const HChar * +static void s390_irgen_CKSM(UChar r1,UChar r2) { - s390_insn_assert("cksm", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r2)); IRTemp addr = newTemp(Ity_I64); IRTemp op = newTemp(Ity_I32); @@ -15384,14 +13704,12 @@ s390_irgen_CKSM(UChar r1,UChar r2) put_gpr_dw0(r2+1, binop(Iop_Sub64, mkexpr(len), mkexpr(inc))); iterate_if(binop(Iop_CmpNE64, mkexpr(len), mkU64(0))); - - return "cksm"; } -static const HChar * +static void s390_irgen_TROO(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("troo", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp src_addr, des_addr, tab_addr, src_len, test_byte; src_addr = newTemp(Ity_I64); @@ -15433,14 +13751,12 @@ s390_irgen_TROO(UChar m3, UChar r1, UChar r2) put_gpr_dw0(r1+1, binop(Iop_Sub64, mkexpr(src_len), mkU64(1))); iterate(); - - return "troo"; } -static const HChar * +static void s390_irgen_TRTO(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("trto", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp src_addr, des_addr, tab_addr, src_len, test_byte; src_addr = newTemp(Ity_I64); @@ -15483,14 +13799,12 @@ s390_irgen_TRTO(UChar m3, UChar r1, UChar r2) put_gpr_dw0(r1+1, binop(Iop_Sub64, mkexpr(src_len), mkU64(2))); iterate(); - - return "trto"; } -static const HChar * +static void s390_irgen_TROT(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("trot", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp src_addr, des_addr, tab_addr, src_len, test_byte; src_addr = newTemp(Ity_I64); @@ -15532,14 +13846,12 @@ s390_irgen_TROT(UChar m3, UChar r1, UChar r2) put_gpr_dw0(r1+1, binop(Iop_Sub64, mkexpr(src_len), mkU64(1))); iterate(); - - return "trot"; } -static const HChar * +static void s390_irgen_TRTT(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("trtt", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp src_addr, des_addr, tab_addr, src_len, test_byte; src_addr = newTemp(Ity_I64); @@ -15582,25 +13894,21 @@ s390_irgen_TRTT(UChar m3, UChar r1, UChar r2) put_gpr_dw0(r1+1, binop(Iop_Sub64, mkexpr(src_len), mkU64(2))); iterate(); - - return "trtt"; } -static const HChar * +static void s390_irgen_TR(UChar length, IRTemp start1, IRTemp start2) { IRTemp len = newTemp(Ity_I64); assign(len, mkU64(length)); s390_irgen_TR_EX(len, start1, start2); - - return "tr"; } -static const HChar * +static void s390_irgen_TRE(UChar r1,UChar r2) { - s390_insn_assert("tre", is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r1)); IRTemp src_addr, tab_addr, src_len, test_byte; src_addr = newTemp(Ity_I64); @@ -15637,8 +13945,6 @@ s390_irgen_TRE(UChar r1,UChar r2) put_gpr_dw0(r1+1, binop(Iop_Sub64, mkexpr(src_len), mkU64(1))); iterate(); - - return "tre"; } static IRExpr * @@ -15655,11 +13961,11 @@ s390_call_cu21(IRExpr *srcval, IRExpr *low_surrogate) return call; } -static const HChar * +static void s390_irgen_CU21(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("cu21", is_valid_gpr_pair(r1)); - s390_insn_assert("cu21", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); IRTemp addr1 = newTemp(Ity_I64); IRTemp addr2 = newTemp(Ity_I64); @@ -15767,8 +14073,6 @@ s390_irgen_CU21(UChar m3, UChar r1, UChar r2) put_gpr_dw0(r1 + 1, binop(Iop_Sub64, mkexpr(len1), mkexpr(num_bytes))); iterate(); - - return "cu21"; } static IRExpr * @@ -15785,11 +14089,11 @@ s390_call_cu24(IRExpr *srcval, IRExpr *low_surrogate) return call; } -static const HChar * +static void s390_irgen_CU24(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("cu24", is_valid_gpr_pair(r1)); - s390_insn_assert("cu24", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); IRTemp addr1 = newTemp(Ity_I64); IRTemp addr2 = newTemp(Ity_I64); @@ -15877,8 +14181,6 @@ s390_irgen_CU24(UChar m3, UChar r1, UChar r2) put_gpr_dw0(r1 + 1, binop(Iop_Sub64, mkexpr(len1), mkU64(4))); iterate(); - - return "cu24"; } static IRExpr * @@ -15895,11 +14197,11 @@ s390_call_cu42(IRExpr *srcval) return call; } -static const HChar * +static void s390_irgen_CU42(UChar r1, UChar r2) { - s390_insn_assert("cu42", is_valid_gpr_pair(r1)); - s390_insn_assert("cu42", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); IRTemp addr1 = newTemp(Ity_I64); IRTemp addr2 = newTemp(Ity_I64); @@ -15974,8 +14276,6 @@ s390_irgen_CU42(UChar r1, UChar r2) put_gpr_dw0(r1 + 1, binop(Iop_Sub64, mkexpr(len1), mkexpr(num_bytes))); iterate(); - - return "cu42"; } static IRExpr * @@ -15992,11 +14292,11 @@ s390_call_cu41(IRExpr *srcval) return call; } -static const HChar * +static void s390_irgen_CU41(UChar r1, UChar r2) { - s390_insn_assert("cu41", is_valid_gpr_pair(r1)); - s390_insn_assert("cu41", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); IRTemp addr1 = newTemp(Ity_I64); IRTemp addr2 = newTemp(Ity_I64); @@ -16068,8 +14368,6 @@ s390_irgen_CU41(UChar r1, UChar r2) put_gpr_dw0(r1 + 1, binop(Iop_Sub64, mkexpr(len1), mkexpr(num_bytes))); iterate(); - - return "cu41"; } static IRExpr * @@ -16242,26 +14540,22 @@ s390_irgen_cu12_cu14(UChar m3, UChar r1, UChar r2, Bool is_cu12) iterate(); } -static const HChar * +static void s390_irgen_CU12(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("cu12", is_valid_gpr_pair(r1)); - s390_insn_assert("cu12", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); s390_irgen_cu12_cu14(m3, r1, r2, /* is_cu12 = */ 1); - - return "cu12"; } -static const HChar * +static void s390_irgen_CU14(UChar m3, UChar r1, UChar r2) { - s390_insn_assert("cu14", is_valid_gpr_pair(r1)); - s390_insn_assert("cu14", is_valid_gpr_pair(r2)); + s390_insn_assert(is_valid_gpr_pair(r1)); + s390_insn_assert(is_valid_gpr_pair(r2)); s390_irgen_cu12_cu14(m3, r1, r2, /* is_cu12 = */ 0); - - return "cu14"; } static IRExpr * @@ -16279,139 +14573,114 @@ s390_call_ecag(IRExpr *op2addr) return call; } -static const HChar * +static void s390_irgen_ECAG(UChar r1, UChar r3 __attribute__((unused)), IRTemp op2addr) { put_gpr_dw0(r1, s390_call_ecag(mkexpr(op2addr))); - - return "ecag"; } -static const HChar * +static void s390_irgen_VL(UChar v1, IRTemp op2addr) { put_vr_qw(v1, load(Ity_V128, mkexpr(op2addr))); - - return "vl"; } -static const HChar * +static void s390_irgen_VLR(UChar v1, UChar v2) { put_vr_qw(v1, get_vr_qw(v2)); - - return "vlr"; } -static const HChar * +static void s390_irgen_VST(UChar v1, IRTemp op2addr) { store(mkexpr(op2addr), get_vr_qw(v1)); - - return "vst"; } -static const HChar * +static void s390_irgen_VLREP(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vlrep", m3 <= 3); + s390_insn_assert(m3 <= 3); IRType o2type = s390_vr_get_type(m3); IRExpr* o2 = load(o2type, mkexpr(op2addr)); s390_vr_fill(v1, o2); - return "vlrep"; } -static const HChar * +static void s390_irgen_VLEB(UChar v1, IRTemp op2addr, UChar m3) { /* Specification exception cannot occur. */ IRExpr* o2 = load(Ity_I8, mkexpr(op2addr)); put_vr(v1, Ity_I8, m3, o2); - - return "vleb"; } -static const HChar * +static void s390_irgen_VLEH(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vleh", m3 < 8); + s390_insn_assert(m3 < 8); IRExpr* o2 = load(Ity_I16, mkexpr(op2addr)); put_vr(v1, Ity_I16, m3, o2); - - return "vleh"; } -static const HChar * +static void s390_irgen_VLEF(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vlef", m3 < 4); + s390_insn_assert(m3 < 4); IRExpr* o2 = load(Ity_I32, mkexpr(op2addr)); put_vr(v1, Ity_I32, m3, o2); - - return "vlef"; } -static const HChar * +static void s390_irgen_VLEG(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vleg", m3 < 2); + s390_insn_assert(m3 < 2); IRExpr* o2 = load(Ity_I64, mkexpr(op2addr)); put_vr(v1, Ity_I64, m3, o2); - - return "vleg"; } -static const HChar * +static void s390_irgen_VLEIB(UChar v1, UShort i2, UChar m3) { /* Specification exception cannot occur. */ IRExpr* o2 = unop(Iop_16to8, mkU16(i2)); put_vr(v1, Ity_I8, m3, o2); - - return "vleib"; } -static const HChar * +static void s390_irgen_VLEIH(UChar v1, UShort i2, UChar m3) { - s390_insn_assert("vleih", m3 < 8); + s390_insn_assert(m3 < 8); IRExpr* o2 = mkU16(i2); put_vr(v1, Ity_I16, m3, o2); - - return "vleih"; } -static const HChar * +static void s390_irgen_VLEIF(UChar v1, UShort i2, UChar m3) { - s390_insn_assert("vleif", m3 < 4); + s390_insn_assert(m3 < 4); IRExpr* o2 = unop(Iop_16Sto32, mkU16(i2)); put_vr(v1, Ity_I32, m3, o2); - - return "vleif"; } -static const HChar * +static void s390_irgen_VLEIG(UChar v1, UShort i2, UChar m3) { - s390_insn_assert("vleig", m3 < 2); + s390_insn_assert(m3 < 2); IRExpr* o2 = unop(Iop_16Sto64, mkU16(i2)); put_vr(v1, Ity_I64, m3, o2); - - return "vleig"; } -static const HChar * +static void s390_irgen_VLGV(UChar r1, IRTemp op2addr, UChar v3, UChar m4) { - s390_insn_assert("vlgv", m4 <= 3); + s390_insn_assert(m4 <= 3); IRType o2type = s390_vr_get_type(m4); IRExpr* index = unop(Iop_64to8, binop(Iop_And64, mkexpr(op2addr), mkU64(0xf))); @@ -16439,21 +14708,18 @@ s390_irgen_VLGV(UChar r1, IRTemp op2addr, UChar v3, UChar m4) } put_gpr_dw0(r1, result); - return "vlgv"; } -static const HChar * +static void s390_irgen_VGBM(UChar v1, UShort i2) { put_vr_qw(v1, mkV128(i2)); - - return "vgbm"; } -static const HChar * +static void s390_irgen_VGM(UChar v1, UChar i2, UChar i3, UChar m4) { - s390_insn_assert("vgm", m4 <= 3); + s390_insn_assert(m4 <= 3); UChar max_idx = (8 << m4) - 1; UChar from = max_idx & i2; @@ -16487,13 +14753,12 @@ s390_irgen_VGM(UChar v1, UChar i2, UChar i3, UChar m4) } s390_vr_fill(v1, fillValue); - return "vgm"; } -static const HChar * +static void s390_irgen_VLLEZ(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vllez", m3 <= 3 || m3 == 6); + s390_insn_assert(m3 <= 3 || m3 == 6); IRType type = s390_vr_get_type(m3 & 3); IRExpr* op2 = load(type, mkexpr(op2addr)); @@ -16523,32 +14788,29 @@ s390_irgen_VLLEZ(UChar v1, IRTemp op2addr, UChar m3) put_vr_dw0(v1, op2as64bit); } put_vr_dw1(v1, mkU64(0)); - return "vllez"; } -static const HChar * +static void s390_irgen_VGEF(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vgef", m3 < 4); + s390_insn_assert(m3 < 4); put_vr(v1, Ity_I32, m3, load(Ity_I32, mkexpr(op2addr))); - return "vgef"; } -static const HChar * +static void s390_irgen_VGEG(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vgeg", m3 < 2); + s390_insn_assert(m3 < 2); put_vr(v1, Ity_I64, m3, load(Ity_I64, mkexpr(op2addr))); - return "vgeg"; } -static const HChar * +static void s390_irgen_VLM(UChar v1, IRTemp op2addr, UChar v3) { - s390_insn_assert("vlm", v3 >= v1); - s390_insn_assert("vlm", v3 - v1 <= 16); + s390_insn_assert(v3 >= v1); + s390_insn_assert(v3 - v1 <= 16); IRExpr* current = mkexpr(op2addr); @@ -16557,22 +14819,18 @@ s390_irgen_VLM(UChar v1, IRTemp op2addr, UChar v3) put_vr_qw(vr, load(Ity_V128, current)); current = next; } - - return "vlm"; } -static const HChar * +static void s390_irgen_VLVGP(UChar v1, UChar r2, UChar r3) { put_vr_qw(v1, binop(Iop_64HLtoV128, get_gpr_dw0(r2), get_gpr_dw0(r3))); - - return "vlvgp"; } -static const HChar * +static void s390_irgen_VLVG(UChar v1, IRTemp op2addr, UChar r3, UChar m4) { - s390_insn_assert("vlvg", m4 <= 3); + s390_insn_assert(m4 <= 3); IRType type = s390_vr_get_type(m4); IRExpr* index = unop(Iop_64to8, mkexpr(op2addr)); @@ -16598,85 +14856,73 @@ s390_irgen_VLVG(UChar v1, IRTemp op2addr, UChar r3, UChar m4) default: vpanic("s390_irgen_VLVG: unknown type"); } - - return "vlvg"; } -static const HChar * +static void s390_irgen_VMRH(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmrh", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_InterleaveHI8x16, Iop_InterleaveHI16x8, Iop_InterleaveHI32x4, Iop_InterleaveHI64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmrh"; } -static const HChar * +static void s390_irgen_VMRL(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmrl", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_InterleaveLO8x16, Iop_InterleaveLO16x8, Iop_InterleaveLO32x4, Iop_InterleaveLO64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmrl"; } -static const HChar * +static void s390_irgen_VPK(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vpk", m4 >= 1 && m4 <= 3); + s390_insn_assert(m4 >= 1 && m4 <= 3); const IROp ops[] = { Iop_NarrowBin16to8x16, Iop_NarrowBin32to16x8, Iop_NarrowBin64to32x4 }; Char index = m4 - 1; put_vr_qw(v1, binop(ops[index], get_vr_qw(v2), get_vr_qw(v3))); - return "vpk"; } -static const HChar * +static void s390_irgen_VPERM(UChar v1, UChar v2, UChar v3, UChar v4) { put_vr_qw(v1, triop(Iop_Perm8x16x2, get_vr_qw(v2), get_vr_qw(v3), get_vr_qw(v4))); - - return "vperm"; } -static const HChar * +static void s390_irgen_VSCEF(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vscef", m3 < 4); + s390_insn_assert(m3 < 4); store(mkexpr(op2addr), get_vr(v1, Ity_I32, m3)); - return "vscef"; } -static const HChar * +static void s390_irgen_VSCEG(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vsceg", m3 < 2); + s390_insn_assert(m3 < 2); store(mkexpr(op2addr), get_vr(v1, Ity_I64, m3)); - return "vsceg"; } -static const HChar * +static void s390_irgen_VPDI(UChar v1, UChar v2, UChar v3, UChar m4) { put_vr_qw(v1, binop(Iop_64HLtoV128, m4 & 4 ? get_vr_dw1(v2) : get_vr_dw0(v2), m4 & 1 ? get_vr_dw1(v3) : get_vr_dw0(v3))); - return "vpdi"; } -static const HChar * +static void s390_irgen_VSEG(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vseg", m3 <= 2); + s390_insn_assert(m3 <= 2); IRType type = s390_vr_get_type(m3); switch(type) { @@ -16696,54 +14942,44 @@ s390_irgen_VSEG(UChar v1, UChar v2, UChar m3) ppIRType(type); vpanic("s390_irgen_VSEG: unknown type"); } - - return "vseg"; } -static const HChar * +static void s390_irgen_VSTEB(UChar v1, IRTemp op2addr, UChar m3) { /* Specification exception cannot occur. */ store(mkexpr(op2addr), get_vr(v1, Ity_I8, m3)); - - return "vsteb"; } -static const HChar * +static void s390_irgen_VSTEH(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vsteh", m3 < 8); + s390_insn_assert(m3 < 8); store(mkexpr(op2addr), get_vr(v1, Ity_I16, m3)); - - return "vsteh"; } -static const HChar * +static void s390_irgen_VSTEF(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vstef", m3 < 8); + s390_insn_assert(m3 < 8); store(mkexpr(op2addr), get_vr(v1, Ity_I32, m3)); - - return "vstef"; } -static const HChar * +static void s390_irgen_VSTEG(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert("vsteg", m3 < 2); + s390_insn_assert(m3 < 2); store(mkexpr(op2addr), get_vr(v1, Ity_I64, m3)); - - return "vsteg"; } -static const HChar * +static void s390_irgen_VSTM(UChar v1, IRTemp op2addr, UChar v3) { - s390_insn_assert("vstm", v3 >= v1); - s390_insn_assert("vstm", v3 - v1 <= 16); + s390_insn_assert(v3 >= v1); + s390_insn_assert(v3 - v1 <= 16); IRExpr* current = mkexpr(op2addr); @@ -16752,71 +14988,60 @@ s390_irgen_VSTM(UChar v1, IRTemp op2addr, UChar v3) store(current, get_vr_qw(vr)); current = next; } - - return "vstm"; } -static const HChar * +static void s390_irgen_VUPH(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vuph", m3 <= 2); + s390_insn_assert(m3 <= 2); const IROp ops[] = { Iop_Widen8Sto16x8, Iop_Widen16Sto32x4, Iop_Widen32Sto64x2 }; put_vr_qw(v1, unop(ops[m3], get_vr_dw0(v2))); - - return "vuph"; } -static const HChar * +static void s390_irgen_VUPLH(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vuplh", m3 <= 2); + s390_insn_assert(m3 <= 2); const IROp ops[] = { Iop_Widen8Uto16x8, Iop_Widen16Uto32x4, Iop_Widen32Uto64x2 }; put_vr_qw(v1, unop(ops[m3], get_vr_dw0(v2))); - return "vuplh"; } -static const HChar * +static void s390_irgen_VUPL(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vupl", m3 <= 2); + s390_insn_assert(m3 <= 2); const IROp ops[] = { Iop_Widen8Sto16x8, Iop_Widen16Sto32x4, Iop_Widen32Sto64x2 }; put_vr_qw(v1, unop(ops[m3], get_vr_dw1(v2))); - - return "vupl"; } -static const HChar * +static void s390_irgen_VUPLL(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vupll", m3 <= 2); + s390_insn_assert(m3 <= 2); const IROp ops[] = { Iop_Widen8Uto16x8, Iop_Widen16Uto32x4, Iop_Widen32Uto64x2 }; put_vr_qw(v1, unop(ops[m3], get_vr_dw1(v2))); - - return "vupll"; } -static const HChar * +static void s390_irgen_VREP(UChar v1, UChar v3, UShort i2, UChar m4) { - s390_insn_assert("vrep", m4 <= 3); - s390_insn_assert("vrep", (m4 == 0 && i2 < 16) || (m4 == 1 && i2 < 8) || + s390_insn_assert(m4 <= 3); + s390_insn_assert((m4 == 0 && i2 < 16) || (m4 == 1 && i2 < 8) || (m4 == 2 && i2 < 4) || (m4 == 3 && i2 < 2)); IRType type = s390_vr_get_type(m4); IRExpr* arg = get_vr(v3, type, i2); s390_vr_fill(v1, arg); - - return "vrep"; } -static const HChar * +static void s390_irgen_VREPI(UChar v1, UShort i2, UChar m3) { - s390_insn_assert("vrepi", m3 <= 3); + s390_insn_assert(m3 <= 3); IRType type = s390_vr_get_type(m3); IRExpr *value; @@ -16838,14 +15063,12 @@ s390_irgen_VREPI(UChar v1, UShort i2, UChar m3) vpanic("s390_irgen_VREPI: unknown type"); } s390_vr_fill(v1, value); - - return "vrepi"; } -static const HChar * +static void s390_irgen_VPKS(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vpks", m4 >= 1 && m4 <= 3); + s390_insn_assert(m4 >= 1 && m4 <= 3); if (!s390_vr_is_cs_set(m5)) { const IROp ops[] = { Iop_QNarrowBin16Sto8Sx16, Iop_QNarrowBin32Sto16Sx8, @@ -16885,14 +15108,12 @@ s390_irgen_VPKS(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) stmt(IRStmt_Dirty(d)); s390_cc_set(cc); } - - return "vpks"; } -static const HChar * +static void s390_irgen_VPKLS(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vpkls", m4 >= 1 && m4 <= 3); + s390_insn_assert(m4 >= 1 && m4 <= 3); if (!s390_vr_is_cs_set(m5)) { const IROp ops[] = { Iop_QNarrowBin16Uto8Ux16, Iop_QNarrowBin32Uto16Ux8, @@ -16932,11 +15153,9 @@ s390_irgen_VPKLS(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) stmt(IRStmt_Dirty(d)); s390_cc_set(cc); } - - return "vpkls"; } -static const HChar * +static void s390_irgen_VSEL(UChar v1, UChar v2, UChar v3, UChar v4) { IRExpr* vIfTrue = get_vr_qw(v2); @@ -16944,190 +15163,160 @@ s390_irgen_VSEL(UChar v1, UChar v2, UChar v3, UChar v4) IRExpr* vCond = get_vr_qw(v4); put_vr_qw(v1, s390_V128_bitwiseITE(vCond, vIfTrue, vIfFalse)); - return "vsel"; } -static const HChar * +static void s390_irgen_VLBB(UChar v1, IRTemp addr, UChar m3) { - s390_insn_assert("vlbb", m3 <= 6); + s390_insn_assert(m3 <= 6); IRExpr* maxIndex = binop(Iop_Sub32, s390_getCountToBlockBoundary(addr, m3), mkU32(1)); s390_vr_loadWithLength(v1, addr, maxIndex, False); - - return "vlbb"; } -static const HChar * +static void s390_irgen_VLL(UChar v1, IRTemp addr, UChar r3) { s390_vr_loadWithLength(v1, addr, get_gpr_w1(r3), False); - - return "vll"; } -static const HChar * +static void s390_irgen_VLRL(UChar v1, IRTemp addr, UChar i3) { if (! s390_host_has_vxd) { emulation_failure(EmFail_S390X_vxd); - return "vlrl"; + return; } - s390_insn_assert("vlrl", (i3 & 0xf0) == 0); + s390_insn_assert((i3 & 0xf0) == 0); s390_vr_loadWithLength(v1, addr, mkU32((UInt) i3), True); - - return "vlrl"; } -static const HChar * +static void s390_irgen_VLRLR(UChar v1, UChar r3, IRTemp addr) { if (! s390_host_has_vxd) { emulation_failure(EmFail_S390X_vxd); - return "vlrlr"; + return; } s390_vr_loadWithLength(v1, addr, get_gpr_w1(r3), True); - - return "vlrlr"; } -static const HChar * +static void s390_irgen_VSTL(UChar v1, IRTemp addr, UChar r3) { s390_vr_storeWithLength(v1, addr, get_gpr_w1(r3), False); - return "vstl"; } -static const HChar * +static void s390_irgen_VSTRL(UChar v1, IRTemp addr, UChar i3) { if (! s390_host_has_vxd) { emulation_failure(EmFail_S390X_vxd); - return "vstrl"; + return; } - s390_insn_assert("vstrl", (i3 & 0xf0) == 0); + s390_insn_assert((i3 & 0xf0) == 0); s390_vr_storeWithLength(v1, addr, mkU32((UInt) i3), True); - return "vstrl"; } -static const HChar * +static void s390_irgen_VSTRLR(UChar v1, UChar r3, IRTemp addr) { if (! s390_host_has_vxd) { emulation_failure(EmFail_S390X_vxd); - return "vstrlr"; + return; } s390_vr_storeWithLength(v1, addr, get_gpr_w1(r3), True); - return "vstrlr"; } -static const HChar * +static void s390_irgen_VX(UChar v1, UChar v2, UChar v3) { put_vr_qw(v1, binop(Iop_XorV128, get_vr_qw(v2), get_vr_qw(v3))); - - return "vx"; } -static const HChar * +static void s390_irgen_VN(UChar v1, UChar v2, UChar v3) { put_vr_qw(v1, binop(Iop_AndV128, get_vr_qw(v2), get_vr_qw(v3))); - - return "vn"; } -static const HChar * +static void s390_irgen_VO(UChar v1, UChar v2, UChar v3) { put_vr_qw(v1, binop(Iop_OrV128, get_vr_qw(v2), get_vr_qw(v3))); - - return "vo"; } -static const HChar * +static void s390_irgen_VOC(UChar v1, UChar v2, UChar v3) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "voc"; + return; } put_vr_qw(v1, binop(Iop_OrV128, get_vr_qw(v2), unop(Iop_NotV128, get_vr_qw(v3)))); - - return "voc"; } -static const HChar * +static void s390_irgen_VNN(UChar v1, UChar v2, UChar v3) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vnn"; + return; } put_vr_qw(v1, unop(Iop_NotV128, binop(Iop_AndV128, get_vr_qw(v2), get_vr_qw(v3)))); - - return "vnn"; } -static const HChar * +static void s390_irgen_VNO(UChar v1, UChar v2, UChar v3) { put_vr_qw(v1, unop(Iop_NotV128, binop(Iop_OrV128, get_vr_qw(v2), get_vr_qw(v3)))); - - return "vno"; } -static const HChar * +static void s390_irgen_VNX(UChar v1, UChar v2, UChar v3) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vnx"; + return; } put_vr_qw(v1, unop(Iop_NotV128, binop(Iop_XorV128, get_vr_qw(v2), get_vr_qw(v3)))); - - return "vnx"; } -static const HChar * +static void s390_irgen_LZRF(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I32); assign(op2, binop(Iop_And32, load(Ity_I32, mkexpr(op2addr)), mkU32(0xffffff00))); put_gpr_w1(r1, mkexpr(op2)); - - return "lzrf"; } -static const HChar * +static void s390_irgen_LZRG(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I64); assign(op2, binop(Iop_And64, load(Ity_I64, mkexpr(op2addr)), mkU64(0xffffffffffffff00UL))); put_gpr_dw0(r1, mkexpr(op2)); - - return "lzrg"; } -static const HChar * +static void s390_irgen_LLZRGF(UChar r1, IRTemp op2addr) { IRTemp op2 = newTemp(Ity_I32); @@ -17135,68 +15324,54 @@ s390_irgen_LLZRGF(UChar r1, IRTemp op2addr) assign(op2, binop(Iop_And32, load(Ity_I32, mkexpr(op2addr)), mkU32(0xffffff00))); put_gpr_w1(r1, mkexpr(op2)); put_gpr_w0(r1, mkU32(0)); - - return "llzrgf"; } -static const HChar * +static void s390_irgen_LOCFH(UChar r1, IRTemp op2addr) { /* condition is checked in format handler */ put_gpr_w0(r1, load(Ity_I32, mkexpr(op2addr))); - - return "locfh"; } -static const HChar * +static void s390_irgen_LOCFHR(UChar m3, UChar r1, UChar r2) { next_insn_if(binop(Iop_CmpEQ32, s390_call_calculate_cond(m3), mkU32(0))); put_gpr_w0(r1, get_gpr_w0(r2)); - - return "locfhr"; } -static const HChar * +static void s390_irgen_LOCHHI(UChar r1, UChar m3, UShort i2) { next_insn_if(binop(Iop_CmpEQ32, s390_call_calculate_cond(m3), mkU32(0))); put_gpr_w0(r1, mkU32((UInt)(Int)(Short)i2)); - - return "lochhi"; } -static const HChar * +static void s390_irgen_LOCHI(UChar r1, UChar m3, UShort i2) { next_insn_if(binop(Iop_CmpEQ32, s390_call_calculate_cond(m3), mkU32(0))); put_gpr_w1(r1, mkU32((UInt)(Int)(Short)i2)); - - return "lochi"; } -static const HChar * +static void s390_irgen_LOCGHI(UChar r1, UChar m3, UShort i2) { next_insn_if(binop(Iop_CmpEQ32, s390_call_calculate_cond(m3), mkU32(0))); put_gpr_dw0(r1, mkU64((ULong)(Long)(Short)i2)); - - return "locghi"; } -static const HChar * +static void s390_irgen_STOCFH(UChar r1, IRTemp op2addr) { /* condition is checked in format handler */ store(mkexpr(op2addr), get_gpr_w1(r1)); - - return "stocfh"; } -static const HChar * +static void s390_irgen_LCBB(UChar r1, IRTemp op2addr, UChar m3) { - s390_insn_assert("lcbb", m3 <= 6); + s390_insn_assert(m3 <= 6); IRTemp op2 = newTemp(Ity_I32); assign(op2, s390_getCountToBlockBoundary(op2addr, m3)); @@ -17204,39 +15379,35 @@ s390_irgen_LCBB(UChar r1, IRTemp op2addr, UChar m3) IRExpr* cc = mkite(binop(Iop_CmpEQ32, mkexpr(op2), mkU32(16)), mkU64(0), mkU64(3)); s390_cc_thunk_fill(mkU64(S390_CC_OP_SET), cc, mkU64(0), mkU64(0)); - - return "lcbb"; } -static const HChar * +static void s390_irgen_PRNO(UChar r1, UChar r2) { if (!s390_host_has_msa5) { emulation_failure(EmFail_S390X_prno); - return "prno"; + return; } /* Check for obvious specification exceptions */ - s390_insn_assert("prno", r1 % 2 == 0 && r2 % 2 == 0 && r1 != 0 && r2 != 0); + s390_insn_assert(r1 % 2 == 0 && r2 % 2 == 0 && r1 != 0 && r2 != 0); extension(S390_EXT_PRNO, r1 | (r2 << 4)); - return "prno"; } -static const HChar * +static void s390_irgen_DFLTCC(UChar r3, UChar r1, UChar r2) { if (!s390_host_has_dflt) { emulation_failure(EmFail_S390X_dflt); - return "dfltcc"; + return; } /* Check for obvious specification exceptions */ - s390_insn_assert("dfltcc", r1 % 2 == 0 && r1 != 0 && + s390_insn_assert(r1 % 2 == 0 && r1 != 0 && r2 % 2 == 0 && r2 != 0 && r3 >= 2); extension(S390_EXT_DFLT, r1 | (r2 << 4) | (r3 << 8)); - return "dfltcc"; } enum s390_VStrX { @@ -17425,26 +15596,24 @@ s390_irgen_VStrX(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, dis_res->hint = Dis_HintVerbose; } -static const HChar * +static void s390_irgen_VFAE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vfae", m4 <= 2); + s390_insn_assert(m4 <= 2); s390_irgen_VStrX(v1, v2, v3, 255, m4, m5, s390_VStrX_VFAE); - return "vfae"; } -static const HChar * +static void s390_irgen_VFEE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vfee", m4 < 3 && m5 == (m5 & 3)); + s390_insn_assert(m4 < 3 && m5 == (m5 & 3)); s390_irgen_VStrX(v1, v2, v3, 255, m4, m5, s390_VStrX_VFEE); - return "vfee"; } -static const HChar * +static void s390_irgen_VFENE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vfene", m4 < 3 && m5 == (m5 & 3)); + s390_insn_assert(m4 < 3 && m5 == (m5 & 3)); static const IROp compare_op[3] = { Iop_CmpEQ8x16, Iop_CmpEQ16x8, Iop_CmpEQ32x4 @@ -17524,13 +15693,12 @@ s390_irgen_VFENE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) s390_cc_set(cc); } dis_res->hint = Dis_HintVerbose; - return "vfene"; } -static const HChar * +static void s390_irgen_VISTR(UChar v1, UChar v2, UChar m3, UChar m5) { - s390_insn_assert("vistr", m3 < 3 && m5 == (m5 & 1)); + s390_insn_assert(m3 < 3 && m5 == (m5 & 1)); static const IROp compare_op[3] = { Iop_CmpEQ8x16, Iop_CmpEQ16x8, Iop_CmpEQ32x4 @@ -17558,26 +15726,24 @@ s390_irgen_VISTR(UChar v1, UChar v2, UChar m3, UChar m5) s390_cc_set(cc); } dis_res->hint = Dis_HintVerbose; - return "vistr"; } -static const HChar * +static void s390_irgen_VSTRC(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { - s390_insn_assert("vstrc", m5 <= 2); + s390_insn_assert(m5 <= 2); s390_irgen_VStrX(v1, v2, v3, v4, m5, m6, s390_VStrX_VSTRC); - return "vstrc"; } -static const HChar * +static void s390_irgen_VSTRS(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vstrs"; + return; } - s390_insn_assert("vstrs", m5 <= 2 && m6 == (m6 & 2)); + s390_insn_assert(m5 <= 2 && m6 == (m6 & 2)); IRTemp op2 = newTemp(Ity_V128); IRTemp op3 = newTemp(Ity_V128); @@ -17670,134 +15836,112 @@ s390_irgen_VSTRS(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) s390_cc_set(cc); dis_res->hint = Dis_HintVerbose; - return "vstrs"; } -static const HChar * +static void s390_irgen_VNC(UChar v1, UChar v2, UChar v3) { put_vr_qw(v1, binop(Iop_AndV128, get_vr_qw(v2), unop(Iop_NotV128, get_vr_qw(v3))) ); - - return "vnc"; } -static const HChar * +static void s390_irgen_VA(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("va", m4 <= 4); + s390_insn_assert(m4 <= 4); const IROp ops[] = { Iop_Add8x16, Iop_Add16x8, Iop_Add32x4, Iop_Add64x2, Iop_Add128x1 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "va"; } -static const HChar * +static void s390_irgen_VS(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vs", m4 <= 4); + s390_insn_assert(m4 <= 4); const IROp ops[] = { Iop_Sub8x16, Iop_Sub16x8, Iop_Sub32x4, Iop_Sub64x2, Iop_Sub128x1 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vs"; } -static const HChar * +static void s390_irgen_VMX(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmx", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Max8Sx16, Iop_Max16Sx8, Iop_Max32Sx4, Iop_Max64Sx2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmx"; } -static const HChar * +static void s390_irgen_VMXL(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmxl", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Max8Ux16, Iop_Max16Ux8, Iop_Max32Ux4, Iop_Max64Ux2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmxl"; } -static const HChar * +static void s390_irgen_VMN(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmn", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Min8Sx16, Iop_Min16Sx8, Iop_Min32Sx4, Iop_Min64Sx2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmn"; } -static const HChar * +static void s390_irgen_VMNL(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmnl", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Min8Ux16, Iop_Min16Ux8, Iop_Min32Ux4, Iop_Min64Ux2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmnl"; } -static const HChar * +static void s390_irgen_VAVG(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vavg", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Avg8Sx16, Iop_Avg16Sx8, Iop_Avg32Sx4, Iop_Avg64Sx2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vavg"; } -static const HChar * +static void s390_irgen_VAVGL(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vavgl", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Avg8Ux16, Iop_Avg16Ux8, Iop_Avg32Ux4, Iop_Avg64Ux2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vavgl"; } -static const HChar * +static void s390_irgen_VLC(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vlc", m3 < 4); + s390_insn_assert(m3 < 4); IRType type = s390_vr_get_type(m3); put_vr_qw(v1, s390_V128_get_complement(get_vr_qw(v2), type)); - return "vlc"; } -static const HChar * +static void s390_irgen_VLP(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vlp", m3 <= 3); + s390_insn_assert(m3 <= 3); const IROp ops[] = { Iop_Abs8x16, Iop_Abs16x8, Iop_Abs32x4, Iop_Abs64x2 }; put_vr_qw(v1, unop(ops[m3], get_vr_qw(v2))); - - return "vlp"; } -static const HChar * +static void s390_irgen_VCH(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vch", m4 <= 3); + s390_insn_assert(m4 <= 3); if (!s390_vr_is_cs_set(m5)) { const IROp ops[] = { Iop_CmpGT8Sx16, Iop_CmpGT16Sx8, Iop_CmpGT32Sx4, @@ -17836,14 +15980,12 @@ s390_irgen_VCH(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) stmt(IRStmt_Dirty(d)); s390_cc_set(cc); } - - return "vch"; } -static const HChar * +static void s390_irgen_VCHL(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vchl", m4 <= 3); + s390_insn_assert(m4 <= 3); if (!s390_vr_is_cs_set(m5)) { const IROp ops[] = { Iop_CmpGT8Ux16, Iop_CmpGT16Ux8, Iop_CmpGT32Ux4, @@ -17882,36 +16024,30 @@ s390_irgen_VCHL(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) stmt(IRStmt_Dirty(d)); s390_cc_set(cc); } - - return "vchl"; } -static const HChar * +static void s390_irgen_VCLZ(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vclz", m3 <= 3); + s390_insn_assert(m3 <= 3); const IROp ops[] = { Iop_Clz8x16, Iop_Clz16x8, Iop_Clz32x4, Iop_Clz64x2 }; put_vr_qw(v1, unop(ops[m3], get_vr_qw(v2))); - - return "vclz"; } -static const HChar * +static void s390_irgen_VCTZ(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vctz", m3 <= 3); + s390_insn_assert(m3 <= 3); const IROp ops[] = { Iop_Ctz8x16, Iop_Ctz16x8, Iop_Ctz32x4, Iop_Ctz64x2 }; put_vr_qw(v1, unop(ops[m3], get_vr_qw(v2))); - - return "vctz"; } -static const HChar * +static void s390_irgen_VPOPCT(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vpopct", m3 <= 3); + s390_insn_assert(m3 <= 3); IRExpr* cnt = unop(Iop_Cnt8x16, get_vr_qw(v2)); @@ -17924,149 +16060,123 @@ s390_irgen_VPOPCT(UChar v1, UChar v2, UChar m3) } } put_vr_qw(v1, cnt); - - return "vpopct"; } -static const HChar * +static void s390_irgen_VML(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vml", m4 <= 2); + s390_insn_assert(m4 <= 2); const IROp ops[] = { Iop_Mul8x16, Iop_Mul16x8, Iop_Mul32x4 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vml"; } -static const HChar * +static void s390_irgen_VMLH(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmlh", m4 <= 2); + s390_insn_assert(m4 <= 2); const IROp ops[] = { Iop_MulHi8Ux16, Iop_MulHi16Ux8, Iop_MulHi32Ux4 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmlh"; } -static const HChar * +static void s390_irgen_VMH(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmh", m4 <= 2); + s390_insn_assert(m4 <= 2); const IROp ops[] = { Iop_MulHi8Sx16, Iop_MulHi16Sx8, Iop_MulHi32Sx4 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmh"; } -static const HChar * +static void s390_irgen_VMO(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmo", m4 <= 2); + s390_insn_assert(m4 <= 2); const IROp ops[] = { Iop_MullEven8Sx16, Iop_MullEven16Sx8, Iop_MullEven32Sx4 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmo"; } -static const HChar * +static void s390_irgen_VMLO(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmlo", m4 <= 2); + s390_insn_assert(m4 <= 2); const IROp ops[] = { Iop_MullEven8Ux16, Iop_MullEven16Ux8, Iop_MullEven32Ux4 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vmlo"; } -static const HChar * +static void s390_irgen_VESLV(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vselv", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Shl8x16, Iop_Shl16x8, Iop_Shl32x4, Iop_Shl64x2}; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "veslv"; } -static const HChar * +static void s390_irgen_VESL(UChar v1, IRTemp op2addr, UChar v3, UChar m4) { - s390_insn_assert("vesl", m4 <= 3); + s390_insn_assert(m4 <= 3); IRExpr* shift_amount = unop(Iop_64to8, mkexpr(op2addr)); const IROp ops[] = { Iop_ShlN8x16, Iop_ShlN16x8, Iop_ShlN32x4, Iop_ShlN64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v3), shift_amount)); - - return "vesl"; } -static const HChar * +static void s390_irgen_VESRAV(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vesrav", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Sar8x16, Iop_Sar16x8, Iop_Sar32x4, Iop_Sar64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vesrav"; } -static const HChar * +static void s390_irgen_VESRA(UChar v1, IRTemp op2addr, UChar v3, UChar m4) { - s390_insn_assert("vesra", m4 <= 3); + s390_insn_assert(m4 <= 3); IRExpr* shift_amount = unop(Iop_64to8, mkexpr(op2addr)); const IROp ops[] = { Iop_SarN8x16, Iop_SarN16x8, Iop_SarN32x4, Iop_SarN64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v3), shift_amount)); - - return "vesra"; } -static const HChar * +static void s390_irgen_VESRLV(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vesrlv", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Shr8x16, Iop_Shr16x8, Iop_Shr32x4, Iop_Shr64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "vesrlv"; } -static const HChar * +static void s390_irgen_VESRL(UChar v1, IRTemp op2addr, UChar v3, UChar m4) { - s390_insn_assert("vesrl", m4 <= 3); + s390_insn_assert(m4 <= 3); IRExpr* shift_amount = unop(Iop_64to8, mkexpr(op2addr)); const IROp ops[] = { Iop_ShrN8x16, Iop_ShrN16x8, Iop_ShrN32x4, Iop_ShrN64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v3), shift_amount)); - - return "vesrl"; } -static const HChar * +static void s390_irgen_VERLLV(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("verllv", m4 <= 3); + s390_insn_assert(m4 <= 3); const IROp ops[] = { Iop_Rol8x16, Iop_Rol16x8, Iop_Rol32x4, Iop_Rol64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v2), get_vr_qw(v3))); - - return "verllv"; } -static const HChar * +static void s390_irgen_VERLL(UChar v1, IRTemp op2addr, UChar v3, UChar m4) { - s390_insn_assert("verll", m4 <= 3); + s390_insn_assert(m4 <= 3); /* There is no Iop_RolN?x?? operations so we have to use VECTOR x VECTOR variant. @@ -18074,11 +16184,9 @@ s390_irgen_VERLL(UChar v1, IRTemp op2addr, UChar v3, UChar m4) IRExpr* shift_vector = unop(Iop_Dup8x16, unop(Iop_64to8, mkexpr(op2addr))); const IROp ops[] = { Iop_Rol8x16, Iop_Rol16x8, Iop_Rol32x4, Iop_Rol64x2 }; put_vr_qw(v1, binop(ops[m4], get_vr_qw(v3), shift_vector)); - - return "verll"; } -static const HChar * +static void s390_irgen_VSL(UChar v1, UChar v2, UChar v3) { IRTemp a = newTemp(Ity_V128); @@ -18095,10 +16203,9 @@ s390_irgen_VSL(UChar v1, UChar v2, UChar v3) binop(Iop_ShlV128, mkexpr(a), mkU8(8)), unop(Iop_NotV128, mkexpr(b))), unop(Iop_Dup8x16, mkU8(1))))); - return "vsl"; } -static const HChar * +static void s390_irgen_VSRL(UChar v1, UChar v2, UChar v3) { IRTemp a = newTemp(Ity_V128); @@ -18115,10 +16222,9 @@ s390_irgen_VSRL(UChar v1, UChar v2, UChar v3) binop(Iop_ShrV128, mkexpr(a), mkU8(8)), unop(Iop_NotV128, mkexpr(b))), unop(Iop_Dup8x16, mkU8(1))))); - return "vsrl"; } -static const HChar * +static void s390_irgen_VSRA(UChar v1, UChar v2, UChar v3) { IRTemp a = newTemp(Ity_V128); @@ -18141,13 +16247,12 @@ s390_irgen_VSRA(UChar v1, UChar v2, UChar v3) binop(Iop_ShrV128, mkexpr(a), mkU8(8)), unop(Iop_NotV128, mkexpr(b))), unop(Iop_Dup8x16, mkU8(1))))); - return "vsra"; } -static const HChar * +static void s390_irgen_VERIM(UChar v1, UChar v2, UChar v3, UChar i4, UChar m5) { - s390_insn_assert("verim", m5 <= 3); + s390_insn_assert(m5 <= 3); /* There is no Iop_RolN?x?? operations so we have to use VECTOR x VECTOR variant. @@ -18160,14 +16265,12 @@ s390_irgen_VERIM(UChar v1, UChar v2, UChar v3, UChar i4, UChar m5) IRExpr* mask = get_vr_qw(v3); IRExpr* result = get_vr_qw(v1); put_vr_qw(v1, s390_V128_bitwiseITE(mask, rotated_vector, result)); - - return "verim"; } -static const HChar * +static void s390_irgen_VEC(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vec", m3 <= 3); + s390_insn_assert(m3 <= 3); IRType type = s390_vr_get_type(m3); IRTemp op1 = newTemp(type); @@ -18195,14 +16298,12 @@ s390_irgen_VEC(UChar v1, UChar v2, UChar m3) } s390_cc_thunk_putSS(S390_CC_OP_SIGNED_COMPARE, op1, op2); - - return "vec"; } -static const HChar * +static void s390_irgen_VECL(UChar v1, UChar v2, UChar m3) { - s390_insn_assert("vecl", m3 <= 3); + s390_insn_assert(m3 <= 3); IRType type = s390_vr_get_type(m3); IRTemp op1 = newTemp(type); @@ -18230,14 +16331,12 @@ s390_irgen_VECL(UChar v1, UChar v2, UChar m3) } s390_cc_thunk_putZZ(S390_CC_OP_UNSIGNED_COMPARE, op1, op2); - - return "vecl"; } -static const HChar * +static void s390_irgen_VCEQ(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert("vceq", m4 <= 3); + s390_insn_assert(m4 <= 3); if (!s390_vr_is_cs_set(m5)) { const IROp ops[] = { Iop_CmpEQ8x16, Iop_CmpEQ16x8, Iop_CmpEQ32x4, @@ -18276,41 +16375,36 @@ s390_irgen_VCEQ(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) stmt(IRStmt_Dirty(d)); s390_cc_set(cc); } - - return "vceq"; } -static const HChar * +static void s390_irgen_VSLB(UChar v1, UChar v2, UChar v3) { IRTemp shift_amount = newTemp(Ity_I8); assign(shift_amount, binop(Iop_And8, get_vr_b7(v3), mkU8(0b01111000))); put_vr_qw(v1, binop(Iop_ShlV128, get_vr_qw(v2), mkexpr(shift_amount))); - return "vslb"; } -static const HChar * +static void s390_irgen_VSRLB(UChar v1, UChar v2, UChar v3) { IRTemp shift_amount = newTemp(Ity_I8); assign(shift_amount, binop(Iop_And8, get_vr_b7(v3), mkU8(0b01111000))); put_vr_qw(v1, binop(Iop_ShrV128, get_vr_qw(v2), mkexpr(shift_amount))); - return "vsrlb"; } -static const HChar * +static void s390_irgen_VSRAB(UChar v1, UChar v2, UChar v3) { IRTemp shift_amount = newTemp(Ity_I8); assign(shift_amount, binop(Iop_And8, get_vr_b7(v3), mkU8(0b01111000))); put_vr_qw(v1, binop(Iop_SarV128, get_vr_qw(v2), mkexpr(shift_amount))); - return "vsrab"; } -static const HChar * +static void s390_irgen_VSLDB(UChar v1, UChar v2, UChar v3, UChar i4) { UChar imm = i4 & 0b00001111; @@ -18327,19 +16421,17 @@ s390_irgen_VSLDB(UChar v1, UChar v2, UChar v3, UChar i4) ) ); } - - return "vsldb"; } -static const HChar * +static void s390_irgen_VSLD(UChar v1, UChar v2, UChar v3, UChar i4) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vsld"; + return; } - s390_insn_assert("vsld", i4 <= 7); + s390_insn_assert(i4 <= 7); if (i4 == 0) { /* Just copy v2. */ @@ -18353,19 +16445,17 @@ s390_irgen_VSLD(UChar v1, UChar v2, UChar v3, UChar i4) ) ); } - - return "vsld"; } -static const HChar * +static void s390_irgen_VSRD(UChar v1, UChar v2, UChar v3, UChar i4) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vsrd"; + return; } - s390_insn_assert("vsrd", i4 <= 7); + s390_insn_assert(i4 <= 7); if (i4 == 0) { /* Just copy v3. */ @@ -18379,14 +16469,12 @@ s390_irgen_VSRD(UChar v1, UChar v2, UChar v3, UChar i4) ) ); } - - return "vsrd"; } -static const HChar * +static void s390_irgen_VME(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vme", m4 <= 2); + s390_insn_assert(m4 <= 2); const IROp ops[] = { Iop_MullEven8Sx16, Iop_MullEven16Sx8, Iop_MullEven32Sx4 }; @@ -18396,14 +16484,12 @@ s390_irgen_VME(UChar v1, UChar v2, UChar v3, UChar m4) binop(Iop_ShrV128, get_vr_qw(v3), mkU8(shifts[m4])) ); put_vr_qw(v1, result); - - return "vme"; } -static const HChar * +static void s390_irgen_VMLE(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vmle", m4 <= 2); + s390_insn_assert(m4 <= 2); const IROp ops[] = { Iop_MullEven8Ux16, Iop_MullEven16Ux8, Iop_MullEven32Ux4 }; @@ -18413,14 +16499,12 @@ s390_irgen_VMLE(UChar v1, UChar v2, UChar v3, UChar m4) binop(Iop_ShrV128, get_vr_qw(v3), mkU8(shifts[m4])) ); put_vr_qw(v1, result); - - return "vmle"; } -static const HChar * +static void s390_irgen_VMAO(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vmao", m5 <= 2); + s390_insn_assert(m5 <= 2); const IROp mul_ops[] = { Iop_MullEven8Sx16, Iop_MullEven16Sx8, Iop_MullEven32Sx4 }; @@ -18429,14 +16513,12 @@ s390_irgen_VMAO(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) IRExpr* mul_result = binop(mul_ops[m5], get_vr_qw(v2), get_vr_qw(v3)); IRExpr* result = binop(add_ops[m5], mul_result, get_vr_qw(v4)); put_vr_qw(v1, result); - - return "vmao"; } -static const HChar * +static void s390_irgen_VMALO(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vmalo", m5 <= 2); + s390_insn_assert(m5 <= 2); const IROp mul_ops[] = { Iop_MullEven8Ux16, Iop_MullEven16Ux8, Iop_MullEven32Ux4 }; @@ -18445,14 +16527,12 @@ s390_irgen_VMALO(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) IRExpr* mul_result = binop(mul_ops[m5], get_vr_qw(v2), get_vr_qw(v3)); IRExpr* result = binop(add_ops[m5], mul_result, get_vr_qw(v4)); put_vr_qw(v1, result); - - return "vmalo"; } -static const HChar * +static void s390_irgen_VMAE(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vmae", m5 <= 2); + s390_insn_assert(m5 <= 2); const IROp mul_ops[] = { Iop_MullEven8Sx16, Iop_MullEven16Sx8, Iop_MullEven32Sx4 }; @@ -18465,14 +16545,12 @@ s390_irgen_VMAE(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) binop(Iop_ShrV128, get_vr_qw(v3), mkU8(shifts[m5]))); IRExpr* result = binop(add_ops[m5], mul_result, get_vr_qw(v4)); put_vr_qw(v1, result); - - return "vmae"; } -static const HChar * +static void s390_irgen_VMALE(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vmale", m5 <= 2); + s390_insn_assert(m5 <= 2); const IROp mul_ops[] = { Iop_MullEven8Ux16, Iop_MullEven16Ux8, Iop_MullEven32Ux4 }; @@ -18488,14 +16566,12 @@ s390_irgen_VMALE(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) IRExpr* result = binop(add_ops[m5], mul_result, get_vr_qw(v4)); put_vr_qw(v1, result); - - return "vmale"; } -static const HChar * +static void s390_irgen_VMAL(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vmal", m5 <= 2); + s390_insn_assert(m5 <= 2); const IROp mul_ops[] = { Iop_Mul8x16, Iop_Mul16x8, Iop_Mul32x4 }; const IROp add_ops[] = { Iop_Add8x16, Iop_Add16x8, Iop_Add32x4 }; @@ -18503,14 +16579,12 @@ s390_irgen_VMAL(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) IRExpr* mul_result = binop(mul_ops[m5], get_vr_qw(v2), get_vr_qw(v3)); IRExpr* result = binop(add_ops[m5], mul_result, get_vr_qw(v4)); put_vr_qw(v1, result); - - return "vmal"; } -static const HChar * +static void s390_irgen_VSUM(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vsum", m4 <= 1); + s390_insn_assert(m4 <= 1); IRType type = s390_vr_get_type(m4); IRExpr* mask; @@ -18530,14 +16604,12 @@ s390_irgen_VSUM(UChar v1, UChar v2, UChar v3, UChar m4) IRExpr* addition = binop(Iop_AndV128, get_vr_qw(v3), mask); put_vr_qw(v1, binop(Iop_Add32x4, sum, addition)); - - return "vsum"; } -static const HChar * +static void s390_irgen_VSUMG(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vsumg", m4 == 1 || m4 == 2); + s390_insn_assert(m4 == 1 || m4 == 2); IRType type = s390_vr_get_type(m4); IRExpr* mask; @@ -18557,14 +16629,12 @@ s390_irgen_VSUMG(UChar v1, UChar v2, UChar v3, UChar m4) IRExpr* addition = binop(Iop_AndV128, get_vr_qw(v3), mask); put_vr_qw(v1, binop(Iop_Add64x2, sum, addition)); - - return "vsumg"; } -static const HChar * +static void s390_irgen_VSUMQ(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vsumq", m4 == 2 || m4 == 3); + s390_insn_assert(m4 == 2 || m4 == 3); IRType type = s390_vr_get_type(m4); IRExpr* mask; @@ -18584,11 +16654,9 @@ s390_irgen_VSUMQ(UChar v1, UChar v2, UChar v3, UChar m4) IRExpr* addition = binop(Iop_AndV128, get_vr_qw(v3), mask); put_vr_qw(v1, binop(Iop_Add128x1, sum, addition)); - - return "vsumq"; } -static const HChar * +static void s390_irgen_VTM(UChar v1, UChar v2) { IRTemp op1 = newTemp(Ity_V128); @@ -18614,13 +16682,12 @@ s390_irgen_VTM(UChar v1, UChar v2) assign(cc, mkite(masked_is_zero, mkU64(0), mkite(diff_is_zero, mkU64(3), mkU64(1)))); s390_cc_set(cc); - return "vtm"; } -static const HChar * +static void s390_irgen_VAC(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vac", m5 == 4); + s390_insn_assert(m5 == 4); IRTemp sum = newTemp(Ity_V128); assign(sum, binop(Iop_Add128x1, get_vr_qw(v2), get_vr_qw(v3))); @@ -18628,27 +16695,24 @@ s390_irgen_VAC(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) IRExpr* mask = binop(Iop_64HLtoV128, mkU64(0), mkU64(1)); IRExpr* carry_in = binop(Iop_AndV128, get_vr_qw(v4), mask); put_vr_qw(v1, binop(Iop_Add128x1, mkexpr(sum), carry_in)); - - return "vac"; } -static const HChar * +static void s390_irgen_VACC(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vacc", m4 <= 4); + s390_insn_assert(m4 <= 4); IRType type = s390_vr_get_type(m4); IRExpr* arg1 = get_vr_qw(v2); IRExpr* arg2 = get_vr_qw(v3); put_vr_qw(v1, s390_V128_calculate_carry_out(arg1, arg2, type, False)); - return "vacc"; } -static const HChar * +static void s390_irgen_VACCC(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vaccc", m5 == 4); + s390_insn_assert(m5 == 4); IRExpr* result = s390_V128_calculate_carry_out_with_carry(get_vr_qw(v2), @@ -18657,10 +16721,9 @@ s390_irgen_VACCC(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) ); put_vr_qw(v1, result); - return "vaccc"; } -static const HChar* +static void s390_irgen_VCKSM(UChar v1, UChar v2, UChar v3) { @@ -18671,14 +16734,12 @@ s390_irgen_VCKSM(UChar v1, UChar v2, UChar v3) put_vr_qw(v1, binop(Iop_64HLtoV128, unop(Iop_32Uto64, mkexpr(result)), mkU64(0ULL))); - - return "vcksm"; } -static const HChar * +static void s390_irgen_VGFM(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vgfm", m4 <= 3); + s390_insn_assert(m4 <= 3); IRDirty* d; IRTemp cc = newTemp(Ity_I64); @@ -18708,13 +16769,12 @@ s390_irgen_VGFM(UChar v1, UChar v2, UChar v3, UChar m4) d->fxState[2].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - return "vgfm"; } -static const HChar * +static void s390_irgen_VGFMA(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vgfma", m5 <= 3); + s390_insn_assert(m5 <= 3); IRDirty* d; IRTemp cc = newTemp(Ity_I64); @@ -18748,13 +16808,12 @@ s390_irgen_VGFMA(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) d->fxState[3].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - return "vgfma"; } -static const HChar * +static void s390_irgen_VSBI(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vsbi", m5 == 4); + s390_insn_assert(m5 == 4); IRExpr* mask = binop(Iop_64HLtoV128, mkU64(0ULL), mkU64(1ULL)); IRExpr* carry_in = binop(Iop_AndV128, get_vr_qw(v4), mask); @@ -18767,13 +16826,12 @@ s390_irgen_VSBI(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) ); put_vr_qw(v1, binop(Iop_Add128x1, mkexpr(sum), carry_in)); - return "vsbi"; } -static const HChar * +static void s390_irgen_VSCBI(UChar v1, UChar v2, UChar v3, UChar m4) { - s390_insn_assert("vscbi", m4 <= 4); + s390_insn_assert(m4 <= 4); IRType type = s390_vr_get_type(m4); IRExpr* arg1 = get_vr_qw(v2); @@ -18781,13 +16839,12 @@ s390_irgen_VSCBI(UChar v1, UChar v2, UChar v3, UChar m4) IRExpr* result = s390_V128_calculate_carry_out(arg1, arg2, type, True); put_vr_qw(v1, result); - return "vscbi"; } -static const HChar * +static void s390_irgen_VSBCBI(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vsbcbi", m5 == 4); + s390_insn_assert(m5 == 4); IRExpr* result = s390_V128_calculate_carry_out_with_carry(get_vr_qw(v2), @@ -18795,13 +16852,12 @@ s390_irgen_VSBCBI(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) get_vr_qw(v4)); put_vr_qw(v1, result); - return "vsbcbi"; } -static const HChar * +static void s390_irgen_VMAH(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vmah", m5 < 3); + s390_insn_assert(m5 < 3); IRDirty* d; IRTemp cc = newTemp(Ity_I64); @@ -18835,14 +16891,12 @@ s390_irgen_VMAH(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) d->fxState[3].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - - return "vmah"; } -static const HChar * +static void s390_irgen_VMALH(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) { - s390_insn_assert("vmalh", m5 < 3); + s390_insn_assert(m5 < 3); IRDirty* d; IRTemp cc = newTemp(Ity_I64); @@ -18876,19 +16930,17 @@ s390_irgen_VMALH(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5) d->fxState[3].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - - return "vmalh"; } -static const HChar * +static void s390_irgen_VMSL(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vmsl"; + return; } - s390_insn_assert("vmsl", m5 == 3 && (m6 & 3) == 0); + s390_insn_assert(m5 == 3 && (m6 & 3) == 0); IRDirty* d; IRTemp cc = newTemp(Ity_I64); @@ -18923,8 +16975,6 @@ s390_irgen_VMSL(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) d->fxState[3].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - - return "vmsl"; } static void @@ -18965,69 +17015,64 @@ s390_vector_fp_convert(IROp op, IRType fromType, IRType toType, Bool rounding, } } -static const HChar * +static void s390_irgen_VCDG(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - s390_insn_assert("vcdg", m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); - s390_insn_assert("vcdg", (m4 & 0x3) == 0); - s390_insn_assert("vcdg", m5 != 2 && m5 <= 7); + s390_insn_assert(m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); + s390_insn_assert((m4 & 0x3) == 0); + s390_insn_assert(m5 != 2 && m5 <= 7); s390_vector_fp_convert(m3 == 2 ? Iop_I32StoF32 : Iop_I64StoF64, m3 == 2 ? Ity_I32 : Ity_I64, m3 == 2 ? Ity_F32 : Ity_F64, True, v1, v2, m3, m4, m5); - return "vcdg"; } -static const HChar * +static void s390_irgen_VCDLG(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - s390_insn_assert("vcdlg", m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); - s390_insn_assert("vcdlg", (m4 & 0x3) == 0); - s390_insn_assert("vcdlg", m5 != 2 && m5 <= 7); + s390_insn_assert(m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); + s390_insn_assert((m4 & 0x3) == 0); + s390_insn_assert(m5 != 2 && m5 <= 7); s390_vector_fp_convert(m3 == 2 ? Iop_I32UtoF32 : Iop_I64UtoF64, m3 == 2 ? Ity_I32 : Ity_I64, m3 == 2 ? Ity_F32 : Ity_F64, True, v1, v2, m3, m4, m5); - return "vcdlg"; } -static const HChar * +static void s390_irgen_VCGD(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - s390_insn_assert("vcgd", m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); - s390_insn_assert("vcgd", (m4 & 0x3) == 0); - s390_insn_assert("vcgd", m5 != 2 && m5 <= 7); + s390_insn_assert(m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); + s390_insn_assert((m4 & 0x3) == 0); + s390_insn_assert(m5 != 2 && m5 <= 7); s390_vector_fp_convert(m3 == 2 ? Iop_F32toI32S : Iop_F64toI64S, m3 == 2 ? Ity_F32 : Ity_F64, m3 == 2 ? Ity_I32 : Ity_I64, True, v1, v2, m3, m4, m5); - return "vcgd"; } -static const HChar * +static void s390_irgen_VCLGD(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - s390_insn_assert("vclgd", m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); - s390_insn_assert("vclgd", (m4 & 0x3) == 0); - s390_insn_assert("vclgd", m5 != 2 && m5 <= 7); + s390_insn_assert(m3 == 3 || (m3 == 2 && s390_host_has_vxe2)); + s390_insn_assert((m4 & 0x3) == 0); + s390_insn_assert(m5 != 2 && m5 <= 7); s390_vector_fp_convert(m3 == 2 ? Iop_F32toI32U : Iop_F64toI64U, m3 == 2 ? Ity_F32 : Ity_F64, m3 == 2 ? Ity_I32 : Ity_I64, True, v1, v2, m3, m4, m5); - return "vclgd"; } -static const HChar * +static void s390_irgen_VFI(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - s390_insn_assert("vfi", - (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); - s390_insn_assert("vfi", (m4 & 0x3) == 0); - s390_insn_assert("vfi", m5 != 2 && m5 <= 7); + s390_insn_assert((m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); + s390_insn_assert((m4 & 0x3) == 0); + s390_insn_assert(m5 != 2 && m5 <= 7); switch (m3) { case 2: s390_vector_fp_convert(Iop_RoundF32toInt, Ity_F32, Ity_F32, True, @@ -19037,15 +17082,13 @@ s390_irgen_VFI(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) case 4: s390_vector_fp_convert(Iop_RoundF128toInt, Ity_F128, Ity_F128, True, v1, v2, m3, m4, m5); break; } - - return "vfi"; } -static const HChar * +static void s390_irgen_VFLL(UChar v1, UChar v2, UChar m3, UChar m4) { - s390_insn_assert("vfll", m3 == 2 || (s390_host_has_vxe && m3 == 3)); - s390_insn_assert("vfll", (m4 & 0x7) == 0); + s390_insn_assert(m3 == 2 || (s390_host_has_vxe && m3 == 3)); + s390_insn_assert((m4 & 0x7) == 0); if (m3 == 2) s390_vector_fp_convert(Iop_F32toF64, Ity_F32, Ity_F64, False, @@ -19053,16 +17096,14 @@ s390_irgen_VFLL(UChar v1, UChar v2, UChar m3, UChar m4) else s390_vector_fp_convert(Iop_F64toF128, Ity_F64, Ity_F128, False, v1, v2, m3, m4, /* don't care */ 0); - - return "vfll"; } -static const HChar * +static void s390_irgen_VFLR(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - s390_insn_assert("vflr", m3 == 3 || (s390_host_has_vxe && m3 == 4)); - s390_insn_assert("vflr", (m4 & 0x3) == 0); - s390_insn_assert("vflr", m5 != 2 && m5 <= 7); + s390_insn_assert(m3 == 3 || (s390_host_has_vxe && m3 == 4)); + s390_insn_assert((m4 & 0x3) == 0); + s390_insn_assert(m5 != 2 && m5 <= 7); if (m3 == 3) s390_vector_fp_convert(Iop_F64toF32, Ity_F64, Ity_F32, True, @@ -19070,16 +17111,14 @@ s390_irgen_VFLR(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) else s390_vector_fp_convert(Iop_F128toF64, Ity_F128, Ity_F64, True, v1, v2, m3, m4, m5); - - return "vflr"; } -static const HChar * +static void s390_irgen_VFPSO(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - s390_insn_assert("vfpso", m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4)); - s390_insn_assert("vfpso", (m4 & 0x7) == 0); - s390_insn_assert("vfpso", m5 <= 2); + s390_insn_assert(m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4)); + s390_insn_assert((m4 & 0x7) == 0); + s390_insn_assert(m5 <= 2); Bool single = s390_vr_is_single_element_control_set(m4) || m3 == 4; IRType type = single ? s390_vr_get_ftype(m3) : Ity_V128; @@ -19106,16 +17145,14 @@ s390_irgen_VFPSO(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) const IROp *ops = m5 == 2 ? abs_ops : negate_ops; put_vr(v1, type, 0, unop(ops[idx], get_vr(v2, type, 0))); } - - return "vfpso"; } -static const HChar * -s390x_vec_fp_binary_op(const HChar* mnm, const IROp ops[], +static void +s390x_vec_fp_binary_op(const IROp ops[], UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - s390_insn_assert(mnm, (m5 & 7) == 0 && + s390_insn_assert((m5 & 7) == 0 && (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); int idx = 2 * (m4 - 2); @@ -19129,15 +17166,13 @@ s390x_vec_fp_binary_op(const HChar* mnm, const IROp ops[], put_vr_qw(v1, triop(ops[idx + 1], get_bfp_rounding_mode_from_fpc(), get_vr_qw(v2), get_vr_qw(v3))); } - - return mnm; } -static const HChar * -s390x_vec_fp_unary_op(const HChar* mnm, const IROp ops[], +static void +s390x_vec_fp_unary_op(const IROp ops[], UChar v1, UChar v2, UChar m3, UChar m4) { - s390_insn_assert(mnm, (m4 & 7) == 0 && + s390_insn_assert((m4 & 7) == 0 && (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); int idx = 2 * (m3 - 2); @@ -19152,19 +17187,17 @@ s390x_vec_fp_unary_op(const HChar* mnm, const IROp ops[], put_vr_qw(v1, binop(ops[idx + 1], get_bfp_rounding_mode_from_fpc(), get_vr_qw(v2))); } - - return mnm; } -static const HChar * +static void s390_vector_fp_mulAddOrSub(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6, - const HChar* mnm, const IROp single_ops[], + const IROp single_ops[], Bool negate) { - s390_insn_assert(mnm, (m5 & 0x7) == 0); - s390_insn_assert(mnm, m6 == 3 || (s390_host_has_vxe && m6 >= 2 && m6 <= 4)); + s390_insn_assert((m5 & 0x7) == 0); + s390_insn_assert(m6 == 3 || (s390_host_has_vxe && m6 >= 2 && m6 <= 4)); static const IROp negate_ops[] = { Iop_NegF32, Iop_NegF64, Iop_NegF128 }; IRType type = s390_vr_get_ftype(m6); @@ -19182,10 +17215,9 @@ s390_vector_fp_mulAddOrSub(UChar v1, UChar v2, UChar v3, UChar v4, get_vr(v4, type, idx)); put_vr(v1, type, idx, negate ? unop(negate_ops[m6 - 2], result) : result); } - return mnm; } -static const HChar * +static void s390_irgen_VFA(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { static const IROp vfa_ops[] = { @@ -19193,10 +17225,10 @@ s390_irgen_VFA(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) Iop_AddF64, Iop_Add64Fx2, Iop_AddF128, }; - return s390x_vec_fp_binary_op("vfa", vfa_ops, v1, v2, v3, m4, m5); + s390x_vec_fp_binary_op(vfa_ops, v1, v2, v3, m4, m5); } -static const HChar * +static void s390_irgen_VFS(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { static const IROp vfs_ops[] = { @@ -19204,10 +17236,10 @@ s390_irgen_VFS(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) Iop_SubF64, Iop_Sub64Fx2, Iop_SubF128, }; - return s390x_vec_fp_binary_op("vfs", vfs_ops, v1, v2, v3, m4, m5); + s390x_vec_fp_binary_op(vfs_ops, v1, v2, v3, m4, m5); } -static const HChar * +static void s390_irgen_VFM(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { static const IROp vfm_ops[] = { @@ -19215,10 +17247,10 @@ s390_irgen_VFM(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) Iop_MulF64, Iop_Mul64Fx2, Iop_MulF128, }; - return s390x_vec_fp_binary_op("vfm", vfm_ops, v1, v2, v3, m4, m5); + s390x_vec_fp_binary_op(vfm_ops, v1, v2, v3, m4, m5); } -static const HChar * +static void s390_irgen_VFD(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { static const IROp vfd_ops[] = { @@ -19226,10 +17258,10 @@ s390_irgen_VFD(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) Iop_DivF64, Iop_Div64Fx2, Iop_DivF128, }; - return s390x_vec_fp_binary_op("vfd", vfd_ops, v1, v2, v3, m4, m5); + s390x_vec_fp_binary_op(vfd_ops, v1, v2, v3, m4, m5); } -static const HChar * +static void s390_irgen_VFSQ(UChar v1, UChar v2, UChar m3, UChar m4) { static const IROp vfsq_ops[] = { @@ -19237,59 +17269,59 @@ s390_irgen_VFSQ(UChar v1, UChar v2, UChar m3, UChar m4) Iop_SqrtF64, Iop_Sqrt64Fx2, Iop_SqrtF128 }; - return s390x_vec_fp_unary_op("vfsq", vfsq_ops, v1, v2, m3, m4); + s390x_vec_fp_unary_op(vfsq_ops, v1, v2, m3, m4); } static const IROp FMA_single_ops[] = { Iop_MAddF32, Iop_MAddF64, Iop_MAddF128 }; -static const HChar * +static void s390_irgen_VFMA(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { - return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, - "vfma", FMA_single_ops, False); + s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, + FMA_single_ops, False); } -static const HChar * +static void s390_irgen_VFNMA(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vfnma"; + return; } - return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, - "vfnma", FMA_single_ops, True); + s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, + FMA_single_ops, True); } static const IROp FMS_single_ops[] = { Iop_MSubF32, Iop_MSubF64, Iop_MSubF128 }; -static const HChar * +static void s390_irgen_VFMS(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { - return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, - "vfms", FMS_single_ops, False); + s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, + FMS_single_ops, False); } -static const HChar * +static void s390_irgen_VFNMS(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vfnms"; + return; } - return s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, - "vfnms", FMS_single_ops, True); + s390_vector_fp_mulAddOrSub(v1, v2, v3, v4, m5, m6, + FMS_single_ops, True); } -static const HChar * +static void s390_irgen_WFC(UChar v1, UChar v2, UChar m3, UChar m4) { - s390_insn_assert("wfc", m4 == 0 && + s390_insn_assert(m4 == 0 && (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); static const IROp ops[] = { Iop_CmpF32, Iop_CmpF64, Iop_CmpF128 }; @@ -19301,27 +17333,23 @@ s390_irgen_WFC(UChar v1, UChar v2, UChar m3, UChar m4) IRTemp cc_s390 = newTemp(Ity_I32); assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex)); s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False); - - return "wfc"; } -static const HChar * +static void s390_irgen_WFK(UChar v1, UChar v2, UChar m3, UChar m4) { - s390_insn_assert("wfk", m4 == 0 && + s390_insn_assert(m4 == 0 && (m3 == 3 || (s390_host_has_vxe && m3 >= 2 && m3 <= 4))); s390_irgen_WFC(v1, v2, m3, m4); - - return "wfk"; } -static const HChar * +static void s390_irgen_VFCx(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6, - const HChar *mnem, IRCmpFResult cmp, Bool equal_ok, + IRCmpFResult cmp, Bool equal_ok, IROp cmp32, IROp cmp64) { - s390_insn_assert(mnem, (m5 & 3) == 0 && (m6 & 14) == 0 && + s390_insn_assert((m5 & 3) == 0 && (m6 & 14) == 0 && (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); Bool single = s390_vr_is_single_element_control_set(m5) || m4 == 4; @@ -19375,39 +17403,36 @@ s390_irgen_VFCx(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6, s390_cc_set(cc); } } - - return mnem; } -static const HChar * +static void s390_irgen_VFCE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { - return s390_irgen_VFCx(v1, v2, v3, m4, m5, m6, "vfce", Ircr_EQ, - False, Iop_CmpEQ32Fx4, Iop_CmpEQ64Fx2); + s390_irgen_VFCx(v1, v2, v3, m4, m5, m6, Ircr_EQ, + False, Iop_CmpEQ32Fx4, Iop_CmpEQ64Fx2); } -static const HChar * +static void s390_irgen_VFCH(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { /* Swap arguments and compare "low" instead. */ - return s390_irgen_VFCx(v1, v3, v2, m4, m5, m6, "vfch", Ircr_LT, - False, Iop_CmpLT32Fx4, Iop_CmpLT64Fx2); + s390_irgen_VFCx(v1, v3, v2, m4, m5, m6, Ircr_LT, + False, Iop_CmpLT32Fx4, Iop_CmpLT64Fx2); } -static const HChar * +static void s390_irgen_VFCHE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { /* Swap arguments and compare "low or equal" instead. */ - return s390_irgen_VFCx(v1, v3, v2, m4, m5, m6, "vfche", Ircr_LT, - True, Iop_CmpLE32Fx4, Iop_CmpLE64Fx2); + s390_irgen_VFCx(v1, v3, v2, m4, m5, m6, Ircr_LT, + True, Iop_CmpLE32Fx4, Iop_CmpLE64Fx2); } -static const HChar * +static void s390_irgen_VFTCI(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5) { - s390_insn_assert("vftci", - (m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); - s390_insn_assert("vftci", (m5 & 0x7) == 0); + s390_insn_assert((m4 == 3 || (s390_host_has_vxe && m4 >= 2 && m4 <= 4))); + s390_insn_assert((m5 & 0x7) == 0); Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); @@ -19440,21 +17465,19 @@ s390_irgen_VFTCI(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5) stmt(IRStmt_Dirty(d)); s390_cc_set(cc); - - return "vftci"; } -static const HChar * +static void s390_irgen_VFMIN(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vfmin"; + return; } - s390_insn_assert("vfmin", m4 >= 2 && m4 <= 4); - s390_insn_assert("vfmin", (m5 & 0x7) == 0); - s390_insn_assert("vfmin", m6 <= 4 || (m6 >= 8 && m6 <= 12)); + s390_insn_assert(m4 >= 2 && m4 <= 4); + s390_insn_assert((m5 & 0x7) == 0); + s390_insn_assert(m6 <= 4 || (m6 >= 8 && m6 <= 12)); Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); IRDirty* d; @@ -19488,20 +17511,19 @@ s390_irgen_VFMIN(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) d->fxState[2].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - return "vfmin"; } -static const HChar * +static void s390_irgen_VFMAX(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vfmax"; + return; } - s390_insn_assert("vfmax", m4 >= 2 && m4 <= 4); - s390_insn_assert("vfmax", (m5 & 0x7) == 0); - s390_insn_assert("vfmax", m6 <= 4 || (m6 >= 8 && m6 <= 12)); + s390_insn_assert(m4 >= 2 && m4 <= 4); + s390_insn_assert((m5 & 0x7) == 0); + s390_insn_assert(m6 <= 4 || (m6 >= 8 && m6 <= 12)); Bool isSingleElementOp = s390_vr_is_single_element_control_set(m5); IRDirty* d; @@ -19535,15 +17557,14 @@ s390_irgen_VFMAX(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) d->fxState[2].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - return "vfmax"; } -static const HChar * +static void s390_irgen_VBPERM(UChar v1, UChar v2, UChar v3) { if (! s390_host_has_vxe) { emulation_failure(EmFail_S390X_vxe); - return "vbperm"; + return; } IRDirty* d; @@ -19577,31 +17598,27 @@ s390_irgen_VBPERM(UChar v1, UChar v2, UChar v3) stmt(IRStmt_Dirty(d)); s390_cc_set(cc); - return "vbperm"; } -static const HChar * +static void s390_irgen_SELR(UChar r3, UChar m4, UChar r1, UChar r2) { IRExpr* cond = binop(Iop_CmpNE32, s390_call_calculate_cond(m4), mkU32(0)); put_gpr_w1(r1, mkite(cond, get_gpr_w1(r2), get_gpr_w1(r3))); - return "selr"; } -static const HChar * +static void s390_irgen_SELGR(UChar r3, UChar m4, UChar r1, UChar r2) { IRExpr* cond = binop(Iop_CmpNE32, s390_call_calculate_cond(m4), mkU32(0)); put_gpr_dw0(r1, mkite(cond, get_gpr_dw0(r2), get_gpr_dw0(r3))); - return "selgr"; } -static const HChar * +static void s390_irgen_SELFHR(UChar r3, UChar m4, UChar r1, UChar r2) { IRExpr* cond = binop(Iop_CmpNE32, s390_call_calculate_cond(m4), mkU32(0)); put_gpr_w0(r1, mkite(cond, get_gpr_w0(r2), get_gpr_w0(r3))); - return "selfhr"; } /* Helper function that byte-swaps each element of its V128 input operand */ @@ -19633,60 +17650,56 @@ s390_reverse_elements(IRExpr* v, UChar m) mkU64(perm[m - 1][1]))); } -static const HChar * +static void s390_irgen_VLBR(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vlbr"; + return; } - s390_insn_assert("vlbr", m3 >= 1 && m3 <= 4); + s390_insn_assert(m3 >= 1 && m3 <= 4); put_vr_qw(v1, s390_byteswap_elements(load(Ity_V128, mkexpr(op2addr)), m3)); - return "vlbr"; } -static const HChar * +static void s390_irgen_VSTBR(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vstbr"; + return; } - s390_insn_assert("vstbr", m3 >= 1 && m3 <= 4); + s390_insn_assert(m3 >= 1 && m3 <= 4); store(mkexpr(op2addr), s390_byteswap_elements(get_vr_qw(v1), m3)); - return "vstbr"; } -static const HChar * +static void s390_irgen_VLER(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vler"; + return; } - s390_insn_assert("vler", m3 >= 1 && m3 <= 3); + s390_insn_assert(m3 >= 1 && m3 <= 3); put_vr_qw(v1, s390_reverse_elements(load(Ity_V128, mkexpr(op2addr)), m3)); - return "vler"; } -static const HChar * +static void s390_irgen_VSTER(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vster"; + return; } - s390_insn_assert("vster", m3 >= 1 && m3 <= 4); + s390_insn_assert(m3 >= 1 && m3 <= 4); store(mkexpr(op2addr), s390_reverse_elements(get_vr_qw(v1), m3)); - return "vster"; } /* Helper function that combines its two V128 operands by replacing element 'to' @@ -19712,33 +17725,32 @@ s390_insert_byteswapped(IRExpr* a, IRExpr* b, UChar m, UChar to, UChar from) mkU64(permH), mkU64(permL))); } -static const HChar * +static void s390_irgen_VLEBRH(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vlebrh"; + return; } - s390_insn_assert("vlebrh", m3 <= 7); + s390_insn_assert(m3 <= 7); IRTemp op2 = newTemp(Ity_I16); assign(op2, load(Ity_I16, mkexpr(op2addr))); put_vr(v1, Ity_I16, m3, binop(Iop_Or16, binop(Iop_Shl16, mkexpr(op2), mkU8(8)), binop(Iop_Shr16, mkexpr(op2), mkU8(8)))); - return "vlebrh"; } -static const HChar * +static void s390_irgen_VLEBRF(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vlebrf"; + return; } - s390_insn_assert("vlebrf", m3 <= 3); + s390_insn_assert(m3 <= 3); IRTemp op1 = newTemp(Ity_V128); assign(op1, get_vr_qw(v1)); @@ -19746,18 +17758,17 @@ s390_irgen_VLEBRF(UChar v1, IRTemp op2addr, UChar m3) assign(op2, unop(Iop_32Uto64, load(Ity_I32, mkexpr(op2addr)))); IRExpr* b = binop(Iop_64HLtoV128, mkexpr(op2), mkexpr(op2)); put_vr_qw(v1, s390_insert_byteswapped(mkexpr(op1), b, 2, m3, 3)); - return "vlebrf"; } -static const HChar * +static void s390_irgen_VLEBRG(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vlebrg"; + return; } - s390_insn_assert("vlebrg", m3 <= 1); + s390_insn_assert(m3 <= 1); IRTemp op1 = newTemp(Ity_V128); assign(op1, get_vr_qw(v1)); @@ -19765,18 +17776,17 @@ s390_irgen_VLEBRG(UChar v1, IRTemp op2addr, UChar m3) assign(op2, load(Ity_I64, mkexpr(op2addr))); IRExpr* b = binop(Iop_64HLtoV128, mkexpr(op2), mkexpr(op2)); put_vr_qw(v1, s390_insert_byteswapped(mkexpr(op1), b, 3, m3, 1)); - return "vlebrg"; } -static const HChar * +static void s390_irgen_VLBRREP(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vlbrrep"; + return; } - s390_insn_assert("vlbrrep", m3 >= 1 && m3 <= 3); + s390_insn_assert(m3 >= 1 && m3 <= 3); static const ULong perm[3] = { 0x0f0e0f0e0f0e0f0e, /* 2-byte element */ @@ -19793,18 +17803,17 @@ s390_irgen_VLBRREP(UChar v1, IRTemp op2addr, UChar m3) put_vr_qw(v1, binop(Iop_Perm8x16, binop(Iop_64HLtoV128, mkexpr(op2), mkexpr(op2)), binop(Iop_64HLtoV128, permHL, permHL))); - return "vlbrrep"; } -static const HChar * +static void s390_irgen_VLLEBRZ(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vllebrz"; + return; } - s390_insn_assert("vllebrz", (m3 >= 1 && m3 <= 3) || m3 == 6); + s390_insn_assert((m3 >= 1 && m3 <= 3) || m3 == 6); static const ULong perm[6] = { 0x0000000000000f0e, /* 2-byte element */ @@ -19824,68 +17833,64 @@ s390_irgen_VLLEBRZ(UChar v1, IRTemp op2addr, UChar m3) put_vr_qw(v1, binop(Iop_Perm8x16, binop(Iop_64HLtoV128, mkU64(0), mkexpr(op2)), binop(Iop_64HLtoV128, permH, mkU64(0)))); - return "vllebrz"; } -static const HChar * +static void s390_irgen_VSTEBRH(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vstebrh"; + return; } - s390_insn_assert("vstebrh", m3 <= 7); + s390_insn_assert(m3 <= 7); IRTemp op1 = newTemp(Ity_I16); assign(op1, get_vr(v1, Ity_I16, m3)); store(mkexpr(op2addr), binop(Iop_Or16, binop(Iop_Shl16, mkexpr(op1), mkU8(8)), binop(Iop_Shr16, mkexpr(op1), mkU8(8)))); - return "vstebrh"; } -static const HChar * +static void s390_irgen_VSTEBRF(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vstebrf"; + return; } - s390_insn_assert("vstebrf", m3 <= 3); + s390_insn_assert(m3 <= 3); IRTemp op1 = newTemp(Ity_V128); assign(op1, get_vr_qw(v1)); IRExpr* b = s390_insert_byteswapped(mkexpr(op1), mkexpr(op1), 2, 3, m3); store(mkexpr(op2addr), unop(Iop_V128to32, b)); - return "vstebrf"; } -static const HChar * +static void s390_irgen_VSTEBRG(UChar v1, IRTemp op2addr, UChar m3) { if (! s390_host_has_vxe2) { emulation_failure(EmFail_S390X_vxe2); - return "vstebrg"; + return; } - s390_insn_assert("vstebrg", m3 <= 1); + s390_insn_assert(m3 <= 1); IRTemp op1 = newTemp(Ity_V128); assign(op1, get_vr_qw(v1)); IRExpr* b = s390_insert_byteswapped(mkexpr(op1), mkexpr(op1), 3, 1, m3); store(mkexpr(op2addr), unop(Iop_V128to64, b)); - return "vstebrg"; } -static const HChar * -s390_irgen_VCxx(const HChar *mnem, s390x_vec_op_details_t details, +static void +s390_irgen_VCxx(s390x_vec_op_details_t details, UShort v2_offs, UShort v2_size) { if (! s390_host_has_nnpa) { emulation_failure(EmFail_S390X_nnpa); - return mnem; + return; } IRDirty* d = unsafeIRDirty_0_N(0, "s390x_dirtyhelper_vec_op", @@ -19904,10 +17909,9 @@ s390_irgen_VCxx(const HChar *mnem, s390x_vec_op_details_t details, d->fxState[1].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - return mnem; } -static const HChar * +static void s390_irgen_VCNF(UChar v1, UChar v2, UChar m3, UChar m4) { s390x_vec_op_details_t details = { .serialized = 0ULL }; @@ -19916,10 +17920,10 @@ s390_irgen_VCNF(UChar v1, UChar v2, UChar m3, UChar m4) details.v2 = v2; details.m3 = m3; details.m4 = m4; - return s390_irgen_VCxx("vcnf", details, 0, sizeof(V128)); + s390_irgen_VCxx( details, 0, sizeof(V128)); } -static const HChar * +static void s390_irgen_VCLFNH(UChar v1, UChar v2, UChar m3, UChar m4) { s390x_vec_op_details_t details = { .serialized = 0ULL }; @@ -19928,10 +17932,10 @@ s390_irgen_VCLFNH(UChar v1, UChar v2, UChar m3, UChar m4) details.v2 = v2; details.m3 = m3; details.m4 = m4; - return s390_irgen_VCxx("vclfnh", details, 0, sizeof(V128) / 2); + s390_irgen_VCxx(details, 0, sizeof(V128) / 2); } -static const HChar * +static void s390_irgen_VCFN(UChar v1, UChar v2, UChar m3, UChar m4) { s390x_vec_op_details_t details = { .serialized = 0ULL }; @@ -19940,10 +17944,10 @@ s390_irgen_VCFN(UChar v1, UChar v2, UChar m3, UChar m4) details.v2 = v2; details.m3 = m3; details.m4 = m4; - return s390_irgen_VCxx("vcfn", details, 0, sizeof(V128)); + s390_irgen_VCxx(details, 0, sizeof(V128)); } -static const HChar * +static void s390_irgen_VCLFNL(UChar v1, UChar v2, UChar m3, UChar m4) { s390x_vec_op_details_t details = { .serialized = 0ULL }; @@ -19952,16 +17956,15 @@ s390_irgen_VCLFNL(UChar v1, UChar v2, UChar m3, UChar m4) details.v2 = v2; details.m3 = m3; details.m4 = m4; - return s390_irgen_VCxx("vclfnl", details, sizeof(V128) / 2, - sizeof(V128) / 2); + s390_irgen_VCxx(details, sizeof(V128) / 2, sizeof(V128) / 2); } -static const HChar * +static void s390_irgen_VCRNF(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { if (! s390_host_has_nnpa) { emulation_failure(EmFail_S390X_nnpa); - return "vcrnf"; + return; } s390x_vec_op_details_t details = { .serialized = 0ULL }; @@ -19989,149 +17992,132 @@ s390_irgen_VCRNF(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) d->fxState[2].size = sizeof(V128); stmt(IRStmt_Dirty(d)); - return "vcrnf"; } -static const HChar * +static void s390_irgen_NNPA(void) { if (! s390_host_has_nnpa) { emulation_failure(EmFail_S390X_nnpa); - return "nnpa"; + return; } extension(S390_EXT_NNPA, 0); - return "nnpa"; } -static const HChar * +static void s390_irgen_KM(UChar r1, UChar r2) { - s390_insn_assert("km", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KM, r1 | (r2 << 4)); - return "km"; } -static const HChar * +static void s390_irgen_KMC(UChar r1, UChar r2) { - s390_insn_assert("kmc", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMC, r1 | (r2 << 4)); - return "kmc"; } -static const HChar * +static void s390_irgen_KIMD(UChar r1, UChar r2) { /* r1 is reserved */ - s390_insn_assert("kimd", r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KIMD, r1 | (r2 << 4)); - return "kimd"; } -static const HChar * +static void s390_irgen_KLMD(UChar r1, UChar r2) { /* r1 is only used by some functions */ - s390_insn_assert("klmd", r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KLMD, r1 | (r2 << 4)); - return "klmd"; } -static const HChar * +static void s390_irgen_KMAC(UChar r1, UChar r2) { /* r1 is ignored */ - s390_insn_assert("kmac", r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMAC, r1 | (r2 << 4)); - return "kmac"; } -static const HChar * +static void s390_irgen_PCC(void) { extension(S390_EXT_PCC, 0); - return "pcc"; } -static const HChar * +static void s390_irgen_KMCTR(UChar r3, UChar r1, UChar r2) { - s390_insn_assert("kmctr", r1 % 2 == 0 && r1 != 0 && r2 % 2 == 0 && r2 != 0 && + s390_insn_assert(r1 % 2 == 0 && r1 != 0 && r2 % 2 == 0 && r2 != 0 && r3 % 2 == 0 && r3 != 0); extension(S390_EXT_KMCTR, r1 | (r2 << 4) | (r3 << 8)); - return "kmctr"; } -static const HChar * +static void s390_irgen_KMO(UChar r1, UChar r2) { - s390_insn_assert("kmo", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMO, r1 | (r2 << 4)); - return "kmo"; } -static const HChar * +static void s390_irgen_KMF(UChar r1, UChar r2) { - s390_insn_assert("kmf", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMF, r1 | (r2 << 4)); - return "kmf"; } -static const HChar * +static void s390_irgen_KMA(UChar r3, UChar r1, UChar r2) { if (! s390_host_has_msa8) { emulation_failure(EmFail_S390X_msa8); - return "kma"; + return; } - s390_insn_assert("kma", r1 % 2 == 0 && r1 != 0 && r2 % 2 == 0 && r2 != 0 && + s390_insn_assert(r1 % 2 == 0 && r1 != 0 && r2 % 2 == 0 && r2 != 0 && r3 % 2 == 0 && r3 != 0 && r3 != r1 && r3 != r2); extension(S390_EXT_KMA, r1 | (r2 << 4) | (r3 << 8)); - return "kma"; } -static const HChar * +static void s390_irgen_KDSA(UChar r1, UChar r2) { if (! s390_host_has_msa9) { emulation_failure(EmFail_S390X_msa9); - return "kdsa"; + return; } /* r1 is reserved */ - s390_insn_assert("kdsa", r2 != 0 && r2 % 2 == 0); + s390_insn_assert(r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KDSA, r1 | (r2 << 4)); - return "kdsa"; } -static const HChar * +static void s390_irgen_BPP(UChar m1, UShort i2, IRTemp op3addr) { /* Treat as a no-op */ - return "bpp"; } -static const HChar * +static void s390_irgen_BPRP(UChar m1, UShort i2, UInt i3) { /* Treat as a no-op */ - return "bprp"; } -static const HChar * +static void s390_irgen_NIAI(UChar i1, UChar i2) { /* Treat as a no-op */ - return "niai"; } -static const HChar * +static void s390_irgen_PPA(UChar m3, UChar r1, UChar r2) { /* Treat as a no-op. m3 could indicate one of the following: 1: transaction-abort assist -- fine, we don't support transactions 15: in-order-execution assist -- we don't claim support */ - return "ppa"; } /* New insns are added here. @@ -20994,11 +18980,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; case 0xb960: s390_format_RRF_U0RR(s390_irgen_CGRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl), - cabt_disasm); goto ok; + RRF2_r1(ovl), RRF2_r2(ovl) + ); goto ok; case 0xb961: s390_format_RRF_U0RR(s390_irgen_CLGRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl), - cabt_disasm); goto ok; + RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; case 0xb964: s390_format_RRF_R0RR2(s390_irgen_NNGRK, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; case 0xb965: s390_format_RRF_R0RR2(s390_irgen_OCGRK, RRF4_r3(ovl), @@ -21012,11 +18997,9 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb96c: /* BEXTG */ goto unimplemented; case 0xb96d: /* BDEPG */ goto unimplemented; case 0xb972: s390_format_RRF_U0RR(s390_irgen_CRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl), - cabt_disasm); goto ok; + RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; case 0xb973: s390_format_RRF_U0RR(s390_irgen_CLRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl), - cabt_disasm); goto ok; + RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; case 0xb974: s390_format_RRF_R0RR2(s390_irgen_NNRK, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; case 0xb975: s390_format_RRF_R0RR2(s390_irgen_OCRK, RRF4_r3(ovl), @@ -21130,13 +19113,11 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb9df: s390_format_RRE_RR(s390_irgen_CLHLR, RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb9e0: s390_format_RRF_U0RR(s390_irgen_LOCFHR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl), - cls_disasm); goto ok; + RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; case 0xb9e1: s390_format_RRFa_U0RR(s390_irgen_POPCNT, RRF3_r3(ovl), RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; case 0xb9e2: s390_format_RRF_U0RR(s390_irgen_LOCGR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl), - cls_disasm); goto ok; + RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; case 0xb9e3: s390_format_RRF_RURR(s390_irgen_SELGR, RRF4_r3(ovl), RRF4_m4(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; @@ -21174,8 +19155,7 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RRF4_m4(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; case 0xb9f2: s390_format_RRF_U0RR(s390_irgen_LOCR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl), - cls_disasm); goto ok; + RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; case 0xb9f4: s390_format_RRF_R0RR2(s390_irgen_NRK, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; @@ -21813,56 +19793,56 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe60000000001ULL: s390_format_VRX_VRRDM(s390_irgen_VLEBRH, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000002ULL: s390_format_VRX_VRRDM(s390_irgen_VLEBRG, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000003ULL: s390_format_VRX_VRRDM(s390_irgen_VLEBRF, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000004ULL: s390_format_VRX_VRRDM(s390_irgen_VLLEBRZ, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), vllebrz_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000005ULL: s390_format_VRX_VRRDM(s390_irgen_VLBRREP, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), va_like_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000006ULL: s390_format_VRX_VRRDM(s390_irgen_VLBR, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), va_like_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000007ULL: s390_format_VRX_VRRDM(s390_irgen_VLER, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), va_like_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000009ULL: s390_format_VRX_VRRDM(s390_irgen_VSTEBRH, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe6000000000aULL: s390_format_VRX_VRRDM(s390_irgen_VSTEBRG, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), vstebrg_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe6000000000bULL: s390_format_VRX_VRRDM(s390_irgen_VSTEBRF, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), vstebrf_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe6000000000eULL: s390_format_VRX_VRRDM(s390_irgen_VSTBR, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), va_like_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe6000000000fULL: s390_format_VRX_VRRDM(s390_irgen_VSTER, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), va_like_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe60000000034ULL: /* VPKZ */ goto unimplemented; case 0xe60000000035ULL: s390_format_VSI_URDV(s390_irgen_VLRL, VSI_v1(ovl), VSI_b2(ovl), VSI_d2(ovl), @@ -21891,19 +19871,19 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe60000000055ULL: s390_format_VRRa_VVMM(s390_irgen_VCNF, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), NULL); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe60000000056ULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNH, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), NULL); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe6000000005dULL: s390_format_VRRa_VVMM(s390_irgen_VCFN, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), NULL); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe6000000005eULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNL, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), NULL); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe60000000058ULL: /* VCVD */ goto unimplemented; case 0xe60000000059ULL: /* VSRP */ goto unimplemented; case 0xe6000000005aULL: /* VCVDG */ goto unimplemented; @@ -21918,7 +19898,7 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRRa_v1(ovl), VRRa_v2(ovl), VRRa_v3(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), NULL); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe60000000077ULL: /* VCP */ goto unimplemented; case 0xe60000000078ULL: /* VMP */ goto unimplemented; case 0xe60000000079ULL: /* VMSP */ goto unimplemented; @@ -21932,27 +19912,27 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe70000000000ULL: s390_format_VRX_VRRDM(s390_irgen_VLEB, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000001ULL: s390_format_VRX_VRRDM(s390_irgen_VLEH, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000002ULL: s390_format_VRX_VRRDM(s390_irgen_VLEG, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000003ULL: s390_format_VRX_VRRDM(s390_irgen_VLEF, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000004ULL: s390_format_VRX_VRRDM(s390_irgen_VLLEZ, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), vllez_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000005ULL: s390_format_VRX_VRRDM(s390_irgen_VLREP, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), va_like_disasm); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000006ULL: s390_format_VRX_VRRD(s390_irgen_VL, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), @@ -21960,23 +19940,23 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe70000000007ULL: s390_format_VRX_VRRDM(s390_irgen_VLBB, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000008ULL: s390_format_VRX_VRRDM(s390_irgen_VSTEB, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe70000000009ULL: s390_format_VRX_VRRDM(s390_irgen_VSTEH, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe7000000000aULL: s390_format_VRX_VRRDM(s390_irgen_VSTEG, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe7000000000bULL: s390_format_VRX_VRRDM(s390_irgen_VSTEF, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl), NULL); goto ok; + VRX_rxb(ovl)); goto ok; case 0xe7000000000eULL: s390_format_VRX_VRRD(s390_irgen_VST, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), @@ -22045,10 +20025,9 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRI_rxb(ovl)); goto ok; case 0xe70000000043ULL: s390_format_VRI_VIM(s390_irgen_VLEIF, VRI_v1(ovl), VRI_i2(ovl), VRI_m3(ovl), - VRI_rxb(ovl)); goto ok;break; + VRI_rxb(ovl)); goto ok; case 0xe70000000044ULL: s390_format_VRI_V0U(s390_irgen_VGBM, VRI_v1(ovl), - VRI_i2(ovl), VRI_rxb(ovl), - vgbm_disasm); goto ok; + VRI_i2(ovl), VRI_rxb(ovl)); goto ok; case 0xe70000000045ULL: s390_format_VRI_V0IU(s390_irgen_VREPI, VRI_v1(ovl), VRI_i2(ovl), VRI_m3(ovl), VRI_rxb(ovl)); goto ok; @@ -22164,16 +20143,16 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRR_rxb(ovl)); goto ok; case 0xe70000000080ULL: s390_format_VRR_VVVMM(s390_irgen_VFEE, VRR_v1(ovl), VRR_v2(ovl), VRR_r3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vfae_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe70000000081ULL: s390_format_VRR_VVVMM(s390_irgen_VFENE, VRR_v1(ovl), VRR_v2(ovl), VRR_r3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vfae_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe70000000082ULL: s390_format_VRR_VVVMM(s390_irgen_VFAE, VRR_v1(ovl), VRR_v2(ovl), VRR_r3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vfae_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe70000000084ULL: s390_format_VRR_VVVM(s390_irgen_VPDI, VRR_v1(ovl), VRR_v2(ovl), VRR_r3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; @@ -22193,13 +20172,13 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe7000000008aULL: s390_format_VRR_VVVVMM(s390_irgen_VSTRC, VRRd_v1(ovl), VRRd_v2(ovl), VRRd_v3(ovl), VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_m6(ovl), VRRd_rxb(ovl), - vstrc_disasm); goto ok; + VRRd_m6(ovl), VRRd_rxb(ovl) + ); goto ok; case 0xe7000000008bULL: s390_format_VRR_VVVVMM(s390_irgen_VSTRS, VRRd_v1(ovl), VRRd_v2(ovl), VRRd_v3(ovl), VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_m6(ovl), VRRd_rxb(ovl), - vfae_like_disasm); goto ok; + VRRd_m6(ovl), VRRd_rxb(ovl) + ); goto ok; case 0xe7000000008cULL: s390_format_VRR_VVVV(s390_irgen_VPERM, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_v4(ovl), VRR_rxb(ovl)); goto ok; @@ -22209,34 +20188,34 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe7000000008eULL: s390_format_VRR_VVVVMM(s390_irgen_VFMS, VRRe_v1(ovl), VRRe_v2(ovl), VRRe_v3(ovl), VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl), - vfms_like_disasm); goto ok; + VRRe_m6(ovl), VRRe_rxb(ovl) + ); goto ok; case 0xe7000000008fULL: s390_format_VRR_VVVVMM(s390_irgen_VFMA, VRRe_v1(ovl), VRRe_v2(ovl), VRRe_v3(ovl), VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl), - vfms_like_disasm); goto ok; + VRRe_m6(ovl), VRRe_rxb(ovl) + ); goto ok; case 0xe70000000094ULL: s390_format_VRR_VVVM(s390_irgen_VPK, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; case 0xe70000000095ULL: s390_format_VRR_VVVMM(s390_irgen_VPKLS, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vch_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe70000000097ULL: s390_format_VRR_VVVMM(s390_irgen_VPKS, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vch_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe7000000009eULL: s390_format_VRR_VVVVMM(s390_irgen_VFNMS, VRRe_v1(ovl), VRRe_v2(ovl), VRRe_v3(ovl), VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl), - vfms_like_disasm); goto ok; + VRRe_m6(ovl), VRRe_rxb(ovl) + ); goto ok; case 0xe7000000009fULL: s390_format_VRR_VVVVMM(s390_irgen_VFNMA, VRRe_v1(ovl), VRRe_v2(ovl), VRRe_v3(ovl), VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl), - vfms_like_disasm); goto ok; + VRRe_m6(ovl), VRRe_rxb(ovl) + ); goto ok; case 0xe700000000a1ULL: s390_format_VRR_VVVM(s390_irgen_VMLH, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; @@ -22296,8 +20275,8 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe700000000b8ULL: s390_format_VRR_VVVVMM(s390_irgen_VMSL, VRRd_v1(ovl), VRRd_v2(ovl), VRRd_v3(ovl), VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_m6(ovl), VRRd_rxb(ovl), - vmsl_disasm); goto ok; + VRRd_m6(ovl), VRRd_rxb(ovl) + ); goto ok; case 0xe700000000b9ULL: s390_format_VRRd_VVVVM(s390_irgen_VACCC, VRRd_v1(ovl), VRRd_v2(ovl), VRRd_v3(ovl), VRRd_v4(ovl), VRRd_m5(ovl), @@ -22336,8 +20315,8 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRRa_rxb(ovl)); goto ok; case 0xe700000000c4ULL: s390_format_VRRa_VVMM(s390_irgen_VFLL, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_rxb(ovl), - vfll_disasm); goto ok; + VRRa_m4(ovl), VRRa_rxb(ovl) + ); goto ok; case 0xe700000000c5ULL: s390_format_VRRa_VVMMM(s390_irgen_VFLR, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_m4(ovl), VRRa_m5(ovl), @@ -22348,12 +20327,12 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRRa_rxb(ovl)); goto ok; case 0xe700000000caULL: s390_format_VRRa_VVMM(s390_irgen_WFK, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_rxb(ovl), - wfc_like_disasm); goto ok; + VRRa_m4(ovl), VRRa_rxb(ovl) + ); goto ok; case 0xe700000000cbULL: s390_format_VRRa_VVMM(s390_irgen_WFC, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_rxb(ovl), - wfc_like_disasm); goto ok; + VRRa_m4(ovl), VRRa_rxb(ovl) + ); goto ok; case 0xe700000000ccULL: s390_format_VRRa_VVMMM(s390_irgen_VFPSO, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_m4(ovl), VRRa_m5(ovl), @@ -22361,7 +20340,7 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe700000000ceULL: s390_format_VRRa_VVMM(s390_irgen_VFSQ, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), vfmix_like_disasm); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe700000000d4ULL: s390_format_VRR_VVM(s390_irgen_VUPLL, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRRa_rxb(ovl)); goto ok; @@ -22391,19 +20370,19 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe700000000e2ULL: s390_format_VRRa_VVVMM(s390_irgen_VFS, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_v3(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), vfa_like_disasm); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe700000000e3ULL: s390_format_VRRa_VVVMM(s390_irgen_VFA, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_v3(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), vfa_like_disasm); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe700000000e5ULL: s390_format_VRRa_VVVMM(s390_irgen_VFD, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_v3(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), vfa_like_disasm); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe700000000e7ULL: s390_format_VRRa_VVVMM(s390_irgen_VFM, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_v3(ovl), VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl), vfa_like_disasm); goto ok; + VRRa_rxb(ovl)); goto ok; case 0xe700000000e8ULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCE, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_v3(ovl), VRRa_m3(ovl), VRRa_m4(ovl), @@ -22449,16 +20428,16 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRR_m4(ovl), VRR_rxb(ovl)); goto ok; case 0xe700000000f8ULL: s390_format_VRR_VVVMM(s390_irgen_VCEQ, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vch_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe700000000f9ULL: s390_format_VRR_VVVMM(s390_irgen_VCHL, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vch_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe700000000fbULL: s390_format_VRR_VVVMM(s390_irgen_VCH, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl), - vch_like_disasm); goto ok; + VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) + ); goto ok; case 0xe700000000fcULL: s390_format_VRR_VVVM(s390_irgen_VMNL, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; @@ -23309,6 +21288,9 @@ s390_decode_and_irgen(const UChar *bytes, UInt insn_length, DisResult *dres) s390_decode_special_and_irgen(bytes + S390_SPECIAL_OP_PREAMBLE_SIZE); } else { /* Handle normal instructions. */ + if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) + s390_disasm(bytes); + switch (insn_length) { case 2: status = s390_decode_2byte_and_irgen(bytes); diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 3205060b5..d0b7de838 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -40,7 +40,6 @@ #include "host_s390_defs.h" #include "s390_disasm.h" #include "guest_s390_defs.h" /* S390X_GUEST_OFFSET */ -#include /*------------------------------------------------------------*/ /*--- Forward declarations ---*/ @@ -1471,24 +1470,40 @@ s390_insn_map_regs(HRegRemap *m, s390_insn *insn) /*--- Functions to emit a sequence of bytes ---*/ /*------------------------------------------------------------*/ +static __inline__ UChar * +emit(UChar *p, const UChar *insn, UInt len) +{ + if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) + s390_disasm(insn); + + return (UChar *)__builtin_memcpy(p, insn, len) + len; +} + + static __inline__ UChar * emit_2bytes(UChar *p, ULong val) { - return (UChar *)__builtin_memcpy(p, ((UChar *)&val) + 6, 2) + 2; + const UChar *insn = (UChar *)&val + 6; + + return emit(p, insn, 2); } static __inline__ UChar * emit_4bytes(UChar *p, ULong val) { - return (UChar *)__builtin_memcpy(p, ((UChar *)&val) + 4, 4) + 4; + const UChar *insn = (UChar *)&val + 4; + + return emit(p, insn, 4); } static __inline__ UChar * emit_6bytes(UChar *p, ULong val) { - return (UChar *)__builtin_memcpy(p, ((UChar *)&val) + 2, 6) + 6; + const UChar *insn = (UChar *)&val + 2; + + return emit(p, insn, 6); } @@ -2001,9 +2016,6 @@ emit_VRR_VVVMM(UChar *p, ULong op, UChar v1, UChar v2, UChar v3, UChar m4, static UChar * s390_emit_AR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ar"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1a00, r1, r2); } @@ -2011,9 +2023,6 @@ s390_emit_AR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_AGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("agr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9080000, r1, r2); } @@ -2021,9 +2030,6 @@ s390_emit_AGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_A(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("a"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x5a000000, r1, x2, b2, d2); } @@ -2031,9 +2037,6 @@ s390_emit_A(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_AY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ay"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000005aULL, r1, x2, b2, dl2, dh2); } @@ -2041,9 +2044,6 @@ s390_emit_AY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_AG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ag"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000008ULL, r1, x2, b2, dl2, dh2); } @@ -2051,9 +2051,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("afi"), GPR(r1), INT(i2)); - return emit_RIL(p, 0xc20900000000ULL, r1, i2); } @@ -2061,9 +2058,6 @@ s390_emit_AFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_AGFI(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("agfi"), GPR(r1), INT(i2)); - return emit_RIL(p, 0xc20800000000ULL, r1, i2); } @@ -2071,9 +2065,6 @@ s390_emit_AGFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_AH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ah"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x4a000000, r1, x2, b2, d2); } @@ -2081,9 +2072,6 @@ s390_emit_AH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_AHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ahy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000007aULL, r1, x2, b2, dl2, dh2); } @@ -2091,9 +2079,6 @@ s390_emit_AHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_AHI(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ahi"), GPR(r1), INT((Int)(Short)i2)); - return emit_RI(p, 0xa70a0000, r1, i2); } @@ -2101,9 +2086,6 @@ s390_emit_AHI(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_AGHI(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("aghi"), GPR(r1), INT((Int)(Short)i2)); - return emit_RI(p, 0xa70b0000, r1, i2); } @@ -2111,9 +2093,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("agsi"), SDXB(dh1, dl1, 0, b1), INT((Int)(Char)i2)); - return emit_SIY(p, 0xeb000000007aULL, i2, b1, dl1, dh1); } @@ -2121,9 +2100,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("asi"), SDXB(dh1, dl1, 0, b1), INT((Int)(Char)i2)); - return emit_SIY(p, 0xeb000000006aULL, i2, b1, dl1, dh1); } @@ -2131,9 +2107,6 @@ s390_emit_ASI(UChar *p, UChar i2, UChar b1, UShort dl1, UChar dh1) static UChar * s390_emit_NR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("nr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1400, r1, r2); } @@ -2141,9 +2114,6 @@ s390_emit_NR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_NGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ngr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9800000, r1, r2); } @@ -2151,9 +2121,6 @@ s390_emit_NGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_N(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("n"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x54000000, r1, x2, b2, d2); } @@ -2161,9 +2128,6 @@ s390_emit_N(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_NY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ny"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000054ULL, r1, x2, b2, dl2, dh2); } @@ -2171,9 +2135,6 @@ s390_emit_NY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_NG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ng"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000080ULL, r1, x2, b2, dl2, dh2); } @@ -2181,9 +2142,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("nihf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00a00000000ULL, r1, i2); } @@ -2191,9 +2149,6 @@ s390_emit_NIHF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_NILF(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("nilf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00b00000000ULL, r1, i2); } @@ -2201,9 +2156,6 @@ s390_emit_NILF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_NILL(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("nill"), GPR(r1), UINT(i2)); - return emit_RI(p, 0xa5070000, r1, i2); } @@ -2211,9 +2163,6 @@ s390_emit_NILL(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_TM(UChar *p, UChar i2, UChar b1, UShort d1) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("tm"), UDXB(d1, 0, b1), UINT(i2)); - return emit_SI(p, 0x91000000, i2, b1, d1); } @@ -2221,9 +2170,6 @@ s390_emit_TM(UChar *p, UChar i2, UChar b1, UShort d1) static UChar * s390_emit_TMY(UChar *p, UChar i2, UChar b1, UShort dl1, UChar dh1) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("tmy"), SDXB(dh1, dl1, 0, b1), UINT(i2)); - return emit_SIY(p, 0xeb0000000051ULL, i2, b1, dl1, dh1); } @@ -2231,9 +2177,6 @@ s390_emit_TMY(UChar *p, UChar i2, UChar b1, UShort dl1, UChar dh1) static UChar * s390_emit_TMLL(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("tmll"), GPR(r1), UINT(i2)); - return emit_RI(p, 0xa7010000, r1, i2); } @@ -2241,9 +2184,6 @@ s390_emit_TMLL(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_BASR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("basr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x0d00, r1, r2); } @@ -2251,9 +2191,6 @@ s390_emit_BASR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_BCR(UChar *p, UChar m1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("bcr", bcr_disasm), MASK(m1), GPR(r2)); - return emit_RR(p, 0x0700, m1, r2); } @@ -2261,9 +2198,6 @@ s390_emit_BCR(UChar *p, UChar m1, UChar r2) static UChar * s390_emit_BRC(UChar *p, UChar m1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("brc", brc_disasm), MASK(m1), PCREL((Int)(Short)i2)); - return emit_RI(p, 0xa7040000, m1, i2); } @@ -2271,9 +2205,6 @@ s390_emit_BRC(UChar *p, UChar m1, UShort i2) static UChar * s390_emit_BRCL(UChar *p, UChar m1, ULong i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("brcl", brcl_disasm), MASK(m1), PCREL(i2)); - return emit_RIL(p, 0xc00400000000ULL, m1, i2); } @@ -2281,9 +2212,6 @@ s390_emit_BRCL(UChar *p, UChar m1, ULong i2) static UChar * s390_emit_CR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1900, r1, r2); } @@ -2291,9 +2219,6 @@ s390_emit_CR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9200000, r1, r2); } @@ -2301,9 +2226,6 @@ s390_emit_CGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_C(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("c"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x59000000, r1, x2, b2, d2); } @@ -2311,9 +2233,6 @@ s390_emit_C(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_CY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000059ULL, r1, x2, b2, dl2, dh2); } @@ -2321,9 +2240,6 @@ s390_emit_CY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000020ULL, r1, x2, b2, dl2, dh2); } @@ -2331,9 +2247,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cfi"), GPR(r1), INT(i2)); - return emit_RIL(p, 0xc20d00000000ULL, r1, i2); } @@ -2341,9 +2254,6 @@ s390_emit_CFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_CGFI(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cgfi"), GPR(r1), INT(i2)); - return emit_RIL(p, 0xc20c00000000ULL, r1, i2); } @@ -2351,9 +2261,6 @@ s390_emit_CGFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_CS(UChar *p, UChar r1, UChar r3, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cs"), GPR(r1), GPR(r3), UDXB(d2, 0, b2)); - return emit_RS(p, 0xba000000, r1, r3, b2, d2); } @@ -2361,9 +2268,6 @@ s390_emit_CS(UChar *p, UChar r1, UChar r3, UChar b2, UShort d2) static UChar * s390_emit_CSY(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("csy"), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); - return emit_RSY(p, 0xeb0000000014ULL, r1, r3, b2, dl2, dh2); } @@ -2371,9 +2275,6 @@ s390_emit_CSY(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CSG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("csg"), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); - return emit_RSY(p, 0xeb0000000030ULL, r1, r3, b2, dl2, dh2); } @@ -2381,9 +2282,6 @@ s390_emit_CSG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CDS(UChar *p, UChar r1, UChar r3, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cds"), GPR(r1), GPR(r3), UDXB(d2, 0, b2)); - return emit_RS(p, 0xbb000000, r1, r3, b2, d2); } @@ -2391,9 +2289,6 @@ s390_emit_CDS(UChar *p, UChar r1, UChar r3, UChar b2, UShort d2) static UChar * s390_emit_CDSY(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cdsy"), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); - return emit_RSY(p, 0xeb0000000031ULL, r1, r3, b2, dl2, dh2); } @@ -2401,9 +2296,6 @@ s390_emit_CDSY(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CDSG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cdsg"), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); - return emit_RSY(p, 0xeb000000003eULL, r1, r3, b2, dl2, dh2); } @@ -2411,9 +2303,6 @@ s390_emit_CDSG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CLR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("clr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1500, r1, r2); } @@ -2421,9 +2310,6 @@ s390_emit_CLR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CLGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("clgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9210000, r1, r2); } @@ -2431,9 +2317,6 @@ s390_emit_CLGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CL(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cl"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x55000000, r1, x2, b2, d2); } @@ -2441,9 +2324,6 @@ s390_emit_CL(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_CLY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cly"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000055ULL, r1, x2, b2, dl2, dh2); } @@ -2451,9 +2331,6 @@ s390_emit_CLY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_CLG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("clg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000021ULL, r1, x2, b2, dl2, dh2); } @@ -2461,9 +2338,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("clfi"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc20f00000000ULL, r1, i2); } @@ -2471,9 +2345,6 @@ s390_emit_CLFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_CLGFI(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("clgfi"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc20e00000000ULL, r1, i2); } @@ -2481,9 +2352,6 @@ s390_emit_CLGFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_DR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1d00, r1, r2); } @@ -2491,9 +2359,6 @@ s390_emit_DR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_D(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("d"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x5d000000, r1, x2, b2, d2); } @@ -2501,9 +2366,6 @@ s390_emit_D(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_DLR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dlr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9970000, r1, r2); } @@ -2511,9 +2373,6 @@ s390_emit_DLR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_DLGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dlgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9870000, r1, r2); } @@ -2521,9 +2380,6 @@ s390_emit_DLGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_DL(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dl"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000097ULL, r1, x2, b2, dl2, dh2); } @@ -2531,9 +2387,6 @@ s390_emit_DL(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_DLG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dlg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000087ULL, r1, x2, b2, dl2, dh2); } @@ -2541,9 +2394,6 @@ s390_emit_DLG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_DSGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dsgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb90d0000, r1, r2); } @@ -2551,9 +2401,6 @@ s390_emit_DSGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_DSG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dsg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000000dULL, r1, x2, b2, dl2, dh2); } @@ -2561,9 +2408,6 @@ s390_emit_DSG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_XR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("xr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1700, r1, r2); } @@ -2571,9 +2415,6 @@ s390_emit_XR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_XGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("xgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9820000, r1, r2); } @@ -2581,9 +2422,6 @@ s390_emit_XGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_X(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("x"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x57000000, r1, x2, b2, d2); } @@ -2591,9 +2429,6 @@ s390_emit_X(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_XY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("xy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000057ULL, r1, x2, b2, dl2, dh2); } @@ -2601,9 +2436,6 @@ s390_emit_XY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_XG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("xg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000082ULL, r1, x2, b2, dl2, dh2); } @@ -2611,9 +2443,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("xihf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00600000000ULL, r1, i2); } @@ -2621,9 +2450,6 @@ s390_emit_XIHF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_XILF(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("xilf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00700000000ULL, r1, i2); } @@ -2631,9 +2457,6 @@ s390_emit_XILF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_XC(UChar *p, UInt l, UChar b1, UShort d1, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("xc"), UDLB(d1, l, b1), UDXB(d2, 0, b2)); - return emit_SSa(p, 0xd70000000000ULL, l, b1, d1, b2, d2); } @@ -2641,9 +2464,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("flogr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9830000, r1, r2); } @@ -2651,9 +2471,6 @@ s390_emit_FLOGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_IC(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ic"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x43000000, r1, x2, b2, d2); } @@ -2661,9 +2478,6 @@ s390_emit_IC(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_ICY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("icy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000073ULL, r1, x2, b2, dl2, dh2); } @@ -2671,9 +2485,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iihf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00800000000ULL, r1, i2); } @@ -2681,9 +2492,6 @@ s390_emit_IIHF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_IILF(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iilf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00900000000ULL, r1, i2); } @@ -2691,9 +2499,6 @@ s390_emit_IILF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_IPM(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ipm"), GPR(r1)); - return emit_RRE(p, 0xb2220000, r1, r2); } @@ -2701,9 +2506,6 @@ s390_emit_IPM(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1800, r1, r2); } @@ -2711,9 +2513,6 @@ s390_emit_LR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9040000, r1, r2); } @@ -2721,9 +2520,6 @@ s390_emit_LGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGFR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgfr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9140000, r1, r2); } @@ -2731,9 +2527,6 @@ s390_emit_LGFR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_L(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("l"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x58000000, r1, x2, b2, d2); } @@ -2741,9 +2534,6 @@ s390_emit_L(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_LY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ly"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000058ULL, r1, x2, b2, dl2, dh2); } @@ -2751,9 +2541,6 @@ s390_emit_LY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000004ULL, r1, x2, b2, dl2, dh2); } @@ -2761,9 +2548,6 @@ s390_emit_LG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LGF(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgf"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000014ULL, r1, x2, b2, dl2, dh2); } @@ -2771,9 +2555,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgfi"), GPR(r1), INT(i2)); - return emit_RIL(p, 0xc00100000000ULL, r1, i2); } @@ -2781,9 +2562,6 @@ s390_emit_LGFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_LTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ltr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1200, r1, r2); } @@ -2791,9 +2569,6 @@ s390_emit_LTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LTGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ltgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9020000, r1, r2); } @@ -2801,9 +2576,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lt"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000012ULL, r1, x2, b2, dl2, dh2); } @@ -2811,9 +2583,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ltg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000002ULL, r1, x2, b2, dl2, dh2); } @@ -2821,9 +2590,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lbr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9260000, r1, r2); } @@ -2831,9 +2597,6 @@ s390_emit_LBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgbr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9060000, r1, r2); } @@ -2841,9 +2604,6 @@ s390_emit_LGBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LB(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lb"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000076ULL, r1, x2, b2, dl2, dh2); } @@ -2851,9 +2611,6 @@ s390_emit_LB(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LGB(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgb"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000077ULL, r1, x2, b2, dl2, dh2); } @@ -2861,9 +2618,6 @@ s390_emit_LGB(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LCR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lcr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1300, r1, r2); } @@ -2871,9 +2625,6 @@ s390_emit_LCR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LCGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lcgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9030000, r1, r2); } @@ -2881,9 +2632,6 @@ s390_emit_LCGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LHR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lhr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9270000, r1, r2); } @@ -2891,9 +2639,6 @@ s390_emit_LHR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGHR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lghr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9070000, r1, r2); } @@ -2901,9 +2646,6 @@ s390_emit_LGHR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lh"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x48000000, r1, x2, b2, d2); } @@ -2911,9 +2653,6 @@ s390_emit_LH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_LHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lhy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000078ULL, r1, x2, b2, dl2, dh2); } @@ -2921,9 +2660,6 @@ s390_emit_LHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LGH(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgh"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000015ULL, r1, x2, b2, dl2, dh2); } @@ -2931,9 +2667,6 @@ s390_emit_LGH(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LHI(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lhi"), GPR(r1), INT((Int)(Short)i2)); - return emit_RI(p, 0xa7080000, r1, i2); } @@ -2941,9 +2674,6 @@ s390_emit_LHI(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_LGHI(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lghi"), GPR(r1), INT((Int)(Short)i2)); - return emit_RI(p, 0xa7090000, r1, i2); } @@ -2951,9 +2681,6 @@ s390_emit_LGHI(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_LLGFR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llgfr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9160000, r1, r2); } @@ -2961,9 +2688,6 @@ s390_emit_LLGFR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LLGF(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llgf"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000016ULL, r1, x2, b2, dl2, dh2); } @@ -2971,9 +2695,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llcr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9940000, r1, r2); } @@ -2981,9 +2702,6 @@ s390_emit_LLCR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LLGCR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llgcr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9840000, r1, r2); } @@ -2991,9 +2709,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llc"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000094ULL, r1, x2, b2, dl2, dh2); } @@ -3001,9 +2716,6 @@ s390_emit_LLC(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LLGC(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llgc"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000090ULL, r1, x2, b2, dl2, dh2); } @@ -3011,9 +2723,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llhr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9950000, r1, r2); } @@ -3021,9 +2730,6 @@ s390_emit_LLHR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LLGHR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llghr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9850000, r1, r2); } @@ -3031,9 +2737,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llh"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000095ULL, r1, x2, b2, dl2, dh2); } @@ -3041,9 +2744,6 @@ s390_emit_LLH(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LLGH(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llgh"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000091ULL, r1, x2, b2, dl2, dh2); } @@ -3051,9 +2751,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llilf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00f00000000ULL, r1, i2); } @@ -3061,9 +2758,6 @@ s390_emit_LLILF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_LLILL(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("llill"), GPR(r1), UINT(i2)); - return emit_RI(p, 0xa50f0000, r1, i2); } @@ -3071,9 +2765,6 @@ s390_emit_LLILL(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_MR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1c00, r1, r2); } @@ -3081,9 +2772,6 @@ s390_emit_MR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_M(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("m"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x5c000000, r1, x2, b2, d2); } @@ -3091,9 +2779,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mfy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000005cULL, r1, x2, b2, dl2, dh2); } @@ -3101,9 +2786,6 @@ s390_emit_MFY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_MG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000084ULL, r1, x2, b2, dl2, dh2); } @@ -3111,9 +2793,6 @@ s390_emit_MG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_MGRK(UChar *p, UChar r3, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mgrk"), GPR(r1), GPR(r2), GPR(r3)); - return emit_RRF3(p, 0xb9ec0000, r3, r1, r2); } @@ -3121,9 +2800,6 @@ s390_emit_MGRK(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_MH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mh"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x4c000000, r1, x2, b2, d2); } @@ -3131,9 +2807,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mhy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000007cULL, r1, x2, b2, dl2, dh2); } @@ -3141,9 +2814,6 @@ s390_emit_MHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_MHI(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mhi"), GPR(r1), INT((Int)(Short)i2)); - return emit_RI(p, 0xa70c0000, r1, i2); } @@ -3151,9 +2821,6 @@ s390_emit_MHI(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_MLR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mlr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9960000, r1, r2); } @@ -3161,9 +2828,6 @@ s390_emit_MLR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_MLGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mlgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9860000, r1, r2); } @@ -3171,9 +2835,6 @@ s390_emit_MLGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_ML(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ml"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000096ULL, r1, x2, b2, dl2, dh2); } @@ -3181,9 +2842,6 @@ s390_emit_ML(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_MLG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mlg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000086ULL, r1, x2, b2, dl2, dh2); } @@ -3191,9 +2849,6 @@ s390_emit_MLG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_MSR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb2520000, r1, r2); } @@ -3201,9 +2856,6 @@ s390_emit_MSR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_MSGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb90c0000, r1, r2); } @@ -3211,9 +2863,6 @@ s390_emit_MSGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_MS(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ms"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x71000000, r1, x2, b2, d2); } @@ -3221,9 +2870,6 @@ s390_emit_MS(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_MSY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000051ULL, r1, x2, b2, dl2, dh2); } @@ -3231,9 +2877,6 @@ s390_emit_MSY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_MSG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000000cULL, r1, x2, b2, dl2, dh2); } @@ -3241,9 +2884,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msfi"), GPR(r1), INT(i2)); - return emit_RIL(p, 0xc20100000000ULL, r1, i2); } @@ -3251,9 +2891,6 @@ s390_emit_MSFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_MSGFI(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msgfi"), GPR(r1), INT(i2)); - return emit_RIL(p, 0xc20000000000ULL, r1, i2); } @@ -3261,9 +2898,6 @@ s390_emit_MSGFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_MVC(UChar *p, UInt l, UChar b1, UShort d1, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mvc"), UDLB(d1, l, b1), UDXB(d2, 0, b2)); - return emit_SSa(p, 0xd20000000000ULL, l, b1, d1, b2, d2); } @@ -3271,9 +2905,6 @@ s390_emit_MVC(UChar *p, UInt l, UChar b1, UShort d1, UChar b2, UShort d2) static UChar * s390_emit_MVI(UChar *p, UChar i2, UChar b1, UShort d1) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mvi"), UDXB(d1, 0, b1), UINT(i2)); - return emit_SI(p, 0x92000000, i2, b1, d1); } @@ -3281,9 +2912,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mvhhi"), UDXB(d1, 0, b1), INT((Int)(Short)i2)); - return emit_SIL(p, 0xe54400000000ULL, b1, d1, i2); } @@ -3291,9 +2919,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mvhi"), UDXB(d1, 0, b1), INT((Int)(Short)i2)); - return emit_SIL(p, 0xe54c00000000ULL, b1, d1, i2); } @@ -3301,9 +2926,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mvghi"), UDXB(d1, 0, b1), INT((Int)(Short)i2)); - return emit_SIL(p, 0xe54800000000ULL, b1, d1, i2); } @@ -3311,9 +2933,6 @@ s390_emit_MVGHI(UChar *p, UChar b1, UShort d1, UShort i2) static UChar * s390_emit_OR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("or"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1600, r1, r2); } @@ -3321,9 +2940,6 @@ s390_emit_OR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_OGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ogr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9810000, r1, r2); } @@ -3331,9 +2947,6 @@ s390_emit_OGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_O(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("o"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x56000000, r1, x2, b2, d2); } @@ -3341,9 +2954,6 @@ s390_emit_O(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_OY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("oy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000056ULL, r1, x2, b2, dl2, dh2); } @@ -3351,9 +2961,6 @@ s390_emit_OY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_OG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("og"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000081ULL, r1, x2, b2, dl2, dh2); } @@ -3361,9 +2968,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("oihf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00c00000000ULL, r1, i2); } @@ -3371,9 +2975,6 @@ s390_emit_OIHF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_OILF(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("oilf"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc00d00000000ULL, r1, i2); } @@ -3381,9 +2982,6 @@ s390_emit_OILF(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_OILL(UChar *p, UChar r1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("oill"), GPR(r1), UINT(i2)); - return emit_RI(p, 0xa50b0000, r1, i2); } @@ -3391,9 +2989,6 @@ s390_emit_OILL(UChar *p, UChar r1, UShort i2) static UChar * s390_emit_SLL(UChar *p, UChar r1, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sll"), GPR(r1), UDXB(d2, 0, b2)); - return emit_RS(p, 0x89000000, r1, 0, b2, d2); } @@ -3401,9 +2996,6 @@ s390_emit_SLL(UChar *p, UChar r1, UChar b2, UShort d2) static UChar * s390_emit_SLLG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sllg"), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); - return emit_RSY(p, 0xeb000000000dULL, r1, r3, b2, dl2, dh2); } @@ -3411,9 +3003,6 @@ s390_emit_SLLG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_SRA(UChar *p, UChar r1, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sra"), GPR(r1), UDXB(d2, 0, b2)); - return emit_RS(p, 0x8a000000, r1, 0, b2, d2); } @@ -3421,9 +3010,6 @@ s390_emit_SRA(UChar *p, UChar r1, UChar b2, UShort d2) static UChar * s390_emit_SRAG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("srag"), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); - return emit_RSY(p, 0xeb000000000aULL, r1, r3, b2, dl2, dh2); } @@ -3431,9 +3017,6 @@ s390_emit_SRAG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_SRL(UChar *p, UChar r1, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("srl"), GPR(r1), UDXB(d2, 0, b2)); - return emit_RS(p, 0x88000000, r1, 0, b2, d2); } @@ -3441,9 +3024,6 @@ s390_emit_SRL(UChar *p, UChar r1, UChar b2, UShort d2) static UChar * s390_emit_SRLG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("srlg"), GPR(r1), GPR(r3), SDXB(dh2, dl2, 0, b2)); - return emit_RSY(p, 0xeb000000000cULL, r1, r3, b2, dl2, dh2); } @@ -3451,9 +3031,6 @@ s390_emit_SRLG(UChar *p, UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_ST(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("st"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x50000000, r1, x2, b2, d2); } @@ -3461,9 +3038,6 @@ s390_emit_ST(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_STY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sty"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000050ULL, r1, x2, b2, dl2, dh2); } @@ -3471,9 +3045,6 @@ s390_emit_STY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_STG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("stg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000024ULL, r1, x2, b2, dl2, dh2); } @@ -3481,9 +3052,6 @@ s390_emit_STG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_STC(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("stc"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x42000000, r1, x2, b2, d2); } @@ -3491,9 +3059,6 @@ s390_emit_STC(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_STCY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("stcy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000072ULL, r1, x2, b2, dl2, dh2); } @@ -3501,9 +3066,6 @@ s390_emit_STCY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_STH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sth"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x40000000, r1, x2, b2, d2); } @@ -3511,9 +3073,6 @@ s390_emit_STH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_STHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sthy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000070ULL, r1, x2, b2, dl2, dh2); } @@ -3521,9 +3080,6 @@ s390_emit_STHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_SR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sr"), GPR(r1), GPR(r2)); - return emit_RR(p, 0x1b00, r1, r2); } @@ -3531,9 +3087,6 @@ s390_emit_SR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_SGR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sgr"), GPR(r1), GPR(r2)); - return emit_RRE(p, 0xb9090000, r1, r2); } @@ -3541,9 +3094,6 @@ s390_emit_SGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_S(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("s"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x5b000000, r1, x2, b2, d2); } @@ -3551,9 +3101,6 @@ s390_emit_S(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_SY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000005bULL, r1, x2, b2, dl2, dh2); } @@ -3561,9 +3108,6 @@ s390_emit_SY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_SG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sg"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe30000000009ULL, r1, x2, b2, dl2, dh2); } @@ -3571,9 +3115,6 @@ s390_emit_SG(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_SH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sh"), GPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x4b000000, r1, x2, b2, d2); } @@ -3581,9 +3122,6 @@ s390_emit_SH(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_SHY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("shy"), GPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xe3000000007bULL, r1, x2, b2, dl2, dh2); } @@ -3591,9 +3129,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("slfi"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc20500000000ULL, r1, i2); } @@ -3601,9 +3136,6 @@ s390_emit_SLFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_SLGFI(UChar *p, UChar r1, UInt i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("slgfi"), GPR(r1), UINT(i2)); - return emit_RIL(p, 0xc20400000000ULL, r1, i2); } @@ -3611,9 +3143,6 @@ s390_emit_SLGFI(UChar *p, UChar r1, UInt i2) static UChar * s390_emit_LDR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ldr"), FPR(r1), FPR(r2)); - return emit_RR(p, 0x2800, r1, r2); } @@ -3621,9 +3150,6 @@ s390_emit_LDR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LE(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("le"), FPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x78000000, r1, x2, b2, d2); } @@ -3631,9 +3157,6 @@ s390_emit_LE(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_LD(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ld"), FPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x68000000, r1, x2, b2, d2); } @@ -3641,9 +3164,6 @@ s390_emit_LD(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_LEY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ley"), FPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xed0000000064ULL, r1, x2, b2, dl2, dh2); } @@ -3651,9 +3171,6 @@ s390_emit_LEY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LDY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ldy"), FPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xed0000000065ULL, r1, x2, b2, dl2, dh2); } @@ -3661,9 +3178,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ldgr"), FPR(r1), GPR(r2)); - return emit_RRE(p, 0xb3c10000, r1, r2); } @@ -3671,9 +3185,6 @@ s390_emit_LDGR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LGDR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lgdr"), GPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3cd0000, r1, r2); } @@ -3681,9 +3192,6 @@ s390_emit_LGDR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LZER(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lzer"), FPR(r1)); - return emit_RRE(p, 0xb3740000, r1, r2); } @@ -3691,9 +3199,6 @@ s390_emit_LZER(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LZDR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lzdr"), FPR(r1)); - return emit_RRE(p, 0xb3750000, r1, r2); } @@ -3701,9 +3206,6 @@ s390_emit_LZDR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_SFPC(UChar *p, UChar r1) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sfpc"), GPR(r1)); - return emit_RRE(p, 0xb3840000, r1, 0); } @@ -3711,9 +3213,6 @@ s390_emit_SFPC(UChar *p, UChar r1) static UChar * s390_emit_STE(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ste"), FPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x70000000, r1, x2, b2, d2); } @@ -3721,9 +3220,6 @@ s390_emit_STE(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_STD(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("std"), FPR(r1), UDXB(d2, x2, b2)); - return emit_RX(p, 0x60000000, r1, x2, b2, d2); } @@ -3731,9 +3227,6 @@ s390_emit_STD(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_STEY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("stey"), FPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xed0000000066ULL, r1, x2, b2, dl2, dh2); } @@ -3741,9 +3234,6 @@ s390_emit_STEY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_STDY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("stdy"), FPR(r1), SDXB(dh2, dl2, x2, b2)); - return emit_RXY(p, 0xed0000000067ULL, r1, x2, b2, dl2, dh2); } @@ -3751,9 +3241,6 @@ s390_emit_STDY(UChar *p, UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_AEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("aebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb30a0000, r1, r2); } @@ -3761,9 +3248,6 @@ s390_emit_AEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_ADBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("adbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb31a0000, r1, r2); } @@ -3771,9 +3255,6 @@ s390_emit_ADBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_AXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("axbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb34a0000, r1, r2); } @@ -3781,9 +3262,6 @@ s390_emit_AXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3090000, r1, r2); } @@ -3791,9 +3269,6 @@ s390_emit_CEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cdbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3190000, r1, r2); } @@ -3801,9 +3276,6 @@ s390_emit_CDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3490000, r1, r2); } @@ -3813,9 +3285,6 @@ s390_emit_CEFBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cefbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3940000, m3, m4, r1, r2); } @@ -3825,9 +3294,6 @@ s390_emit_CDFBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdfbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3950000, m3, m4, r1, r2); } @@ -3837,9 +3303,6 @@ s390_emit_CXFBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxfbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3960000, m3, m4, r1, r2); } @@ -3849,9 +3312,6 @@ s390_emit_CEGBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cegbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3a40000, m3, m4, r1, r2); } @@ -3861,9 +3321,6 @@ s390_emit_CDGBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdgbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3a50000, m3, m4, r1, r2); } @@ -3873,9 +3330,6 @@ s390_emit_CXGBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxgbra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3a60000, m3, m4, r1, r2); } @@ -3885,9 +3339,6 @@ s390_emit_CELFBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("celfbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3900000, m3, m4, r1, r2); } @@ -3897,9 +3348,6 @@ s390_emit_CDLFBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdlfbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3910000, m3, m4, r1, r2); } @@ -3909,9 +3357,6 @@ s390_emit_CXLFBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxlfbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3920000, m3, m4, r1, r2); } @@ -3921,9 +3366,6 @@ s390_emit_CELGBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("celgbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3a00000, m3, m4, r1, r2); } @@ -3933,9 +3375,6 @@ s390_emit_CDLGBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdlgbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3a10000, m3, m4, r1, r2); } @@ -3945,9 +3384,6 @@ s390_emit_CXLGBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxlgbr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3a20000, m3, m4, r1, r2); } @@ -3957,9 +3393,6 @@ s390_emit_CLFEBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clfebr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb39c0000, m3, m4, r1, r2); } @@ -3969,9 +3402,6 @@ s390_emit_CLFDBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clfdbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb39d0000, m3, m4, r1, r2); } @@ -3981,9 +3411,6 @@ s390_emit_CLFXBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clfxbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb39e0000, m3, m4, r1, r2); } @@ -3993,9 +3420,6 @@ s390_emit_CLGEBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clgebr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3ac0000, m3, m4, r1, r2); } @@ -4005,9 +3429,6 @@ s390_emit_CLGDBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clgdbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3ad0000, m3, m4, r1, r2); } @@ -4017,9 +3438,6 @@ s390_emit_CLGXBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clgxbr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3ae0000, m3, m4, r1, r2); } @@ -4027,9 +3445,6 @@ s390_emit_CLGXBR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CFEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cfebra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF3(p, 0xb3980000, m3, r1, r2); } @@ -4037,9 +3452,6 @@ s390_emit_CFEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CFDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cfdbra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF3(p, 0xb3990000, m3, r1, r2); } @@ -4047,9 +3459,6 @@ s390_emit_CFDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CFXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cfxbra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF3(p, 0xb39a0000, m3, r1, r2); } @@ -4057,9 +3466,6 @@ s390_emit_CFXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CGEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cgebra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF3(p, 0xb3a80000, m3, r1, r2); } @@ -4067,9 +3473,6 @@ s390_emit_CGEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CGDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cgdbra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF3(p, 0xb3a90000, m3, r1, r2); } @@ -4077,9 +3480,6 @@ s390_emit_CGDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CGXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cgxbra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF3(p, 0xb3aa0000, m3, r1, r2); } @@ -4087,9 +3487,6 @@ s390_emit_CGXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_DEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("debr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb30d0000, r1, r2); } @@ -4097,9 +3494,6 @@ s390_emit_DEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_DDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ddbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb31d0000, r1, r2); } @@ -4107,9 +3501,6 @@ s390_emit_DDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_DXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("dxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb34d0000, r1, r2); } @@ -4117,9 +3508,6 @@ s390_emit_DXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LCEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lcebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3030000, r1, r2); } @@ -4127,9 +3515,6 @@ s390_emit_LCEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LCDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lcdbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3130000, r1, r2); } @@ -4137,9 +3522,6 @@ s390_emit_LCDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LCXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lcxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3430000, r1, r2); } @@ -4147,9 +3529,6 @@ s390_emit_LCXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LDEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ldebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3040000, r1, r2); } @@ -4157,9 +3536,6 @@ s390_emit_LDEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LXDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lxdbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3050000, r1, r2); } @@ -4167,9 +3543,6 @@ s390_emit_LXDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LXEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lxebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3060000, r1, r2); } @@ -4177,9 +3550,6 @@ s390_emit_LXEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LNEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lnebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3010000, r1, r2); } @@ -4187,9 +3557,6 @@ s390_emit_LNEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LNDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lndbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3110000, r1, r2); } @@ -4197,9 +3564,6 @@ s390_emit_LNDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LNXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lnxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3410000, r1, r2); } @@ -4207,9 +3571,6 @@ s390_emit_LNXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LPEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lpebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3000000, r1, r2); } @@ -4217,9 +3578,6 @@ s390_emit_LPEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LPDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lpdbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3100000, r1, r2); } @@ -4227,9 +3585,6 @@ s390_emit_LPDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_LPXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lpxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3400000, r1, r2); } @@ -4239,9 +3594,6 @@ s390_emit_LEDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("ledbra", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3440000, m3, m4, r1, r2); } @@ -4251,9 +3603,6 @@ s390_emit_LDXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("ldxbra", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3450000, m3, m4, r1, r2); } @@ -4263,9 +3612,6 @@ s390_emit_LEXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("lexbra", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3460000, m3, m4, r1, r2); } @@ -4273,9 +3619,6 @@ s390_emit_LEXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_FIEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("fiebra", fp_convt_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3570000, m3, m4, r1, r2); } @@ -4283,9 +3626,6 @@ s390_emit_FIEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_FIDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("fidbra", fp_convt_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb35f0000, m3, m4, r1, r2); } @@ -4293,9 +3633,6 @@ s390_emit_FIDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_FIXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("fixbra", fp_convt_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3470000, m3, m4, r1, r2); } @@ -4303,9 +3640,6 @@ s390_emit_FIXBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_MEEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("meebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3170000, r1, r2); } @@ -4313,9 +3647,6 @@ s390_emit_MEEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_MDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mdbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb31c0000, r1, r2); } @@ -4323,9 +3654,6 @@ s390_emit_MDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_MXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("mxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb34c0000, r1, r2); } @@ -4333,9 +3661,6 @@ s390_emit_MXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_MAEBR(UChar *p, UChar r1, UChar r3, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("maebr"), FPR(r1), FPR(r3), FPR(r2)); - return emit_RRF(p, 0xb30e0000, r1, r3, r2); } @@ -4343,9 +3668,6 @@ s390_emit_MAEBR(UChar *p, UChar r1, UChar r3, UChar r2) static UChar * s390_emit_MADBR(UChar *p, UChar r1, UChar r3, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("madbr"), FPR(r1), FPR(r3), FPR(r2)); - return emit_RRF(p, 0xb31e0000, r1, r3, r2); } @@ -4353,9 +3675,6 @@ s390_emit_MADBR(UChar *p, UChar r1, UChar r3, UChar r2) static UChar * s390_emit_MSEBR(UChar *p, UChar r1, UChar r3, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msebr"), FPR(r1), FPR(r3), FPR(r2)); - return emit_RRF(p, 0xb30f0000, r1, r3, r2); } @@ -4363,9 +3682,6 @@ s390_emit_MSEBR(UChar *p, UChar r1, UChar r3, UChar r2) static UChar * s390_emit_MSDBR(UChar *p, UChar r1, UChar r3, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("msdbr"), FPR(r1), FPR(r3), FPR(r2)); - return emit_RRF(p, 0xb31f0000, r1, r3, r2); } @@ -4373,9 +3689,6 @@ s390_emit_MSDBR(UChar *p, UChar r1, UChar r3, UChar r2) static UChar * s390_emit_SQEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sqebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3140000, r1, r2); } @@ -4383,9 +3696,6 @@ s390_emit_SQEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_SQDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sqdbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3150000, r1, r2); } @@ -4393,9 +3703,6 @@ s390_emit_SQDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_SQXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sqxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3160000, r1, r2); } @@ -4403,9 +3710,6 @@ s390_emit_SQXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_SEBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sebr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb30b0000, r1, r2); } @@ -4413,9 +3717,6 @@ s390_emit_SEBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_SDBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sdbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb31b0000, r1, r2); } @@ -4423,9 +3724,6 @@ s390_emit_SDBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_SXBR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sxbr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb34b0000, r1, r2); } @@ -4433,9 +3731,6 @@ s390_emit_SXBR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_ADTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("adtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3d20000, r3, m4, r1, r2); } @@ -4443,9 +3738,6 @@ s390_emit_ADTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_AXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("axtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3da0000, r3, m4, r1, r2); } @@ -4453,9 +3745,6 @@ s390_emit_AXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CDTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cdtr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3e40000, r1, r2); } @@ -4463,9 +3752,6 @@ s390_emit_CDTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CXTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cxtr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3ec0000, r1, r2); } @@ -4475,9 +3761,6 @@ s390_emit_CDGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdgtra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3f10000, m3, m4, r1, r2); } @@ -4490,9 +3773,6 @@ s390_emit_CXGTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) IRop (Iop_I64StoD128) does not take rounding mode. */ vassert(m3 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxgtra", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3f90000, m3, m4, r1, r2); } @@ -4502,9 +3782,6 @@ s390_emit_CDFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9510000, m3, m4, r1, r2); } @@ -4514,9 +3791,6 @@ s390_emit_CXFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9590000, m3, m4, r1, r2); } @@ -4526,9 +3800,6 @@ s390_emit_CDLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9530000, m3, m4, r1, r2); } @@ -4538,9 +3809,6 @@ s390_emit_CXLFTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxlftr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb95b0000, m3, m4, r1, r2); } @@ -4550,9 +3818,6 @@ s390_emit_CDLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cdlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9520000, m3, m4, r1, r2); } @@ -4562,9 +3827,6 @@ s390_emit_CXLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cxlgtr", fp_convf_disasm), FPR(r1), MASK(m3), GPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb95a0000, m3, m4, r1, r2); } @@ -4572,9 +3834,6 @@ s390_emit_CXLGTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_CEDTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cedtr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3f40000, r1, r2); } @@ -4582,9 +3841,6 @@ s390_emit_CEDTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_CEXTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("cextr"), FPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3fc0000, r1, r2); } @@ -4594,9 +3850,6 @@ s390_emit_CFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9410000, m3, m4, r1, r2); } @@ -4606,9 +3859,6 @@ s390_emit_CFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9490000, m3, m4, r1, r2); } @@ -4618,9 +3868,6 @@ s390_emit_CGDTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cgdtra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3e10000, m3, m4, r1, r2); } @@ -4630,9 +3877,6 @@ s390_emit_CGXTRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("cgxtra", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3e90000, m3, m4, r1, r2); } @@ -4642,9 +3886,6 @@ s390_emit_CLFDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clfdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9430000, m3, m4, r1, r2); } @@ -4654,9 +3895,6 @@ s390_emit_CLFXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clfxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb94b0000, m3, m4, r1, r2); } @@ -4666,9 +3904,6 @@ s390_emit_CLGDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clgdtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb9420000, m3, m4, r1, r2); } @@ -4678,9 +3913,6 @@ s390_emit_CLGXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("clgxtr", fp_convt_disasm), GPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb94a0000, m3, m4, r1, r2); } @@ -4688,9 +3920,6 @@ s390_emit_CLGXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_DDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("ddtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3d10000, r3, m4, r1, r2); } @@ -4698,9 +3927,6 @@ s390_emit_DDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_DXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("dxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3d90000, r3, m4, r1, r2); } @@ -4708,9 +3934,6 @@ s390_emit_DXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_EEDTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("eedtr"), GPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3e50000, r1, r2); } @@ -4718,9 +3941,6 @@ s390_emit_EEDTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_EEXTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("eextr"), GPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3ed0000, r1, r2); } @@ -4728,9 +3948,6 @@ s390_emit_EEXTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_ESDTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("esdtr"), GPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3e70000, r1, r2); } @@ -4738,9 +3955,6 @@ s390_emit_ESDTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_ESXTR(UChar *p, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("esxtr"), GPR(r1), FPR(r2)); - return emit_RRE(p, 0xb3ef0000, r1, r2); } @@ -4748,9 +3962,6 @@ s390_emit_ESXTR(UChar *p, UChar r1, UChar r2) static UChar * s390_emit_IEDTR(UChar *p, UChar r3, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iedtr"), FPR(r1), FPR(r3), GPR(r2)); - return emit_RRF(p, 0xb3f60000, r3, r1, r2); } @@ -4758,9 +3969,6 @@ s390_emit_IEDTR(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_IEXTR(UChar *p, UChar r3, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("iextr"), FPR(r1), FPR(r3), GPR(r2)); - return emit_RRF(p, 0xb3fe0000, r3, r1, r2); } @@ -4768,9 +3976,6 @@ s390_emit_IEXTR(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_LDETR(UChar *p, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("ldetr"), FPR(r1), FPR(r2), UINT(m4)); - return emit_RRF5(p, 0xb3d40000, m4, r1, r2); } @@ -4778,9 +3983,6 @@ s390_emit_LDETR(UChar *p, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_LXDTR(UChar *p, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("lxdtr"), FPR(r1), FPR(r2), UINT(m4)); - return emit_RRF5(p, 0xb3dc0000, m4, r1, r2); } @@ -4790,9 +3992,6 @@ s390_emit_LEDTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("ledtr", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3d50000, m3, m4, r1, r2); } @@ -4802,9 +4001,6 @@ s390_emit_LDXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) { vassert(m4 == 0); - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("ldxtr", fp_convf_disasm), FPR(r1), MASK(m3), FPR(r2), MASK(m4)); - return emit_RRF2(p, 0xb3dd0000, m3, m4, r1, r2); } @@ -4812,9 +4008,6 @@ s390_emit_LDXTR(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_MDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("mdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3d00000, r3, m4, r1, r2); } @@ -4822,9 +4015,6 @@ s390_emit_MDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_MXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("mxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3d80000, r3, m4, r1, r2); } @@ -4841,10 +4031,6 @@ emit_E(UChar *p, UInt op) static UChar * s390_emit_PFPO(UChar *p) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) { - S390_DISASM(MNM("pfpo")); - } - return emit_E(p, 0x010a); } @@ -4852,9 +4038,6 @@ s390_emit_PFPO(UChar *p) static UChar * s390_emit_QADTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("qadtr"), FPR(r1), FPR(r3), FPR(r2), UINT(m4)); - return emit_RRF4(p, 0xb3f50000, r3, m4, r1, r2); } @@ -4862,9 +4045,6 @@ s390_emit_QADTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_QAXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("qaxtr"), FPR(r1), FPR(r3), FPR(r2), UINT(m4)); - return emit_RRF4(p, 0xb3fd0000, r3, m4, r1, r2); } @@ -4872,9 +4052,6 @@ s390_emit_QAXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_RRDTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("rrdtr"), FPR(r1), FPR(r3), GPR(r2), UINT(m4)); - return emit_RRF4(p, 0xb3f70000, r3, m4, r1, r2); } @@ -4882,9 +4059,6 @@ s390_emit_RRDTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_RRXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("rrxtr"), FPR(r1), FPR(r3), GPR(r2), UINT(m4)); - return emit_RRF4(p, 0xb3ff0000, r3, m4, r1, r2); } @@ -4892,9 +4066,6 @@ s390_emit_RRXTR(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("sdtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3d30000, r3, m4, r1, r2); } @@ -4902,9 +4073,6 @@ s390_emit_SDTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_SXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("sxtra", adtra_like_disasm), FPR(r1), FPR(r2), FPR(r3), MASK(m4)); - return emit_RRF4(p, 0xb3db0000, r3, m4, r1, r2); } @@ -4912,9 +4080,6 @@ s390_emit_SXTRA(UChar *p, UChar r3, UChar m4, UChar r1, UChar r2) static UChar * s390_emit_SLDT(UChar *p, UChar r3, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("sldt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); - return emit_RXF(p, 0xED0000000040ULL, r3, 0, r2, 0, r1); } @@ -4922,9 +4087,6 @@ s390_emit_SLDT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_SLXT(UChar *p, UChar r3, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("slxt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); - return emit_RXF(p, 0xED0000000048ULL, r3, 0, r2, 0, r1); } @@ -4932,9 +4094,6 @@ s390_emit_SLXT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_SRDT(UChar *p, UChar r3, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("srdt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); - return emit_RXF(p, 0xED0000000041ULL, r3, 0, r2, 0, r1); } @@ -4942,9 +4101,6 @@ s390_emit_SRDT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_SRXT(UChar *p, UChar r3, UChar r1, UChar r2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("srxt"), FPR(r1), FPR(r3), UDXB(0, 0, r2)); - return emit_RXF(p, 0xED0000000049ULL, r3, 0, r2, 0, r1); } @@ -4952,9 +4108,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) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("locgr", cls_disasm), GPR(r1), GPR(r2), MASK(m3)); - return emit_RRF3(p, 0xb9e20000, m3, r1, r2); } @@ -4962,9 +4115,6 @@ s390_emit_LOCGR(UChar *p, UChar m3, UChar r1, UChar r2) static UChar * s390_emit_LOC(UChar *p, UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("loc", cls_disasm), GPR(r1), SDXB(dh2, dl2, 0, b2), MASK(m3)); - return emit_RSY(p, 0xeb00000000f2ULL, r1, m3, b2, dl2, dh2); } @@ -4972,27 +4122,18 @@ s390_emit_LOC(UChar *p, UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) static UChar * s390_emit_LOCG(UChar *p, UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("locg", cls_disasm), GPR(r1), SDXB(dh2, dl2, 0, b2), MASK(m3)); - return emit_RSY(p, 0xeb00000000e2ULL, r1, m3, b2, dl2, dh2); } static UChar * s390_emit_LOCGHI(UChar *p, UChar r1, UShort i2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("locghi", cls_disasm), GPR(r1), INT((Int)(Short)i2), MASK(m3)); - return emit_RIE(p, 0xec0000000046ULL, r1, i2, m3); } static UChar * s390_emit_RISBG(UChar *p, UChar r1, UChar r2, UChar i3, Char i4, UChar i5) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("risbg", rotate_disasm), GPR(r1), GPR(r2), MASK(i3), MASK(i4), MASK(i5)); - return emit_RIEf(p, 0xec0000000055ULL, r1, r2, i3, i4, i5); } @@ -5074,19 +4215,13 @@ s390_emit_load_32imm(UChar *p, UChar reg, UInt val) static UChar * s390_emit_VL(UChar *p, UChar v1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - /* m3 = 0 --> no alignment indicated */ - S390_DISASM(XMNM("vl", mask0_disasm), VR(v1), UDXB(d2, x2, b2), MASK(0)); - + /* m3 = 0 --> no alignment indicated */ return emit_VRX(p, 0xE70000000006ULL, v1, x2, b2, d2, 0); } static UChar * s390_emit_VLR(UChar *p, UChar v1, UChar v2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vlr"), VR(v1), VR(v2)); - return emit_VRR_VV(p, 0xE70000000056ULL, v1, v2); } @@ -5094,9 +4229,6 @@ s390_emit_VLR(UChar *p, UChar v1, UChar v2) static UChar * s390_emit_VLREP(UChar *p, UChar v1, UChar x2, UChar b2, UShort d2, UShort m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vlrep"), VR(v1), UDXB(d2, x2, b2), UINT(m3)); - return emit_VRX(p, 0xE70000000005ULL, v1, x2, b2, d2, m3); } @@ -5104,10 +4236,7 @@ s390_emit_VLREP(UChar *p, UChar v1, UChar x2, UChar b2, UShort d2, UShort m3) static UChar * s390_emit_VST(UChar *p, UChar v1, UChar x2, UChar b2, UShort d2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - /* As the alignment of the 2nd operand is unknown --> m3 = 0 */ - S390_DISASM(XMNM("vst", mask0_disasm), VR(v1), UDXB(d2, x2, b2), MASK(0)); - + /* As the alignment of the 2nd operand is unknown --> m3 = 0 */ return emit_VRX(p, 0xE7000000000eULL, v1, x2, b2, d2, 0); } @@ -5115,9 +4244,6 @@ s390_emit_VST(UChar *p, UChar v1, UChar x2, UChar b2, UShort d2) static UChar * s390_emit_VLGV(UChar *p, UChar r1, UChar b2, UShort d2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vlgv", va_like_disasm), GPR(r1), VR(v3), UDXB(d2, 0, b2), MASK(m4)); - return emit_VRS(p, 0xE70000000021ULL, r1, b2, d2, v3, m4); } @@ -5125,9 +4251,6 @@ s390_emit_VLGV(UChar *p, UChar r1, UChar b2, UShort d2, UChar v3, UChar m4) static UChar * s390_emit_VLVG(UChar *p, UChar v1, UChar b2, UShort d2, UChar r3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vlvg", va_like_disasm), VR(v1), GPR(r3), UDXB(d2, 0, b2), MASK(m4)); - return emit_VRS(p, 0xE70000000022ULL, v1, b2, d2, r3, m4); } @@ -5135,54 +4258,36 @@ s390_emit_VLVG(UChar *p, UChar v1, UChar b2, UShort d2, UChar r3, UChar m4) static UChar * s390_emit_VPERM(UChar *p, UChar v1, UChar v2, UChar v3, UChar v4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vperm"), VR(v1), VR(v2), VR(v3), VR(v4)); - return emit_VRR_VVVV(p, 0xE7000000008cULL, v1, v2, v3, v4); } static UChar * s390_emit_VO(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vo"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000006aULL, v1, v2, v3); } static UChar * s390_emit_VOC(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("voc"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000006fULL, v1, v2, v3); } static UChar * s390_emit_VX(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vx"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000006dULL, v1, v2, v3); } static UChar * s390_emit_VN(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vn"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE70000000068ULL, v1, v2, v3); } static UChar* s390_emit_VCEQ(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vceq", vch_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(0)); - return emit_VRR_VVVM(p, 0xE700000000f8ULL, v1, v2, v3, m4); } @@ -5190,9 +4295,6 @@ s390_emit_VCEQ(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) static UChar * s390_emit_VGBM(UChar *p, UChar v1, UShort i2) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vgbm", vgbm_disasm), VR(v1), UINT(i2)); - return emit_VRI_VI(p, 0xE70000000044ULL, v1, i2); } @@ -5200,9 +4302,6 @@ s390_emit_VGBM(UChar *p, UChar v1, UShort i2) static UChar * s390_emit_VPK(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vpk", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000094ULL, v1, v2, v3, m4); } @@ -5210,9 +4309,6 @@ s390_emit_VPK(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) static UChar * s390_emit_VPKS(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vpks", vch_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(0)); - return emit_VRR_VVVM(p, 0xE70000000097ULL, v1, v2, v3, m4); } @@ -5220,9 +4316,6 @@ s390_emit_VPKS(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) static UChar * s390_emit_VPKLS(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vpkls", vch_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(0)); - return emit_VRR_VVVM(p, 0xE70000000095ULL, v1, v2, v3, m4); } @@ -5230,9 +4323,6 @@ s390_emit_VPKLS(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) static UChar * s390_emit_VREP(UChar *p, UChar v1, UChar v3, UShort i2, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vrep", va_like_disasm), VR(v1), VR(v3), UINT(i2), MASK(m4)); - return emit_VRI_VVMM(p, 0xE7000000004DULL, v1, v3, i2, m4); } @@ -5240,9 +4330,6 @@ s390_emit_VREP(UChar *p, UChar v1, UChar v3, UShort i2, UChar m4) static UChar * s390_emit_VREPI(UChar *p, UChar v1, UShort i2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vrepi", va_like_disasm), VR(v1), INT((Short)i2), MASK(m3)); - return emit_VRI_VIM(p, 0xE70000000045ULL, v1, i2, m3); } @@ -5250,9 +4337,6 @@ s390_emit_VREPI(UChar *p, UChar v1, UShort i2, UChar m3) static UChar * s390_emit_VUPH(UChar *p, UChar v1, UChar v2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vuph", va_like_disasm), VR(v1), VR(v2), MASK(m3)); - return emit_VRR_VVM(p, 0xE700000000D7ULL, v1, v2, m3); } @@ -5260,9 +4344,6 @@ s390_emit_VUPH(UChar *p, UChar v1, UChar v2, UChar m3) static UChar * s390_emit_VUPLH(UChar *p, UChar v1, UChar v2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vuplh", va_like_disasm), VR(v1), VR(v2), MASK(m3)); - return emit_VRR_VVM(p, 0xE700000000D5ULL, v1, v2, m3); } @@ -5270,9 +4351,6 @@ s390_emit_VUPLH(UChar *p, UChar v1, UChar v2, UChar m3) static UChar* s390_emit_VMRH(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmrh", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000061ULL, v1, v2, v3, m4); } @@ -5280,396 +4358,264 @@ s390_emit_VMRH(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) static UChar* s390_emit_VMRL(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmrl", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000060ULL, v1, v2, v3, m4); } static UChar * s390_emit_VA(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("va", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000f3ULL, v1, v2, v3, m4); } static UChar * s390_emit_VS(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vs", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000f7ULL, v1, v2, v3, m4); } static UChar * s390_emit_VNO(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vno"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000006bULL, v1, v2, v3); } static UChar * s390_emit_VCH(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vch", vch_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(0)); - return emit_VRR_VVVM(p, 0xE700000000fbULL, v1, v2, v3, m4); } static UChar * s390_emit_VCHL(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vchl", vch_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(0)); - return emit_VRR_VVVM(p, 0xE700000000f9ULL, v1, v2, v3, m4); } static UChar * s390_emit_VCLZ(UChar *p, UChar v1, UChar v2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vclz", va_like_disasm), VR(v1), VR(v2), MASK(m3)); - return emit_VRR_VVM(p, 0xE70000000053ULL, v1, v2, m3); } static UChar * s390_emit_VCTZ(UChar *p, UChar v1, UChar v2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vctz", va_like_disasm), VR(v1), VR(v2), MASK(m3)); - return emit_VRR_VVM(p, 0xE70000000052ULL, v1, v2, m3); } static UChar * s390_emit_VPOPCT(UChar *p, UChar v1, UChar v2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vpopct", va_like_disasm), VR(v1), VR(v2), MASK(m3)); - return emit_VRR_VVM(p, 0xE70000000050ULL, v1, v2, m3); } static UChar * s390_emit_VMX(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmx", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000ffULL, v1, v2, v3, m4); } static UChar * s390_emit_VMXL(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmxl", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000fdULL, v1, v2, v3, m4); } static UChar * s390_emit_VMN(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmn", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000feULL, v1, v2, v3, m4); } static UChar * s390_emit_VMNL(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmnl", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000fcULL, v1, v2, v3, m4); } static UChar * s390_emit_VAVG(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vavg", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000f2ULL, v1, v2, v3, m4); } static UChar * s390_emit_VAVGL(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vavgl", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000f0ULL, v1, v2, v3, m4); } static UChar * s390_emit_VLP(UChar *p, UChar v1, UChar v2, UChar m3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vlp", va_like_disasm), VR(v1), VR(v2), MASK(m3)); - return emit_VRR_VVM(p, 0xE700000000DFULL, v1, v2, m3); } static UChar * s390_emit_VMH(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmh", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000a3ULL, v1, v2, v3, m4); } static UChar * s390_emit_VMLH(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmlh", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000a1ULL, v1, v2, v3, m4); } static UChar * s390_emit_VML(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vml", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000a2ULL, v1, v2, v3, m4); } static UChar * s390_emit_VMO(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmo", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000a7ULL, v1, v2, v3, m4); } static UChar * s390_emit_VMLO(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vmlo", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE700000000a5ULL, v1, v2, v3, m4); } static UChar * s390_emit_VESLV(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("veslv", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000070ULL, v1, v2, v3, m4); } static UChar * s390_emit_VESRAV(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vesrav", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE7000000007aULL, v1, v2, v3, m4); } static UChar * s390_emit_VESRLV(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vesrlv", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000078ULL, v1, v2, v3, m4); } static UChar * s390_emit_VESL(UChar *p, UChar v1, UChar b2, UShort d2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vesl", va_like_disasm), VR(v1), VR(v3), UDXB(d2, 0, b2), MASK(m4)); - return emit_VRS(p, 0xE70000000030ULL, v1, b2, d2, v3, m4); } static UChar * s390_emit_VESRA(UChar *p, UChar v1, UChar b2, UShort d2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vesra", va_like_disasm), VR(v1), VR(v3), UDXB(d2, 0, b2), MASK(m4)); - return emit_VRS(p, 0xE7000000003aULL, v1, b2, d2, v3, m4); } static UChar * s390_emit_VESRL(UChar *p, UChar v1, UChar b2, UShort d2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vesrl", va_like_disasm), VR(v1), VR(v3), UDXB(d2, 0, b2), MASK(m4)); - return emit_VRS(p, 0xE70000000038ULL, v1, b2, d2, v3, m4); } static UChar * s390_emit_VERLLV(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("verllv", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000073ULL, v1, v2, v3, m4); } static UChar * s390_emit_VSL(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vsl"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE70000000074ULL, v1, v2, v3); } static UChar * s390_emit_VSRL(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vsrl"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000007cULL, v1, v2, v3); } static UChar * s390_emit_VSRA(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vsra"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000007eULL, v1, v2, v3); } static UChar * s390_emit_VSLB(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vslb"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE70000000075ULL, v1, v2, v3); } static UChar * s390_emit_VSRLB(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vsrlb"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000007dULL, v1, v2, v3); } static UChar * s390_emit_VSRAB(UChar *p, UChar v1, UChar v2, UChar v3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vsrab"), VR(v1), VR(v2), VR(v3)); - return emit_VRR_VVV(p, 0xE7000000007fULL, v1, v2, v3); } static UChar * s390_emit_VSUM(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vsum", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000064ULL, v1, v2, v3, m4); } static UChar * s390_emit_VSUMG(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vsumg", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000065ULL, v1, v2, v3, m4); } static UChar * s390_emit_VSUMQ(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vsumq", va_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4)); - return emit_VRR_VVVM(p, 0xE70000000067ULL, v1, v2, v3, m4); } static UChar * s390_emit_VLVGP(UChar *p, UChar v1, UChar r2, UChar r3) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vlvgp"), VR(v1), GPR(r2), GPR(r3)); - return emit_VRR_VRR(p, 0xE70000000062ULL, v1, r2, r3); } static UChar * s390_emit_VFPSO(UChar *p, UChar v1, UChar v2, UChar m3, UChar m4, UChar m5) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vfpso"), VR(v1), VR(v2), UINT(m3), UINT(m4), UINT(m5)); - return emit_VRR_VVMMM(p, 0xE700000000CCULL, v1, v2, m3, m4, m5); } static UChar * s390_emit_VFA(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vfa"), VR(v1), VR(v2), VR(v3), UINT(m4), UINT(m5)); - return emit_VRR_VVVMM(p, 0xE700000000e3ULL, v1, v2, v3, m4, m5); } static UChar * s390_emit_VFS(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vfs"), VR(v1), VR(v2), VR(v3), UINT(m4), UINT(m5)); - return emit_VRR_VVVMM(p, 0xE700000000e2ULL, v1, v2, v3, m4, m5); } static UChar * s390_emit_VFM(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vfm"), VR(v1), VR(v2), VR(v3), UINT(m4), UINT(m5)); - return emit_VRR_VVVMM(p, 0xE700000000e7ULL, v1, v2, v3, m4, m5); } static UChar * s390_emit_VFD(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vfd"), VR(v1), VR(v2), VR(v3), UINT(m4), UINT(m5)); - return emit_VRR_VVVMM(p, 0xE700000000e5ULL, v1, v2, v3, m4, m5); } static UChar * s390_emit_VFSQ(UChar *p, UChar v1, UChar v2, UChar m3, UChar m4) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(MNM("vfsq"), VR(v1), VR(v2), UINT(m3), UINT(m4)); - return emit_VRR_VVMMM(p, 0xE700000000CEULL, v1, v2, m3, m4, 0); } @@ -5677,9 +4623,6 @@ static UChar * s390_emit_VFMA(UChar *p, UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vfma", vfms_like_disasm), VR(v1), VR(v2), VR(v3), VR(v4), MASK(m5), MASK(m6)); - return emit_VRRe_VVVVMM(p, 0xE7000000008fULL, v1, v2, v3, v4, m5, m6); } @@ -5687,9 +4630,6 @@ static UChar * s390_emit_VFMS(UChar *p, UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vfms", vfms_like_disasm), VR(v1), VR(v2), VR(v3), VR(v4), MASK(m5), MASK(m6)); - return emit_VRRe_VVVVMM(p, 0xE7000000008eULL, v1, v2, v3, v4, m5, m6); } @@ -5697,9 +4637,6 @@ static UChar * s390_emit_VFCE(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vfce", vfce_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(m5), MASK(m6)); - return emit_VRR_VVVMMM(p, 0xE700000000e8ULL, v1, v2, v3, m4, m5, m6); } @@ -5707,9 +4644,6 @@ static UChar * s390_emit_VFCH(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vfch", vfce_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(m5), MASK(m6)); - return emit_VRR_VVVMMM(p, 0xE700000000ebULL, v1, v2, v3, m4, m5, m6); } @@ -5717,9 +4651,6 @@ static UChar * s390_emit_VFCHE(UChar *p, UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - S390_DISASM(XMNM("vfche", vfce_like_disasm), VR(v1), VR(v2), VR(v3), MASK(m4), MASK(m5), MASK(m6)); - return emit_VRR_VVVMMM(p, 0xE700000000eaULL, v1, v2, v3, m4, m5, m6); } diff --git a/VEX/priv/objdump/README b/VEX/priv/objdump/README new file mode 100644 index 000000000..9ed56d253 --- /dev/null +++ b/VEX/priv/objdump/README @@ -0,0 +1,16 @@ +Files imported from binutils distribution: 2.45 + +/include/dis-asm.h -> dis-asm.h modified +/include/opcode/s390.h -> s390.h unchanged +/opcodes/dis-init.c -> dis-init.c modified +/opcodes/s390-dis.c -> s390-dis.c modified +/opcodes/s390-opc.c -> s390-opc.c modified + +s390-opc.tab generated from +/opcodes/s390-opc.txt via +/opcodes/mkopc.c + +gcc mkopc.c +./a.out < s390-opc.txt > s390-opc.tab + +Might not be worth the trouble to write an update-objdump script. diff --git a/VEX/priv/objdump/dis-asm.h b/VEX/priv/objdump/dis-asm.h new file mode 100644 index 000000000..4ca3320c1 --- /dev/null +++ b/VEX/priv/objdump/dis-asm.h @@ -0,0 +1,502 @@ +/* Interface between the opcode library and its callers. + + Copyright (C) 1999-2025 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, + Boston, MA 02110-1301, USA. + + Written by Cygnus Support, 1993. + + The opcode library (libopcodes.a) provides instruction decoders for + a large variety of instruction sets, callable with an identical + interface, for making instruction-processing programs more independent + of the instruction set being processed. */ + +#ifndef DIS_ASM_H +#define DIS_ASM_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "stubs.h" + +enum dis_insn_type +{ + dis_noninsn, /* Not a valid instruction. */ + dis_nonbranch, /* Not a branch instruction. */ + dis_branch, /* Unconditional branch. */ + dis_condbranch, /* Conditional branch. */ + dis_jsr, /* Jump to subroutine. */ + dis_condjsr, /* Conditional jump to subroutine. */ + dis_dref, /* Data reference instruction. */ + dis_dref2 /* Two data references in instruction. */ +}; + +/* When printing styled disassembler output, this describes what style + should be used. */ + +enum disassembler_style +{ + /* This is the default style, use this for any additional syntax + (e.g. commas between operands, brackets, etc), or just as a default if + no other style seems appropriate. */ + dis_style_text, + + /* Use this for all instruction mnemonics, or aliases for mnemonics. + These should be things that correspond to real machine + instructions. */ + dis_style_mnemonic, + + /* Some architectures include additional mnemonic like fields within the + instruction operands, e.g. on aarch64 'add w16, w7, w1, lsl #2' where + the 'lsl' is an additional piece of text that describes how the + instruction should behave. This sub-mnemonic style can be used for + these pieces of text. */ + dis_style_sub_mnemonic, + + /* For things that aren't real machine instructions, but rather + assembler directives, e.g. .byte, etc. */ + dis_style_assembler_directive, + + /* Use this for any register names. This may or may-not include any + register prefix, e.g. '$', '%', at the discretion of the target, + though within each target the choice to include prefixes for not + should be kept consistent. If the prefix is not printed with this + style, then dis_style_text should be used. */ + dis_style_register, + + /* Use this for any constant values used within instructions or + directives, unless the value is an absolute address, or an offset + that will be added to an address (no matter where the address comes + from) before use. This style may, or may-not be used for any + prefix to the immediate value, e.g. '$', at the discretion of the + target, though within each target the choice to include these + prefixes should be kept consistent. */ + dis_style_immediate, + + /* The style for the numerical representation of an absolute address. + Anything that is an address offset should use the immediate style. + This style may, or may-not be used for any prefix to the immediate + value, e.g. '$', at the discretion of the target, though within + each target the choice to include these prefixes should be kept + consistent. */ + dis_style_address, + + /* The style for any constant value within an instruction or directive + that represents an offset that will be added to an address before + use. This style may, or may-not be used for any prefix to the + immediate value, e.g. '$', at the discretion of the target, though + within each target the choice to include these prefixes should be + kept consistent. */ + dis_style_address_offset, + + /* The style for a symbol's name. The numerical address of a symbol + should use the address style above, this style is reserved for the + name. */ + dis_style_symbol, + + /* The start of a comment that runs to the end of the line. Anything + printed after a comment start might be styled differently, + e.g. everything might be styled as a comment, regardless of the + actual style used. The disassembler itself should not try to adjust + the style emitted for comment content, e.g. an address emitted within + a comment should still be given dis_style_address, in this way it is + up to the user of the disassembler to decide how comments should be + styled. */ + dis_style_comment_start +}; + +typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2; +typedef int (*fprintf_styled_ftype) (void *, enum disassembler_style, const char*, ...) ATTRIBUTE_FPTR_PRINTF_3; + +/* This struct is passed into the instruction decoding routine, + and is passed back out into each callback. The various fields are used + for conveying information from your main routine into your callbacks, + for passing information into the instruction decoders (such as the + addresses of the callback functions), or for passing information + back from the instruction decoders to their callers. + + It must be initialized before it is first passed; this can be done + by hand, or using one of the initialization macros below. */ + +typedef struct disassemble_info +{ + fprintf_ftype fprintf_func; + fprintf_styled_ftype fprintf_styled_func; + void *stream; +#if 0 + void *application_data; + + /* Target description. We could replace this with a pointer to the bfd, + but that would require one. There currently isn't any such requirement + so to avoid introducing one we record these explicitly. */ + /* The bfd_flavour. This can be bfd_target_unknown_flavour. */ + enum bfd_flavour flavour; + /* The bfd_arch value. */ + enum bfd_architecture arch; + /* The bfd_mach value. */ + unsigned long mach; + /* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */ + enum bfd_endian endian; + /* Endianness of code, for mixed-endian situations such as ARM BE8. */ + enum bfd_endian endian_code; + + /* Some targets need information about the current section to accurately + display insns. If this is NULL, the target disassembler function + will have to make its best guess. */ + asection *section; + + /* An array of pointers to symbols either at the location being disassembled + or at the start of the function being disassembled. The array is sorted + so that the first symbol is intended to be the one used. The others are + present for any misc. purposes. This is not set reliably, but if it is + not NULL, it is correct. */ + asymbol **symbols; + /* Number of symbols in array. */ + int num_symbols; + + /* Symbol table provided for targets that want to look at it. This is + used on Arm to find mapping symbols and determine Arm/Thumb code. */ + asymbol **symtab; + int symtab_pos; + int symtab_size; + + /* For use by the disassembler. + The top 16 bits are reserved for public use (and are documented here). + The bottom 16 bits are for the internal use of the disassembler. */ + unsigned long flags; + /* Set if the disassembler has determined that there are one or more + relocations associated with the instruction being disassembled. */ +#define INSN_HAS_RELOC (1u << 31) + /* Set if the user has requested the disassembly of data as well as code. */ +#define DISASSEMBLE_DATA (1u << 30) + /* Set if the user has specifically set the machine type encoded in the + mach field of this structure. */ +#define USER_SPECIFIED_MACHINE_TYPE (1u << 29) + /* Set if the user has requested wide output. */ +#define WIDE_OUTPUT (1u << 28) + + /* Dynamic relocations, if they have been loaded. */ + arelent **dynrelbuf; + long dynrelcount; + + /* Use internally by the target specific disassembly code. */ + void *private_data; + + /* Function used to get bytes to disassemble. MEMADDR is the + address of the stuff to be disassembled, MYADDR is the address to + put the bytes in, and LENGTH is the number of bytes to read. + INFO is a pointer to this struct. + Returns an errno value or 0 for success. */ + int (*read_memory_func) + (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length, + struct disassemble_info *dinfo); + + /* Function which should be called if we get an error that we can't + recover from. STATUS is the errno value from read_memory_func and + MEMADDR is the address that we were trying to read. INFO is a + pointer to this struct. */ + void (*memory_error_func) + (int status, bfd_vma memaddr, struct disassemble_info *dinfo); +#endif + + /* Function called to print ADDR. */ + void (*print_address_func) + (bfd_vma addr, struct disassemble_info *dinfo); + +#if 0 + /* Function called to determine if there is a symbol at the given ADDR. + If there is, the function returns 1, otherwise it returns 0. + This is used by ports which support an overlay manager where + the overlay number is held in the top part of an address. In + some circumstances we want to include the overlay number in the + address, (normally because there is a symbol associated with + that address), but sometimes we want to mask out the overlay bits. */ + asymbol * (*symbol_at_address_func) + (bfd_vma addr, struct disassemble_info *dinfo); + + /* Function called to check if a SYMBOL is can be displayed to the user. + This is used by some ports that want to hide special symbols when + displaying debugging outout. */ + bool (*symbol_is_valid) + (asymbol *, struct disassemble_info *dinfo); + + /* These are for buffer_read_memory. */ + bfd_byte *buffer; + bfd_vma buffer_vma; + size_t buffer_length; + + /* This variable may be set by the instruction decoder. It suggests + the number of bytes objdump should display on a single line. If + the instruction decoder sets this, it should always set it to + the same value in order to get reasonable looking output. */ + int bytes_per_line; + + /* The next two variables control the way objdump displays the raw data. */ + /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */ + /* output will look like this: + 00: 00000000 00000000 + with the chunks displayed according to "display_endian". */ + int bytes_per_chunk; + enum bfd_endian display_endian; + + /* Number of octets per incremented target address + Normally one, but some DSPs have byte sizes of 16 or 32 bits. */ + unsigned int octets_per_byte; + + /* The number of zeroes we want to see at the end of a section before we + start skipping them. */ + unsigned int skip_zeroes; + + /* The number of zeroes to skip at the end of a section. If the number + of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES, + they will be disassembled. If there are fewer than + SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic + attempt to avoid disassembling zeroes inserted by section + alignment. */ + unsigned int skip_zeroes_at_end; + + /* Whether the disassembler always needs the relocations. */ + bool disassembler_needs_relocs; +#endif + + /* Results from instruction decoders. Not all decoders yet support + this information. This info is set each time an instruction is + decoded, and is only valid for the last such instruction. + + To determine whether this decoder supports this information, set + insn_info_valid to 0, decode an instruction, then check it. */ + + char insn_info_valid; /* Branch info has been set. */ + char branch_delay_insns; /* How many sequential insn's will run before + a branch takes effect. (0 = normal) */ + char data_size; /* Size of data reference in insn, in bytes */ + enum dis_insn_type insn_type; /* Type of instruction */ + bfd_vma target; /* Target address of branch or dref, if known; + zero if unknown. */ + bfd_vma target2; /* Second target address for dref2 */ + + /* Command line options specific to the target disassembler. */ + const char *disassembler_options; + + /* If non-zero then try not disassemble beyond this address, even if + there are values left in the buffer. This address is the address + of the nearest symbol forwards from the start of the disassembly, + and it is assumed that it lies on the boundary between instructions. + If an instruction spans this address then this is an error in the + file being disassembled. */ + bfd_vma stop_vma; + + /* The end range of the current range being disassembled. This is required + in order to notify the disassembler when it's currently handling a + different range than it was before. This prevent unsafe optimizations when + disassembling such as the way mapping symbols are found on AArch64. */ + bfd_vma stop_offset; + + /* Set to true if the disassembler applied styling to the output, + otherwise, set to false. */ + bool created_styled_output; +} disassemble_info; + +#if 0 +/* This struct is used to pass information about valid disassembler + option arguments from the target to the generic GDB functions + that set and display them. */ + +typedef struct +{ + /* Option argument name to use in descriptions. */ + const char *name; + + /* Vector of acceptable option argument values, NULL-terminated. + NULL if any values are accepted. */ + const char **values; +} disasm_option_arg_t; + +/* This struct is used to pass information about valid disassembler + options, their descriptions and arguments from the target to the + generic GDB functions that set and display them. Options are + defined by tuples of vector entries at each index. */ + +typedef struct +{ + /* Vector of option names, NULL-terminated. */ + const char **name; + + /* Vector of option descriptions or NULL if none to be shown. */ + const char **description; + + /* Vector of option argument information pointers or NULL if no + option accepts an argument. NULL entries denote individual + options that accept no argument. */ + const disasm_option_arg_t **arg; +} disasm_options_t; + +/* This struct is used to pass information about valid disassembler + options and arguments from the target to the generic GDB functions + that set and display them. */ + +typedef struct +{ + /* Valid disassembler options. Individual options that support + an argument will refer to entries in the ARGS vector. */ + disasm_options_t options; + + /* Vector of acceptable option arguments, NULL-terminated. This + collects all possible option argument choices, some of which + may be shared by different options from the OPTIONS member. */ + disasm_option_arg_t *args; +} disasm_options_and_args_t; + +/* Standard disassemblers. Disassemble one instruction at the given + target address. Return number of octets processed. */ +typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *); + +/* Disassemblers used out side of opcodes library. */ +extern int print_insn_m32c (bfd_vma, disassemble_info *); +extern int print_insn_mep (bfd_vma, disassemble_info *); +extern int print_insn_s12z (bfd_vma, disassemble_info *); +extern int print_insn_sh (bfd_vma, disassemble_info *); +extern int print_insn_sparc (bfd_vma, disassemble_info *); +extern int print_insn_rx (bfd_vma, disassemble_info *); +extern int print_insn_rl78 (bfd_vma, disassemble_info *); +extern int print_insn_rl78_g10 (bfd_vma, disassemble_info *); +extern int print_insn_rl78_g13 (bfd_vma, disassemble_info *); +extern int print_insn_rl78_g14 (bfd_vma, disassemble_info *); + +extern disassembler_ftype arc_get_disassembler (bfd *); +extern disassembler_ftype cris_get_disassembler (bfd *); + +extern void print_aarch64_disassembler_options (FILE *); +extern void print_i386_disassembler_options (FILE *); +extern void print_mips_disassembler_options (FILE *); +extern void print_nfp_disassembler_options (FILE *); +extern void print_ppc_disassembler_options (FILE *); +extern void print_riscv_disassembler_options (FILE *); +extern void print_arm_disassembler_options (FILE *); +extern void print_arc_disassembler_options (FILE *); +extern void print_kvx_disassembler_options(FILE *); +extern void print_s390_disassembler_options (FILE *); +extern void print_wasm32_disassembler_options (FILE *); +extern void print_loongarch_disassembler_options (FILE *); +extern void print_bpf_disassembler_options (FILE *); +extern bool aarch64_symbol_is_valid (asymbol *, struct disassemble_info *); +extern bool arm_symbol_is_valid (asymbol *, struct disassemble_info *); +extern bool csky_symbol_is_valid (asymbol *, struct disassemble_info *); +extern bool riscv_symbol_is_valid (asymbol *, struct disassemble_info *); +extern void disassemble_init_powerpc (struct disassemble_info *); +#endif +extern void disassemble_init_s390 (struct disassemble_info *); +#if 0 +extern void disassemble_init_wasm32 (struct disassemble_info *); +extern void disassemble_init_nds32 (struct disassemble_info *); +extern const disasm_options_and_args_t *disassembler_options_arc (void); +extern const disasm_options_and_args_t *disassembler_options_arm (void); +extern const disasm_options_and_args_t *disassembler_options_mips (void); +extern const disasm_options_and_args_t *disassembler_options_powerpc (void); +extern const disasm_options_and_args_t *disassembler_options_riscv (void); +extern const disasm_options_and_args_t *disassembler_options_s390 (void); + +/* Fetch the disassembler for a given architecture ARC, endianess (big + endian if BIG is true), bfd_mach value MACH, and ABFD, if that support + is available. ABFD may be NULL. */ +extern disassembler_ftype disassembler (enum bfd_architecture arc, + bool big, unsigned long mach, + bfd *abfd); + +/* Amend the disassemble_info structure as necessary for the target architecture. + Should only be called after initialising the info->arch field. */ +extern void disassemble_init_for_target (struct disassemble_info *); + +/* Tidy any memory allocated by targets, such as info->private_data. */ +extern void disassemble_free_target (struct disassemble_info *); + +/* Set the basic disassembler print functions. */ +extern void disassemble_set_printf (struct disassemble_info *, void *, + fprintf_ftype, fprintf_styled_ftype); + +/* Document any target specific options available from the disassembler. */ +extern void disassembler_usage (FILE *); + +/* Remove whitespace and consecutive commas. */ +extern char *remove_whitespace_and_extra_commas (char *); + +/* Like STRCMP, but treat ',' the same as '\0' so that we match + strings like "foobar" against "foobar,xxyyzz,...". */ +extern int disassembler_options_cmp (const char *, const char *); + +/* A helper function for FOR_EACH_DISASSEMBLER_OPTION. */ +static inline const char * +next_disassembler_option (const char *options) +{ + const char *opt = strchr (options, ','); + if (opt != NULL) + opt++; + return opt; +} + +/* A macro for iterating over each comma separated option in OPTIONS. */ +#define FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) \ + for ((OPT) = (OPTIONS); \ + (OPT) != NULL; \ + (OPT) = next_disassembler_option (OPT)) + + +/* This block of definitions is for particular callers who read instructions + into a buffer before calling the instruction decoder. */ + +/* Here is a function which callers may wish to use for read_memory_func. + It gets bytes from a buffer. */ +extern int buffer_read_memory + (bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *); + +/* This function goes with buffer_read_memory. + It prints a message using info->fprintf_func and info->stream. */ +extern void perror_memory (int, bfd_vma, struct disassemble_info *); + + +/* Just print the address in hex. This is included for completeness even + though both GDB and objdump provide their own (to print symbolic + addresses). */ +extern void generic_print_address + (bfd_vma, struct disassemble_info *); + +/* Always NULL. */ +extern asymbol *generic_symbol_at_address + (bfd_vma, struct disassemble_info *); + +/* Always true. */ +extern bool generic_symbol_is_valid + (asymbol *, struct disassemble_info *); + +#endif + +/* Method to initialize a disassemble_info struct. This should be + called by all applications creating such a struct. */ +extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream, + fprintf_ftype fprintf_func, + fprintf_styled_ftype fprintf_styled_func); + +/* For compatibility with existing code. */ +#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC, FPRINTF_STYLED_FUNC) \ + init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC), \ + (fprintf_styled_ftype) (FPRINTF_STYLED_FUNC)) + +#ifdef __cplusplus +} +#endif + +#endif /* ! defined (DIS_ASM_H) */ diff --git a/VEX/priv/objdump/dis-init.c b/VEX/priv/objdump/dis-init.c new file mode 100644 index 000000000..8a10ee31d --- /dev/null +++ b/VEX/priv/objdump/dis-init.c @@ -0,0 +1,56 @@ +/* Initialize "struct disassemble_info". + + Copyright (C) 2003-2025 Free Software Foundation, Inc. + + This file is part of the GNU opcodes library. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#include "dis-asm.h" + +void +init_disassemble_info (struct disassemble_info *info, void *stream, + fprintf_ftype fprintf_func, + fprintf_styled_ftype fprintf_styled_func) +{ +#if 0 + memset(info, 0, sizeof (*info)); + + info->flavour = bfd_target_unknown_flavour; + info->arch = bfd_arch_unknown; + info->endian = BFD_ENDIAN_UNKNOWN; + info->endian_code = info->endian; + info->octets_per_byte = 1; + info->fprintf_func = fprintf_func; + info->fprintf_styled_func = fprintf_styled_func; + info->stream = stream; + info->read_memory_func = buffer_read_memory; + info->memory_error_func = perror_memory; + info->print_address_func = generic_print_address; + info->symbol_at_address_func = generic_symbol_at_address; + info->symbol_is_valid = generic_symbol_is_valid; + info->display_endian = BFD_ENDIAN_UNKNOWN; + info->created_styled_output = false; +#else + __builtin_memset(info, 0, sizeof (*info)); + + info->fprintf_func = fprintf_func; + info->fprintf_styled_func = fprintf_styled_func; + info->stream = stream; + info->print_address_func = 0; +#endif +} + diff --git a/VEX/priv/objdump/s390-dis.c b/VEX/priv/objdump/s390-dis.c new file mode 100644 index 000000000..eeae533b0 --- /dev/null +++ b/VEX/priv/objdump/s390-dis.c @@ -0,0 +1,701 @@ +/* s390-dis.c -- Disassemble S390 instructions + Copyright (C) 2000-2025 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + + This file is part of the GNU opcodes library. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with this file; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#include +#include "s390.h" +#include "dis-asm.h" +#undef NULL +#include "main_util.h" // vex_strlen +#include "s390_defs.h" // S390_MAX_MNEMONIC_LEN +#include "s390_disasm.h" + +static int opc_index[256]; +static int current_arch_mask = 0; +static int option_use_insn_len_bits_p = 0; +static int option_print_insn_desc = 0; + + +static const char * +padmnm(const char *mnm) +{ + static char buf[S390_MAX_MNEMONIC_LEN + 1]; + + if (vex_strlen(mnm) > S390_MAX_MNEMONIC_LEN) + return "failed: buf too small"; + + vex_sprintf(buf, "%-*s", S390_MAX_MNEMONIC_LEN, mnm); + + return buf; +} + + +#if 0 +typedef struct +{ + const char *name; + const char *description; +} s390_options_t; + +static const s390_options_t options[] = +{ + { "esa" , N_("Disassemble in ESA architecture mode") }, + /* TRANSLATORS: Please do not translate 'z/Architecture' as this is a technical name. */ + { "zarch", N_("Disassemble in z/Architecture mode") }, + { "insnlength", N_("Print unknown instructions according to " + "length from first two bits") }, + { "insndesc", N_("Print instruction description as comment") }, +}; +#endif + +/* Set up index table for first opcode byte. */ + +void +disassemble_init_s390 (struct disassemble_info *info) +{ + int i; + + __builtin_memset (opc_index, 0, sizeof (opc_index)); + + /* Reverse order, such that each opc_index ends up pointing to the + first matching entry instead of the last. */ + for (i = s390_num_opcodes; i--; ) + opc_index[s390_opcodes[i].opcode[0]] = i; + + current_arch_mask = 1 << S390_OPCODE_ZARCH; + option_use_insn_len_bits_p = 0; + option_print_insn_desc = 0; +#if 0 + for (p = info->disassembler_options; p != NULL; ) + { + if (startswith (p, "esa")) + current_arch_mask = 1 << S390_OPCODE_ESA; + else if (startswith (p, "zarch")) + current_arch_mask = 1 << S390_OPCODE_ZARCH; + else if (startswith (p, "insnlength")) + option_use_insn_len_bits_p = 1; + else if (startswith (p, "insndesc")) + option_print_insn_desc = 1; + else + /* xgettext:c-format */ + opcodes_error_handler (_("unknown S/390 disassembler option: %s"), p); + + p = strchr (p, ','); + if (p != NULL) + p++; + } +#endif +} + +/* Derive the length of an instruction from its first byte. */ + +static inline int +s390_insn_length (const bfd_byte *buffer) +{ + /* 00xxxxxx -> 2, 01xxxxxx/10xxxxxx -> 4, 11xxxxxx -> 6. */ + return ((buffer[0] >> 6) + 3) & ~1U; +} + +/* Match the instruction in BUFFER against the given OPCODE, excluding + the first byte. */ + +static inline int +s390_insn_matches_opcode (const bfd_byte *buffer, + const struct s390_opcode *opcode) +{ + return (buffer[1] & opcode->mask[1]) == opcode->opcode[1] + && (buffer[2] & opcode->mask[2]) == opcode->opcode[2] + && (buffer[3] & opcode->mask[3]) == opcode->opcode[3] + && (buffer[4] & opcode->mask[4]) == opcode->opcode[4] + && (buffer[5] & opcode->mask[5]) == opcode->opcode[5]; +} + +union operand_value +{ + int i; + unsigned int u; +}; + +/* Extracts an operand value from an instruction. */ +/* We do not perform the shift operation for larl-type address + operands here since that would lead to an overflow of the 32 bit + integer value. Instead the shift operation is done when printing + the operand. */ + +static inline union operand_value +s390_extract_operand (const bfd_byte *insn, + const struct s390_operand *operand) +{ + union operand_value ret; + unsigned int val; + int bits; + const bfd_byte *orig_insn = insn; + + /* Extract fragments of the operand byte for byte. */ + insn += operand->shift / 8; + bits = (operand->shift & 7) + operand->bits; + val = 0; + do + { + val <<= 8; + val |= (unsigned int) *insn++; + bits -= 8; + } + while (bits > 0); + val >>= -bits; + val &= ((1U << (operand->bits - 1)) << 1) - 1; + + /* Check for special long displacement case. */ + if (operand->bits == 20 && operand->shift == 20) + val = (val & 0xff) << 12 | (val & 0xfff00) >> 8; + + /* Sign extend value if the operand is signed or pc relative. Avoid + integer overflows. */ + if (operand->flags & (S390_OPERAND_SIGNED | S390_OPERAND_PCREL)) + { + unsigned int m = 1U << (operand->bits - 1); + + if (val >= m) + ret.i = (int) (val - m) - 1 - (int) (m - 1U); + else + ret.i = (int) val; + } + else if (operand->flags & S390_OPERAND_LENGTH) + /* Length x in an instruction has real length x + 1. */ + ret.u = val + 1; + + else if (operand->flags & S390_OPERAND_VR) + { + /* Extract the extra bits for a vector register operand stored + in the RXB field. */ + unsigned vr = operand->shift == 32 ? 3 + : (unsigned) operand->shift / 4 - 2; + + ret.u = val | ((orig_insn[4] & (1 << (3 - vr))) << (vr + 1)); + } + else + ret.u = val; + + return ret; +} + +/* Return remaining operand count. */ + +static unsigned int +operand_count (const unsigned char *opindex_ptr) +{ + unsigned int count = 0; + + for (; *opindex_ptr != 0; opindex_ptr++) + { + /* Count D(X,B), D(B), and D(L,B) as one operand. Assuming correct + instruction operand definitions simply do not count D, X, and L. */ + if (!(s390_operands[*opindex_ptr].flags & (S390_OPERAND_DISP + | S390_OPERAND_INDEX + | S390_OPERAND_LENGTH))) + count++; + } + + return count; +} + +/* Return true if all remaining instruction operands are optional. */ + +static bool +skip_optargs_p (unsigned int opcode_flags, const unsigned char *opindex_ptr) +{ + if ((opcode_flags & (S390_INSTR_FLAG_OPTPARM | S390_INSTR_FLAG_OPTPARM2))) + { + unsigned int opcount = operand_count (opindex_ptr); + + if (opcount == 1) + return true; + + if ((opcode_flags & S390_INSTR_FLAG_OPTPARM2) && opcount == 2) + return true; + } + + return false; +} + +/* Return true if all remaining instruction operands are optional + and their values are zero. */ + +static bool +skip_optargs_zero_p (const bfd_byte *buffer, unsigned int opcode_flags, + const unsigned char *opindex_ptr) +{ + /* Test if remaining operands are optional. */ + if (!skip_optargs_p (opcode_flags, opindex_ptr)) + return false; + + /* Test if remaining operand values are zero. */ + for (; *opindex_ptr != 0; opindex_ptr++) + { + const struct s390_operand *operand = &s390_operands[*opindex_ptr]; + union operand_value value = s390_extract_operand (buffer, operand); + + if (value.u != 0) + return false; + } + + return true; +} + +/* Print the S390 instruction in BUFFER, assuming that it matches the + given OPCODE. */ + +static void +s390_print_insn_with_opcode (bfd_vma memaddr, + struct disassemble_info *info, + const bfd_byte *buffer, + const struct s390_opcode *opcode) +{ + const unsigned char *opindex; + char separator; + + /* Mnemonic. */ + info->fprintf_styled_func (info->stream, dis_style_mnemonic, + "%s", padmnm(opcode->name)); + + /* Operands. */ + separator = ' '; // mnemonics are padded to the right and have same width + for (opindex = opcode->operands; *opindex != 0; opindex++) + { + const struct s390_operand *operand = s390_operands + *opindex; + union operand_value val = s390_extract_operand (buffer, operand); + unsigned long flags = operand->flags; + + /* Omit index register 0, except for vector index register 0. */ + if ((flags & S390_OPERAND_INDEX) && !(flags & S390_OPERAND_VR) + && val.u == 0) + continue; + /* Omit base register 0, if no or omitted index register 0. */ + if ((flags & S390_OPERAND_BASE) && val.u == 0 && separator == '(') + { + separator = ','; + continue; + } + + /* Omit optional last operands with a value of zero, except if + within an addressing operand sequence D(X,B), D(B), and D(L,B). + Index and base register operands with a value of zero are + handled separately, as they may not be omitted unconditionally. */ + if (!(operand->flags & (S390_OPERAND_BASE + | S390_OPERAND_INDEX + | S390_OPERAND_LENGTH)) + && skip_optargs_zero_p (buffer, opcode->flags, opindex)) + break; + + if (flags & S390_OPERAND_GPR) + { + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + if ((flags & (S390_OPERAND_BASE | S390_OPERAND_INDEX)) + && val.u == 0) + info->fprintf_styled_func (info->stream, dis_style_register, + "%u", val.u); + else + info->fprintf_styled_func (info->stream, dis_style_register, + "%%r%u", val.u); + } + else if (flags & S390_OPERAND_FPR) + { + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + info->fprintf_styled_func (info->stream, dis_style_register, + "%%f%u", val.u); + } + else if (flags & S390_OPERAND_VR) + { + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + info->fprintf_styled_func (info->stream, dis_style_register, + "%%v%u", val.u); + } + else if (flags & S390_OPERAND_AR) + { + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + info->fprintf_styled_func (info->stream, dis_style_register, + "%%a%u", val.u); + } + else if (flags & S390_OPERAND_CR) + { + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + info->fprintf_styled_func (info->stream, dis_style_register, + "%%c%u", val.u); + } + else if (flags & S390_OPERAND_PCREL) + { + bfd_vma target = memaddr + val.i + val.i; + + /* Provide info for jump visualization. May be evaluated by p_a_f(). */ + info->target = target; + + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + info->print_address_func (target, info); + } + else if (flags & S390_OPERAND_SIGNED) + { + enum disassembler_style style; + + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + style = ((flags & S390_OPERAND_DISP) + ? dis_style_address_offset : dis_style_immediate); + info->fprintf_styled_func (info->stream, style, "%i", val.i); + } + else + { + enum disassembler_style style; + + if (!(flags & S390_OPERAND_LENGTH)) + { + union operand_value insn_opval; + + /* Mask any constant operand bits set in insn template. */ + insn_opval = s390_extract_operand (opcode->opcode, operand); + val.u &= ~insn_opval.u; + } + + if ((opcode->flags & S390_INSTR_FLAG_OPTPARM) + && val.u == 0 + && opindex[1] == 0) + break; + + info->fprintf_styled_func (info->stream, dis_style_text, + "%c", separator); + style = ((flags & S390_OPERAND_DISP) + ? dis_style_address_offset : dis_style_immediate); + info->fprintf_styled_func (info->stream, style, "%u", val.u); + } + + if (flags & S390_OPERAND_DISP) + separator = '('; + else if (flags & S390_OPERAND_BASE) + { + info->fprintf_styled_func (info->stream, dis_style_text, ")"); + separator = ','; + } + else + separator = ','; + } + + /* Optional: instruction name. */ + if (option_print_insn_desc && opcode->description + && opcode->description[0] != '\0') + info->fprintf_styled_func (info->stream, dis_style_comment_start, "\t# %s", + opcode->description); +} + +/* Check whether opcode A's mask is more specific than that of B. */ + +static int +opcode_mask_more_specific (const struct s390_opcode *a, + const struct s390_opcode *b) +{ + return (((int) a->mask[0] + a->mask[1] + a->mask[2] + + a->mask[3] + a->mask[4] + a->mask[5]) + > ((int) b->mask[0] + b->mask[1] + b->mask[2] + + b->mask[3] + b->mask[4] + b->mask[5])); +} + +/* Print a S390 instruction. */ + +static int +print_insn_s390 (bfd_vma memaddr, const bfd_byte *buffer, + struct disassemble_info *info) +{ + const struct s390_opcode *opcode = NULL; + + /* Set some defaults for the insn info. */ + info->insn_info_valid = 0; + info->branch_delay_insns = 0; + info->data_size = 0; + info->insn_type = dis_nonbranch; + info->target = 0; + info->target2 = 0; + +#if 0 + /* Every S390 instruction is max 6 bytes long. */ + memset (buffer, 0, 6); + status = info->read_memory_func (memaddr, buffer, 6, info); + if (status != 0) + { + for (bufsize = 0; bufsize < 6; bufsize++) + if (info->read_memory_func (memaddr, buffer, bufsize + 1, info) != 0) + break; + if (bufsize <= 0) + { + info->memory_error_func (status, memaddr, info); + return -1; + } + opsize = s390_insn_length (buffer); + status = opsize > bufsize; + } + else + { + bufsize = 6; + opsize = s390_insn_length (buffer); + } +#endif + int status = 0; + int opsize = s390_insn_length (buffer); + + if (status == 0) + { + const struct s390_opcode *op; + + /* Find the "best match" in the opcode table. */ + for (op = s390_opcodes + opc_index[buffer[0]]; + op != s390_opcodes + s390_num_opcodes + && op->opcode[0] == buffer[0]; + op++) + { + if ((op->modes & current_arch_mask) + && s390_insn_matches_opcode (buffer, op) + && (opcode == NULL + || opcode_mask_more_specific (op, opcode))) + opcode = op; + } + + if (opcode != NULL) + { + /* Provide info for jump visualization. Must be done before print. */ + switch (opcode->flags & S390_INSTR_FLAG_CLASS_MASK) + { + case S390_INSTR_FLAGS_CLASS_JUMP: + info->insn_type = dis_branch; + break; + case S390_INSTR_FLAGS_CLASS_CONDJUMP: + info->insn_type = dis_condbranch; + break; + case S390_INSTR_FLAGS_CLASS_JUMPSR: + info->insn_type = dis_jsr; + break; + default: + info->insn_type = dis_nonbranch; + } + info->insn_info_valid = 1; + + /* The instruction is valid. Print it and return its size. */ + s390_print_insn_with_opcode (memaddr, info, buffer, opcode); + return opsize; + } + } + return 0; // failed +} + +#if 0 + /* For code sections it makes sense to skip unknown instructions + according to their length bits. */ + if (status == 0 + && option_use_insn_len_bits_p + && info->section != NULL + && (info->section->flags & SEC_CODE)) + bytes_to_dump = opsize; + else + /* By default unknown instructions are printed as .long's/.short' + depending on how many bytes are available. */ + bytes_to_dump = bufsize >= 4 ? 4 : bufsize; + + if (bytes_to_dump == 0) + return 0; + + info->insn_type = dis_noninsn; + info->insn_info_valid = 1; + + /* Fall back to hex print. */ + switch (bytes_to_dump) + { + case 4: + value = (unsigned int) buffer[0]; + value = (value << 8) + (unsigned int) buffer[1]; + value = (value << 8) + (unsigned int) buffer[2]; + value = (value << 8) + (unsigned int) buffer[3]; + info->fprintf_styled_func (info->stream, dis_style_assembler_directive, + ".long"); + info->fprintf_styled_func (info->stream, dis_style_text, + "\t"); + info->fprintf_styled_func (info->stream, dis_style_immediate, + "0x%08x", value); + return 4; + case 2: + value = (unsigned int) buffer[0]; + value = (value << 8) + (unsigned int) buffer[1]; + info->fprintf_styled_func (info->stream, dis_style_assembler_directive, + ".short"); + info->fprintf_styled_func (info->stream, dis_style_text, + "\t"); + info->fprintf_styled_func (info->stream, dis_style_immediate, + "0x%04x", value); + return 2; + default: + info->fprintf_styled_func (info->stream, dis_style_assembler_directive, + ".byte"); + info->fprintf_styled_func (info->stream, dis_style_text, + "\t"); + info->fprintf_styled_func (info->stream, dis_style_immediate, + "0x%02x", (unsigned int) buffer[0]); + for (i = 1; i < bytes_to_dump; i++) + info->fprintf_styled_func (info->stream, dis_style_immediate, + "0x%02x", (unsigned int) buffer[i]); + return bytes_to_dump; + } + return 0; +} + +const disasm_options_and_args_t * +disassembler_options_s390 (void) +{ + static disasm_options_and_args_t *opts_and_args; + + if (opts_and_args == NULL) + { + size_t i, num_options = ARRAY_SIZE (options); + disasm_options_t *opts; + + opts_and_args = XNEW (disasm_options_and_args_t); + opts_and_args->args = NULL; + + opts = &opts_and_args->options; + opts->name = XNEWVEC (const char *, num_options + 1); + opts->description = XNEWVEC (const char *, num_options + 1); + opts->arg = NULL; + for (i = 0; i < num_options; i++) + { + opts->name[i] = options[i].name; + opts->description[i] = _(options[i].description); + } + /* The array we return must be NULL terminated. */ + opts->name[i] = NULL; + opts->description[i] = NULL; + } + + return opts_and_args; +} + +void +print_s390_disassembler_options (FILE *stream) +{ + unsigned int i, max_len = 0; + fprintf (stream, _("\n\ +The following S/390 specific disassembler options are supported for use\n\ +with the -M switch (multiple options should be separated by commas):\n")); + + for (i = 0; i < ARRAY_SIZE (options); i++) + { + unsigned int len = strlen (options[i].name); + if (max_len < len) + max_len = len; + } + + for (i = 0, max_len++; i < ARRAY_SIZE (options); i++) + fprintf (stream, " %s%*c %s\n", + options[i].name, + (int)(max_len - strlen (options[i].name)), ' ', + _(options[i].description)); +} +#endif + + +/* Pseudo FILE object for strings. */ +typedef struct { + char buf[128]; // holds the disassembled insn; large enough + size_t pos; + size_t alloc; + unsigned (*val_vsprintf)(char *, const char *, va_list); // == vex_vsprintf + struct disassemble_info *info; +} SFILE; + +static unsigned +sprintf_cb(SFILE *f, enum disassembler_style style, const char *fmt, ...) +{ + va_list args; + unsigned space = f->alloc - f->pos; + unsigned n; + + va_start(args, fmt); + n = f->val_vsprintf(f->buf + f->pos, fmt, args); + va_end(args); + + if (space <= n) + vassert(0); + + f->pos += n; + + return n; +} + +static void +objdump_print_pcrel(bfd_vma addr, struct disassemble_info *info) +{ + /* this really is a signed offset in bytes */ + long long offset = (long long)addr; + + (*info->fprintf_styled_func)(info->stream, dis_style_text, + (offset < 0) ? ".%lld" : ".+%lld", offset); +} + + +static void +s390_disasm_init(SFILE *dis, unsigned (*fp)(char *, const char *, va_list)) +{ + static struct disassemble_info info; + + init_disassemble_info(&info, dis, NULL, + (fprintf_styled_ftype) sprintf_cb); + disassemble_init_s390(&info); + info.print_address_func = objdump_print_pcrel; + + /* Initialise the SFILE object */ + dis->val_vsprintf = fp; + dis->pos = 0; + dis->alloc = sizeof dis->buf; + dis->buf[0] = '\0'; + dis->info = &info; +} + + +void +s390_disasm(const unsigned char insn[]) +{ + static int initialised = 0; + static SFILE disasm; + + if (! initialised) { + initialised = 1; + s390_disasm_init(&disasm, vex_vsprintf); + } + + disasm.pos = 0; /* reset */ + disasm.buf[0] = '\0'; + + /* Passing 0 as an address which is only used for symbolically print + a PC-relative operand like so . That means: in + objdump_print_pcrel we get the offset and can write it out relative to + the current address: .+offset of .-offset */ + int rc = print_insn_s390(/* address */ 0, insn, disasm.info); + + vex_printf("%s\n", (rc == 0) ? "disassemly failed" : disasm.buf); +} diff --git a/VEX/priv/objdump/s390-opc.c b/VEX/priv/objdump/s390-opc.c new file mode 100644 index 000000000..f351aadc4 --- /dev/null +++ b/VEX/priv/objdump/s390-opc.c @@ -0,0 +1,814 @@ +/* s390-opc.c -- S390 opcode list + Copyright (C) 2000-2025 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + + This file is part of the GNU opcodes library. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + It is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with this file; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#include "stubs.h" +#include "s390.h" + +/* This file holds the S390 opcode table. The opcode table + includes almost all of the extended instruction mnemonics. This + permits the disassembler to use them, and simplifies the assembler + logic, at the cost of increasing the table size. The table is + strictly constant data, so the compiler should be able to put it in + the .text section. + + This file also holds the operand table. All knowledge about + inserting operands into instructions and vice-versa is kept in this + file. */ + +/* Build-time checks are preferrable over runtime ones. Use this construct + in preference where possible. */ +#ifndef static_assert +#define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); })) +#endif + +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) + +/* The operands table. + The fields are bits, shift, insert, extract, flags. */ + +const struct s390_operand s390_operands[] = +{ +#define UNUSED 0 + { 0, 0, 0 }, /* Indicates the end of the operand list */ + +/* General purpose register operands. */ + +#define R_8 (UNUSED + 1) /* GPR starting at position 8 */ + { 4, 8, S390_OPERAND_GPR }, +#define R_12 (R_8 + 1) /* GPR starting at position 12 */ + { 4, 12, S390_OPERAND_GPR }, +#define R_16 (R_12 + 1) /* GPR starting at position 16 */ + { 4, 16, S390_OPERAND_GPR }, +#define R_20 (R_16 + 1) /* GPR starting at position 20 */ + { 4, 20, S390_OPERAND_GPR }, +#define R_24 (R_20 + 1) /* GPR starting at position 24 */ + { 4, 24, S390_OPERAND_GPR }, +#define R_28 (R_24 + 1) /* GPR starting at position 28 */ + { 4, 28, S390_OPERAND_GPR }, +#define R_CP16_28 (R_28 + 1) /* GPR starting at position 28 */ + { 4, 28, S390_OPERAND_GPR | S390_OPERAND_CP16 }, /* with a copy at pos 16 */ +#define R_32 (R_CP16_28+1) /* GPR starting at position 32 */ + { 4, 32, S390_OPERAND_GPR }, + +/* General purpose register pair operands. */ + +#define RE_8 (R_32 + 1) /* GPR starting at position 8 */ + { 4, 8, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR }, +#define RE_12 (RE_8 + 1) /* GPR starting at position 12 */ + { 4, 12, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR }, +#define RE_16 (RE_12 + 1) /* GPR starting at position 16 */ + { 4, 16, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR }, +#define RE_20 (RE_16 + 1) /* GPR starting at position 20 */ + { 4, 20, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR }, +#define RE_24 (RE_20 + 1) /* GPR starting at position 24 */ + { 4, 24, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR }, +#define RE_28 (RE_24 + 1) /* GPR starting at position 28 */ + { 4, 28, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR }, +#define RE_32 (RE_28 + 1) /* GPR starting at position 32 */ + { 4, 32, S390_OPERAND_GPR | S390_OPERAND_REG_PAIR }, + +/* Floating point register operands. */ + +#define F_8 (RE_32 + 1) /* FPR starting at position 8 */ + { 4, 8, S390_OPERAND_FPR }, +#define F_12 (F_8 + 1) /* FPR starting at position 12 */ + { 4, 12, S390_OPERAND_FPR }, +#define F_16 (F_12 + 1) /* FPR starting at position 16 */ + { 4, 16, S390_OPERAND_FPR }, +#define F_24 (F_16 + 1) /* FPR starting at position 24 */ + { 4, 24, S390_OPERAND_FPR }, +#define F_28 (F_24 + 1) /* FPR starting at position 28 */ + { 4, 28, S390_OPERAND_FPR }, +#define F_32 (F_28 + 1) /* FPR starting at position 32 */ + { 4, 32, S390_OPERAND_FPR }, + +/* Floating point register pair operands. */ + +#define FE_8 (F_32 + 1) /* FPR starting at position 8 */ + { 4, 8, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR }, +#define FE_12 (FE_8 + 1) /* FPR starting at position 12 */ + { 4, 12, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR }, +#define FE_16 (FE_12 + 1) /* FPR starting at position 16 */ + { 4, 16, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR }, +#define FE_24 (FE_16 + 1) /* FPR starting at position 24 */ + { 4, 24, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR }, +#define FE_28 (FE_24 + 1) /* FPR starting at position 28 */ + { 4, 28, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR }, +#define FE_32 (FE_28 + 1) /* FPR starting at position 32 */ + { 4, 32, S390_OPERAND_FPR | S390_OPERAND_REG_PAIR }, + +/* Vector register operands. */ + +/* For each of these operands and additional bit in the RXB operand is + needed. */ + +#define V_8 (FE_32 + 1) /* Vector reg. starting at position 8 */ + { 4, 8, S390_OPERAND_VR }, +#define V_12 (V_8 + 1) /* Vector reg. starting at position 12 */ + { 4, 12, S390_OPERAND_VR }, +#define V_CP16_12 (V_12 + 1) /* Vector reg. starting at position 12 */ + { 4, 12, S390_OPERAND_VR | S390_OPERAND_CP16 }, /* with a copy at pos 16 */ +#define V_16 (V_CP16_12+1) /* Vector reg. starting at position 16 */ + { 4, 16, S390_OPERAND_VR }, +#define V_32 (V_16 + 1) /* Vector reg. starting at position 32 */ + { 4, 32, S390_OPERAND_VR }, + +/* Access register operands. */ + +#define A_8 (V_32 + 1) /* Access reg. starting at position 8 */ + { 4, 8, S390_OPERAND_AR }, +#define A_12 (A_8 + 1) /* Access reg. starting at position 12 */ + { 4, 12, S390_OPERAND_AR }, +#define A_24 (A_12 + 1) /* Access reg. starting at position 24 */ + { 4, 24, S390_OPERAND_AR }, +#define A_28 (A_24 + 1) /* Access reg. starting at position 28 */ + { 4, 28, S390_OPERAND_AR }, + +/* Control register operands. */ + +#define C_8 (A_28 + 1) /* Control reg. starting at position 8 */ + { 4, 8, S390_OPERAND_CR }, +#define C_12 (C_8 + 1) /* Control reg. starting at position 12 */ + { 4, 12, S390_OPERAND_CR }, + +/* Base register operands. */ + +#define B_16 (C_12 + 1) /* Base register starting at position 16 */ + { 4, 16, S390_OPERAND_BASE | S390_OPERAND_GPR }, +#define B_32 (B_16 + 1) /* Base register starting at position 32 */ + { 4, 32, S390_OPERAND_BASE | S390_OPERAND_GPR }, + +#define X_12 (B_32 + 1) /* Index register starting at position 12 */ + { 4, 12, S390_OPERAND_INDEX | S390_OPERAND_GPR }, + +#define VX_12 (X_12+1) /* Vector index register starting at position 12 */ + { 4, 12, S390_OPERAND_INDEX | S390_OPERAND_VR }, + +/* Address displacement operands. */ + +#define D_20 (VX_12 + 1) /* Displacement starting at position 20 */ + { 12, 20, S390_OPERAND_DISP }, +#define D_36 (D_20 + 1) /* Displacement starting at position 36 */ + { 12, 36, S390_OPERAND_DISP }, +#define D20_20 (D_36 + 1) /* 20 bit displacement starting at 20 */ + { 20, 20, S390_OPERAND_DISP | S390_OPERAND_SIGNED }, + +/* Length operands. */ + +#define L4_8 (D20_20 + 1) /* 4 bit length starting at position 8 */ + { 4, 8, S390_OPERAND_LENGTH }, +#define L4_12 (L4_8 + 1) /* 4 bit length starting at position 12 */ + { 4, 12, S390_OPERAND_LENGTH }, +#define L8_8 (L4_12 + 1) /* 8 bit length starting at position 8 */ + { 8, 8, S390_OPERAND_LENGTH }, + +/* Signed immediate operands. */ + +#define I8_8 (L8_8 + 1) /* 8 bit signed value starting at 8 */ + { 8, 8, S390_OPERAND_SIGNED }, +#define I8_32 (I8_8 + 1) /* 8 bit signed value starting at 32 */ + { 8, 32, S390_OPERAND_SIGNED }, +#define I12_12 (I8_32 + 1) /* 12 bit signed value starting at 12 */ + { 12, 12, S390_OPERAND_SIGNED }, +#define I16_16 (I12_12 + 1) /* 16 bit signed value starting at 16 */ + { 16, 16, S390_OPERAND_SIGNED }, +#define I16_32 (I16_16 + 1) /* 16 bit signed value starting at 32 */ + { 16, 32, S390_OPERAND_SIGNED }, +#define I24_24 (I16_32 + 1) /* 24 bit signed value starting at 24 */ + { 24, 24, S390_OPERAND_SIGNED }, +#define I32_16 (I24_24 + 1) /* 32 bit signed value starting at 16 */ + { 32, 16, S390_OPERAND_SIGNED }, + +/* Unsigned immediate operands. */ + +#define U4_8 (I32_16 + 1) /* 4 bit unsigned value starting at 8 */ + { 4, 8, 0 }, +#define U4_12 (U4_8 + 1) /* 4 bit unsigned value starting at 12 */ + { 4, 12, 0 }, +#define U4_16 (U4_12 + 1) /* 4 bit unsigned value starting at 16 */ + { 4, 16, 0 }, +#define U4_20 (U4_16 + 1) /* 4 bit unsigned value starting at 20 */ + { 4, 20, 0 }, +#define U4_24 (U4_20 + 1) /* 4 bit unsigned value starting at 24 */ + { 4, 24, 0 }, +#define U4_28 (U4_24+1) /* 4 bit unsigned value starting at 28 */ + { 4, 28, 0 }, +#define U4_32 (U4_28+1) /* 4 bit unsigned value starting at 32 */ + { 4, 32, 0 }, +#define U4_36 (U4_32 + 1) /* 4 bit unsigned value starting at 36 */ + { 4, 36, 0 }, +#define U8_8 (U4_36 + 1) /* 8 bit unsigned value starting at 8 */ + { 8, 8, 0 }, +#define U8_16 (U8_8 + 1) /* 8 bit unsigned value starting at 16 */ + { 8, 16, 0 }, +#define U8_24 (U8_16 + 1) /* 8 bit unsigned value starting at 24 */ + { 8, 24, 0 }, +#define U8_28 (U8_24 + 1) /* 8 bit unsigned value starting at 28 */ + { 8, 28, 0 }, +#define U8_32 (U8_28 + 1) /* 8 bit unsigned value starting at 32 */ + { 8, 32, 0 }, +#define U12_16 (U8_32 + 1) /* 12 bit unsigned value starting at 16 */ + { 12, 16, 0 }, +#define U16_16 (U12_16 + 1) /* 16 bit unsigned value starting at 16 */ + { 16, 16, 0 }, +#define U16_20 (U16_16 + 1) /* 16 bit unsigned value starting at 20 */ + { 16, 20, 0 }, +#define U16_32 (U16_20 + 1) /* 16 bit unsigned value starting at 32 */ + { 16, 32, 0 }, +#define U32_16 (U16_32 + 1) /* 32 bit unsigned value starting at 16 */ + { 32, 16, 0 }, + +/* PC-relative address operands. */ + +#define J12_12 (U32_16 + 1) /* 12 bit PC relative offset at 12 */ + { 12, 12, S390_OPERAND_PCREL }, +#define J16_16 (J12_12 + 1) /* 16 bit PC relative offset at 16 */ + { 16, 16, S390_OPERAND_PCREL }, +#define J16_32 (J16_16 + 1) /* 16 bit PC relative offset at 32 */ + { 16, 32, S390_OPERAND_PCREL }, +#define J24_24 (J16_32 + 1) /* 24 bit PC relative offset at 24 */ + { 24, 24, S390_OPERAND_PCREL }, +#define J32_16 (J24_24 + 1) /* 32 bit PC relative offset at 16 */ + { 32, 16, S390_OPERAND_PCREL }, + +}; + +static inline void ATTRIBUTE_UNUSED +unused_s390_operands_static_asserts (void) +{ + static_assert (ARRAY_SIZE (s390_operands) - 1 == J32_16); +} + +/* Macros used to form opcodes. */ + +/* 8/16/48 bit opcodes. */ +#define OP8(x) { x, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define OP16(x) { x >> 8, x & 255, 0x00, 0x00, 0x00, 0x00 } +#define OP32(x) { x >> 24, (x >> 16) & 255, (x >> 8) & 255, x & 255, \ + 0x00, 0x00 } +#define OP48(x) { x >> 40, (x >> 32) & 255, (x >> 24) & 255, \ + (x >> 16) & 255, (x >> 8) & 255, x & 255} + +/* The new format of the INSTR_x_y and MASK_x_y defines is based + on the following rules: + 1) the middle part of the definition (x in INSTR_x_y) is the official + names of the instruction format that you can find in the principals + of operation. + 2) the last part of the definition (y in INSTR_x_y) gives you an idea + which operands the binary represenation of the instruction has. + The meanings of the letters in y are: + a - access register + c - control register + d - displacement, 12 bit + f - floating pointer register + fe - fpr extended operand, a valid floating pointer register pair + i - signed integer, 4, 8, 16 or 32 bit + l - length, 4 or 8 bit + p - pc relative + r - general purpose register + re - gpr extended operand, a valid general purpose register pair + u - unsigned integer, 4, 8, 16 or 32 bit + m - mode field, 4 bit + 0 - operand skipped. + The order of the letters reflects the layout of the format in + storage and not the order of the paramaters of the instructions. + The use of the letters is not a 100% match with the PoP but it is + quite close. + + For example the instruction "mvo" is defined in the PoP as follows: + + MVO D1(L1,B1),D2(L2,B2) [SS] + + -------------------------------------- + | 'F1' | L1 | L2 | B1 | D1 | B2 | D2 | + -------------------------------------- + 0 8 12 16 20 32 36 + + The instruction format is: INSTR_SS_LLRDRD / MASK_SS_LLRDRD. */ + +#define INSTR_E 2, { 0,0,0,0,0,0 } /* e.g. pr */ +#define INSTR_IE_UU 4, { U4_24,U4_28,0,0,0,0 } /* e.g. niai */ +#define INSTR_MII_UPP 6, { U4_8,J12_12,J24_24 } /* e.g. bprp */ +#define INSTR_RIE_RRP 6, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxhg */ +#define INSTR_RIE_RRPU 6, { R_8,R_12,U4_32,J16_16,0,0 } /* e.g. crj */ +#define INSTR_RIE_RRP0 6, { R_8,R_12,J16_16,0,0,0 } /* e.g. cgrjne */ +#define INSTR_RIE_RRI0 6, { R_8,R_12,I16_16,0,0,0 } /* e.g. ahik */ +#define INSTR_RIE_RUPI 6, { R_8,I8_32,U4_12,J16_16,0,0 } /* e.g. cij */ +#define INSTR_RIE_R0PI 6, { R_8,I8_32,J16_16,0,0,0 } /* e.g. cijne */ +#define INSTR_RIE_RUPU 6, { R_8,U8_32,U4_12,J16_16,0,0 } /* e.g. clij */ +#define INSTR_RIE_R0PU 6, { R_8,U8_32,J16_16,0,0,0 } /* e.g. clijne */ +#define INSTR_RIE_R0IU 6, { R_8,I16_16,U4_32,0,0,0 } /* e.g. cit */ +#define INSTR_RIE_R0I0 6, { R_8,I16_16,0,0,0,0 } /* e.g. citne */ +#define INSTR_RIE_R0UU 6, { R_8,U16_16,U4_32,0,0,0 } /* e.g. clfit */ +#define INSTR_RIE_R0U0 6, { R_8,U16_16,0,0,0,0 } /* e.g. clfitne */ +#define INSTR_RIE_RUI0 6, { R_8,I16_16,U4_12,0,0,0 } /* e.g. lochi */ +#define INSTR_RIE_RRUUU 6, { R_8,R_12,U8_16,U8_24,U8_32,0 } /* e.g. rnsbg */ +#define INSTR_RIE_RRUUU2 INSTR_RIE_RRUUU /* e.g. risbgz */ +#define INSTR_RIE_RRUUU3 INSTR_RIE_RRUUU /* e.g. risbhg */ +#define INSTR_RIE_RRUUU4 INSTR_RIE_RRUUU /* e.g. rnsbgt */ +#define INSTR_RIL_0P 6, { J32_16,0,0,0,0 } /* e.g. jg */ +#define INSTR_RIL_RP 6, { R_8,J32_16,0,0,0,0 } /* e.g. brasl */ +#define INSTR_RIL_UP 6, { U4_8,J32_16,0,0,0,0 } /* e.g. brcl */ +#define INSTR_RIL_RI 6, { R_8,I32_16,0,0,0,0 } /* e.g. afi */ +#define INSTR_RIL_RU 6, { R_8,U32_16,0,0,0,0 } /* e.g. alfi */ +#define INSTR_RI_0P 4, { J16_16,0,0,0,0,0 } /* e.g. j */ +#define INSTR_RI_RI 4, { R_8,I16_16,0,0,0,0 } /* e.g. ahi */ +#define INSTR_RI_RP 4, { R_8,J16_16,0,0,0,0 } /* e.g. brct */ +#define INSTR_RI_RU 4, { R_8,U16_16,0,0,0,0 } /* e.g. tml */ +#define INSTR_RI_UP 4, { U4_8,J16_16,0,0,0,0 } /* e.g. brc */ +#define INSTR_RIS_RURDI 6, { R_8,I8_32,U4_12,D_20,B_16,0 } /* e.g. cib */ +#define INSTR_RIS_R0RDI 6, { R_8,I8_32,D_20,B_16,0,0 } /* e.g. cibne */ +#define INSTR_RIS_RURDU 6, { R_8,U8_32,U4_12,D_20,B_16,0 } /* e.g. clib */ +#define INSTR_RIS_R0RDU 6, { R_8,U8_32,D_20,B_16,0,0 } /* e.g. clibne*/ +#define INSTR_RRE_00 4, { 0,0,0,0,0,0 } /* e.g. palb */ +#define INSTR_RRE_0R 4, { R_28,0,0,0,0,0 } /* e.g. tb */ +#define INSTR_RRE_AA 4, { A_24,A_28,0,0,0,0 } /* e.g. cpya */ +#define INSTR_RRE_AR 4, { A_24,R_28,0,0,0,0 } /* e.g. sar */ +#define INSTR_RRE_F0 4, { F_24,0,0,0,0,0 } /* e.g. lzer */ +#define INSTR_RRE_FE0 4, { FE_24,0,0,0,0,0 } /* e.g. lzxr */ +#define INSTR_RRE_FF 4, { F_24,F_28,0,0,0,0 } /* e.g. debr */ +#define INSTR_RRE_FEF 4, { FE_24,F_28,0,0,0,0 } /* e.g. lxdbr */ +#define INSTR_RRE_FFE 4, { F_24,FE_28,0,0,0,0 } /* e.g. lexr */ +#define INSTR_RRE_FEFE 4, { FE_24,FE_28,0,0,0,0 } /* e.g. dxr */ +#define INSTR_RRE_R0 4, { R_24,0,0,0,0,0 } /* e.g. ipm */ +#define INSTR_RRE_RA 4, { R_24,A_28,0,0,0,0 } /* e.g. ear */ +#define INSTR_RRE_RF 4, { R_24,F_28,0,0,0,0 } /* e.g. lgdr */ +#define INSTR_RRE_RFE 4, { R_24,FE_28,0,0,0,0 } /* e.g. csxtr */ +#define INSTR_RRE_RR 4, { R_24,R_28,0,0,0,0 } /* e.g. lura */ +#define INSTR_RRE_RER 4, { RE_24,R_28,0,0,0,0 } /* e.g. tre */ +#define INSTR_RRE_RERE 4, { RE_24,RE_28,0,0,0,0 } /* e.g. cuse */ +#define INSTR_RRE_FR 4, { F_24,R_28,0,0,0,0 } /* e.g. ldgr */ +#define INSTR_RRE_FER 4, { FE_24,R_28,0,0,0,0 } /* e.g. cxfbr */ +#define INSTR_RRF_F0FF 4, { F_16,F_24,F_28,0,0,0 } /* e.g. madbr */ +#define INSTR_RRF_FE0FF 4, { F_16,F_24,F_28,0,0,0 } /* e.g. myr */ +#define INSTR_RRF_F0FF2 4, { F_24,F_16,F_28,0,0,0 } /* e.g. cpsdr */ +#define INSTR_RRF_F0FR 4, { F_24,F_16,R_28,0,0,0 } /* e.g. iedtr */ +#define INSTR_RRF_FE0FER 4, { FE_24,FE_16,R_28,0,0,0 } /* e.g. iextr */ +#define INSTR_RRF_FUFF 4, { F_24,F_16,F_28,U4_20,0,0 } /* e.g. didbr */ +#define INSTR_RRF_FEUFEFE 4, { FE_24,FE_16,FE_28,U4_20,0,0 } /* e.g. qaxtr */ +#define INSTR_RRF_FUFF2 4, { F_24,F_28,F_16,U4_20,0,0 } /* e.g. adtra */ +#define INSTR_RRF_FEUFEFE2 4, { FE_24,FE_28,FE_16,U4_20,0,0 } /* e.g. axtra */ +#define INSTR_RRF_RURR 4, { R_24,R_28,R_16,U4_20,0,0 } /* e.g. ipte */ +#define INSTR_RRF_RURR2 4, { R_24,R_16,R_28,U4_20,0,0 } /* e.g. lptea */ +#define INSTR_RRF_R0RR 4, { R_24,R_16,R_28,0,0,0 } /* e.g. idte */ +#define INSTR_RRF_R0RR2 4, { R_24,R_28,R_16,0,0,0 } /* e.g. ark */ +#define INSTR_RRF_R0RER 4, { RE_24,R_28,R_16,0,0,0 } /* e.g. mgrk */ +#define INSTR_RRF_R0RR3 4, { R_24,R_28,R_16,0,0,0 } /* e.g. selrz */ +#define INSTR_RRF_R0RR4 4, { R_24,R_CP16_28,0,0,0,0 } /* e.g. notr */ +#define INSTR_RRF_U0FF 4, { F_24,U4_16,F_28,0,0,0 } /* e.g. fidbr */ +#define INSTR_RRF_U0FEFE 4, { FE_24,U4_16,FE_28,0,0,0 } /* e.g. fixbr */ +#define INSTR_RRF_U0RF 4, { R_24,U4_16,F_28,0,0,0 } /* e.g. cfebr */ +#define INSTR_RRF_U0RFE 4, { R_24,U4_16,FE_28,0,0,0 } /* e.g. cfxbr */ +#define INSTR_RRF_UUFF 4, { F_24,U4_16,F_28,U4_20,0,0 } /* e.g. fidtr */ +#define INSTR_RRF_UUFFE 4, { F_24,U4_16,FE_28,U4_20,0,0 } /* e.g. ldxtr */ +#define INSTR_RRF_UUFEFE 4, { FE_24,U4_16,FE_28,U4_20,0,0 } /* e.g. fixtr */ +#define INSTR_RRF_0UFF 4, { F_24,F_28,U4_20,0,0,0 } /* e.g. ldetr */ +#define INSTR_RRF_0UFEF 4, { FE_24,F_28,U4_20,0,0,0 } /* e.g. lxdtr */ +#define INSTR_RRF_FFRU 4, { F_24,F_16,R_28,U4_20,0,0 } /* e.g. rrdtr */ +#define INSTR_RRF_FEFERU 4, { FE_24,FE_16,R_28,U4_20,0,0 } /* e.g. rrxtr */ +#define INSTR_RRF_U0RR 4, { R_24,R_28,U4_16,0,0,0 } /* e.g. sske */ +#define INSTR_RRF_U0RER 4, { RE_24,R_28,U4_16,0,0,0 } /* e.g. trte */ +#define INSTR_RRF_U0RERE 4, { RE_24,RE_28,U4_16,0,0,0 } /* e.g. cu24 */ +#define INSTR_RRF_00RR 4, { R_24,R_28,0,0,0,0 } /* e.g. clrtne */ +#define INSTR_RRF_0URF 4, { R_24,F_28,U4_20,0,0,0 } /* e.g. csdtr */ +#define INSTR_RRF_0UREFE 4, { RE_24,FE_28,U4_20,0,0,0 } /* e.g. csxtr */ +#define INSTR_RRF_UUFR 4, { F_24,U4_16,R_28,U4_20,0,0 } /* e.g. cdgtra */ +#define INSTR_RRF_UUFER 4, { FE_24,U4_16,R_28,U4_20,0,0 } /* e.g. cxfbra */ +#define INSTR_RRF_UURF 4, { R_24,U4_16,F_28,U4_20,0,0 } /* e.g. cgdtra */ +#define INSTR_RRF_UURFE 4, { R_24,U4_16,FE_28,U4_20,0,0 } /* e.g. cfxbra */ +#define INSTR_RR_0R 2, { R_12, 0,0,0,0,0 } /* e.g. br */ +#define INSTR_RR_FF 2, { F_8,F_12,0,0,0,0 } /* e.g. adr */ +#define INSTR_RR_FEF 2, { FE_8,F_12,0,0,0,0 } /* e.g. mxdr */ +#define INSTR_RR_FFE 2, { F_8,FE_12,0,0,0,0 } /* e.g. ldxr */ +#define INSTR_RR_FEFE 2, { FE_8,FE_12,0,0,0,0 } /* e.g. axr */ +#define INSTR_RR_R0 2, { R_8, 0,0,0,0,0 } /* e.g. spm */ +#define INSTR_RR_RR 2, { R_8,R_12,0,0,0,0 } /* e.g. lr */ +#define INSTR_RR_RER 2, { RE_8,R_12,0,0,0,0 } /* e.g. dr */ +#define INSTR_RR_U0 2, { U8_8, 0,0,0,0,0 } /* e.g. svc */ +#define INSTR_RR_UR 2, { U4_8,R_12,0,0,0,0 } /* e.g. bcr */ +#define INSTR_RRR_F0FF 4, { F_24,F_28,F_16,0,0,0 } /* e.g. ddtr */ +#define INSTR_RRR_FE0FEFE 4, { FE_24,FE_28,FE_16,0,0,0 } /* e.g. axtr */ +#define INSTR_RRS_RRRDU 6, { R_8,R_12,U4_32,D_20,B_16 } /* e.g. crb */ +#define INSTR_RRS_RRRD0 6, { R_8,R_12,D_20,B_16,0 } /* e.g. crbne */ +#define INSTR_RSE_RRRD 6, { R_8,R_12,D_20,B_16,0,0 } /* e.g. lmh */ +#define INSTR_RSE_RERERD 6, { RE_8,RE_12,D_20,B_16,0,0 } /* e.g. mvclu */ +#define INSTR_RSE_CCRD 6, { C_8,C_12,D_20,B_16,0,0 } /* e.g. stctg */ +#define INSTR_RSE_RURD 6, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icmh */ +#define INSTR_RSL_R0RD 6, { D_20,L4_8,B_16,0,0,0 } /* e.g. tp */ +#define INSTR_RSL_LRDFU 6, { F_32,D_20,L8_8,B_16,U4_36,0 } /* e.g. cdzt */ +#define INSTR_RSL_LRDFEU 6, { FE_32,D_20,L8_8,B_16,U4_36,0 } /* e.g. cxzt */ +#define INSTR_RSI_RRP 4, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxh */ +#define INSTR_RSY_RRRD 6, { R_8,R_12,D20_20,B_16,0,0 } /* e.g. stmy */ +#define INSTR_RSY_RERERD 6, { RE_8,RE_12,D20_20,B_16,0,0 } /* e.g. cdsy */ +#define INSTR_RSY_RURD 6, { R_8,U4_12,D20_20,B_16,0,0 } /* e.g. icmh */ +#define INSTR_RSY_RURD2 6, { R_8,D20_20,B_16,U4_12,0,0 } /* e.g. loc */ +#define INSTR_RSY_R0RD 6, { R_8,D20_20,B_16,0,0,0 } /* e.g. locne */ +#define INSTR_RSY_AARD 6, { A_8,A_12,D20_20,B_16,0,0 } /* e.g. lamy */ +#define INSTR_RSY_CCRD 6, { C_8,C_12,D20_20,B_16,0,0 } /* e.g. stctg */ +#define INSTR_RS_AARD 4, { A_8,A_12,D_20,B_16,0,0 } /* e.g. lam */ +#define INSTR_RS_CCRD 4, { C_8,C_12,D_20,B_16,0,0 } /* e.g. lctl */ +#define INSTR_RS_R0RD 4, { R_8,D_20,B_16,0,0,0 } /* e.g. sll */ +#define INSTR_RS_RE0RD 4, { RE_8,D_20,B_16,0,0,0 } /* e.g. slda */ +#define INSTR_RS_RRRD 4, { R_8,R_12,D_20,B_16,0,0 } /* e.g. cs */ +#define INSTR_RS_RERERD 4, { RE_8,RE_12,D_20,B_16,0,0 } /* e.g. cds */ +#define INSTR_RS_RURD 4, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icm */ +#define INSTR_RXE_FRRD 6, { F_8,D_20,X_12,B_16,0,0 } /* e.g. adb */ +#define INSTR_RXE_FERRD 6, { FE_8,D_20,X_12,B_16,0,0 } /* e.g. lxdb */ +#define INSTR_RXE_RRRD 6, { R_8,D_20,X_12,B_16,0,0 } /* e.g. lg */ +#define INSTR_RXE_RRRDU 6, { R_8,D_20,X_12,B_16,U4_32,0 } /* e.g. lcbb */ +#define INSTR_RXE_RERRD 6, { RE_8,D_20,X_12,B_16,0,0 } /* e.g. dsg */ +#define INSTR_RXF_FRRDF 6, { F_32,F_8,D_20,X_12,B_16,0 } /* e.g. madb */ +#define INSTR_RXF_FRRDFE 6, { FE_32,F_8,D_20,X_12,B_16,0 } /* e.g. my */ +#define INSTR_RXF_FERRDFE 6, { FE_32,FE_8,D_20,X_12,B_16,0 } /* e.g. slxt */ +#define INSTR_RXF_RRRDR 6, { R_32,R_8,D_20,X_12,B_16,0 } /* e.g. .insn */ +#define INSTR_RXY_RRRD 6, { R_8,D20_20,X_12,B_16,0,0 } /* e.g. ly */ +#define INSTR_RXY_RERRD 6, { RE_8,D20_20,X_12,B_16,0,0 } /* e.g. dsg */ +#define INSTR_RXY_FRRD 6, { F_8,D20_20,X_12,B_16,0,0 } /* e.g. ley */ +#define INSTR_RXY_URRD 6, { U4_8,D20_20,X_12,B_16,0,0 } /* e.g. pfd */ +#define INSTR_RXY_0RRD 6, { D20_20,X_12,B_16,0,0 } /* e.g. bic */ +#define INSTR_RX_0RRD 4, { D_20,X_12,B_16,0,0,0 } /* e.g. be */ +#define INSTR_RX_FRRD 4, { F_8,D_20,X_12,B_16,0,0 } /* e.g. ae */ +#define INSTR_RX_FERRD 4, { FE_8,D_20,X_12,B_16,0,0 } /* e.g. mxd */ +#define INSTR_RX_RRRD 4, { R_8,D_20,X_12,B_16,0,0 } /* e.g. l */ +#define INSTR_RX_RERRD 4, { RE_8,D_20,X_12,B_16,0,0 } /* e.g. d */ +#define INSTR_RX_URRD 4, { U4_8,D_20,X_12,B_16,0,0 } /* e.g. bc */ +#define INSTR_SI_RD 4, { D_20,B_16,0,0,0,0 } /* e.g. lpsw */ +#define INSTR_SI_URD 4, { D_20,B_16,U8_8,0,0,0 } /* e.g. cli */ +#define INSTR_SIY_RD 6, { D20_20,B_16,0,0,0,0 } /* e.g. lpswey*/ +#define INSTR_SIY_URD 6, { D20_20,B_16,U8_8,0,0,0 } /* e.g. tmy */ +#define INSTR_SIY_IRD 6, { D20_20,B_16,I8_8,0,0,0 } /* e.g. asi */ +#define INSTR_SIL_RDI 6, { D_20,B_16,I16_32,0,0,0 } /* e.g. chhsi */ +#define INSTR_SIL_RDU 6, { D_20,B_16,U16_32,0,0,0 } /* e.g. clfhsi */ +#define INSTR_SMI_U0RDP 6, { U4_8,J16_32,D_20,B_16,0,0 } /* e.g. bpp */ +#define INSTR_SSE_RDRD 6, { D_20,B_16,D_36,B_32,0,0 } /* e.g. mvcdk */ +#define INSTR_SS_L0RDRD 6, { D_20,L8_8,B_16,D_36,B_32,0 } /* e.g. mvc */ +#define INSTR_SS_L2RDRD 6, { D_20,B_16,D_36,L8_8,B_32,0 } /* e.g. pka */ +#define INSTR_SS_LIRDRD 6, { D_20,L4_8,B_16,D_36,B_32,U4_12 } /* e.g. srp */ +#define INSTR_SS_LLRDRD 6, { D_20,L4_8,B_16,D_36,L4_12,B_32 } /* e.g. pack */ +#define INSTR_SS_RRRDRD 6, { D_20,R_8,B_16,D_36,B_32,R_12 } /* e.g. mvck */ +#define INSTR_SS_RRRDRD2 6, { R_8,D_20,B_16,R_12,D_36,B_32 } /* e.g. plo */ +#define INSTR_SS_RRRDRD3 6, { R_8,R_12,D_20,B_16,D_36,B_32 } /* e.g. lmd */ +#define INSTR_SSF_RRDRD 6, { D_20,B_16,D_36,B_32,R_8,0 } /* e.g. mvcos */ +#define INSTR_SSF_RRDRD2 6, { R_8,D_20,B_16,D_36,B_32,0 } /* e.g. cal */ +#define INSTR_SSF_RERDRD2 6, { RE_8,D_20,B_16,D_36,B_32,0 } /* e.g. lpd */ +#define INSTR_S_00 4, { 0,0,0,0,0,0 } /* e.g. hsch */ +#define INSTR_S_RD 4, { D_20,B_16,0,0,0,0 } /* e.g. stck */ +#define INSTR_VRV_VVXRDU 6, { V_8,D_20,VX_12,B_16,U4_32,0 } /* e.g. vgef */ +#define INSTR_VRI_V0U 6, { V_8,U16_16,0,0,0,0 } /* e.g. vgbm */ +#define INSTR_VRI_V 6, { V_8,0,0,0,0,0 } /* e.g. vzero */ +#define INSTR_VRI_V0UUU 6, { V_8,U8_16,U8_24,U4_32,0,0 } /* e.g. vgm */ +#define INSTR_VRI_V0UU 6, { V_8,U8_16,U8_24,0,0,0 } /* e.g. vgmb */ +#define INSTR_VRI_V0UU2 6, { V_8,U16_16,U4_32,0,0,0 } /* e.g. vlip */ +#define INSTR_VRI_VVUU 6, { V_8,V_12,U16_16,U4_32,0,0 } /* e.g. vrep */ +#define INSTR_VRI_VVU 6, { V_8,V_12,U16_16,0,0,0 } /* e.g. vrepb */ +#define INSTR_VRI_VVU2 6, { V_8,V_12,U12_16,0,0,0 } /* e.g. vftcidb */ +#define INSTR_VRI_V0IU 6, { V_8,I16_16,U4_32,0,0,0 } /* e.g. vrepi */ +#define INSTR_VRI_V0I 6, { V_8,I16_16,0,0,0,0 } /* e.g. vrepib */ +#define INSTR_VRI_VVV0UU 6, { V_8,V_12,V_16,U8_24,U4_32,0 } /* e.g. verim */ +#define INSTR_VRI_VVV0UU2 6, { V_8,V_12,V_16,U8_28,U4_24,0 } /* e.g. vap */ +#define INSTR_VRI_VVV0U 6, { V_8,V_12,V_16,U8_24,0,0 } /* e.g. verimb*/ +#define INSTR_VRI_VVUUU 6, { V_8,V_12,U12_16,U4_32,U4_28,0 } /* e.g. vftci */ +#define INSTR_VRI_VVUUU2 6, { V_8,V_12,U8_28,U8_16,U4_24,0 } /* e.g. vpsop */ +#define INSTR_VRI_VR0UU 6, { V_8,R_12,U8_28,U4_24,0,0 } /* e.g. vcvd */ +#define INSTR_VRI_VV0UU 6, { V_8,V_12,U8_28,U4_24,0,0 } /* e.g. vcvdq */ +#define INSTR_VRI_VVV0UV 6, { V_8,V_12,V_16,V_32,U8_24,0 } /* e.g. veval */ +#define INSTR_VRX_VRRD 6, { V_8,D_20,X_12,B_16,0,0 } /* e.g. vl */ +#define INSTR_VRX_VV 6, { V_8,V_12,0,0,0,0 } /* e.g. vlr */ +#define INSTR_VRX_VRRDU 6, { V_8,D_20,X_12,B_16,U4_32,0 } /* e.g. vlrep */ +#define INSTR_VRS_RVRDU 6, { R_8,V_12,D_20,B_16,U4_32,0 } /* e.g. vlgv */ +#define INSTR_VRS_RVRD 6, { R_8,V_12,D_20,B_16,0,0 } /* e.g. vlgvb */ +#define INSTR_VRS_VVRDU 6, { V_8,V_12,D_20,B_16,U4_32,0 } /* e.g. verll */ +#define INSTR_VRS_VVRD 6, { V_8,V_12,D_20,B_16,0,0 } /* e.g. vlm */ +#define INSTR_VRS_VRRDU 6, { V_8,R_12,D_20,B_16,U4_32,0 } /* e.g. vlvg */ +#define INSTR_VRS_VRRD 6, { V_8,R_12,D_20,B_16,0,0 } /* e.g. vlvgb */ +#define INSTR_VRS_RRDV 6, { V_32,R_12,D_20,B_16,0,0 } /* e.g. vlrlr */ +#define INSTR_VRR_VRR 6, { V_8,R_12,R_16,0,0,0 } /* e.g. vlvgp */ +#define INSTR_VRR_VVV0U 6, { V_8,V_12,V_16,U4_32,0,0 } /* e.g. vmrh */ +#define INSTR_VRR_VVV0U0 6, { V_8,V_12,V_16,U4_24,0,0 } /* e.g. vfaeb */ +#define INSTR_VRR_VVV0U02 6, { V_8,V_12,V_16,U4_28,0,0 } /* e.g. vd */ +#define INSTR_VRR_VVV0U1 INSTR_VRR_VVV0U0 /* e.g. vfaebs*/ +#define INSTR_VRR_VVV0U2 INSTR_VRR_VVV0U0 /* e.g. vfaezb*/ +#define INSTR_VRR_VVV0U3 INSTR_VRR_VVV0U0 /* e.g. vfaezbs*/ +#define INSTR_VRR_VVV 6, { V_8,V_12,V_16,0,0,0 } /* e.g. vmrhb */ +#define INSTR_VRR_VVV2 6, { V_8,V_CP16_12,0,0,0,0 } /* e.g. vnot */ +#define INSTR_VRR_VV0U 6, { V_8,V_12,U4_32,0,0,0 } /* e.g. vseg */ +#define INSTR_VRR_VV0U2 6, { V_8,V_12,U4_24,0,0,0 } /* e.g. vistrb*/ +#define INSTR_VRR_VV0UU 6, { V_8,V_12,U4_28,U4_24,0,0 } /* e.g. vcdgb */ +#define INSTR_VRR_VV0UU2 6, { V_8,V_12,U4_32,U4_28,0,0 } /* e.g. wfc */ +#define INSTR_VRR_VV0UU8 INSTR_VRR_VV0UU /* e.g. wcdgb */ +#define INSTR_VRR_VV 6, { V_8,V_12,0,0,0,0 } /* e.g. vsegb */ +#define INSTR_VRR_VVVUU0V 6, { V_8,V_12,V_16,V_32,U4_20,U4_24 } /* e.g. vstrc */ +#define INSTR_VRR_VVVU0V 6, { V_8,V_12,V_16,V_32,U4_20,0 } /* e.g. vac */ +#define INSTR_VRR_VVVU0VB 6, { V_8,V_12,V_16,V_32,U4_24,0 } /* e.g. vstrcb*/ +#define INSTR_VRR_VVVU0VB1 INSTR_VRR_VVVU0VB /* e.g. vstrcbs*/ +#define INSTR_VRR_VVVU0VB2 INSTR_VRR_VVVU0VB /* e.g. vstrczb*/ +#define INSTR_VRR_VVVU0VB3 INSTR_VRR_VVVU0VB /* e.g. vstrczbs*/ +#define INSTR_VRR_VVV0V 6, { V_8,V_12,V_16,V_32,0,0 } /* e.g. vacq */ +#define INSTR_VRR_VVV0U0U 6, { V_8,V_12,V_16,U4_32,U4_24,0 } /* e.g. vfae */ +#define INSTR_VRR_VVVV 6, { V_8,V_12,V_16,V_32,0,0 } /* e.g. vfmadb*/ +#define INSTR_VRR_VVV0UUU 6, { V_8,V_12,V_16,U4_32,U4_28,U4_24 }/* e.g. vfch */ +#define INSTR_VRR_VVV0UU 6, { V_8,V_12,V_16,U4_32,U4_28,0 } /* e.g. vfa */ +#define INSTR_VRR_VV0UUU 6, { V_8,V_12,U4_32,U4_28,U4_24,0 } /* e.g. vcdg */ +#define INSTR_VRR_VVVU0UV 6, { V_8,V_12,V_16,V_32,U4_28,U4_20 } /* e.g. vfma */ +#define INSTR_VRR_VV0U0U 6, { V_8,V_12,U4_32,U4_24,0,0 } /* e.g. vistr */ +#define INSTR_VRR_0V 6, { V_12,0,0,0,0,0 } /* e.g. vtp */ +#define INSTR_VRR_0V0U 6, { V_12,U16_20,0,0,0,0 } /* e.g. vtp */ +#define INSTR_VRR_0VVU 6, { V_12,V_16,U16_20,0,0,0 } /* e.g. vtz */ +#define INSTR_VRR_0VV0U 6, { V_12,V_16,U4_24,0,0,0 } /* e.g. vcp */ +#define INSTR_VRR_RV0U 6, { R_8,V_12,U4_24,0,0,0 } /* e.g. vcvb */ +#define INSTR_VRR_RV0UU 6, { R_8,V_12,U4_24,U4_28,0,0 } /* e.g. vcvb */ +#define INSTR_VSI_URDV 6, { V_32,D_20,B_16,U8_8,0,0 } /* e.g. vlrl */ + +#define MASK_E { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_IE_UU { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_MII_UPP { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RIE_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIE_RRPU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIE_RRP0 { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff } +#define MASK_RIE_RRI0 { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff } +#define MASK_RIE_RUPI { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIE_R0PI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIE_RUPU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIE_R0PU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIE_R0IU { 0xff, 0x0f, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RIE_R0I0 { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff } +#define MASK_RIE_R0UU { 0xff, 0x0f, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RIE_R0U0 { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff } +#define MASK_RIE_RUI0 { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RIE_RRUUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIE_RRUUU2 { 0xff, 0x00, 0x00, 0x80, 0x00, 0xff } +#define MASK_RIE_RRUUU3 { 0xff, 0x00, 0x00, 0x80, 0x00, 0xff } +#define MASK_RIE_RRUUU4 { 0xff, 0x00, 0x80, 0x00, 0x00, 0xff } +#define MASK_RIL_0P { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RIL_RP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RIL_UP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RIL_RI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RIL_RU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RI_0P { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RI_RI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RI_RP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RI_RU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RI_UP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RIS_RURDI { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIS_R0RDI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIS_RURDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RIS_R0RDU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_RRE_00 { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 } +#define MASK_RRE_0R { 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00 } +#define MASK_RRE_AA { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_AR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_F0 { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 } +#define MASK_RRE_FE0 { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 } +#define MASK_RRE_FF { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_FEF { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_FFE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_FEFE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_R0 { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 } +#define MASK_RRE_RA { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_RF { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_RFE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_RR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_RER { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_RERE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_FR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRE_FER { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRF_F0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_FE0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_F0FF2 { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_F0FR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_FE0FER { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_FUFF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_FEUFEFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_FUFF2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_FEUFEFE2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_RURR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_RURR2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_R0RR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_R0RR2 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_R0RER { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_R0RR3 { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_R0RR4 { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_U0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_U0FEFE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_U0RF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_U0RFE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_UUFF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_UUFFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_UUFEFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_0UFF { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 } +#define MASK_RRF_0UFEF { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 } +#define MASK_RRF_FFRU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_FEFERU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_U0RR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_U0RER { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_U0RERE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRF_00RR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 } +#define MASK_RRF_0URF { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 } +#define MASK_RRF_0UREFE { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 } +#define MASK_RRF_UUFR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_UUFER { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_UURF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRF_UURFE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_0R { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_FF { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_FEF { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_FFE { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_FEFE { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_R0 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_RR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_RER { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_U0 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RR_UR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RRR_F0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRR_FE0FEFE { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 } +#define MASK_RRS_RRRDU { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RRS_RRRD0 { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RSE_RRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RSE_RERERD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RSE_CCRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RSE_RURD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RSL_R0RD { 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff } +#define MASK_RSL_LRDFU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSL_LRDFEU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSI_RRP { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RS_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RS_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RS_R0RD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RS_RE0RD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RS_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RS_RERERD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RS_RURD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RSY_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSY_RERERD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSY_RURD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSY_RURD2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSY_R0RD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSY_AARD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RSY_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RXE_FRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RXE_FERRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RXE_RRRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RXE_RRRDU { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RXE_RERRD { 0xff, 0x00, 0x00, 0x00, 0xff, 0xff } +#define MASK_RXF_FRRDF { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RXF_FRRDFE { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RXF_FERRDFE { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RXF_RRRDR { 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff } +#define MASK_RXY_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RXY_RERRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RXY_FRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RXY_URRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_RXY_0RRD { 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff } +#define MASK_RX_0RRD { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RX_FRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RX_FERRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RX_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RX_RERRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_RX_URRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SI_RD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SI_URD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SIY_RD { 0xff, 0xff, 0x00, 0x00, 0x00, 0xff } +#define MASK_SIY_URD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_SIY_IRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_SIL_RDI { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SIL_RDU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SMI_U0RDP { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SSE_RDRD { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SS_L0RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SS_L2RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SS_LIRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SS_LLRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SS_RRRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SS_RRRDRD2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SS_RRRDRD3 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SSF_RRDRD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SSF_RRDRD2 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_SSF_RERDRD2 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 } +#define MASK_S_00 { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 } +#define MASK_S_RD { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 } +#define MASK_VRV_VVXRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRI_V0U { 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRI_V { 0xff, 0x0f, 0xff, 0xff, 0xf0, 0xff } +#define MASK_VRI_V0UUU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRI_V0UU { 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRI_V0UU2 { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRI_VVUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRI_VVU { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRI_VVU2 { 0xff, 0x00, 0x00, 0x0f, 0xf0, 0xff } +#define MASK_VRI_V0IU { 0xff, 0x0f, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRI_V0I { 0xff, 0x0f, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRI_VVV0UU { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff } +#define MASK_VRI_VVV0UU2 { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff } +#define MASK_VRI_VVV0U { 0xff, 0x00, 0x0f, 0x00, 0xf0, 0xff } +#define MASK_VRI_VVUUU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRI_VVUUU2 { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRI_VR0UU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff } +#define MASK_VRI_VV0UU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff } +#define MASK_VRI_VVV0UV { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff } +#define MASK_VRX_VRRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRX_VV { 0xff, 0x00, 0xff, 0xff, 0xf0, 0xff } +#define MASK_VRX_VRRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRS_RVRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRS_RVRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRS_VVRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRS_VVRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRS_VRRDU { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRS_VRRD { 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff } +#define MASK_VRS_RRDV { 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRR_VRR { 0xff, 0x00, 0x0f, 0xff, 0xf0, 0xff } +#define MASK_VRR_VVV0U { 0xff, 0x00, 0x0f, 0xff, 0x00, 0xff } +#define MASK_VRR_VVV0U0 { 0xff, 0x00, 0x0f, 0x0f, 0xf0, 0xff } +#define MASK_VRR_VVV0U02 { 0xff, 0x00, 0x0f, 0xf0, 0xf0, 0xff } +#define MASK_VRR_VVV0U1 { 0xff, 0x00, 0x0f, 0x1f, 0xf0, 0xff } +#define MASK_VRR_VVV0U2 { 0xff, 0x00, 0x0f, 0x2f, 0xf0, 0xff } +#define MASK_VRR_VVV0U3 { 0xff, 0x00, 0x0f, 0x3f, 0xf0, 0xff } +#define MASK_VRR_VVV { 0xff, 0x00, 0x0f, 0xff, 0xf0, 0xff } +#define MASK_VRR_VVV2 { 0xff, 0x00, 0x0f, 0xff, 0xf0, 0xff } +#define MASK_VRR_VVV0V { 0xff, 0x00, 0x0f, 0xff, 0x00, 0xff } +#define MASK_VRR_VV0U { 0xff, 0x00, 0xff, 0xff, 0x00, 0xff } +#define MASK_VRR_VV0U2 { 0xff, 0x00, 0xff, 0x0f, 0xf0, 0xff } +#define MASK_VRR_VV0UU { 0xff, 0x00, 0xff, 0x00, 0xf0, 0xff } +#define MASK_VRR_VV0UU2 { 0xff, 0x00, 0xff, 0xf0, 0x00, 0xff } +#define MASK_VRR_VV0UU8 { 0xff, 0x00, 0xff, 0x08, 0xf0, 0xff } +#define MASK_VRR_VV { 0xff, 0x00, 0xff, 0xff, 0xf0, 0xff } +#define MASK_VRR_VVVUU0V { 0xff, 0x00, 0x00, 0x0f, 0x00, 0xff } +#define MASK_VRR_VVVU0V { 0xff, 0x00, 0x00, 0xff, 0x00, 0xff } +#define MASK_VRR_VVVU0VB { 0xff, 0x00, 0x0f, 0x0f, 0x00, 0xff } +#define MASK_VRR_VVVU0VB1 { 0xff, 0x00, 0x0f, 0x1f, 0x00, 0xff } +#define MASK_VRR_VVVU0VB2 { 0xff, 0x00, 0x0f, 0x2f, 0x00, 0xff } +#define MASK_VRR_VVVU0VB3 { 0xff, 0x00, 0x0f, 0x3f, 0x00, 0xff } +#define MASK_VRR_VVV0U0U { 0xff, 0x00, 0x0f, 0x0f, 0x00, 0xff } +#define MASK_VRR_VVVV { 0xff, 0x00, 0x0f, 0xff, 0x00, 0xff } +#define MASK_VRR_VVV0UUU { 0xff, 0x00, 0x0f, 0x00, 0x00, 0xff } +#define MASK_VRR_VVV0UU { 0xff, 0x00, 0x0f, 0xf0, 0x00, 0xff } +#define MASK_VRR_VV0UUU { 0xff, 0x00, 0xff, 0x00, 0x00, 0xff } +#define MASK_VRR_VVVU0UV { 0xff, 0x00, 0x00, 0xf0, 0x00, 0xff } +#define MASK_VRR_VV0U0U { 0xff, 0x00, 0xff, 0x0f, 0x00, 0xff } +#define MASK_VRR_0V { 0xff, 0xf0, 0xff, 0xff, 0xf0, 0xff } +#define MASK_VRR_0V0U { 0xff, 0xf0, 0xf0, 0x00, 0x00, 0xff } +#define MASK_VRR_0VVU { 0xff, 0xf0, 0x00, 0x00, 0x00, 0xff } +#define MASK_VRR_0VV0U { 0xff, 0xf0, 0x0f, 0x0f, 0xf0, 0xff } +#define MASK_VRR_RV0U { 0xff, 0x00, 0xff, 0x0f, 0xf0, 0xff } +#define MASK_VRR_RV0UU { 0xff, 0x00, 0xff, 0x00, 0xf0, 0xff } +#define MASK_VSI_URDV { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff } + + +/* The opcode formats table (blueprints for .insn pseudo mnemonic). */ + +const struct s390_opcode s390_opformats[] = + { + { "e", OP8(0x00LL), MASK_E, INSTR_E, 3, 0, 256, NULL }, + { "ri", OP8(0x00LL), MASK_RI_RI, INSTR_RI_RI, 3, 0, 256, NULL }, + { "rie", OP8(0x00LL), MASK_RIE_RRP, INSTR_RIE_RRP, 3, 0, 256, NULL }, + { "ril", OP8(0x00LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 0, 256, NULL }, + { "rilu", OP8(0x00LL), MASK_RIL_RU, INSTR_RIL_RU, 3, 0, 256, NULL }, + { "ris", OP8(0x00LL), MASK_RIS_RURDI, INSTR_RIS_RURDI, 3, 6, 256, NULL }, + { "rr", OP8(0x00LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 256, NULL }, + { "rre", OP8(0x00LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 256, NULL }, + { "rrf", OP8(0x00LL), MASK_RRF_RURR, INSTR_RRF_RURR, 3, 0, 256, NULL }, + { "rrs", OP8(0x00LL), MASK_RRS_RRRDU, INSTR_RRS_RRRDU, 3, 6, 256, NULL }, + { "rs", OP8(0x00LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 256, NULL }, + { "rse", OP8(0x00LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 3, 0, 256, NULL }, + { "rsi", OP8(0x00LL), MASK_RSI_RRP, INSTR_RSI_RRP, 3, 0, 256, NULL }, + { "rsy", OP8(0x00LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 3, 3, 256, NULL }, + { "rx", OP8(0x00LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 256, NULL }, + { "rxe", OP8(0x00LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 0, 256, NULL }, + { "rxf", OP8(0x00LL), MASK_RXF_RRRDR, INSTR_RXF_RRRDR, 3, 0, 256, NULL }, + { "rxy", OP8(0x00LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 256, NULL }, + { "s", OP8(0x00LL), MASK_S_RD, INSTR_S_RD, 3, 0, 256, NULL }, + { "si", OP8(0x00LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 256, NULL }, + { "siy", OP8(0x00LL), MASK_SIY_URD, INSTR_SIY_URD, 3, 3, 256, NULL }, + { "sil", OP8(0x00LL), MASK_SIL_RDI, INSTR_SIL_RDI, 3, 6, 256, NULL }, + { "ss", OP8(0x00LL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 256, NULL }, + { "sse", OP8(0x00LL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0, 256, NULL }, + { "ssf", OP8(0x00LL), MASK_SSF_RRDRD, INSTR_SSF_RRDRD, 3, 0, 256, NULL }, + { "vrv", OP8(0x00LL), MASK_VRV_VVXRDU, INSTR_VRV_VVXRDU, 3, 9, 256, NULL }, + { "vri", OP8(0x00LL), MASK_VRI_VVUUU, INSTR_VRI_VVUUU, 3, 9, 256, NULL }, + { "vrx", OP8(0x00LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 3, 9, 256, NULL }, + { "vrs", OP8(0x00LL), MASK_VRS_RVRDU, INSTR_VRS_RVRDU, 3, 9, 256, NULL }, + { "vrr", OP8(0x00LL), MASK_VRR_VVV0UUU, INSTR_VRR_VVV0UUU, 3, 9, 256, NULL }, + { "vsi", OP8(0x00LL), MASK_VSI_URDV, INSTR_VSI_URDV, 3, 10, 256, NULL }, +}; + +const int s390_num_opformats = + sizeof (s390_opformats) / sizeof (s390_opformats[0]); + +#include "s390-opc.tab" diff --git a/VEX/priv/objdump/s390-opc.tab b/VEX/priv/objdump/s390-opc.tab new file mode 100644 index 000000000..f15035fea --- /dev/null +++ b/VEX/priv/objdump/s390-opc.tab @@ -0,0 +1,2793 @@ +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + The GNU General Public License is contained in the file COPYING. +*/ + +/* The opcode table. This file was generated by s390-mkopc. + + The format of the opcode table is: + + NAME OPCODE MASK OPERANDS + + Name is the name of the instruction. + OPCODE is the instruction opcode. + MASK is the opcode mask; this is used to tell the disassembler + which bits in the actual opcode must match OPCODE. + OPERANDS is the list of operands. + + The disassembler reads the table in order and prints the first + instruction which matches. + MODE_BITS - zarch or esa + MIN_CPU - number of the min cpu level required + FLAGS - instruction flags. + DESCRIPTION - description of the instruction. */ + +const struct s390_opcode s390_opcodes[] = + { + { "dp", OP8(0xfdLL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "divide decimal" }, + { "mp", OP8(0xfcLL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "multiply decimal" }, + { "sp", OP8(0xfbLL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "subtract decimal" }, + { "ap", OP8(0xfaLL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "add decimal" }, + { "cp", OP8(0xf9LL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "compare decimal" }, + { "zap", OP8(0xf8LL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "zero and add" }, + { "unpk", OP8(0xf3LL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "unpack" }, + { "pack", OP8(0xf2LL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "pack" }, + { "mvo", OP8(0xf1LL), MASK_SS_LLRDRD, INSTR_SS_LLRDRD, 3, 0, 0, "move with offset" }, + { "srp", OP8(0xf0LL), MASK_SS_LIRDRD, INSTR_SS_LIRDRD, 3, 0, 0, "shift and round decimal" }, + { "lmd", OP8(0xefLL), MASK_SS_RRRDRD3, INSTR_SS_RRRDRD3, 2, 2, 0, "load multiple disjoint" }, + { "plo", OP8(0xeeLL), MASK_SS_RRRDRD2, INSTR_SS_RRRDRD2, 3, 0, 0, "perform locked operation" }, + { "cxpt", OP48(0xed00000000afLL), MASK_RSL_LRDFEU, INSTR_RSL_LRDFEU, 2, 9, 0, "convert from packed to extended dfp" }, + { "cdpt", OP48(0xed00000000aeLL), MASK_RSL_LRDFU, INSTR_RSL_LRDFU, 2, 9, 0, "convert from packed to long dfp" }, + { "cpxt", OP48(0xed00000000adLL), MASK_RSL_LRDFEU, INSTR_RSL_LRDFEU, 2, 9, 0, "convert from extended dfp to packed" }, + { "cpdt", OP48(0xed00000000acLL), MASK_RSL_LRDFU, INSTR_RSL_LRDFU, 2, 9, 0, "convert from long dfp to packed" }, + { "cxzt", OP48(0xed00000000abLL), MASK_RSL_LRDFEU, INSTR_RSL_LRDFEU, 2, 8, 0, "convert from zoned extended" }, + { "cdzt", OP48(0xed00000000aaLL), MASK_RSL_LRDFU, INSTR_RSL_LRDFU, 2, 8, 0, "convert from zoned long" }, + { "czxt", OP48(0xed00000000a9LL), MASK_RSL_LRDFEU, INSTR_RSL_LRDFEU, 2, 8, 0, "convert to zoned extended" }, + { "czdt", OP48(0xed00000000a8LL), MASK_RSL_LRDFU, INSTR_RSL_LRDFU, 2, 8, 0, "convert to zoned long" }, + { "stdy", OP48(0xed0000000067LL), MASK_RXY_FRRD, INSTR_RXY_FRRD, 2, 3, 0, "store (long) with long offset" }, + { "stey", OP48(0xed0000000066LL), MASK_RXY_FRRD, INSTR_RXY_FRRD, 2, 3, 0, "store (short) with long offset" }, + { "ldy", OP48(0xed0000000065LL), MASK_RXY_FRRD, INSTR_RXY_FRRD, 2, 3, 0, "load (long) with long offset" }, + { "ley", OP48(0xed0000000064LL), MASK_RXY_FRRD, INSTR_RXY_FRRD, 2, 3, 0, "load (short) with long offset" }, + { "tdgxt", OP48(0xed0000000059LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 2, 5, 0, "test data group extended dfp" }, + { "tdcxt", OP48(0xed0000000058LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 2, 5, 0, "test data class extended dfp" }, + { "tdgdt", OP48(0xed0000000055LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 2, 5, 0, "test data group long dfp" }, + { "tdcdt", OP48(0xed0000000054LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 2, 5, 0, "test data class long dfp" }, + { "tdget", OP48(0xed0000000051LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 2, 5, 0, "test data group short dfp" }, + { "tdcet", OP48(0xed0000000050LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 2, 5, 0, "test data class short dfp" }, + { "srxt", OP48(0xed0000000049LL), MASK_RXF_FERRDFE, INSTR_RXF_FERRDFE, 2, 5, 0, "shift coefficient right extended dfp" }, + { "slxt", OP48(0xed0000000048LL), MASK_RXF_FERRDFE, INSTR_RXF_FERRDFE, 2, 5, 0, "shift coefficient left extended dfp" }, + { "srdt", OP48(0xed0000000041LL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 2, 5, 0, "shift coefficient right long dfp" }, + { "sldt", OP48(0xed0000000040LL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 2, 5, 0, "shift coefficient left long dfp" }, + { "msd", OP48(0xed000000003fLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 3, 0, "multiply and subtract long hfp" }, + { "mad", OP48(0xed000000003eLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 3, 0, "multiply and add long hfp" }, + { "myh", OP48(0xed000000003dLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 2, 4, 0, "multiply unnormalized long hfp high" }, + { "mayh", OP48(0xed000000003cLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 2, 4, 0, "multiply and add unnormalized long hfp high" }, + { "my", OP48(0xed000000003bLL), MASK_RXF_FRRDFE, INSTR_RXF_FRRDFE, 2, 4, 0, "multiply unnormalized long hfp" }, + { "may", OP48(0xed000000003aLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 2, 4, 0, "multiply and add unnormalized long hfp" }, + { "myl", OP48(0xed0000000039LL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 2, 4, 0, "multiply unnormalized long hfp low" }, + { "mayl", OP48(0xed0000000038LL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 2, 4, 0, "multiply and add unnormalized long hfp low" }, + { "mee", OP48(0xed0000000037LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "multiply short hfp" }, + { "sqd", OP48(0xed0000000035LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "square root long hfp" }, + { "sqe", OP48(0xed0000000034LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "square root short hfp" }, + { "mse", OP48(0xed000000002fLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 3, 0, "multiply and subttract short hfp" }, + { "mae", OP48(0xed000000002eLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 3, 0, "multiply and add short hfp" }, + { "lxe", OP48(0xed0000000026LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 3, 0, 0, "load lengthened short to extended hfp" }, + { "lxd", OP48(0xed0000000025LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 3, 0, 0, "load lengthened long to extended hfp" }, + { "lde", OP48(0xed0000000024LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "load lengthened short to long hfp" }, + { "msdb", OP48(0xed000000001fLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 0, 0, "multiply and subtract long bfp" }, + { "madb", OP48(0xed000000001eLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 0, 0, "multiply and add long bfp" }, + { "ddb", OP48(0xed000000001dLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "divide long bfp" }, + { "mdb", OP48(0xed000000001cLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "multiply long bfp" }, + { "sdb", OP48(0xed000000001bLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "subtract long bfp" }, + { "adb", OP48(0xed000000001aLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "add long bfp" }, + { "cdb", OP48(0xed0000000019LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "compare long bfp" }, + { "kdb", OP48(0xed0000000018LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "compare and signal long bfp" }, + { "meeb", OP48(0xed0000000017LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "multiply short bfp" }, + { "sqdb", OP48(0xed0000000015LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "square root long bfp" }, + { "sqeb", OP48(0xed0000000014LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "square root short bfp" }, + { "tcxb", OP48(0xed0000000012LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 3, 0, 0, "test data class extended bfp" }, + { "tcdb", OP48(0xed0000000011LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "test data class long bfp" }, + { "tceb", OP48(0xed0000000010LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "test data class short bfp" }, + { "mseb", OP48(0xed000000000fLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 0, 0, "multiply and subtract short bfp" }, + { "maeb", OP48(0xed000000000eLL), MASK_RXF_FRRDF, INSTR_RXF_FRRDF, 3, 0, 0, "multiply and add short bfp" }, + { "deb", OP48(0xed000000000dLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "divide short bfp" }, + { "mdeb", OP48(0xed000000000cLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "multiply short to long bfp" }, + { "seb", OP48(0xed000000000bLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "subtract short bfp" }, + { "aeb", OP48(0xed000000000aLL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "add short bfp" }, + { "ceb", OP48(0xed0000000009LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "compare short bfp" }, + { "keb", OP48(0xed0000000008LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "compare and signal short bfp" }, + { "mxdb", OP48(0xed0000000007LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 3, 0, 0, "multiply long to extended bfp" }, + { "lxeb", OP48(0xed0000000006LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 3, 0, 0, "load lengthened short to extended bfp" }, + { "lxdb", OP48(0xed0000000005LL), MASK_RXE_FERRD, INSTR_RXE_FERRD, 3, 0, 0, "load lengthened long to extended bfp" }, + { "ldeb", OP48(0xed0000000004LL), MASK_RXE_FRRD, INSTR_RXE_FRRD, 3, 0, 0, "load lengthened short to long bfp" }, + { "lochhino", OP48(0xec0e0000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on not overflow / if not ones" }, + { "locghino", OP48(0xec0e00000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on not overflow / if not ones" }, + { "lochino", OP48(0xec0e00000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on not overflow / if not ones" }, + { "lochhinh", OP48(0xec0d0000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on A not high" }, + { "lochhinp", OP48(0xec0d0000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on not plus" }, + { "locghinh", OP48(0xec0d00000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on A not high" }, + { "locghinp", OP48(0xec0d00000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on not plus" }, + { "lochinh", OP48(0xec0d00000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on A not high" }, + { "lochinp", OP48(0xec0d00000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on not plus" }, + { "clibnh", OP48(0xec0c000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on A not high" }, + { "clible", OP48(0xec0c000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on low or equal" }, + { "cibnh", OP48(0xec0c000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on A not high" }, + { "cible", OP48(0xec0c000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on low or equal" }, + { "clgibnh", OP48(0xec0c000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on A not high" }, + { "clgible", OP48(0xec0c000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on low or equal" }, + { "cgibnh", OP48(0xec0c000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on A not high" }, + { "cgible", OP48(0xec0c000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on low or equal" }, + { "clijnh", OP48(0xec0c0000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on A not high" }, + { "clijle", OP48(0xec0c0000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on low or equal" }, + { "cijnh", OP48(0xec0c0000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on A not high" }, + { "cijle", OP48(0xec0c0000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on low or equal" }, + { "clgijnh", OP48(0xec0c0000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on A not high" }, + { "clgijle", OP48(0xec0c0000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on low or equal" }, + { "cgijnh", OP48(0xec0c0000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on A not high" }, + { "cgijle", OP48(0xec0c0000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on low or equal" }, + { "lochhile", OP48(0xec0c0000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on low or equal" }, + { "locghile", OP48(0xec0c00000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on low or equal" }, + { "lochile", OP48(0xec0c00000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on low or equal" }, + { "lochhinl", OP48(0xec0b0000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on A not low" }, + { "lochhinm", OP48(0xec0b0000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on not minus / if not mixed" }, + { "locghinl", OP48(0xec0b00000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on A not low" }, + { "locghinm", OP48(0xec0b00000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on not minus / if not mixed" }, + { "lochinl", OP48(0xec0b00000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on A not low" }, + { "lochinm", OP48(0xec0b00000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on not minus / if not mixed" }, + { "clibnl", OP48(0xec0a000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on A not low" }, + { "clibhe", OP48(0xec0a000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on high or equal" }, + { "cibnl", OP48(0xec0a000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on A not low" }, + { "cibhe", OP48(0xec0a000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on high or equal" }, + { "clgibnl", OP48(0xec0a000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on A not low" }, + { "clgibhe", OP48(0xec0a000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on high or equal" }, + { "cgibnl", OP48(0xec0a000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on A not low" }, + { "cgibhe", OP48(0xec0a000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on high or equal" }, + { "clijnl", OP48(0xec0a0000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on A not low" }, + { "clijhe", OP48(0xec0a0000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on high or equal" }, + { "cijnl", OP48(0xec0a0000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on A not low" }, + { "cijhe", OP48(0xec0a0000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on high or equal" }, + { "clgijnl", OP48(0xec0a0000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on A not low" }, + { "clgijhe", OP48(0xec0a0000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on high or equal" }, + { "cgijnl", OP48(0xec0a0000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on A not low" }, + { "cgijhe", OP48(0xec0a0000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on high or equal" }, + { "lochhihe", OP48(0xec0a0000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on high or equal" }, + { "locghihe", OP48(0xec0a00000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on high or equal" }, + { "lochihe", OP48(0xec0a00000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on high or equal" }, + { "lochhinlh", OP48(0xec090000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on not low or high" }, + { "locghinlh", OP48(0xec0900000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on not low or high" }, + { "lochinlh", OP48(0xec0900000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on not low or high" }, + { "clibe", OP48(0xec08000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on A equal B" }, + { "clibnlh", OP48(0xec08000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on not low or high" }, + { "cibe", OP48(0xec08000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on A equal B" }, + { "cibnlh", OP48(0xec08000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on not low or high" }, + { "clgibe", OP48(0xec08000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on A equal B" }, + { "clgibnlh", OP48(0xec08000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on not low or high" }, + { "cgibe", OP48(0xec08000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on A equal B" }, + { "cgibnlh", OP48(0xec08000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on not low or high" }, + { "clije", OP48(0xec080000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on A equal B" }, + { "clijnlh", OP48(0xec080000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on not low or high" }, + { "cije", OP48(0xec080000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on A equal B" }, + { "cijnlh", OP48(0xec080000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on not low or high" }, + { "clgije", OP48(0xec080000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on A equal B" }, + { "clgijnlh", OP48(0xec080000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on not low or high" }, + { "cgije", OP48(0xec080000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on A equal B" }, + { "cgijnlh", OP48(0xec080000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on not low or high" }, + { "lochhie", OP48(0xec080000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on A equal B" }, + { "lochhiz", OP48(0xec080000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on zero / if zeros" }, + { "locghie", OP48(0xec0800000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on A equal B" }, + { "locghiz", OP48(0xec0800000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on zero / if zeros" }, + { "lochie", OP48(0xec0800000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on A equal B" }, + { "lochiz", OP48(0xec0800000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on zero / if zeros" }, + { "lochhine", OP48(0xec070000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on A not equal B" }, + { "lochhinz", OP48(0xec070000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on not zero / if not zeros" }, + { "locghine", OP48(0xec0700000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on A not equal B" }, + { "locghinz", OP48(0xec0700000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on not zero / if not zeros" }, + { "lochine", OP48(0xec0700000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on A not equal B" }, + { "lochinz", OP48(0xec0700000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on not zero / if not zeros" }, + { "clibne", OP48(0xec06000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on A not equal B" }, + { "cliblh", OP48(0xec06000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on low or high" }, + { "cibne", OP48(0xec06000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on A not equal B" }, + { "ciblh", OP48(0xec06000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on low or high" }, + { "clgibne", OP48(0xec06000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on A not equal B" }, + { "clgiblh", OP48(0xec06000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on low or high" }, + { "cgibne", OP48(0xec06000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on A not equal B" }, + { "cgiblh", OP48(0xec06000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on low or high" }, + { "clijne", OP48(0xec060000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on A not equal B" }, + { "clijlh", OP48(0xec060000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on low or high" }, + { "cijne", OP48(0xec060000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on A not equal B" }, + { "cijlh", OP48(0xec060000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on low or high" }, + { "clgijne", OP48(0xec060000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on A not equal B" }, + { "clgijlh", OP48(0xec060000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on low or high" }, + { "cgijne", OP48(0xec060000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on A not equal B" }, + { "cgijlh", OP48(0xec060000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on low or high" }, + { "lochhilh", OP48(0xec060000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on low or high" }, + { "locghilh", OP48(0xec0600000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on low or high" }, + { "lochilh", OP48(0xec0600000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on low or high" }, + { "lochhinhe", OP48(0xec050000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on not high or equal" }, + { "locghinhe", OP48(0xec0500000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on not high or equal" }, + { "lochinhe", OP48(0xec0500000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on not high or equal" }, + { "clibl", OP48(0xec04000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on A low" }, + { "clibnhe", OP48(0xec04000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on not high or equal" }, + { "cibl", OP48(0xec04000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on A low" }, + { "cibnhe", OP48(0xec04000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on not high or equal" }, + { "clgibl", OP48(0xec04000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on A low" }, + { "clgibnhe", OP48(0xec04000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on not high or equal" }, + { "cgibl", OP48(0xec04000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on A low" }, + { "cgibnhe", OP48(0xec04000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on not high or equal" }, + { "clijl", OP48(0xec040000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on A low" }, + { "clijnhe", OP48(0xec040000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on not high or equal" }, + { "cijl", OP48(0xec040000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on A low" }, + { "cijnhe", OP48(0xec040000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on not high or equal" }, + { "clgijl", OP48(0xec040000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on A low" }, + { "clgijnhe", OP48(0xec040000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on not high or equal" }, + { "cgijl", OP48(0xec040000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on A low" }, + { "cgijnhe", OP48(0xec040000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on not high or equal" }, + { "lochhil", OP48(0xec040000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on A low" }, + { "lochhim", OP48(0xec040000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on minus / if mixed" }, + { "locghil", OP48(0xec0400000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on A low" }, + { "locghim", OP48(0xec0400000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on minus / if mixed" }, + { "lochil", OP48(0xec0400000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on A low" }, + { "lochim", OP48(0xec0400000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on minus / if mixed" }, + { "lochhinle", OP48(0xec030000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on not low or equal" }, + { "locghinle", OP48(0xec0300000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on not low or equal" }, + { "lochinle", OP48(0xec0300000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on not low or equal" }, + { "clibh", OP48(0xec02000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on A high" }, + { "clibnle", OP48(0xec02000000ffLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (32<8) on not low or equal" }, + { "cibh", OP48(0xec02000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on A high" }, + { "cibnle", OP48(0xec02000000feLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (32<8) on not low or equal" }, + { "clgibh", OP48(0xec02000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on A high" }, + { "clgibnle", OP48(0xec02000000fdLL), MASK_RIS_R0RDU, INSTR_RIS_R0RDU, 2, 6, 0, "compare logical immediate and branch (64<8) on not low or equal" }, + { "cgibh", OP48(0xec02000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on A high" }, + { "cgibnle", OP48(0xec02000000fcLL), MASK_RIS_R0RDI, INSTR_RIS_R0RDI, 2, 6, 0, "compare immediate and branch (64<8) on not low or equal" }, + { "clijh", OP48(0xec020000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on A high" }, + { "clijnle", OP48(0xec020000007fLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (32<8) on not low or equal" }, + { "cijh", OP48(0xec020000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on A high" }, + { "cijnle", OP48(0xec020000007eLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (32<8) on not low or equal" }, + { "clgijh", OP48(0xec020000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on A high" }, + { "clgijnle", OP48(0xec020000007dLL), MASK_RIE_R0PU, INSTR_RIE_R0PU, 2, 6, 112, "compare logical immediate and branch relative (64<8) on not low or equal" }, + { "cgijh", OP48(0xec020000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on A high" }, + { "cgijnle", OP48(0xec020000007cLL), MASK_RIE_R0PI, INSTR_RIE_R0PI, 2, 6, 112, "compare immediate and branch relative (64<8) on not low or equal" }, + { "lochhih", OP48(0xec020000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on A high" }, + { "lochhip", OP48(0xec020000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on plus" }, + { "locghih", OP48(0xec0200000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on A high" }, + { "locghip", OP48(0xec0200000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on plus" }, + { "lochih", OP48(0xec0200000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on A high" }, + { "lochip", OP48(0xec0200000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on plus" }, + { "lochhio", OP48(0xec010000004eLL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword high immediate on condition on overflow / if ones" }, + { "locghio", OP48(0xec0100000046LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr on overflow / if ones" }, + { "lochio", OP48(0xec0100000042LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr on overflow / if ones" }, + { "rxsbgt", OP48(0xec0080000057LL), MASK_RIE_RRUUU4, INSTR_RIE_RRUUU4, 2, 6, 1, "rotate then exclusive or selected bits and test results" }, + { "rosbgt", OP48(0xec0080000056LL), MASK_RIE_RRUUU4, INSTR_RIE_RRUUU4, 2, 6, 1, "rotate then or selected bits and test results" }, + { "rnsbgt", OP48(0xec0080000054LL), MASK_RIE_RRUUU4, INSTR_RIE_RRUUU4, 2, 6, 1, "rotate then and selected bits and test results" }, + { "risbhgz", OP48(0xec000080005dLL), MASK_RIE_RRUUU3, INSTR_RIE_RRUUU3, 2, 7, 1, "rotate then insert selected bits high and zero remaining bits" }, + { "risbgnz", OP48(0xec0000800059LL), MASK_RIE_RRUUU2, INSTR_RIE_RRUUU2, 2, 8, 1, "rotate then insert selected bits and zero remaining bits nocc" }, + { "risbgz", OP48(0xec0000800055LL), MASK_RIE_RRUUU2, INSTR_RIE_RRUUU2, 2, 6, 1, "rotate then insert selected bits and zero remaining bits" }, + { "risblgz", OP48(0xec0000800051LL), MASK_RIE_RRUUU3, INSTR_RIE_RRUUU3, 2, 7, 1, "rotate then insert selected bits low and zero remaining bits" }, + { "clrbnh", OP48(0xec000000c0f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on A not high" }, + { "clrble", OP48(0xec000000c0f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on low or equal" }, + { "crbnh", OP48(0xec000000c0f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on A not high" }, + { "crble", OP48(0xec000000c0f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on low or equal" }, + { "clgrbnh", OP48(0xec000000c0e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on A not high" }, + { "clgrble", OP48(0xec000000c0e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on low or equal" }, + { "cgrbnh", OP48(0xec000000c0e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on A not high" }, + { "cgrble", OP48(0xec000000c0e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on low or equal" }, + { "clrjnh", OP48(0xec000000c077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on A not high" }, + { "clrjle", OP48(0xec000000c077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on low or equal" }, + { "crjnh", OP48(0xec000000c076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on A not high" }, + { "crjle", OP48(0xec000000c076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on low or equal" }, + { "clfitnh", OP48(0xec000000c073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on A not high" }, + { "clfitle", OP48(0xec000000c073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on low or equal" }, + { "citnh", OP48(0xec000000c072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on A not high" }, + { "citle", OP48(0xec000000c072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on low or equal" }, + { "clgitnh", OP48(0xec000000c071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on A not high" }, + { "clgitle", OP48(0xec000000c071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on low or equal" }, + { "cgitnh", OP48(0xec000000c070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on A not high" }, + { "cgitle", OP48(0xec000000c070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on low or equal" }, + { "clgrjnh", OP48(0xec000000c065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on A not high" }, + { "clgrjle", OP48(0xec000000c065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on low or equal" }, + { "cgrjnh", OP48(0xec000000c064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on A not high" }, + { "cgrjle", OP48(0xec000000c064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on low or equal" }, + { "clrbnl", OP48(0xec000000a0f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on A not low" }, + { "clrbhe", OP48(0xec000000a0f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on high or equal" }, + { "crbnl", OP48(0xec000000a0f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on A not low" }, + { "crbhe", OP48(0xec000000a0f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on high or equal" }, + { "clgrbnl", OP48(0xec000000a0e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on A not low" }, + { "clgrbhe", OP48(0xec000000a0e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on high or equal" }, + { "cgrbnl", OP48(0xec000000a0e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on A not low" }, + { "cgrbhe", OP48(0xec000000a0e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on high or equal" }, + { "clrjnl", OP48(0xec000000a077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on A not low" }, + { "clrjhe", OP48(0xec000000a077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on high or equal" }, + { "crjnl", OP48(0xec000000a076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on A not low" }, + { "crjhe", OP48(0xec000000a076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on high or equal" }, + { "clfitnl", OP48(0xec000000a073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on A not low" }, + { "clfithe", OP48(0xec000000a073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on high or equal" }, + { "citnl", OP48(0xec000000a072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on A not low" }, + { "cithe", OP48(0xec000000a072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on high or equal" }, + { "clgitnl", OP48(0xec000000a071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on A not low" }, + { "clgithe", OP48(0xec000000a071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on high or equal" }, + { "cgitnl", OP48(0xec000000a070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on A not low" }, + { "cgithe", OP48(0xec000000a070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on high or equal" }, + { "clgrjnl", OP48(0xec000000a065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on A not low" }, + { "clgrjhe", OP48(0xec000000a065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on high or equal" }, + { "cgrjnl", OP48(0xec000000a064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on A not low" }, + { "cgrjhe", OP48(0xec000000a064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on high or equal" }, + { "clrbe", OP48(0xec00000080f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on A equal B" }, + { "clrbnlh", OP48(0xec00000080f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on not low or high" }, + { "crbe", OP48(0xec00000080f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on A equal B" }, + { "crbnlh", OP48(0xec00000080f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on not low or high" }, + { "clgrbe", OP48(0xec00000080e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on A equal B" }, + { "clgrbnlh", OP48(0xec00000080e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on not low or high" }, + { "cgrbe", OP48(0xec00000080e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on A equal B" }, + { "cgrbnlh", OP48(0xec00000080e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on not low or high" }, + { "clrje", OP48(0xec0000008077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on A equal B" }, + { "clrjnlh", OP48(0xec0000008077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on not low or high" }, + { "crje", OP48(0xec0000008076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on A equal B" }, + { "crjnlh", OP48(0xec0000008076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on not low or high" }, + { "clfite", OP48(0xec0000008073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on A equal B" }, + { "clfitnlh", OP48(0xec0000008073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on not low or high" }, + { "cite", OP48(0xec0000008072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on A equal B" }, + { "citnlh", OP48(0xec0000008072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on not low or high" }, + { "clgite", OP48(0xec0000008071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on A equal B" }, + { "clgitnlh", OP48(0xec0000008071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on not low or high" }, + { "cgite", OP48(0xec0000008070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on A equal B" }, + { "cgitnlh", OP48(0xec0000008070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on not low or high" }, + { "clgrje", OP48(0xec0000008065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on A equal B" }, + { "clgrjnlh", OP48(0xec0000008065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on not low or high" }, + { "cgrje", OP48(0xec0000008064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on A equal B" }, + { "cgrjnlh", OP48(0xec0000008064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on not low or high" }, + { "clrbne", OP48(0xec00000060f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on A not equal B" }, + { "clrblh", OP48(0xec00000060f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on low or high" }, + { "crbne", OP48(0xec00000060f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on A not equal B" }, + { "crblh", OP48(0xec00000060f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on low or high" }, + { "clgrbne", OP48(0xec00000060e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on A not equal B" }, + { "clgrblh", OP48(0xec00000060e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on low or high" }, + { "cgrbne", OP48(0xec00000060e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on A not equal B" }, + { "cgrblh", OP48(0xec00000060e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on low or high" }, + { "clrjne", OP48(0xec0000006077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on A not equal B" }, + { "clrjlh", OP48(0xec0000006077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on low or high" }, + { "crjne", OP48(0xec0000006076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on A not equal B" }, + { "crjlh", OP48(0xec0000006076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on low or high" }, + { "clfitne", OP48(0xec0000006073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on A not equal B" }, + { "clfitlh", OP48(0xec0000006073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on low or high" }, + { "citne", OP48(0xec0000006072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on A not equal B" }, + { "citlh", OP48(0xec0000006072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on low or high" }, + { "clgitne", OP48(0xec0000006071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on A not equal B" }, + { "clgitlh", OP48(0xec0000006071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on low or high" }, + { "cgitne", OP48(0xec0000006070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on A not equal B" }, + { "cgitlh", OP48(0xec0000006070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on low or high" }, + { "clgrjne", OP48(0xec0000006065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on A not equal B" }, + { "clgrjlh", OP48(0xec0000006065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on low or high" }, + { "cgrjne", OP48(0xec0000006064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on A not equal B" }, + { "cgrjlh", OP48(0xec0000006064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on low or high" }, + { "clrbl", OP48(0xec00000040f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on A low" }, + { "clrbnhe", OP48(0xec00000040f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on not high or equal" }, + { "crbl", OP48(0xec00000040f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on A low" }, + { "crbnhe", OP48(0xec00000040f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on not high or equal" }, + { "clgrbl", OP48(0xec00000040e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on A low" }, + { "clgrbnhe", OP48(0xec00000040e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on not high or equal" }, + { "cgrbl", OP48(0xec00000040e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on A low" }, + { "cgrbnhe", OP48(0xec00000040e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on not high or equal" }, + { "clrjl", OP48(0xec0000004077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on A low" }, + { "clrjnhe", OP48(0xec0000004077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on not high or equal" }, + { "crjl", OP48(0xec0000004076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on A low" }, + { "crjnhe", OP48(0xec0000004076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on not high or equal" }, + { "clfitl", OP48(0xec0000004073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on A low" }, + { "clfitnhe", OP48(0xec0000004073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on not high or equal" }, + { "citl", OP48(0xec0000004072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on A low" }, + { "citnhe", OP48(0xec0000004072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on not high or equal" }, + { "clgitl", OP48(0xec0000004071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on A low" }, + { "clgitnhe", OP48(0xec0000004071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on not high or equal" }, + { "cgitl", OP48(0xec0000004070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on A low" }, + { "cgitnhe", OP48(0xec0000004070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on not high or equal" }, + { "clgrjl", OP48(0xec0000004065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on A low" }, + { "clgrjnhe", OP48(0xec0000004065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on not high or equal" }, + { "cgrjl", OP48(0xec0000004064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on A low" }, + { "cgrjnhe", OP48(0xec0000004064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on not high or equal" }, + { "clrbh", OP48(0xec00000020f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on A high" }, + { "clrbnle", OP48(0xec00000020f7LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (32) on not low or equal" }, + { "crbh", OP48(0xec00000020f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on A high" }, + { "crbnle", OP48(0xec00000020f6LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (32) on not low or equal" }, + { "clgrbh", OP48(0xec00000020e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on A high" }, + { "clgrbnle", OP48(0xec00000020e5LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare logical and branch (64) on not low or equal" }, + { "cgrbh", OP48(0xec00000020e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on A high" }, + { "cgrbnle", OP48(0xec00000020e4LL), MASK_RRS_RRRD0, INSTR_RRS_RRRD0, 2, 6, 0, "compare and branch (64) on not low or equal" }, + { "clrjh", OP48(0xec0000002077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on A high" }, + { "clrjnle", OP48(0xec0000002077LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (32) on not low or equal" }, + { "crjh", OP48(0xec0000002076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on A high" }, + { "crjnle", OP48(0xec0000002076LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (32) on not low or equal" }, + { "clfith", OP48(0xec0000002073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on A high" }, + { "clfitnle", OP48(0xec0000002073LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (32<16) on not low or equal" }, + { "cith", OP48(0xec0000002072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on A high" }, + { "citnle", OP48(0xec0000002072LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (32<16) on not low or equal" }, + { "clgith", OP48(0xec0000002071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on A high" }, + { "clgitnle", OP48(0xec0000002071LL), MASK_RIE_R0U0, INSTR_RIE_R0U0, 2, 6, 0, "compare logical and trap (64<16) on not low or equal" }, + { "cgith", OP48(0xec0000002070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on A high" }, + { "cgitnle", OP48(0xec0000002070LL), MASK_RIE_R0I0, INSTR_RIE_R0I0, 2, 6, 0, "compare immediate and trap (64<16) on not low or equal" }, + { "clgrjh", OP48(0xec0000002065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on A high" }, + { "clgrjnle", OP48(0xec0000002065LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare logical and branch relative (64) on not low or equal" }, + { "cgrjh", OP48(0xec0000002064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on A high" }, + { "cgrjnle", OP48(0xec0000002064LL), MASK_RIE_RRP0, INSTR_RIE_RRP0, 2, 6, 112, "compare and branch relative (64) on not low or equal" }, + { "clib", OP48(0xec00000000ffLL), MASK_RIS_RURDU, INSTR_RIS_RURDU, 2, 6, 0, "compare logical immediate and branch (32<8)" }, + { "cib", OP48(0xec00000000feLL), MASK_RIS_RURDI, INSTR_RIS_RURDI, 2, 6, 0, "compare immediate and branch (32<8)" }, + { "clgib", OP48(0xec00000000fdLL), MASK_RIS_RURDU, INSTR_RIS_RURDU, 2, 6, 0, "compare logical immediate and branch (64<8)" }, + { "cgib", OP48(0xec00000000fcLL), MASK_RIS_RURDI, INSTR_RIS_RURDI, 2, 6, 0, "compare immediate and branch (64<8)" }, + { "clrb", OP48(0xec00000000f7LL), MASK_RRS_RRRDU, INSTR_RRS_RRRDU, 2, 6, 0, "compare logical and branch (32)" }, + { "crb", OP48(0xec00000000f6LL), MASK_RRS_RRRDU, INSTR_RRS_RRRDU, 2, 6, 0, "compare and branch (32)" }, + { "clgrb", OP48(0xec00000000e5LL), MASK_RRS_RRRDU, INSTR_RRS_RRRDU, 2, 6, 0, "compare logical and branch (64)" }, + { "cgrb", OP48(0xec00000000e4LL), MASK_RRS_RRRDU, INSTR_RRS_RRRDU, 2, 6, 0, "compare and branch (64)" }, + { "alghsik", OP48(0xec00000000dbLL), MASK_RIE_RRI0, INSTR_RIE_RRI0, 2, 7, 0, "add logical immediate 3 operands 64 bit" }, + { "alhsik", OP48(0xec00000000daLL), MASK_RIE_RRI0, INSTR_RIE_RRI0, 2, 7, 0, "add logical immediate 3 operands 32 bit" }, + { "aghik", OP48(0xec00000000d9LL), MASK_RIE_RRI0, INSTR_RIE_RRI0, 2, 7, 0, "add immediate 3 operands 64 bit" }, + { "ahik", OP48(0xec00000000d8LL), MASK_RIE_RRI0, INSTR_RIE_RRI0, 2, 7, 0, "add immediate 3 operands 32 bit" }, + { "clij", OP48(0xec000000007fLL), MASK_RIE_RUPU, INSTR_RIE_RUPU, 2, 6, 112, "compare logical immediate and branch relative (32<8)" }, + { "cij", OP48(0xec000000007eLL), MASK_RIE_RUPI, INSTR_RIE_RUPI, 2, 6, 112, "compare immediate and branch relative (32<8)" }, + { "clgij", OP48(0xec000000007dLL), MASK_RIE_RUPU, INSTR_RIE_RUPU, 2, 6, 112, "compare logical immediate and branch relative (64<8)" }, + { "cgij", OP48(0xec000000007cLL), MASK_RIE_RUPI, INSTR_RIE_RUPI, 2, 6, 112, "compare immediate and branch relative (64<8)" }, + { "clrj", OP48(0xec0000000077LL), MASK_RIE_RRPU, INSTR_RIE_RRPU, 2, 6, 112, "compare logical and branch relative (32)" }, + { "crj", OP48(0xec0000000076LL), MASK_RIE_RRPU, INSTR_RIE_RRPU, 2, 6, 112, "compare and branch relative (32)" }, + { "clfit", OP48(0xec0000000073LL), MASK_RIE_R0UU, INSTR_RIE_R0UU, 2, 6, 0, "compare logical and trap (32<16)" }, + { "cit", OP48(0xec0000000072LL), MASK_RIE_R0IU, INSTR_RIE_R0IU, 2, 6, 0, "compare immediate and trap (32<16)" }, + { "clgit", OP48(0xec0000000071LL), MASK_RIE_R0UU, INSTR_RIE_R0UU, 2, 6, 0, "compare logical and trap (64<16)" }, + { "cgit", OP48(0xec0000000070LL), MASK_RIE_R0IU, INSTR_RIE_R0IU, 2, 6, 0, "compare immediate and trap (64<16)" }, + { "clgrj", OP48(0xec0000000065LL), MASK_RIE_RRPU, INSTR_RIE_RRPU, 2, 6, 112, "compare logical and branch relative (64)" }, + { "cgrj", OP48(0xec0000000064LL), MASK_RIE_RRPU, INSTR_RIE_RRPU, 2, 6, 112, "compare and branch relative (64)" }, + { "risbhg", OP48(0xec000000005dLL), MASK_RIE_RRUUU, INSTR_RIE_RRUUU, 2, 7, 1, "rotate then insert selected bits high" }, + { "risbgn", OP48(0xec0000000059LL), MASK_RIE_RRUUU, INSTR_RIE_RRUUU, 2, 8, 1, "rotate then insert selected bits nocc" }, + { "rxsbg", OP48(0xec0000000057LL), MASK_RIE_RRUUU, INSTR_RIE_RRUUU, 2, 6, 1, "rotate then exclusive or selected bits" }, + { "rosbg", OP48(0xec0000000056LL), MASK_RIE_RRUUU, INSTR_RIE_RRUUU, 2, 6, 1, "rotate then or selected bits" }, + { "risbg", OP48(0xec0000000055LL), MASK_RIE_RRUUU, INSTR_RIE_RRUUU, 2, 6, 1, "rotate then insert selected bits" }, + { "rnsbg", OP48(0xec0000000054LL), MASK_RIE_RRUUU, INSTR_RIE_RRUUU, 2, 6, 1, "rotate then and selected bits" }, + { "risblg", OP48(0xec0000000051LL), MASK_RIE_RRUUU, INSTR_RIE_RRUUU, 2, 7, 1, "rotate then insert selected bits low" }, + { "lochhi", OP48(0xec000000004eLL), MASK_RIE_RUI0, INSTR_RIE_RUI0, 2, 9, 0, "load halfword high immediate on condition" }, + { "locghi", OP48(0xec0000000046LL), MASK_RIE_RUI0, INSTR_RIE_RUI0, 2, 9, 0, "load halfword immediate on condition into 64 bit gpr" }, + { "brxlg", OP48(0xec0000000045LL), MASK_RIE_RRP, INSTR_RIE_RRP, 2, 2, 112, "branch relative on index low or equal 64" }, + { "jxleg", OP48(0xec0000000045LL), MASK_RIE_RRP, INSTR_RIE_RRP, 2, 2, 112, "branch relative on index low or equal 64" }, + { "brxhg", OP48(0xec0000000044LL), MASK_RIE_RRP, INSTR_RIE_RRP, 2, 2, 112, "branch relative on index high 64" }, + { "jxhg", OP48(0xec0000000044LL), MASK_RIE_RRP, INSTR_RIE_RRP, 2, 2, 112, "branch relative on index high 64" }, + { "lochi", OP48(0xec0000000042LL), MASK_RIE_RUI0, INSTR_RIE_RUI0, 2, 9, 0, "load halfword immediate on condition into 32 bit gpr" }, + { "stocno", OP48(0xeb0e000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on not overflow / if not ones" }, + { "locno", OP48(0xeb0e000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on not overflow / if not ones" }, + { "stocgno", OP48(0xeb0e000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on not overflow / if not ones" }, + { "locgno", OP48(0xeb0e000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on not overflow / if not ones" }, + { "stocfhno", OP48(0xeb0e000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on not overflow / if not ones" }, + { "locfhno", OP48(0xeb0e000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on not overflow / if not ones" }, + { "stocnh", OP48(0xeb0d000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on A not high" }, + { "stocnp", OP48(0xeb0d000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on not plus" }, + { "locnh", OP48(0xeb0d000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on A not high" }, + { "locnp", OP48(0xeb0d000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on not plus" }, + { "stocgnh", OP48(0xeb0d000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on A not high" }, + { "stocgnp", OP48(0xeb0d000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on not plus" }, + { "locgnh", OP48(0xeb0d000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on A not high" }, + { "locgnp", OP48(0xeb0d000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on not plus" }, + { "stocfhnh", OP48(0xeb0d000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on A not high" }, + { "stocfhnp", OP48(0xeb0d000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on not plus" }, + { "locfhnh", OP48(0xeb0d000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on A not high" }, + { "locfhnp", OP48(0xeb0d000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on not plus" }, + { "stocle", OP48(0xeb0c000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on low or equal" }, + { "locle", OP48(0xeb0c000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on low or equal" }, + { "stocgle", OP48(0xeb0c000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on low or equal" }, + { "locgle", OP48(0xeb0c000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on low or equal" }, + { "stocfhle", OP48(0xeb0c000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on low or equal" }, + { "locfhle", OP48(0xeb0c000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on low or equal" }, + { "clgtnh", OP48(0xeb0c0000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on A not high" }, + { "clgtle", OP48(0xeb0c0000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on low or equal" }, + { "cltnh", OP48(0xeb0c00000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on A not high" }, + { "cltle", OP48(0xeb0c00000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on low or equal" }, + { "stocnl", OP48(0xeb0b000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on A not low" }, + { "stocnm", OP48(0xeb0b000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on not minus / if not mixed" }, + { "locnl", OP48(0xeb0b000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on A not low" }, + { "locnm", OP48(0xeb0b000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on not minus / if not mixed" }, + { "stocgnl", OP48(0xeb0b000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on A not low" }, + { "stocgnm", OP48(0xeb0b000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on not minus / if not mixed" }, + { "locgnl", OP48(0xeb0b000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on A not low" }, + { "locgnm", OP48(0xeb0b000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on not minus / if not mixed" }, + { "stocfhnl", OP48(0xeb0b000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on A not low" }, + { "stocfhnm", OP48(0xeb0b000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on not minus / if not mixed" }, + { "locfhnl", OP48(0xeb0b000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on A not low" }, + { "locfhnm", OP48(0xeb0b000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on not minus / if not mixed" }, + { "stoche", OP48(0xeb0a000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on high or equal" }, + { "loche", OP48(0xeb0a000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on high or equal" }, + { "stocghe", OP48(0xeb0a000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on high or equal" }, + { "locghe", OP48(0xeb0a000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on high or equal" }, + { "stocfhhe", OP48(0xeb0a000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on high or equal" }, + { "locfhhe", OP48(0xeb0a000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on high or equal" }, + { "clgtnl", OP48(0xeb0a0000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on A not low" }, + { "clgthe", OP48(0xeb0a0000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on high or equal" }, + { "cltnl", OP48(0xeb0a00000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on A not low" }, + { "clthe", OP48(0xeb0a00000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on high or equal" }, + { "stocnlh", OP48(0xeb09000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on not low or high" }, + { "locnlh", OP48(0xeb09000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on not low or high" }, + { "stocgnlh", OP48(0xeb09000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on not low or high" }, + { "locgnlh", OP48(0xeb09000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on not low or high" }, + { "stocfhnlh", OP48(0xeb09000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on not low or high" }, + { "locfhnlh", OP48(0xeb09000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on not low or high" }, + { "stoce", OP48(0xeb08000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on A equal B" }, + { "stocz", OP48(0xeb08000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on zero / if zeros" }, + { "loce", OP48(0xeb08000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on A equal B" }, + { "locz", OP48(0xeb08000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on zero / if zeros" }, + { "stocge", OP48(0xeb08000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on A equal B" }, + { "stocgz", OP48(0xeb08000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on zero / if zeros" }, + { "locge", OP48(0xeb08000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on A equal B" }, + { "locgz", OP48(0xeb08000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on zero / if zeros" }, + { "stocfhe", OP48(0xeb08000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on A equal B" }, + { "stocfhz", OP48(0xeb08000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on zero / if zeros" }, + { "locfhe", OP48(0xeb08000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on A equal B" }, + { "locfhz", OP48(0xeb08000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on zero / if zeros" }, + { "clgte", OP48(0xeb080000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on A equal B" }, + { "clgtnlh", OP48(0xeb080000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on not low or high" }, + { "clte", OP48(0xeb0800000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on A equal B" }, + { "cltnlh", OP48(0xeb0800000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on not low or high" }, + { "stocne", OP48(0xeb07000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on A not equal B" }, + { "stocnz", OP48(0xeb07000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on not zero / if not zeros" }, + { "locne", OP48(0xeb07000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on A not equal B" }, + { "locnz", OP48(0xeb07000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on not zero / if not zeros" }, + { "stocgne", OP48(0xeb07000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on A not equal B" }, + { "stocgnz", OP48(0xeb07000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on not zero / if not zeros" }, + { "locgne", OP48(0xeb07000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on A not equal B" }, + { "locgnz", OP48(0xeb07000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on not zero / if not zeros" }, + { "stocfhne", OP48(0xeb07000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on A not equal B" }, + { "stocfhnz", OP48(0xeb07000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on not zero / if not zeros" }, + { "locfhne", OP48(0xeb07000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on A not equal B" }, + { "locfhnz", OP48(0xeb07000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on not zero / if not zeros" }, + { "stoclh", OP48(0xeb06000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on low or high" }, + { "loclh", OP48(0xeb06000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on low or high" }, + { "stocglh", OP48(0xeb06000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on low or high" }, + { "locglh", OP48(0xeb06000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on low or high" }, + { "stocfhlh", OP48(0xeb06000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on low or high" }, + { "locfhlh", OP48(0xeb06000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on low or high" }, + { "clgtne", OP48(0xeb060000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on A not equal B" }, + { "clgtlh", OP48(0xeb060000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on low or high" }, + { "cltne", OP48(0xeb0600000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on A not equal B" }, + { "cltlh", OP48(0xeb0600000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on low or high" }, + { "stocnhe", OP48(0xeb05000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on not high or equal" }, + { "locnhe", OP48(0xeb05000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on not high or equal" }, + { "stocgnhe", OP48(0xeb05000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on not high or equal" }, + { "locgnhe", OP48(0xeb05000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on not high or equal" }, + { "stocfhnhe", OP48(0xeb05000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on not high or equal" }, + { "locfhnhe", OP48(0xeb05000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on not high or equal" }, + { "stocl", OP48(0xeb04000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on A low" }, + { "stocm", OP48(0xeb04000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on minus / if mixed" }, + { "locl", OP48(0xeb04000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on A low" }, + { "locm", OP48(0xeb04000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on minus / if mixed" }, + { "stocgl", OP48(0xeb04000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on A low" }, + { "stocgm", OP48(0xeb04000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on minus / if mixed" }, + { "locgl", OP48(0xeb04000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on A low" }, + { "locgm", OP48(0xeb04000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on minus / if mixed" }, + { "stocfhl", OP48(0xeb04000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on A low" }, + { "stocfhm", OP48(0xeb04000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on minus / if mixed" }, + { "locfhl", OP48(0xeb04000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on A low" }, + { "locfhm", OP48(0xeb04000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on minus / if mixed" }, + { "clgtl", OP48(0xeb040000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on A low" }, + { "clgtnhe", OP48(0xeb040000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on not high or equal" }, + { "cltl", OP48(0xeb0400000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on A low" }, + { "cltnhe", OP48(0xeb0400000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on not high or equal" }, + { "stocnle", OP48(0xeb03000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on not low or equal" }, + { "locnle", OP48(0xeb03000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on not low or equal" }, + { "stocgnle", OP48(0xeb03000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on not low or equal" }, + { "locgnle", OP48(0xeb03000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on not low or equal" }, + { "stocfhnle", OP48(0xeb03000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on not low or equal" }, + { "locfhnle", OP48(0xeb03000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on not low or equal" }, + { "stoch", OP48(0xeb02000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on A high" }, + { "stocp", OP48(0xeb02000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on plus" }, + { "loch", OP48(0xeb02000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on A high" }, + { "locp", OP48(0xeb02000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on plus" }, + { "stocgh", OP48(0xeb02000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on A high" }, + { "stocgp", OP48(0xeb02000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on plus" }, + { "locgh", OP48(0xeb02000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on A high" }, + { "locgp", OP48(0xeb02000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on plus" }, + { "stocfhh", OP48(0xeb02000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on A high" }, + { "stocfhp", OP48(0xeb02000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on plus" }, + { "locfhh", OP48(0xeb02000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on A high" }, + { "locfhp", OP48(0xeb02000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on plus" }, + { "clgth", OP48(0xeb020000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on A high" }, + { "clgtnle", OP48(0xeb020000002bLL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 64 bit reg-mem on not low or equal" }, + { "clth", OP48(0xeb0200000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on A high" }, + { "cltnle", OP48(0xeb0200000023LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 8, 0, "compare logical and trap 32 bit reg-mem on not low or equal" }, + { "stoco", OP48(0xeb01000000f3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 32 bit on overflow / if ones" }, + { "loco", OP48(0xeb01000000f2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 32 bit on overflow / if ones" }, + { "stocgo", OP48(0xeb01000000e3LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "store on condition 64 bit on overflow / if ones" }, + { "locgo", OP48(0xeb01000000e2LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 7, 0, "load on condition 64 bit on overflow / if ones" }, + { "stocfho", OP48(0xeb01000000e1LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "store high on condition on overflow / if ones" }, + { "locfho", OP48(0xeb01000000e0LL), MASK_RSY_R0RD, INSTR_RSY_R0RD, 2, 9, 0, "load high on condition from memory on overflow / if ones" }, + { "laal", OP48(0xeb00000000faLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and add logical 32 bit" }, + { "laa", OP48(0xeb00000000f8LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and add 32 bit" }, + { "lax", OP48(0xeb00000000f7LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and exclusive or 32 bit" }, + { "lao", OP48(0xeb00000000f6LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and or 32 bit" }, + { "lan", OP48(0xeb00000000f4LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and and 32 bit" }, + { "stoc", OP48(0xeb00000000f3LL), MASK_RSY_RURD2, INSTR_RSY_RURD2, 2, 7, 0, "store on condition 32 bit" }, + { "loc", OP48(0xeb00000000f2LL), MASK_RSY_RURD2, INSTR_RSY_RURD2, 2, 7, 0, "load on condition 32 bit" }, + { "laalg", OP48(0xeb00000000eaLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and add logical 64 bit" }, + { "laag", OP48(0xeb00000000e8LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and add 64 bit" }, + { "laxg", OP48(0xeb00000000e7LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and exclusive or 64 bit" }, + { "laog", OP48(0xeb00000000e6LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and or 64 bit" }, + { "lang", OP48(0xeb00000000e4LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "load and and 64 bit" }, + { "stocg", OP48(0xeb00000000e3LL), MASK_RSY_RURD2, INSTR_RSY_RURD2, 2, 7, 0, "store on condition 64 bit" }, + { "locg", OP48(0xeb00000000e2LL), MASK_RSY_RURD2, INSTR_RSY_RURD2, 2, 7, 0, "load on condition 64 bit" }, + { "stocfh", OP48(0xeb00000000e1LL), MASK_RSY_RURD2, INSTR_RSY_RURD2, 2, 9, 0, "store high on condition" }, + { "locfh", OP48(0xeb00000000e0LL), MASK_RSY_RURD2, INSTR_RSY_RURD2, 2, 9, 0, "load high on condition from memory" }, + { "sllk", OP48(0xeb00000000dfLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "shift left single logical 3 operands 32 bit" }, + { "srlk", OP48(0xeb00000000deLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "shift right single logical 3 operands 32 bit" }, + { "slak", OP48(0xeb00000000ddLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "shift left single 3 operands 32 bit" }, + { "srak", OP48(0xeb00000000dcLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 7, 0, "shift right single 3 operands 32 bit" }, + { "tp", OP48(0xeb00000000c0LL), MASK_RSL_R0RD, INSTR_RSL_R0RD, 3, 0, 0, "test decimal" }, + { "stamy", OP48(0xeb000000009bLL), MASK_RSY_AARD, INSTR_RSY_AARD, 2, 3, 0, "store access multiple with long offset" }, + { "lamy", OP48(0xeb000000009aLL), MASK_RSY_AARD, INSTR_RSY_AARD, 2, 3, 0, "load access multiple" }, + { "lmy", OP48(0xeb0000000098LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "load multiple with long offset" }, + { "lmh", OP48(0xeb0000000096LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "load multiple high" }, + { "lmh", OP48(0xeb0000000096LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "load multiple high" }, + { "stmy", OP48(0xeb0000000090LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "store multiple with long offset" }, + { "clclu", OP48(0xeb000000008fLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 3, 3, 0, "compare logical long unicode with long offset" }, + { "mvclu", OP48(0xeb000000008eLL), MASK_RSY_RERERD, INSTR_RSY_RERERD, 3, 3, 0, "move long unicode" }, + { "mvclu", OP48(0xeb000000008eLL), MASK_RSE_RERERD, INSTR_RSE_RERERD, 3, 0, 0, "move long unicode" }, + { "icmy", OP48(0xeb0000000081LL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 3, 0, "insert characters with long offset" }, + { "icmh", OP48(0xeb0000000080LL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 3, 0, "insert characters under mask high with long offset" }, + { "icmh", OP48(0xeb0000000080LL), MASK_RSE_RURD, INSTR_RSE_RURD, 2, 2, 0, "insert characters under mask high" }, + { "algsi", OP48(0xeb000000007eLL), MASK_SIY_IRD, INSTR_SIY_IRD, 2, 6, 0, "add logical with signed immediate (64<8)" }, + { "agsi", OP48(0xeb000000007aLL), MASK_SIY_IRD, INSTR_SIY_IRD, 2, 6, 0, "add immediate (64<8)" }, + { "lpswey", OP48(0xeb0000000071LL), MASK_SIY_RD, INSTR_SIY_RD, 2, 12, 0, "load PSW extended" }, + { "alsi", OP48(0xeb000000006eLL), MASK_SIY_IRD, INSTR_SIY_IRD, 2, 6, 0, "add logical with signed immediate (32<8)" }, + { "asi", OP48(0xeb000000006aLL), MASK_SIY_IRD, INSTR_SIY_IRD, 2, 6, 0, "add immediate (32<8)" }, + { "xiy", OP48(0xeb0000000057LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 0, "exclusive or immediate with long offset" }, + { "oiy", OP48(0xeb0000000056LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 0, "or immediate with long offset" }, + { "cliy", OP48(0xeb0000000055LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 0, "compare logical immediate with long offset" }, + { "niy", OP48(0xeb0000000054LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 0, "and immediate with long offset" }, + { "mviy", OP48(0xeb0000000052LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 0, "move immediate with long offset" }, + { "tmy", OP48(0xeb0000000051LL), MASK_SIY_URD, INSTR_SIY_URD, 2, 3, 0, "test under mask with long offset" }, + { "ecag", OP48(0xeb000000004cLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 6, 0, "extract cache attribute" }, + { "bxleg", OP48(0xeb0000000045LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "branch on index low or equal 64" }, + { "bxleg", OP48(0xeb0000000045LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "branch on index low or equal 64" }, + { "bxhg", OP48(0xeb0000000044LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "branch on index high 64" }, + { "bxhg", OP48(0xeb0000000044LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "branch on index high 64" }, + { "cdsg", OP48(0xeb000000003eLL), MASK_RSY_RERERD, INSTR_RSY_RERERD, 2, 3, 0, "compare double and swap with long offset 64" }, + { "cdsg", OP48(0xeb000000003eLL), MASK_RSE_RERERD, INSTR_RSE_RERERD, 2, 2, 0, "compare double and swap 64" }, + { "cdsy", OP48(0xeb0000000031LL), MASK_RSY_RERERD, INSTR_RSY_RERERD, 2, 3, 0, "compare double and swap with long offset" }, + { "csg", OP48(0xeb0000000030LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "compare and swap with long offset 64" }, + { "csg", OP48(0xeb0000000030LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "compare and swap 64" }, + { "lctlg", OP48(0xeb000000002fLL), MASK_RSY_CCRD, INSTR_RSY_CCRD, 2, 3, 0, "load control 64" }, + { "lctlg", OP48(0xeb000000002fLL), MASK_RSE_CCRD, INSTR_RSE_CCRD, 2, 2, 0, "load control 64" }, + { "stcmy", OP48(0xeb000000002dLL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 3, 0, "store characters under mask with long offset" }, + { "stcmh", OP48(0xeb000000002cLL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 3, 0, "store characters under mask high with long offset" }, + { "stcmh", OP48(0xeb000000002cLL), MASK_RSE_RURD, INSTR_RSE_RURD, 2, 2, 0, "store characters under mask high" }, + { "clgt", OP48(0xeb000000002bLL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 8, 0, "compare logical and trap 64 bit reg-mem" }, + { "stmh", OP48(0xeb0000000026LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "store multiple high" }, + { "stmh", OP48(0xeb0000000026LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "store multiple high" }, + { "stctg", OP48(0xeb0000000025LL), MASK_RSY_CCRD, INSTR_RSY_CCRD, 2, 3, 0, "store control 64" }, + { "stctg", OP48(0xeb0000000025LL), MASK_RSE_CCRD, INSTR_RSE_CCRD, 2, 2, 0, "store control 64" }, + { "stmg", OP48(0xeb0000000024LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "store multiple with long offset 64" }, + { "stmg", OP48(0xeb0000000024LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "store multiple 64" }, + { "clt", OP48(0xeb0000000023LL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 8, 0, "compare logical and trap 32 bit reg-mem" }, + { "clmy", OP48(0xeb0000000021LL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 3, 0, "compare logical characters under mask with long offset" }, + { "clmh", OP48(0xeb0000000020LL), MASK_RSY_RURD, INSTR_RSY_RURD, 2, 3, 0, "compare logical characters under mask high with long offset" }, + { "clmh", OP48(0xeb0000000020LL), MASK_RSE_RURD, INSTR_RSE_RURD, 2, 2, 0, "compare logical characters under mask high" }, + { "rll", OP48(0xeb000000001dLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 3, 3, 0, "rotate left single logical 32" }, + { "rll", OP48(0xeb000000001dLL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 3, 2, 0, "rotate left single logical 32" }, + { "rllg", OP48(0xeb000000001cLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "rotate left single logical 64" }, + { "rllg", OP48(0xeb000000001cLL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "rotate left single logical 64" }, + { "pfcr", OP48(0xeb0000000016LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 13, 0, "perform functions with concurrent results" }, + { "csy", OP48(0xeb0000000014LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "compare and swap with long offset" }, + { "tracg", OP48(0xeb000000000fLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "trace 64" }, + { "tracg", OP48(0xeb000000000fLL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "trace 64" }, + { "sllg", OP48(0xeb000000000dLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "shift left single logical 64" }, + { "sllg", OP48(0xeb000000000dLL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "shift left single logical 64" }, + { "srlg", OP48(0xeb000000000cLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "shift right single logical 64" }, + { "srlg", OP48(0xeb000000000cLL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "shift right single logical 64" }, + { "slag", OP48(0xeb000000000bLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "shift left single 64" }, + { "slag", OP48(0xeb000000000bLL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "shift left single 64" }, + { "srag", OP48(0xeb000000000aLL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "shift right single 64" }, + { "srag", OP48(0xeb000000000aLL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "shift right single 64" }, + { "lmg", OP48(0xeb0000000004LL), MASK_RSY_RRRD, INSTR_RSY_RRRD, 2, 3, 0, "load multiple with long offset 64" }, + { "lmg", OP48(0xeb0000000004LL), MASK_RSE_RRRD, INSTR_RSE_RRRD, 2, 2, 0, "load multiple 64" }, + { "unpka", OP8(0xeaLL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "unpack ascii" }, + { "pka", OP8(0xe9LL), MASK_SS_L2RDRD, INSTR_SS_L2RDRD, 3, 0, 0, "pack ascii" }, + { "mvcin", OP8(0xe8LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "move inverse" }, + { "vone", OP48(0xe700ffff0044LL), MASK_VRI_V, INSTR_VRI_V, 2, 9, 8, "vector set to ones" }, + { "wfnmaxb", OP48(0xe7000408009fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp negative multiply and add scalar extended" }, + { "wfnmsxb", OP48(0xe7000408009eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp negative multiply and subtract scalar extended" }, + { "wfmaxb", OP48(0xe7000408008fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp multiply and add scalar extended" }, + { "wfmsxb", OP48(0xe7000408008eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp multiply and subtract scalar extended" }, + { "vsbiq", OP48(0xe700040000bfLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector subtract with borrow indication quadword" }, + { "vsbcbiq", OP48(0xe700040000bdLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector subtract with borrow compute borrow indication quadword" }, + { "vacq", OP48(0xe700040000bbLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector add with carry quadword" }, + { "vacccq", OP48(0xe700040000b9LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector add with carry compute carry quadword" }, + { "vmahq", OP48(0xe700040000abLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add high quadword" }, + { "vmalq", OP48(0xe700040000aaLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add low quadword" }, + { "vmalhq", OP48(0xe700040000a9LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add logical high quadword" }, + { "vblendq", OP48(0xe70004000089LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector blend quadword" }, + { "wfnmadb", OP48(0xe7000308009fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp negative multiply and add scalar long" }, + { "wfnmsdb", OP48(0xe7000308009eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp negative multiply and subtract scalar long" }, + { "wfmadb", OP48(0xe7000308008fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 9, 8, "vector fp multiply and add long" }, + { "wfmsdb", OP48(0xe7000308008eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 9, 8, "vector fp multiply and subtract long" }, + { "vgfmag", OP48(0xe700030000bcLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector galois field multiply sum and accumulate doubleword" }, + { "vmslg", OP48(0xe700030000b8LL), MASK_VRR_VVVU0VB, INSTR_VRR_VVVU0VB, 2, 10, 0, "vector multiply sum logical double word" }, + { "vmaog", OP48(0xe700030000afLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add odd doubleword" }, + { "vmaeg", OP48(0xe700030000aeLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add even doubleword" }, + { "vmalog", OP48(0xe700030000adLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add logical odd doubleword" }, + { "vmaleg", OP48(0xe700030000acLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add logical even doubleword" }, + { "vmahg", OP48(0xe700030000abLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add high doubleword" }, + { "vmalg", OP48(0xe700030000aaLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add low doubleword" }, + { "vmalhg", OP48(0xe700030000a9LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector multiply and add logical high doubleword" }, + { "vfnmadb", OP48(0xe7000300009fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "vector fp negative multiply and add long" }, + { "vfnmsdb", OP48(0xe7000300009eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "vector fp negative multiply and subtract long" }, + { "vfmadb", OP48(0xe7000300008fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 9, 8, "vector fp multiply and add long" }, + { "vfmsdb", OP48(0xe7000300008eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 9, 8, "vector fp multiply and subtract long" }, + { "vblendg", OP48(0xe70003000089LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector blend doubleword" }, + { "vstrczfs", OP48(0xe7000230008aLL), MASK_VRR_VVVU0VB3, INSTR_VRR_VVVU0VB3, 2, 9, 9, "vector string range compare word" }, + { "vstrszf", OP48(0xe7000220008bLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 11, 0, "vector string search word zero" }, + { "vstrczf", OP48(0xe7000220008aLL), MASK_VRR_VVVU0VB2, INSTR_VRR_VVVU0VB2, 2, 9, 9, "vector string range compare word" }, + { "vstrcfs", OP48(0xe7000210008aLL), MASK_VRR_VVVU0VB1, INSTR_VRR_VVVU0VB1, 2, 9, 9, "vector string range compare word" }, + { "wfnmasb", OP48(0xe7000208009fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp negative multiply and add scalar short" }, + { "wfnmssb", OP48(0xe7000208009eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp negative multiply and subtract scalar short" }, + { "wfmasb", OP48(0xe7000208008fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp multiply and add scalar short" }, + { "wfmssb", OP48(0xe7000208008eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "scalar vector fp multiply and subtract scalar short" }, + { "vgfmaf", OP48(0xe700020000bcLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector galois field multiply sum and accumulate word" }, + { "vmaof", OP48(0xe700020000afLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add odd word" }, + { "vmaef", OP48(0xe700020000aeLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add even word" }, + { "vmalof", OP48(0xe700020000adLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical odd word" }, + { "vmalef", OP48(0xe700020000acLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical even word" }, + { "vmahf", OP48(0xe700020000abLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add high word" }, + { "vmalf", OP48(0xe700020000aaLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add low word" }, + { "vmalhf", OP48(0xe700020000a9LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical high word" }, + { "vfnmasb", OP48(0xe7000200009fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "vector fp negative multiply and add short" }, + { "vfnmssb", OP48(0xe7000200009eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "vector fp negative multiply and subtract short" }, + { "vfmasb", OP48(0xe7000200008fLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "vector fp multiply and add short" }, + { "vfmssb", OP48(0xe7000200008eLL), MASK_VRR_VVVV, INSTR_VRR_VVVV, 2, 10, 0, "vector fp multiply and subtract short" }, + { "vstrsf", OP48(0xe7000200008bLL), MASK_VRR_VVVU0VB, INSTR_VRR_VVVU0VB, 2, 11, 1, "vector string search word" }, + { "vstrcf", OP48(0xe7000200008aLL), MASK_VRR_VVVU0VB, INSTR_VRR_VVVU0VB, 2, 9, 9, "vector string range compare word" }, + { "vblendf", OP48(0xe70002000089LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector blend word" }, + { "vstrczhs", OP48(0xe7000130008aLL), MASK_VRR_VVVU0VB3, INSTR_VRR_VVVU0VB3, 2, 9, 9, "vector string range compare halfword" }, + { "vstrszh", OP48(0xe7000120008bLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 11, 0, "vector string search halfword zero" }, + { "vstrczh", OP48(0xe7000120008aLL), MASK_VRR_VVVU0VB2, INSTR_VRR_VVVU0VB2, 2, 9, 9, "vector string range compare halfword" }, + { "vstrchs", OP48(0xe7000110008aLL), MASK_VRR_VVVU0VB1, INSTR_VRR_VVVU0VB1, 2, 9, 9, "vector string range compare halfword" }, + { "vgfmah", OP48(0xe700010000bcLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector galois field multiply sum and accumulate halfword" }, + { "vmaoh", OP48(0xe700010000afLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add odd halfword" }, + { "vmaeh", OP48(0xe700010000aeLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add even halfword" }, + { "vmaloh", OP48(0xe700010000adLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical odd halfword" }, + { "vmaleh", OP48(0xe700010000acLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical even halfword" }, + { "vmahh", OP48(0xe700010000abLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add high halfword" }, + { "vmalhw", OP48(0xe700010000aaLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add low halfword" }, + { "vmalhh", OP48(0xe700010000a9LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical high halfword" }, + { "vstrsh", OP48(0xe7000100008bLL), MASK_VRR_VVVU0VB, INSTR_VRR_VVVU0VB, 2, 11, 1, "vector string search halfword" }, + { "vstrch", OP48(0xe7000100008aLL), MASK_VRR_VVVU0VB, INSTR_VRR_VVVU0VB, 2, 9, 9, "vector string range compare halfword" }, + { "vblendh", OP48(0xe70001000089LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector blend halfword" }, + { "vfaezfs", OP48(0xe70000302082LL), MASK_VRR_VVV0U3, INSTR_VRR_VVV0U3, 2, 9, 9, "vector find any element equal" }, + { "vfenezfs", OP48(0xe70000302081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal word" }, + { "vfeezfs", OP48(0xe70000302080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal word" }, + { "vfaezhs", OP48(0xe70000301082LL), MASK_VRR_VVV0U3, INSTR_VRR_VVV0U3, 2, 9, 9, "vector find any element equal" }, + { "vfenezhs", OP48(0xe70000301081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal halfword" }, + { "vfeezhs", OP48(0xe70000301080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal halfword" }, + { "vstrczbs", OP48(0xe7000030008aLL), MASK_VRR_VVVU0VB3, INSTR_VRR_VVVU0VB3, 2, 9, 9, "vector string range compare byte" }, + { "vfaezbs", OP48(0xe70000300082LL), MASK_VRR_VVV0U3, INSTR_VRR_VVV0U3, 2, 9, 9, "vector find any element equal" }, + { "vfenezbs", OP48(0xe70000300081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal byte" }, + { "vfeezbs", OP48(0xe70000300080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal byte" }, + { "wflpxb", OP48(0xe700002840ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp perform sign operation scalar extended" }, + { "wflpdb", OP48(0xe700002830ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp perform sign operation long" }, + { "wflpsb", OP48(0xe700002820ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp perform sign operation scalar short" }, + { "vflpdb", OP48(0xe700002030ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp perform sign operation long" }, + { "vflpsb", OP48(0xe700002020ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector fp perform sign operation short" }, + { "vfaezf", OP48(0xe70000202082LL), MASK_VRR_VVV0U2, INSTR_VRR_VVV0U2, 2, 9, 9, "vector find any element equal" }, + { "vfenezf", OP48(0xe70000202081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal word" }, + { "vfeezf", OP48(0xe70000202080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal word" }, + { "vfaezh", OP48(0xe70000201082LL), MASK_VRR_VVV0U2, INSTR_VRR_VVV0U2, 2, 9, 9, "vector find any element equal" }, + { "vfenezh", OP48(0xe70000201081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal halfword" }, + { "vfeezh", OP48(0xe70000201080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal halfword" }, + { "vstrszb", OP48(0xe7000020008bLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 11, 0, "vector string search byte zero" }, + { "vstrczb", OP48(0xe7000020008aLL), MASK_VRR_VVVU0VB2, INSTR_VRR_VVVU0VB2, 2, 9, 9, "vector string range compare byte" }, + { "vfaezb", OP48(0xe70000200082LL), MASK_VRR_VVV0U2, INSTR_VRR_VVV0U2, 2, 9, 9, "vector find any element equal" }, + { "vfenezb", OP48(0xe70000200081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal byte" }, + { "vfeezb", OP48(0xe70000200080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal byte" }, + { "wfkhxbs", OP48(0xe700001c40ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high scalar extended" }, + { "wfkhexbs", OP48(0xe700001c40eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high or equal scalar extended" }, + { "wfkexbs", OP48(0xe700001c40e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal equal scalar extended" }, + { "wfkhdbs", OP48(0xe700001c30ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high long" }, + { "wfkhedbs", OP48(0xe700001c30eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high or equal long" }, + { "wfkedbs", OP48(0xe700001c30e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal equal long" }, + { "wfkhsbs", OP48(0xe700001c20ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high scalar short" }, + { "wfkhesbs", OP48(0xe700001c20eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high or equal scalar short" }, + { "wfkesbs", OP48(0xe700001c20e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar fp compare and signal equal scalar short" }, + { "wfchxbs", OP48(0xe700001840ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high scalar extended" }, + { "wfchexbs", OP48(0xe700001840eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high or equal scalar extended" }, + { "wfcexbs", OP48(0xe700001840e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare equal scalar extended" }, + { "wflnxb", OP48(0xe700001840ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp perform sign operation scalar extended" }, + { "wfchdbs", OP48(0xe700001830ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high long" }, + { "wfchedbs", OP48(0xe700001830eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high or equal long" }, + { "wfcedbs", OP48(0xe700001830e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare equal long" }, + { "wflndb", OP48(0xe700001830ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp perform sign operation long" }, + { "wfchsbs", OP48(0xe700001820ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high scalar short" }, + { "wfchesbs", OP48(0xe700001820eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high or equal scalar short" }, + { "wfcesbs", OP48(0xe700001820e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar fp compare equal scalar short" }, + { "wflnsb", OP48(0xe700001820ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp perform sign operation scalar short" }, + { "vfkhdbs", OP48(0xe700001430ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high long" }, + { "vfkhedbs", OP48(0xe700001430eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high or equal long" }, + { "vfkedbs", OP48(0xe700001430e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal equal long" }, + { "vfkhsbs", OP48(0xe700001420ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare and signal high short" }, + { "vfkhesbs", OP48(0xe700001420eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare and signal high or equal short" }, + { "vfkesbs", OP48(0xe700001420e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare and signal equal short" }, + { "vchqs", OP48(0xe700001040fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector compare high quadword" }, + { "vchlqs", OP48(0xe700001040f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector compare high logical quadword" }, + { "vceqqs", OP48(0xe700001040f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector compare equal quadword" }, + { "vchgs", OP48(0xe700001030fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high double word" }, + { "vchlgs", OP48(0xe700001030f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical double word" }, + { "vceqgs", OP48(0xe700001030f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal double word" }, + { "vfchdbs", OP48(0xe700001030ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high long" }, + { "vfchedbs", OP48(0xe700001030eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high or equal long" }, + { "vfcedbs", OP48(0xe700001030e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare equal long" }, + { "vflndb", OP48(0xe700001030ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp perform sign operation long" }, + { "vpksgs", OP48(0xe70000103097LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack saturate double word" }, + { "vpklsgs", OP48(0xe70000103095LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack logical saturate double word" }, + { "vchfs", OP48(0xe700001020fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high word" }, + { "vchlfs", OP48(0xe700001020f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical word" }, + { "vceqfs", OP48(0xe700001020f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal word" }, + { "vfchsbs", OP48(0xe700001020ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare high short" }, + { "vfchesbs", OP48(0xe700001020eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare high or equal short" }, + { "vfcesbs", OP48(0xe700001020e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare equal short" }, + { "vflnsb", OP48(0xe700001020ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector fp perform sign operation short" }, + { "vpksfs", OP48(0xe70000102097LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack saturate word" }, + { "vpklsfs", OP48(0xe70000102095LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack logical saturate word" }, + { "vfaefs", OP48(0xe70000102082LL), MASK_VRR_VVV0U1, INSTR_VRR_VVV0U1, 2, 9, 9, "vector find any element equal" }, + { "vfenefs", OP48(0xe70000102081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal word" }, + { "vfeefs", OP48(0xe70000102080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal word" }, + { "vistrfs", OP48(0xe7000010205cLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector isolate string word" }, + { "vchhs", OP48(0xe700001010fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high half word" }, + { "vchlhs", OP48(0xe700001010f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical half word" }, + { "vceqhs", OP48(0xe700001010f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal half word" }, + { "vpkshs", OP48(0xe70000101097LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack saturate halfword" }, + { "vpklshs", OP48(0xe70000101095LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack logical saturate halfword" }, + { "vfaehs", OP48(0xe70000101082LL), MASK_VRR_VVV0U1, INSTR_VRR_VVV0U1, 2, 9, 9, "vector find any element equal" }, + { "vfenehs", OP48(0xe70000101081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal halfword" }, + { "vfeehs", OP48(0xe70000101080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal halfword" }, + { "vistrhs", OP48(0xe7000010105cLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector isolate string halfword" }, + { "vchbs", OP48(0xe700001000fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high byte" }, + { "vchlbs", OP48(0xe700001000f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical byte" }, + { "vceqbs", OP48(0xe700001000f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal byte" }, + { "vstrcbs", OP48(0xe7000010008aLL), MASK_VRR_VVVU0VB1, INSTR_VRR_VVVU0VB1, 2, 9, 9, "vector string range compare byte" }, + { "vfaebs", OP48(0xe70000100082LL), MASK_VRR_VVV0U1, INSTR_VRR_VVV0U1, 2, 9, 9, "vector find any element equal" }, + { "vfenebs", OP48(0xe70000100081LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element not equal byte" }, + { "vfeebs", OP48(0xe70000100080LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector find element equal byte" }, + { "vistrbs", OP48(0xe7000010005cLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector isolate string byte" }, + { "wfkhxb", OP48(0xe700000c40ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high scalar extended" }, + { "wfkhexb", OP48(0xe700000c40eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high or equal scalar extended" }, + { "wfkexb", OP48(0xe700000c40e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal equal scalar extended" }, + { "wfkhdb", OP48(0xe700000c30ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high long" }, + { "wfkhedb", OP48(0xe700000c30eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high or equal long" }, + { "wfkedb", OP48(0xe700000c30e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal equal long" }, + { "wfkhsb", OP48(0xe700000c20ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high scalar short" }, + { "wfkhesb", OP48(0xe700000c20eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal high or equal scalar short" }, + { "wfkesb", OP48(0xe700000c20e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare and signal equal scalar short" }, + { "wfmaxxb", OP48(0xe700000840efLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "scalar fp maximum scalar extended" }, + { "wfminxb", OP48(0xe700000840eeLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "scalar fp minimum scalar extended" }, + { "wfchxb", OP48(0xe700000840ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high scalar extended" }, + { "wfchexb", OP48(0xe700000840eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high or equal scalar extended" }, + { "wfcexb", OP48(0xe700000840e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare equal scalar extended" }, + { "wfmxb", OP48(0xe700000840e7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp multiply scalar extended" }, + { "wfdxb", OP48(0xe700000840e5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp divide scalar extended" }, + { "wfaxb", OP48(0xe700000840e3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp add scalar extended" }, + { "wfsxb", OP48(0xe700000840e2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp subtract scalar extended" }, + { "wfsqxb", OP48(0xe700000840ceLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp square root scalar extended" }, + { "wfpsoxb", OP48(0xe700000840ccLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 10, 0, "scalar vector fp perform sign operation scalar extended" }, + { "wflcxb", OP48(0xe700000840ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp perform sign operation scalar extended" }, + { "wfixb", OP48(0xe700000840c7LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 10, 0, "scalar vector load fp integer scalar extended" }, + { "wflrx", OP48(0xe700000840c5LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 10, 0, "scalar vector fp load rounded extended" }, + { "wftcixb", OP48(0xe7000008404aLL), MASK_VRI_VVU2, INSTR_VRI_VVU2, 2, 10, 0, "scalar vector fp test data class immediate scalar extended" }, + { "wfmaxdb", OP48(0xe700000830efLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "scalar fp maximum scalar long" }, + { "wfmindb", OP48(0xe700000830eeLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "scalar fp minimum scalar long" }, + { "wfchdb", OP48(0xe700000830ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high long" }, + { "wfchedb", OP48(0xe700000830eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high or equal long" }, + { "wfcedb", OP48(0xe700000830e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare equal long" }, + { "wfmdb", OP48(0xe700000830e7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp multiply long" }, + { "wfddb", OP48(0xe700000830e5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp divide long" }, + { "wfadb", OP48(0xe700000830e3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp add long" }, + { "wfsdb", OP48(0xe700000830e2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp subtract long" }, + { "wfsqdb", OP48(0xe700000830ceLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp square root long" }, + { "wfpsodb", OP48(0xe700000830ccLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 9, 8, "vector fp perform sign operation long" }, + { "wflcdb", OP48(0xe700000830ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp perform sign operation long" }, + { "wfidb", OP48(0xe700000830c7LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 9, 8, "vector load fp integer long" }, + { "wflrd", OP48(0xe700000830c5LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 10, 0, "scalar vector fp load rounded long" }, + { "wledb", OP48(0xe700000830c5LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 9, 8, "vector fp load rounded long to short" }, + { "wflld", OP48(0xe700000830c4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp load lengthened long" }, + { "wcdgb", OP48(0xe700000830c3LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 9, 8, "vector fp convert from fixed 64 bit" }, + { "wcgdb", OP48(0xe700000830c2LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 9, 8, "vector fp convert to fixed 64 bit" }, + { "wcdlgb", OP48(0xe700000830c1LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 9, 8, "vector fp convert from logical 64 bit" }, + { "wclgdb", OP48(0xe700000830c0LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 9, 8, "vector fp convert to logical 64 bit" }, + { "wftcidb", OP48(0xe7000008304aLL), MASK_VRI_VVU2, INSTR_VRI_VVU2, 2, 9, 8, "vector fp test data class immediate" }, + { "wfmaxsb", OP48(0xe700000820efLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "scalar fp maximum scalar short" }, + { "wfminsb", OP48(0xe700000820eeLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "scalar fp minimum scalar short" }, + { "wfchsb", OP48(0xe700000820ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high scalar short" }, + { "wfchesb", OP48(0xe700000820eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare high or equal scalar short" }, + { "wfcesb", OP48(0xe700000820e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp compare equal scalar short" }, + { "wfmsb", OP48(0xe700000820e7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp multiply scalar short" }, + { "wfdsb", OP48(0xe700000820e5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp divide scalar short" }, + { "wfasb", OP48(0xe700000820e3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp add scalar short" }, + { "wfssb", OP48(0xe700000820e2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "scalar vector fp subtract scalar short" }, + { "wfsqsb", OP48(0xe700000820ceLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp square root scalar short" }, + { "wfpsosb", OP48(0xe700000820ccLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 10, 0, "scalar vector fp perform sign operation scalar short" }, + { "wflcsb", OP48(0xe700000820ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp perform sign operation scalar short" }, + { "wfisb", OP48(0xe700000820c7LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 10, 0, "scalar vector load fp integer scalar short" }, + { "wflls", OP48(0xe700000820c4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp load lengthened short" }, + { "wldeb", OP48(0xe700000820c4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp load lengthened short to long" }, + { "wcefb", OP48(0xe700000820c3LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 11, 0, "vector fp convert from fixed 32 bit" }, + { "wcfeb", OP48(0xe700000820c2LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 11, 0, "vector fp convert to fixed 32 bit" }, + { "wcelfb", OP48(0xe700000820c1LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 11, 0, "vector fp convert from logical 32 bit" }, + { "wclfeb", OP48(0xe700000820c0LL), MASK_VRR_VV0UU8, INSTR_VRR_VV0UU8, 2, 11, 0, "vector fp convert to logical 32 bit" }, + { "wftcisb", OP48(0xe7000008204aLL), MASK_VRI_VVU2, INSTR_VRI_VVU2, 2, 10, 0, "scalar vector fp test data class immediate scalar short" }, + { "vfkhdb", OP48(0xe700000430ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high long" }, + { "vfkhedb", OP48(0xe700000430eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal high or equal long" }, + { "vfkedb", OP48(0xe700000430e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 8, "vector fp compare and signal equal long" }, + { "vfkhsb", OP48(0xe700000420ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare and signal high short" }, + { "vfkhesb", OP48(0xe700000420eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare and signal high or equal short" }, + { "vfkesb", OP48(0xe700000420e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare and signal equal short" }, + { "vllezlf", OP48(0xe70000006004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 10, 0, "vector load logical word element and zero - left aligned" }, + { "vmxq", OP48(0xe700000040ffLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector maximum quadword" }, + { "vmnq", OP48(0xe700000040feLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector minimum quadword" }, + { "vmxlq", OP48(0xe700000040fdLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector maximum logical quadword" }, + { "vmnlq", OP48(0xe700000040fcLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector minimum logical quadword" }, + { "vchq", OP48(0xe700000040fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector compare high quadword" }, + { "vchlq", OP48(0xe700000040f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector compare high logical quadword" }, + { "vceqq", OP48(0xe700000040f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector compare equal quadword" }, + { "vsq", OP48(0xe700000040f7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract quadword" }, + { "vscbiq", OP48(0xe700000040f5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract compute borrow indication quadword" }, + { "vaq", OP48(0xe700000040f3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add quad word" }, + { "vavgq", OP48(0xe700000040f2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector average quadword" }, + { "vaccq", OP48(0xe700000040f1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add compute carry quadword" }, + { "vavglq", OP48(0xe700000040f0LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector average logical quadword" }, + { "vlpq", OP48(0xe700000040dfLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector load positive quadword" }, + { "vlcq", OP48(0xe700000040deLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector load complement quadword" }, + { "vecq", OP48(0xe700000040dbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector element compare quadword" }, + { "veclq", OP48(0xe700000040d9LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector element compare logical quadword" }, + { "wfcxb", OP48(0xe700000040cbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp compare scalar extended" }, + { "wfkxb", OP48(0xe700000040caLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp compare and signal scalar extended" }, + { "vrq", OP48(0xe700000040b3LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector remainder quadword" }, + { "vdq", OP48(0xe700000040b2LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector divide quadword" }, + { "vrlq", OP48(0xe700000040b1LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector remainder logical quadword" }, + { "vdlq", OP48(0xe700000040b0LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector divide logical quadword" }, + { "vmhq", OP48(0xe700000040a3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply high quadword" }, + { "vmlq", OP48(0xe700000040a2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply low quadword" }, + { "vmlhq", OP48(0xe700000040a1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply logical high quadword" }, + { "vgemq", OP48(0xe70000004054LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector generate element masks quadword" }, + { "vclzq", OP48(0xe70000004053LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector count leading zeros quadword" }, + { "vctzq", OP48(0xe70000004052LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector count trailing zeros quadword" }, + { "vmxg", OP48(0xe700000030ffLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum doubleword" }, + { "vmng", OP48(0xe700000030feLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum doubleword" }, + { "vmxlg", OP48(0xe700000030fdLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum logical doubleword" }, + { "vmnlg", OP48(0xe700000030fcLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum logical doubleword" }, + { "vchg", OP48(0xe700000030fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high double word" }, + { "vchlg", OP48(0xe700000030f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical double word" }, + { "vceqg", OP48(0xe700000030f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal double word" }, + { "vsg", OP48(0xe700000030f7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract doubleword" }, + { "vscbig", OP48(0xe700000030f5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract compute borrow indication doubleword" }, + { "vag", OP48(0xe700000030f3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add double word" }, + { "vavgg", OP48(0xe700000030f2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average double word" }, + { "vaccg", OP48(0xe700000030f1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add compute carry doubleword" }, + { "vavglg", OP48(0xe700000030f0LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average logical double word" }, + { "vfmaxdb", OP48(0xe700000030efLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "vector fp maximum long" }, + { "vfmindb", OP48(0xe700000030eeLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "vector fp minimum long" }, + { "vfchdb", OP48(0xe700000030ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high long" }, + { "vfchedb", OP48(0xe700000030eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare high or equal long" }, + { "vfcedb", OP48(0xe700000030e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp compare equal long" }, + { "vfmdb", OP48(0xe700000030e7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp multiply long" }, + { "vfddb", OP48(0xe700000030e5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp divide long" }, + { "vfadb", OP48(0xe700000030e3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp add long" }, + { "vfsdb", OP48(0xe700000030e2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector fp subtract long" }, + { "vlpg", OP48(0xe700000030dfLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load positive doubleword" }, + { "vlcg", OP48(0xe700000030deLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load complement doubleword" }, + { "vecg", OP48(0xe700000030dbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare double word" }, + { "veclg", OP48(0xe700000030d9LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare logical double word" }, + { "vuphg", OP48(0xe700000030d7LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector unpack high doubleword" }, + { "vuplg", OP48(0xe700000030d6LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector unpack low doubleword" }, + { "vuplhg", OP48(0xe700000030d5LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector unpack logical high doubleword" }, + { "vupllg", OP48(0xe700000030d4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector unpack logical low doubleword" }, + { "vfsqdb", OP48(0xe700000030ceLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp square root long" }, + { "vfpsodb", OP48(0xe700000030ccLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 9, 8, "vector fp perform sign operation long" }, + { "vflcdb", OP48(0xe700000030ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp perform sign operation long" }, + { "wfcdb", OP48(0xe700000030cbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp compare scalar long" }, + { "wfkdb", OP48(0xe700000030caLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp compare and signal scalar long" }, + { "vfidb", OP48(0xe700000030c7LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 9, 8, "vector load fp integer long" }, + { "vflrd", OP48(0xe700000030c5LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 10, 0, "vector fp load rounded long" }, + { "vledb", OP48(0xe700000030c5LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 9, 8, "vector fp load rounded long to short" }, + { "vcdgb", OP48(0xe700000030c3LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 9, 8, "vector fp convert from fixed 64 bit" }, + { "vcgdb", OP48(0xe700000030c2LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 9, 8, "vector fp convert to fixed 64 bit" }, + { "vcdlgb", OP48(0xe700000030c1LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 9, 8, "vector fp convert from logical 64 bit" }, + { "vclgdb", OP48(0xe700000030c0LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 9, 8, "vector fp convert to logical 64 bit" }, + { "vgfmg", OP48(0xe700000030b4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector galois field multiply sum doubleword" }, + { "vrg", OP48(0xe700000030b3LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector remainder doubleword" }, + { "vdg", OP48(0xe700000030b2LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector divide doubleword" }, + { "vrlg", OP48(0xe700000030b1LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector remainder logical doubleword" }, + { "vdlg", OP48(0xe700000030b0LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector divide logical doubleword" }, + { "vmog", OP48(0xe700000030a7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply odd doubleword" }, + { "vmeg", OP48(0xe700000030a6LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply even doubleword" }, + { "vmlog", OP48(0xe700000030a5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply logical odd doubleword" }, + { "vmleg", OP48(0xe700000030a4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply logical even doubleword" }, + { "vmhg", OP48(0xe700000030a3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply high doubleword" }, + { "vmlg", OP48(0xe700000030a2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply low doubleword" }, + { "vmlhg", OP48(0xe700000030a1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 13, 0, "vector multiply logical high doubleword" }, + { "vpksg", OP48(0xe70000003097LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack saturate double word" }, + { "vpklsg", OP48(0xe70000003095LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack logical saturate double word" }, + { "vpkg", OP48(0xe70000003094LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack double word" }, + { "vesravg", OP48(0xe7000000307aLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right arithmetic reg doubleword" }, + { "vesrlvg", OP48(0xe70000003078LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right logical reg doubleword" }, + { "verllvg", OP48(0xe70000003073LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element rotate left logical reg doubleword" }, + { "verimg", OP48(0xe70000003072LL), MASK_VRI_VVV0U, INSTR_VRI_VVV0U, 2, 9, 8, "vector element rotate and insert under mask doubleword" }, + { "veslvg", OP48(0xe70000003070LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift left reg doubleword" }, + { "vsumqg", OP48(0xe70000003067LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector sum across quadword - doubleword elements" }, + { "vmrhg", OP48(0xe70000003061LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge high double word" }, + { "vmrlg", OP48(0xe70000003060LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge low double word" }, + { "vgemg", OP48(0xe70000003054LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector generate element masks doubleword" }, + { "vclzg", OP48(0xe70000003053LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count leading zeros doubleword" }, + { "vctzg", OP48(0xe70000003052LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count trailing zeros doubleword" }, + { "vpopctg", OP48(0xe70000003050LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector population count double word" }, + { "vrepg", OP48(0xe7000000304dLL), MASK_VRI_VVU, INSTR_VRI_VVU, 2, 9, 8, "vector replicate double word" }, + { "vftcidb", OP48(0xe7000000304aLL), MASK_VRI_VVU2, INSTR_VRI_VVU2, 2, 9, 8, "vector fp test data class immediate" }, + { "vgmg", OP48(0xe70000003046LL), MASK_VRI_V0UU, INSTR_VRI_V0UU, 2, 9, 8, "vector generate mask double word" }, + { "vrepig", OP48(0xe70000003045LL), MASK_VRI_V0I, INSTR_VRI_V0I, 2, 9, 8, "vector replicate immediate double word" }, + { "vesrag", OP48(0xe7000000303aLL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right arithmetic mem doubleword" }, + { "vesrlg", OP48(0xe70000003038LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right logical mem doubleword" }, + { "verllg", OP48(0xe70000003033LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element rotate left logical mem doubleword" }, + { "veslg", OP48(0xe70000003030LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift left mem doubleword" }, + { "vlvgg", OP48(0xe70000003022LL), MASK_VRS_VRRD, INSTR_VRS_VRRD, 2, 9, 8, "vector load VR double word element from GR" }, + { "vlgvg", OP48(0xe70000003021LL), MASK_VRS_RVRD, INSTR_VRS_RVRD, 2, 9, 8, "vector load GR from VR double word element" }, + { "vlrepg", OP48(0xe70000003005LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load and replicate double word elements" }, + { "vllezg", OP48(0xe70000003004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load logical double word element and zero" }, + { "vmxf", OP48(0xe700000020ffLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum word" }, + { "vmnf", OP48(0xe700000020feLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum word" }, + { "vmxlf", OP48(0xe700000020fdLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum logical word" }, + { "vmnlf", OP48(0xe700000020fcLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum logical word" }, + { "vchf", OP48(0xe700000020fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high word" }, + { "vchlf", OP48(0xe700000020f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical word" }, + { "vceqf", OP48(0xe700000020f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal word" }, + { "vsf", OP48(0xe700000020f7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract word" }, + { "vscbif", OP48(0xe700000020f5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract compute borrow indication word" }, + { "vaf", OP48(0xe700000020f3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add word" }, + { "vavgf", OP48(0xe700000020f2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average word" }, + { "vaccf", OP48(0xe700000020f1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add compute carry word" }, + { "vavglf", OP48(0xe700000020f0LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average logical word" }, + { "vfmaxsb", OP48(0xe700000020efLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "vector fp maximum short" }, + { "vfminsb", OP48(0xe700000020eeLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 10, 0, "vector fp minimum short" }, + { "vfchsb", OP48(0xe700000020ebLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare high short" }, + { "vfchesb", OP48(0xe700000020eaLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare high or equal short" }, + { "vfcesb", OP48(0xe700000020e8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp compare equal short" }, + { "vfmsb", OP48(0xe700000020e7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp multiply short" }, + { "vfdsb", OP48(0xe700000020e5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp divide short" }, + { "vfasb", OP48(0xe700000020e3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp add short" }, + { "vfssb", OP48(0xe700000020e2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector fp subtract short" }, + { "vlpf", OP48(0xe700000020dfLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load positive word" }, + { "vlcf", OP48(0xe700000020deLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load complement word" }, + { "vecf", OP48(0xe700000020dbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare word" }, + { "veclf", OP48(0xe700000020d9LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare logical word" }, + { "vuphf", OP48(0xe700000020d7LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack high word" }, + { "vuplf", OP48(0xe700000020d6LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack low word" }, + { "vuplhf", OP48(0xe700000020d5LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack logical high word" }, + { "vupllf", OP48(0xe700000020d4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack logical low word" }, + { "vfsqsb", OP48(0xe700000020ceLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector fp square root short" }, + { "vfpsosb", OP48(0xe700000020ccLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 10, 0, "vector fp perform sign operation short" }, + { "vflcsb", OP48(0xe700000020ccLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector fp perform sign operation short" }, + { "wfcsb", OP48(0xe700000020cbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp compare scalar short" }, + { "wfksb", OP48(0xe700000020caLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "scalar vector fp compare and signal scalar short" }, + { "vfisb", OP48(0xe700000020c7LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 10, 0, "vector load fp integer short" }, + { "vflls", OP48(0xe700000020c4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector fp load lengthened" }, + { "vldeb", OP48(0xe700000020c4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector fp load lengthened short to long" }, + { "vcefb", OP48(0xe700000020c3LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 11, 0, "vector fp convert from fixed 32 bit" }, + { "vcfeb", OP48(0xe700000020c2LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 11, 0, "vector fp convert to fixed 32 bit" }, + { "vcelfb", OP48(0xe700000020c1LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 11, 0, "vector fp convert from logical 32 bit" }, + { "vclfeb", OP48(0xe700000020c0LL), MASK_VRR_VV0UU, INSTR_VRR_VV0UU, 2, 11, 0, "vector fp convert to logical 32 bit" }, + { "vgfmf", OP48(0xe700000020b4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector galois field multiply sum word" }, + { "vrf", OP48(0xe700000020b3LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector remainder word" }, + { "vdf", OP48(0xe700000020b2LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector divide word" }, + { "vrlf", OP48(0xe700000020b1LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector remainder logical word" }, + { "vdlf", OP48(0xe700000020b0LL), MASK_VRR_VVV0U02, INSTR_VRR_VVV0U02, 2, 13, 0, "vector divide logical word" }, + { "vmof", OP48(0xe700000020a7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply odd word" }, + { "vmef", OP48(0xe700000020a6LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply even word" }, + { "vmlof", OP48(0xe700000020a5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical odd word" }, + { "vmlef", OP48(0xe700000020a4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical even word" }, + { "vmhf", OP48(0xe700000020a3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply high word" }, + { "vmlf", OP48(0xe700000020a2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply low word" }, + { "vmlhf", OP48(0xe700000020a1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical high word" }, + { "vpksf", OP48(0xe70000002097LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack saturate word" }, + { "vpklsf", OP48(0xe70000002095LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack logical saturate word" }, + { "vpkf", OP48(0xe70000002094LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack word" }, + { "vfaef", OP48(0xe70000002082LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find any element equal word" }, + { "vfenef", OP48(0xe70000002081LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find element not equal word" }, + { "vfeef", OP48(0xe70000002080LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find element equal word" }, + { "vesravf", OP48(0xe7000000207aLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right arithmetic reg word" }, + { "vesrlvf", OP48(0xe70000002078LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right logical reg word" }, + { "verllvf", OP48(0xe70000002073LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element rotate left logical reg word" }, + { "verimf", OP48(0xe70000002072LL), MASK_VRI_VVV0U, INSTR_VRI_VVV0U, 2, 9, 8, "vector element rotate and insert under mask word" }, + { "veslvf", OP48(0xe70000002070LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift left reg word" }, + { "vsumqf", OP48(0xe70000002067LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector sum across quadword - word elements" }, + { "vsumgf", OP48(0xe70000002065LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector sum across doubleword - word" }, + { "vmrhf", OP48(0xe70000002061LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge high word" }, + { "vmrlf", OP48(0xe70000002060LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge low word" }, + { "vsegf", OP48(0xe7000000205fLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector sign extend word to double word" }, + { "vistrf", OP48(0xe7000000205cLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 9, 9, "vector isolate string word" }, + { "vgemf", OP48(0xe70000002054LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector generate element masks word" }, + { "vclzf", OP48(0xe70000002053LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count leading zeros word" }, + { "vctzf", OP48(0xe70000002052LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count trailing zeros word" }, + { "vpopctf", OP48(0xe70000002050LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector population count word" }, + { "vrepf", OP48(0xe7000000204dLL), MASK_VRI_VVU, INSTR_VRI_VVU, 2, 9, 8, "vector replicate word" }, + { "vftcisb", OP48(0xe7000000204aLL), MASK_VRI_VVU2, INSTR_VRI_VVU2, 2, 10, 0, "vector fp test data class immediate short" }, + { "vgmf", OP48(0xe70000002046LL), MASK_VRI_V0UU, INSTR_VRI_V0UU, 2, 9, 8, "vector generate mask word" }, + { "vrepif", OP48(0xe70000002045LL), MASK_VRI_V0I, INSTR_VRI_V0I, 2, 9, 8, "vector replicate immediate word" }, + { "vesraf", OP48(0xe7000000203aLL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right arithmetic mem word" }, + { "vesrlf", OP48(0xe70000002038LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right logical mem word" }, + { "verllf", OP48(0xe70000002033LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element rotate left logical mem word" }, + { "veslf", OP48(0xe70000002030LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift left mem word" }, + { "vlvgf", OP48(0xe70000002022LL), MASK_VRS_VRRD, INSTR_VRS_VRRD, 2, 9, 8, "vector load VR word element from GR" }, + { "vlgvf", OP48(0xe70000002021LL), MASK_VRS_RVRD, INSTR_VRS_RVRD, 2, 9, 8, "vector load GR from VR word element" }, + { "vlrepf", OP48(0xe70000002005LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load and replicate word elements" }, + { "vllezf", OP48(0xe70000002004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load logical word element and zero" }, + { "vmxh", OP48(0xe700000010ffLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum halfword" }, + { "vmnh", OP48(0xe700000010feLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum halfword" }, + { "vmxlh", OP48(0xe700000010fdLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum logical halfword" }, + { "vmnlh", OP48(0xe700000010fcLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum logical halfword" }, + { "vchh", OP48(0xe700000010fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high half word" }, + { "vchlh", OP48(0xe700000010f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical half word" }, + { "vceqh", OP48(0xe700000010f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal half word" }, + { "vsh", OP48(0xe700000010f7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract halfword" }, + { "vscbih", OP48(0xe700000010f5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract compute borrow indication halfword" }, + { "vah", OP48(0xe700000010f3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add halfword" }, + { "vavgh", OP48(0xe700000010f2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average half word" }, + { "vacch", OP48(0xe700000010f1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add compute carry halfword" }, + { "vavglh", OP48(0xe700000010f0LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average logical half word" }, + { "vlph", OP48(0xe700000010dfLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load positive halfword" }, + { "vlch", OP48(0xe700000010deLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load complement halfword" }, + { "vech", OP48(0xe700000010dbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare half word" }, + { "veclh", OP48(0xe700000010d9LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare logical half word" }, + { "vuphh", OP48(0xe700000010d7LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack high halfword" }, + { "vuplhw", OP48(0xe700000010d6LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack low halfword" }, + { "vuplhh", OP48(0xe700000010d5LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack logical high halfword" }, + { "vupllh", OP48(0xe700000010d4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack logical low halfword" }, + { "vgfmh", OP48(0xe700000010b4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector galois field multiply sum halfword" }, + { "vmoh", OP48(0xe700000010a7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply odd halfword" }, + { "vmeh", OP48(0xe700000010a6LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply even halfword" }, + { "vmloh", OP48(0xe700000010a5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical odd halfword" }, + { "vmleh", OP48(0xe700000010a4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical even halfword" }, + { "vmhh", OP48(0xe700000010a3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply high halfword" }, + { "vmlhw", OP48(0xe700000010a2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply low halfword" }, + { "vmlhh", OP48(0xe700000010a1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical high halfword" }, + { "vpksh", OP48(0xe70000001097LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack saturate halfword" }, + { "vpklsh", OP48(0xe70000001095LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack logical saturate halfword" }, + { "vpkh", OP48(0xe70000001094LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector pack halfword" }, + { "vfaeh", OP48(0xe70000001082LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find any element equal halfword" }, + { "vfeneh", OP48(0xe70000001081LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find element not equal halfword" }, + { "vfeeh", OP48(0xe70000001080LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find element equal halfword" }, + { "vesravh", OP48(0xe7000000107aLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right arithmetic reg halfword" }, + { "vesrlvh", OP48(0xe70000001078LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right logical reg halfword" }, + { "verllvh", OP48(0xe70000001073LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element rotate left logical reg halfword" }, + { "verimh", OP48(0xe70000001072LL), MASK_VRI_VVV0U, INSTR_VRI_VVV0U, 2, 9, 8, "vector element rotate and insert under mask halfword" }, + { "veslvh", OP48(0xe70000001070LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift left reg halfword" }, + { "vsumgh", OP48(0xe70000001065LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector sum across doubleword - halfword" }, + { "vsumh", OP48(0xe70000001064LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector sum across word - halfword elements" }, + { "vmrhh", OP48(0xe70000001061LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge high halfword" }, + { "vmrlh", OP48(0xe70000001060LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge low halfword" }, + { "vsegh", OP48(0xe7000000105fLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector sign extend halfword to double word" }, + { "vistrh", OP48(0xe7000000105cLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 9, 9, "vector isolate string halfword" }, + { "vgemh", OP48(0xe70000001054LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector generate element masks halfword" }, + { "vclzh", OP48(0xe70000001053LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count leading zeros halfword" }, + { "vctzh", OP48(0xe70000001052LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count trailing zeros halfword" }, + { "vpopcth", OP48(0xe70000001050LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector population count halfword" }, + { "vreph", OP48(0xe7000000104dLL), MASK_VRI_VVU, INSTR_VRI_VVU, 2, 9, 8, "vector replicate halfword" }, + { "vgmh", OP48(0xe70000001046LL), MASK_VRI_V0UU, INSTR_VRI_V0UU, 2, 9, 8, "vector generate mask halfword" }, + { "vrepih", OP48(0xe70000001045LL), MASK_VRI_V0I, INSTR_VRI_V0I, 2, 9, 8, "vector replicate immediate halfword" }, + { "vesrah", OP48(0xe7000000103aLL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right arithmetic mem halfword" }, + { "vesrlh", OP48(0xe70000001038LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right logical mem halfword" }, + { "verllh", OP48(0xe70000001033LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element rotate left logical mem halfword" }, + { "veslh", OP48(0xe70000001030LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift left mem halfword" }, + { "vlvgh", OP48(0xe70000001022LL), MASK_VRS_VRRD, INSTR_VRS_VRRD, 2, 9, 8, "vector load VR halfword element from GR" }, + { "vlgvh", OP48(0xe70000001021LL), MASK_VRS_RVRD, INSTR_VRS_RVRD, 2, 9, 8, "vector load GR from VR halfword element" }, + { "vlreph", OP48(0xe70000001005LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load and replicate halfword elements" }, + { "vllezh", OP48(0xe70000001004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load logical halfword element and zero" }, + { "vmx", OP48(0xe700000000ffLL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector maximum" }, + { "vmxb", OP48(0xe700000000ffLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum byte" }, + { "vmn", OP48(0xe700000000feLL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector minimum" }, + { "vmnb", OP48(0xe700000000feLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum byte" }, + { "vmxl", OP48(0xe700000000fdLL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector maximum logical" }, + { "vmxlb", OP48(0xe700000000fdLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector maximum logical byte" }, + { "vmnl", OP48(0xe700000000fcLL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector minimum logical" }, + { "vmnlb", OP48(0xe700000000fcLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector minimum logical byte" }, + { "vch", OP48(0xe700000000fbLL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 8, "vector compare high" }, + { "vchb", OP48(0xe700000000fbLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high byte" }, + { "vchl", OP48(0xe700000000f9LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 8, "vector compare high logical" }, + { "vchlb", OP48(0xe700000000f9LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare high logical byte" }, + { "vceq", OP48(0xe700000000f8LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 8, "vector compare equal" }, + { "vceqb", OP48(0xe700000000f8LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector compare equal byte" }, + { "vs", OP48(0xe700000000f7LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector subtract" }, + { "vsb", OP48(0xe700000000f7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract byte" }, + { "vscbi", OP48(0xe700000000f5LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector subtract compute borrow indication" }, + { "vscbib", OP48(0xe700000000f5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector subtract compute borrow indication byte" }, + { "va", OP48(0xe700000000f3LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector add" }, + { "vab", OP48(0xe700000000f3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add byte" }, + { "vavg", OP48(0xe700000000f2LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector average" }, + { "vavgb", OP48(0xe700000000f2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average byte" }, + { "vacc", OP48(0xe700000000f1LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector add compute carry" }, + { "vaccb", OP48(0xe700000000f1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector add compute carry byte" }, + { "vavgl", OP48(0xe700000000f0LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector average logical" }, + { "vavglb", OP48(0xe700000000f0LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector average logical byte" }, + { "vfmax", OP48(0xe700000000efLL), MASK_VRR_VVV0UUU, INSTR_VRR_VVV0UUU, 2, 10, 0, "vector fp maximum" }, + { "vfmin", OP48(0xe700000000eeLL), MASK_VRR_VVV0UUU, INSTR_VRR_VVV0UUU, 2, 10, 0, "vector fp minimum" }, + { "vfch", OP48(0xe700000000ebLL), MASK_VRR_VVV0UUU, INSTR_VRR_VVV0UUU, 2, 9, 8, "vector fp compare high" }, + { "vfche", OP48(0xe700000000eaLL), MASK_VRR_VVV0UUU, INSTR_VRR_VVV0UUU, 2, 9, 8, "vector fp compare high or equal" }, + { "vfce", OP48(0xe700000000e8LL), MASK_VRR_VVV0UUU, INSTR_VRR_VVV0UUU, 2, 9, 8, "vector fp compare equal" }, + { "vfm", OP48(0xe700000000e7LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 9, 8, "vector fp multiply" }, + { "vfd", OP48(0xe700000000e5LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 9, 8, "vector fp divide" }, + { "vfa", OP48(0xe700000000e3LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 9, 8, "vector fp add" }, + { "vfs", OP48(0xe700000000e2LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 9, 8, "vector fp subtract" }, + { "vlp", OP48(0xe700000000dfLL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector load positive" }, + { "vlpb", OP48(0xe700000000dfLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load positive byte" }, + { "vlc", OP48(0xe700000000deLL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector load complement" }, + { "vlcb", OP48(0xe700000000deLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector load complement byte" }, + { "vec", OP48(0xe700000000dbLL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector element compare" }, + { "vecb", OP48(0xe700000000dbLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare byte" }, + { "vecl", OP48(0xe700000000d9LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector element compare logical" }, + { "veclb", OP48(0xe700000000d9LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector element compare logical byte" }, + { "vtm", OP48(0xe700000000d8LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector test under mask" }, + { "vuph", OP48(0xe700000000d7LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector unpack high" }, + { "vuphb", OP48(0xe700000000d7LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack high byte" }, + { "vupl", OP48(0xe700000000d6LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector unpack low" }, + { "vuplb", OP48(0xe700000000d6LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack low byte" }, + { "vuplh", OP48(0xe700000000d5LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector unpack logical high" }, + { "vuplhb", OP48(0xe700000000d5LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack logical high byte" }, + { "vupll", OP48(0xe700000000d4LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector unpack logical low" }, + { "vupllb", OP48(0xe700000000d4LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector unpack logical low byte" }, + { "vfsq", OP48(0xe700000000ceLL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 9, 8, "vector fp square root" }, + { "vfpso", OP48(0xe700000000ccLL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 9, 8, "vector fp perform sign operation" }, + { "wfc", OP48(0xe700000000cbLL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 9, 8, "vector fp compare scalar" }, + { "wfk", OP48(0xe700000000caLL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 9, 8, "vector fp compare and signal scalar" }, + { "vfi", OP48(0xe700000000c7LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 9, 8, "vector load fp integer" }, + { "vflr", OP48(0xe700000000c5LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 10, 0, "vector fp load rounded" }, + { "vled", OP48(0xe700000000c5LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 9, 8, "vector fp load rounded" }, + { "vfll", OP48(0xe700000000c4LL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 10, 0, "vector fp load lengthened" }, + { "vlde", OP48(0xe700000000c4LL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 9, 8, "vector fp load lengthened" }, + { "vcfps", OP48(0xe700000000c3LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 11, 0, "vector fp convert from fixed" }, + { "vcdg", OP48(0xe700000000c3LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 9, 8, "vector fp convert from fixed 64 bit" }, + { "vcsfp", OP48(0xe700000000c2LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 11, 0, "vector fp convert to fixed" }, + { "vcgd", OP48(0xe700000000c2LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 9, 8, "vector fp convert to fixed 64 bit" }, + { "vcfpl", OP48(0xe700000000c1LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 11, 0, "vector fp convert from logical" }, + { "vcdlg", OP48(0xe700000000c1LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 9, 8, "vector fp convert from logical 64 bit" }, + { "vclfp", OP48(0xe700000000c0LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 11, 0, "vector fp convert to logical" }, + { "vclgd", OP48(0xe700000000c0LL), MASK_VRR_VV0UUU, INSTR_VRR_VV0UUU, 2, 9, 8, "vector fp convert to logical 64 bit" }, + { "vsbi", OP48(0xe700000000bfLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector subtract with borrow indication" }, + { "vsbcbi", OP48(0xe700000000bdLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector subtract with borrow compute borrow indication" }, + { "vgfma", OP48(0xe700000000bcLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector galois field multiply sum and accumulate" }, + { "vgfmab", OP48(0xe700000000bcLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector galois field multiply sum and accumulate byte" }, + { "vac", OP48(0xe700000000bbLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector add with carry" }, + { "vaccc", OP48(0xe700000000b9LL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector add with carry compute carry" }, + { "vmsl", OP48(0xe700000000b8LL), MASK_VRR_VVVUU0V, INSTR_VRR_VVVUU0V, 2, 10, 0, "vector multiply sum logical" }, + { "vgfm", OP48(0xe700000000b4LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector galois field multiply sum" }, + { "vgfmb", OP48(0xe700000000b4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector galois field multiply sum byte" }, + { "vr", OP48(0xe700000000b3LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 13, 0, "vector remainder" }, + { "vd", OP48(0xe700000000b2LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 13, 0, "vector divide" }, + { "vrl", OP48(0xe700000000b1LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 13, 0, "vector remainder logical" }, + { "vdl", OP48(0xe700000000b0LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 13, 0, "vector divide logical" }, + { "vmao", OP48(0xe700000000afLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector multiply and add odd" }, + { "vmaob", OP48(0xe700000000afLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add odd byte" }, + { "vmae", OP48(0xe700000000aeLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector multiply and add even" }, + { "vmaeb", OP48(0xe700000000aeLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add even byte" }, + { "vmalo", OP48(0xe700000000adLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector multiply and add logical odd" }, + { "vmalob", OP48(0xe700000000adLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical odd byte" }, + { "vmale", OP48(0xe700000000acLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector multiply and add logical even" }, + { "vmaleb", OP48(0xe700000000acLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical even byte" }, + { "vmah", OP48(0xe700000000abLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector multiply and add high" }, + { "vmahb", OP48(0xe700000000abLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add high byte" }, + { "vmal", OP48(0xe700000000aaLL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector multiply and add low" }, + { "vmalb", OP48(0xe700000000aaLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add low byte" }, + { "vmalh", OP48(0xe700000000a9LL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 9, 8, "vector multiply and add logical high" }, + { "vmalhb", OP48(0xe700000000a9LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector multiply and add logical high byte" }, + { "vmo", OP48(0xe700000000a7LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector multiply odd" }, + { "vmob", OP48(0xe700000000a7LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply odd byte" }, + { "vme", OP48(0xe700000000a6LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector multiply even" }, + { "vmeb", OP48(0xe700000000a6LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply even byte" }, + { "vmlo", OP48(0xe700000000a5LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector multiply logical odd" }, + { "vmlob", OP48(0xe700000000a5LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical odd byte" }, + { "vmle", OP48(0xe700000000a4LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector multiply logical even" }, + { "vmleb", OP48(0xe700000000a4LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical even byte" }, + { "vmh", OP48(0xe700000000a3LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector multiply high" }, + { "vmhb", OP48(0xe700000000a3LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply high byte" }, + { "vml", OP48(0xe700000000a2LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector multiply low" }, + { "vmlb", OP48(0xe700000000a2LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply low byte" }, + { "vmlh", OP48(0xe700000000a1LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector multiply logical high" }, + { "vmlhb", OP48(0xe700000000a1LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector multiply logical high byte" }, + { "vfnma", OP48(0xe7000000009fLL), MASK_VRR_VVVU0UV, INSTR_VRR_VVVU0UV, 2, 10, 0, "vector fp negative multiply and add" }, + { "vfnms", OP48(0xe7000000009eLL), MASK_VRR_VVVU0UV, INSTR_VRR_VVVU0UV, 2, 10, 0, "vector fp negative multiply and subtract" }, + { "vpks", OP48(0xe70000000097LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 8, "vector pack saturate" }, + { "vpkls", OP48(0xe70000000095LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 8, "vector pack logical saturate" }, + { "vpk", OP48(0xe70000000094LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector pack" }, + { "vfma", OP48(0xe7000000008fLL), MASK_VRR_VVVU0UV, INSTR_VRR_VVVU0UV, 2, 9, 8, "vector fp multiply and add" }, + { "vfms", OP48(0xe7000000008eLL), MASK_VRR_VVVU0UV, INSTR_VRR_VVVU0UV, 2, 9, 8, "vector fp multiply and subtract" }, + { "vsel", OP48(0xe7000000008dLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector select" }, + { "vperm", OP48(0xe7000000008cLL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 9, 8, "vector permute" }, + { "vstrs", OP48(0xe7000000008bLL), MASK_VRR_VVVUU0V, INSTR_VRR_VVVUU0V, 2, 11, 1, "vector string search" }, + { "vstrsb", OP48(0xe7000000008bLL), MASK_VRR_VVVU0VB, INSTR_VRR_VVVU0VB, 2, 11, 1, "vector string search byte" }, + { "vstrc", OP48(0xe7000000008aLL), MASK_VRR_VVVUU0V, INSTR_VRR_VVVUU0V, 2, 9, 9, "vector string range compare" }, + { "vstrcb", OP48(0xe7000000008aLL), MASK_VRR_VVVU0VB, INSTR_VRR_VVVU0VB, 2, 9, 9, "vector string range compare byte" }, + { "vblend", OP48(0xe70000000089LL), MASK_VRR_VVVU0V, INSTR_VRR_VVVU0V, 2, 13, 0, "vector blend" }, + { "vblendb", OP48(0xe70000000089LL), MASK_VRR_VVV0V, INSTR_VRR_VVV0V, 2, 13, 0, "vector blend byte" }, + { "veval", OP48(0xe70000000088LL), MASK_VRI_VVV0UV, INSTR_VRI_VVV0UV, 2, 13, 0, "vector evaluate" }, + { "vsrd", OP48(0xe70000000087LL), MASK_VRI_VVV0U, INSTR_VRI_VVV0U, 2, 11, 0, "vector shift right double by bit" }, + { "vsld", OP48(0xe70000000086LL), MASK_VRI_VVV0U, INSTR_VRI_VVV0U, 2, 11, 0, "vector shift left double by bit" }, + { "vbperm", OP48(0xe70000000085LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector bit permute" }, + { "vpdi", OP48(0xe70000000084LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector permute double word immediate" }, + { "vfae", OP48(0xe70000000082LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 9, "vector find any element equal" }, + { "vfaeb", OP48(0xe70000000082LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find any element equal byte" }, + { "vfene", OP48(0xe70000000081LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 9, "vector find element not equal" }, + { "vfeneb", OP48(0xe70000000081LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find element not equal byte" }, + { "vfee", OP48(0xe70000000080LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 9, 9, "vector find element equal" }, + { "vfeeb", OP48(0xe70000000080LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 9, 9, "vector find element equal byte" }, + { "vsrab", OP48(0xe7000000007fLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector shift right arithmetic by byte" }, + { "vsra", OP48(0xe7000000007eLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector shift right arithmetic" }, + { "vsrlb", OP48(0xe7000000007dLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector shift right logical by byte" }, + { "vsrl", OP48(0xe7000000007cLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector shift right logical" }, + { "vesrav", OP48(0xe7000000007aLL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector element shift right arithmetic reg" }, + { "vesravb", OP48(0xe7000000007aLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right arithmetic reg byte" }, + { "vesrlv", OP48(0xe70000000078LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector element shift right logical reg" }, + { "vesrlvb", OP48(0xe70000000078LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift right logical reg byte" }, + { "vsldb", OP48(0xe70000000077LL), MASK_VRI_VVV0U, INSTR_VRI_VVV0U, 2, 9, 8, "vector shift left double by byte" }, + { "vslb", OP48(0xe70000000075LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector shift left by byte" }, + { "vsl", OP48(0xe70000000074LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector shift left" }, + { "verllv", OP48(0xe70000000073LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector element rotate left logical reg" }, + { "verllvb", OP48(0xe70000000073LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element rotate left logical reg byte" }, + { "verim", OP48(0xe70000000072LL), MASK_VRI_VVV0UU, INSTR_VRI_VVV0UU, 2, 9, 8, "vector element rotate and insert under mask" }, + { "verimb", OP48(0xe70000000072LL), MASK_VRI_VVV0U, INSTR_VRI_VVV0U, 2, 9, 8, "vector element rotate and insert under mask byte" }, + { "veslv", OP48(0xe70000000070LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector element shift left reg" }, + { "veslvb", OP48(0xe70000000070LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector element shift left reg byte" }, + { "voc", OP48(0xe7000000006fLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector or with complement" }, + { "vnn", OP48(0xe7000000006eLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector nand" }, + { "vx", OP48(0xe7000000006dLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector exclusive or" }, + { "vnx", OP48(0xe7000000006cLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 10, 0, "vector not exclusive or" }, + { "vno", OP48(0xe7000000006bLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector nor" }, + { "vnot", OP48(0xe7000000006bLL), MASK_VRR_VVV2, INSTR_VRR_VVV2, 2, 9, 8, "vector not" }, + { "vo", OP48(0xe7000000006aLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector or" }, + { "vnc", OP48(0xe70000000069LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector and with complement" }, + { "vn", OP48(0xe70000000068LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector and" }, + { "vsumq", OP48(0xe70000000067LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector sum across quadword" }, + { "vcksm", OP48(0xe70000000066LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector checksum" }, + { "vsumg", OP48(0xe70000000065LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector sum across doubleword" }, + { "vsum", OP48(0xe70000000064LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector sum across word" }, + { "vsumb", OP48(0xe70000000064LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector sum across word - byte elements" }, + { "vlvgp", OP48(0xe70000000062LL), MASK_VRR_VRR, INSTR_VRR_VRR, 2, 9, 8, "vector load VR from GRs disjoint" }, + { "vmrh", OP48(0xe70000000061LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector merge high" }, + { "vmrhb", OP48(0xe70000000061LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge high byte" }, + { "vmrl", OP48(0xe70000000060LL), MASK_VRR_VVV0U, INSTR_VRR_VVV0U, 2, 9, 8, "vector merge low" }, + { "vmrlb", OP48(0xe70000000060LL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 9, 8, "vector merge low byte" }, + { "vseg", OP48(0xe7000000005fLL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector sign extend to double word" }, + { "vsegb", OP48(0xe7000000005fLL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector sign extend byte to double word" }, + { "vistr", OP48(0xe7000000005cLL), MASK_VRR_VV0U0U, INSTR_VRR_VV0U0U, 2, 9, 9, "vector isolate string" }, + { "vistrb", OP48(0xe7000000005cLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 9, 9, "vector isolate string byte" }, + { "vlr", OP48(0xe70000000056LL), MASK_VRX_VV, INSTR_VRX_VV, 2, 9, 8, "vector register load" }, + { "vgem", OP48(0xe70000000054LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 13, 0, "vector generate element masks" }, + { "vgemb", OP48(0xe70000000054LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 13, 0, "vector generate element masks byte" }, + { "vclz", OP48(0xe70000000053LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector count leading zeros" }, + { "vclzb", OP48(0xe70000000053LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count leading zeros byte" }, + { "vctz", OP48(0xe70000000052LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector count trailing zeros" }, + { "vctzb", OP48(0xe70000000052LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 9, 8, "vector count trailing zeros byte" }, + { "vpopctb", OP48(0xe70000000050LL), MASK_VRR_VV, INSTR_VRR_VV, 2, 10, 0, "vector population count byte" }, + { "vpopct", OP48(0xe70000000050LL), MASK_VRR_VV0U, INSTR_VRR_VV0U, 2, 9, 8, "vector population count" }, + { "vrep", OP48(0xe7000000004dLL), MASK_VRI_VVUU, INSTR_VRI_VVUU, 2, 9, 8, "vector replicate" }, + { "vrepb", OP48(0xe7000000004dLL), MASK_VRI_VVU, INSTR_VRI_VVU, 2, 9, 8, "vector replicate byte" }, + { "vftci", OP48(0xe7000000004aLL), MASK_VRI_VVUUU, INSTR_VRI_VVUUU, 2, 9, 8, "vector fp test data class immediate" }, + { "vgm", OP48(0xe70000000046LL), MASK_VRI_V0UUU, INSTR_VRI_V0UUU, 2, 9, 8, "vector generate mask" }, + { "vgmb", OP48(0xe70000000046LL), MASK_VRI_V0UU, INSTR_VRI_V0UU, 2, 9, 8, "vector generate mask byte" }, + { "vrepi", OP48(0xe70000000045LL), MASK_VRI_V0IU, INSTR_VRI_V0IU, 2, 9, 8, "vector replicate immediate" }, + { "vrepib", OP48(0xe70000000045LL), MASK_VRI_V0I, INSTR_VRI_V0I, 2, 9, 8, "vector replicate immediate byte" }, + { "vgbm", OP48(0xe70000000044LL), MASK_VRI_V0U, INSTR_VRI_V0U, 2, 9, 8, "vector generate byte mask" }, + { "vzero", OP48(0xe70000000044LL), MASK_VRI_V, INSTR_VRI_V, 2, 9, 8, "vector set to zero" }, + { "vleif", OP48(0xe70000000043LL), MASK_VRI_V0IU, INSTR_VRI_V0IU, 2, 9, 8, "vector load word element immediate" }, + { "vleig", OP48(0xe70000000042LL), MASK_VRI_V0IU, INSTR_VRI_V0IU, 2, 9, 8, "vector load double word element immediate" }, + { "vleih", OP48(0xe70000000041LL), MASK_VRI_V0IU, INSTR_VRI_V0IU, 2, 9, 8, "vector load halfword element immediate" }, + { "vleib", OP48(0xe70000000040LL), MASK_VRI_V0IU, INSTR_VRI_V0IU, 2, 9, 8, "vector load byte element immediate" }, + { "vstl", OP48(0xe7000000003fLL), MASK_VRS_VRRD, INSTR_VRS_VRRD, 2, 9, 8, "vector store with length" }, + { "vstm", OP48(0xe7000000003eLL), MASK_VRS_VVRDU, INSTR_VRS_VVRDU, 2, 9, 9, "vector store multiple" }, + { "vesra", OP48(0xe7000000003aLL), MASK_VRS_VVRDU, INSTR_VRS_VVRDU, 2, 9, 8, "vector element shift right arithmetic mem" }, + { "vesrab", OP48(0xe7000000003aLL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right arithmetic mem byte" }, + { "vesrl", OP48(0xe70000000038LL), MASK_VRS_VVRDU, INSTR_VRS_VVRDU, 2, 9, 8, "vector element shift right logical mem" }, + { "vesrlb", OP48(0xe70000000038LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift right logical mem byte" }, + { "vll", OP48(0xe70000000037LL), MASK_VRS_VRRD, INSTR_VRS_VRRD, 2, 9, 8, "vector load with length" }, + { "vlm", OP48(0xe70000000036LL), MASK_VRS_VVRDU, INSTR_VRS_VVRDU, 2, 9, 9, "vector load multiple" }, + { "verll", OP48(0xe70000000033LL), MASK_VRS_VVRDU, INSTR_VRS_VVRDU, 2, 9, 8, "vector element rotate left logical mem" }, + { "verllb", OP48(0xe70000000033LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element rotate left logical mem byte" }, + { "vesl", OP48(0xe70000000030LL), MASK_VRS_VVRDU, INSTR_VRS_VVRDU, 2, 9, 8, "vector element shift left mem" }, + { "veslb", OP48(0xe70000000030LL), MASK_VRS_VVRD, INSTR_VRS_VVRD, 2, 9, 8, "vector element shift left mem byte" }, + { "lcbb", OP48(0xe70000000027LL), MASK_RXE_RRRDU, INSTR_RXE_RRRDU, 2, 9, 8, "load count to block boundary" }, + { "vlvg", OP48(0xe70000000022LL), MASK_VRS_VRRDU, INSTR_VRS_VRRDU, 2, 9, 8, "vector load VR element from GR" }, + { "vlvgb", OP48(0xe70000000022LL), MASK_VRS_VRRD, INSTR_VRS_VRRD, 2, 9, 8, "vector load VR byte element from GR" }, + { "vlgv", OP48(0xe70000000021LL), MASK_VRS_RVRDU, INSTR_VRS_RVRDU, 2, 9, 8, "vector load GR from VR element" }, + { "vlgvb", OP48(0xe70000000021LL), MASK_VRS_RVRD, INSTR_VRS_RVRD, 2, 9, 8, "vector load GR from VR byte element" }, + { "vscef", OP48(0xe7000000001bLL), MASK_VRV_VVXRDU, INSTR_VRV_VVXRDU, 2, 9, 8, "vector scatter element 4 byte" }, + { "vsceg", OP48(0xe7000000001aLL), MASK_VRV_VVXRDU, INSTR_VRV_VVXRDU, 2, 9, 8, "vector scatter element 8 byte" }, + { "vgef", OP48(0xe70000000013LL), MASK_VRV_VVXRDU, INSTR_VRV_VVXRDU, 2, 9, 8, "vector gather element 4 byte elements" }, + { "vgeg", OP48(0xe70000000012LL), MASK_VRV_VVXRDU, INSTR_VRV_VVXRDU, 2, 9, 8, "vector gather element 8 byte elements" }, + { "vst", OP48(0xe7000000000eLL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 9, "vector store" }, + { "vstef", OP48(0xe7000000000bLL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector store word element" }, + { "vsteg", OP48(0xe7000000000aLL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector store double word element" }, + { "vsteh", OP48(0xe70000000009LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector store halfword element" }, + { "vsteb", OP48(0xe70000000008LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector store byte element" }, + { "vlbb", OP48(0xe70000000007LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector load to block boundary" }, + { "vl", OP48(0xe70000000006LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 9, "vector memory load" }, + { "vlrep", OP48(0xe70000000005LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector load and replicate" }, + { "vlrepb", OP48(0xe70000000005LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load and replicate byte elements" }, + { "vllez", OP48(0xe70000000004LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector load logical element and zero" }, + { "vllezb", OP48(0xe70000000004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 9, 8, "vector load logical byte element and zero" }, + { "vlef", OP48(0xe70000000003LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector load word element" }, + { "vleg", OP48(0xe70000000002LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector load double word element" }, + { "vleh", OP48(0xe70000000001LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector load halfword element" }, + { "vleb", OP48(0xe70000000000LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 9, 8, "vector load byte element" }, + { "lerv", OP48(0xe60000006004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "load byte reversed word" }, + { "vllebrze", OP48(0xe60000006004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed word element left-aligned and zero" }, + { "vschxp", OP48(0xe60000004074LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 12, 0, "decimal scale and convert to extended hfp" }, + { "vstbrq", OP48(0xe6000000400eLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector store byte reversed quadword elements" }, + { "vlbrq", OP48(0xe60000004006LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed quadword elements" }, + { "vschdp", OP48(0xe60000003074LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 12, 0, "decimal scale and convert to long hfp" }, + { "vsterg", OP48(0xe6000000300fLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector store doubleword elements reversed" }, + { "vstbrg", OP48(0xe6000000300eLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector store byte reversed doubleword elements" }, + { "vlerg", OP48(0xe60000003007LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load doubleword elements reversed" }, + { "vlbrg", OP48(0xe60000003006LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed doubleword elements" }, + { "vlbrrepg", OP48(0xe60000003005LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed doubleword element and replicate" }, + { "ldrv", OP48(0xe60000003004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "load byte reversed doubleword" }, + { "vllebrzg", OP48(0xe60000003004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed doubleword element and zero" }, + { "vschsp", OP48(0xe60000002074LL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 12, 0, "decimal scale and convert to short hfp" }, + { "vsterf", OP48(0xe6000000200fLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector store word elements reversed" }, + { "vstbrf", OP48(0xe6000000200eLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector store byte reversed word elements" }, + { "vlerf", OP48(0xe60000002007LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load word elements reversed" }, + { "vlbrf", OP48(0xe60000002006LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed word elements" }, + { "vlbrrepf", OP48(0xe60000002005LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed word element and replicate" }, + { "vllebrzf", OP48(0xe60000002004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed word element and zero" }, + { "vsterh", OP48(0xe6000000100fLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector store halfword elements reversed" }, + { "vstbrh", OP48(0xe6000000100eLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector store byte reversed halfword elements" }, + { "vlerh", OP48(0xe60000001007LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load halfword elements reversed" }, + { "vlbrh", OP48(0xe60000001006LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed halfword elements" }, + { "vlbrreph", OP48(0xe60000001005LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed halfword element and replicate" }, + { "vllebrzh", OP48(0xe60000001004LL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "vector load byte reversed halfword element and zero" }, + { "vtz", OP48(0xe6000000007fLL), MASK_VRR_0VVU, INSTR_VRR_0VVU, 2, 13, 0, "vector test zoned" }, + { "vsdp", OP48(0xe6000000007eLL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 10, 0, "vector shift and divide decimal" }, + { "vcsph", OP48(0xe6000000007dLL), MASK_VRR_VVV0U0, INSTR_VRR_VVV0U0, 2, 12, 0, "vector convert hfp to scaled decimal" }, + { "vscshp", OP48(0xe6000000007cLL), MASK_VRR_VVV, INSTR_VRR_VVV, 2, 12, 0, "decimal scale and convert and split to hfp" }, + { "vrp", OP48(0xe6000000007bLL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 10, 0, "vector remainder decimal" }, + { "vdp", OP48(0xe6000000007aLL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 10, 0, "vector divide decimal" }, + { "vmsp", OP48(0xe60000000079LL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 10, 0, "vector multiply and shift decimal" }, + { "vmp", OP48(0xe60000000078LL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 10, 0, "vector multiply decimal" }, + { "vcp", OP48(0xe60000000077LL), MASK_VRR_0VV0U, INSTR_VRR_0VV0U, 2, 10, 0, "vector compare decimal" }, + { "vcrnf", OP48(0xe60000000075LL), MASK_VRR_VVV0UU, INSTR_VRR_VVV0UU, 2, 12, 0, "vector fp convert and round to nnp" }, + { "vschp", OP48(0xe60000000074LL), MASK_VRR_VVV0U0U, INSTR_VRR_VVV0U0U, 2, 12, 0, "decimal scale and convert to hfp" }, + { "vsp", OP48(0xe60000000073LL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 10, 0, "vector subtract decimal" }, + { "vsrpr", OP48(0xe60000000072LL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 12, 0, "vector shift and round decimal register" }, + { "vap", OP48(0xe60000000071LL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 10, 0, "vector add decimal" }, + { "vpkzr", OP48(0xe60000000070LL), MASK_VRI_VVV0UU2, INSTR_VRI_VVV0UU2, 2, 12, 0, "vector pack zoned register" }, + { "vtp", OP48(0xe6000000005fLL), MASK_VRR_0V0U, INSTR_VRR_0V0U, 2, 13, 1, "vector test decimal" }, + { "vtp", OP48(0xe6000000005fLL), MASK_VRR_0V, INSTR_VRR_0V, 2, 10, 0, "vector test decimal" }, + { "vclfnl", OP48(0xe6000000005eLL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 12, 0, "vector fp convert and lengthen from nnp low" }, + { "vcfn", OP48(0xe6000000005dLL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 12, 0, "vector fp convert from nnp" }, + { "vupkzl", OP48(0xe6000000005cLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 12, 0, "vector unpack zoned low" }, + { "vpsop", OP48(0xe6000000005bLL), MASK_VRI_VVUUU2, INSTR_VRI_VVUUU2, 2, 10, 0, "vector perform sign operation decimal" }, + { "vcvdg", OP48(0xe6000000005aLL), MASK_VRI_VR0UU, INSTR_VRI_VR0UU, 2, 10, 0, "vector convert to decimal 64 bit" }, + { "vsrp", OP48(0xe60000000059LL), MASK_VRI_VVUUU2, INSTR_VRI_VVUUU2, 2, 10, 0, "vector shift and round decimal" }, + { "vcvd", OP48(0xe60000000058LL), MASK_VRI_VR0UU, INSTR_VRI_VR0UU, 2, 10, 0, "vector convert to decimal 32 bit" }, + { "vclfnh", OP48(0xe60000000056LL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 12, 0, "vector fp convert and lengthen from nnp high" }, + { "vcnf", OP48(0xe60000000055LL), MASK_VRR_VV0UU2, INSTR_VRR_VV0UU2, 2, 12, 0, "vector fp convert to nnp" }, + { "vupkzh", OP48(0xe60000000054LL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 12, 0, "vector unpack zoned high" }, + { "vcvbg", OP48(0xe60000000052LL), MASK_VRR_RV0UU, INSTR_VRR_RV0UU, 2, 11, 1, "vector convert to binary 64 bit" }, + { "vcvbg", OP48(0xe60000000052LL), MASK_VRR_RV0U, INSTR_VRR_RV0U, 2, 10, 0, "vector convert to binary 64 bit" }, + { "vclzdp", OP48(0xe60000000051LL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 12, 0, "vector count leading zero digits" }, + { "vcvb", OP48(0xe60000000050LL), MASK_VRR_RV0UU, INSTR_VRR_RV0UU, 2, 11, 1, "vector convert to binary 32 bit" }, + { "vcvb", OP48(0xe60000000050LL), MASK_VRR_RV0U, INSTR_VRR_RV0U, 2, 10, 0, "vector convert to binary 32 bit" }, + { "vcvbq", OP48(0xe6000000004eLL), MASK_VRR_VV0U2, INSTR_VRR_VV0U2, 2, 13, 0, "vector convert to binary 128 bit" }, + { "vcvdq", OP48(0xe6000000004aLL), MASK_VRI_VV0UU, INSTR_VRI_VV0UU, 2, 13, 0, "vector convert to decimal 128 bit" }, + { "vlip", OP48(0xe60000000049LL), MASK_VRI_V0UU2, INSTR_VRI_V0UU2, 2, 10, 0, "vector load immediate decimal" }, + { "vstrlr", OP48(0xe6000000003fLL), MASK_VRS_RRDV, INSTR_VRS_RRDV, 2, 10, 0, "vector store rightmost with length" }, + { "vstrl", OP48(0xe6000000003dLL), MASK_VSI_URDV, INSTR_VSI_URDV, 2, 10, 0, "vector store rightmost with immediate length" }, + { "vupkz", OP48(0xe6000000003cLL), MASK_VSI_URDV, INSTR_VSI_URDV, 2, 10, 0, "vector unpack zoned" }, + { "vlrlr", OP48(0xe60000000037LL), MASK_VRS_RRDV, INSTR_VRS_RRDV, 2, 10, 0, "vector load rightmost with length" }, + { "vlrl", OP48(0xe60000000035LL), MASK_VSI_URDV, INSTR_VSI_URDV, 2, 10, 0, "vector load rightmost with immediate length" }, + { "vpkz", OP48(0xe60000000034LL), MASK_VSI_URDV, INSTR_VSI_URDV, 2, 10, 0, "vector pack zoned" }, + { "vster", OP48(0xe6000000000fLL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector store elements reversed" }, + { "vstbr", OP48(0xe6000000000eLL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector store byte reversed elements" }, + { "vstebrf", OP48(0xe6000000000bLL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector store byte reversed word element" }, + { "sterv", OP48(0xe6000000000bLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "store byte reversed word" }, + { "vstebrg", OP48(0xe6000000000aLL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector store byte reversed doubleword element" }, + { "stdrv", OP48(0xe6000000000aLL), MASK_VRX_VRRD, INSTR_VRX_VRRD, 2, 11, 0, "store byte reversed doubleword" }, + { "vstebrh", OP48(0xe60000000009LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector store byte reversed halfword element" }, + { "vler", OP48(0xe60000000007LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector load elements reversed" }, + { "vlbr", OP48(0xe60000000006LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector load byte reversed elements" }, + { "vlbrrep", OP48(0xe60000000005LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector load byte reversed element and replicate" }, + { "vllebrz", OP48(0xe60000000004LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector load byte reversed element and zero" }, + { "vlebrf", OP48(0xe60000000003LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector load byte reversed word element" }, + { "vlebrg", OP48(0xe60000000002LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector load byte reversed doubleword element" }, + { "vlebrh", OP48(0xe60000000001LL), MASK_VRX_VRRDU, INSTR_VRX_VRRDU, 2, 11, 0, "vector load byte reversed halfword element" }, + { "tbeginc", OP16(0xe561LL), MASK_SIL_RDU, INSTR_SIL_RDU, 2, 8, 4, "constrained transaction begin" }, + { "tbegin", OP16(0xe560LL), MASK_SIL_RDU, INSTR_SIL_RDU, 2, 8, 4, "transaction begin" }, + { "clfhsi", OP16(0xe55dLL), MASK_SIL_RDU, INSTR_SIL_RDU, 2, 6, 0, "compare logical immediate (32<16)" }, + { "chsi", OP16(0xe55cLL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 0, "compare halfword immediate (32<16)" }, + { "clghsi", OP16(0xe559LL), MASK_SIL_RDU, INSTR_SIL_RDU, 2, 6, 0, "compare logical immediate (64<16)" }, + { "cghsi", OP16(0xe558LL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 0, "compare halfword immediate (64<16)" }, + { "clhhsi", OP16(0xe555LL), MASK_SIL_RDU, INSTR_SIL_RDU, 2, 6, 0, "compare logical immediate (16<16)" }, + { "chhsi", OP16(0xe554LL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 0, "compare halfword immediate (16<16)" }, + { "mvhi", OP16(0xe54cLL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 0, "move (32<16)" }, + { "mvghi", OP16(0xe548LL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 0, "move (64<16)" }, + { "mvhhi", OP16(0xe544LL), MASK_SIL_RDI, INSTR_SIL_RDI, 2, 6, 0, "move (16<16)" }, + { "mvcdk", OP16(0xe50fLL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0, 0, "move with destination key" }, + { "mvcsk", OP16(0xe50eLL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0, 0, "move with source key" }, + { "mvcrl", OP16(0xe50aLL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 2, 11, 0, "move right to left" }, + { "strag", OP16(0xe502LL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 2, 2, 0, "store read address" }, + { "tprot", OP16(0xe501LL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0, 0, "test protection" }, + { "lasp", OP16(0xe500LL), MASK_SSE_RDRD, INSTR_SSE_RDRD, 3, 0, 0, "load address space parameters" }, + { "bi", OP48(0xe3f000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "unconditional indirect branch" }, + { "bino", OP48(0xe3e000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on not overflow / if not ones" }, + { "binh", OP48(0xe3d000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on A not high" }, + { "binp", OP48(0xe3d000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on not plus" }, + { "bile", OP48(0xe3c000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on low or equal" }, + { "binl", OP48(0xe3b000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on A not low" }, + { "binm", OP48(0xe3b000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on not minus / if not mixed" }, + { "bihe", OP48(0xe3a000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on high or equal" }, + { "binlh", OP48(0xe39000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on not low or high" }, + { "bie", OP48(0xe38000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on A equal B" }, + { "biz", OP48(0xe38000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on zero / if zeros" }, + { "bine", OP48(0xe37000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on A not equal B" }, + { "binz", OP48(0xe37000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on not zero / if not zeros" }, + { "bilh", OP48(0xe36000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on low or high" }, + { "binhe", OP48(0xe35000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on not high or equal" }, + { "bil", OP48(0xe34000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on A low" }, + { "bim", OP48(0xe34000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on minus / if mixed" }, + { "binle", OP48(0xe33000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on not low or equal" }, + { "bih", OP48(0xe32000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on A high" }, + { "bip", OP48(0xe32000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on plus" }, + { "bio", OP48(0xe31000000047LL), MASK_RXY_0RRD, INSTR_RXY_0RRD, 2, 10, 0, "branch indirect on condition on overflow / if ones" }, + { "clhf", OP48(0xe300000000cfLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "compare logical high" }, + { "chf", OP48(0xe300000000cdLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "compare high" }, + { "stfh", OP48(0xe300000000cbLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "store high" }, + { "lfh", OP48(0xe300000000caLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "load high" }, + { "lfhat", OP48(0xe300000000c8LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 8, 0, "load high and trap" }, + { "sthh", OP48(0xe300000000c7LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "store halfword high" }, + { "llhh", OP48(0xe300000000c6LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "load logical halfword high" }, + { "lhh", OP48(0xe300000000c4LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "load halfword high" }, + { "stch", OP48(0xe300000000c3LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "store character high" }, + { "llch", OP48(0xe300000000c2LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "load logical character high" }, + { "lbh", OP48(0xe300000000c0LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 7, 0, "load byte high" }, + { "lat", OP48(0xe3000000009fLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 8, 0, "load and trap 32 bit" }, + { "llgfat", OP48(0xe3000000009dLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 8, 0, "load logical and trap 32>64" }, + { "llgtat", OP48(0xe3000000009cLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 8, 0, "load logical thirty one bits and trap 31>64" }, + { "slb", OP48(0xe30000000099LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 0, "subtract logical with borrow 32" }, + { "slb", OP48(0xe30000000099LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 2, 0, "subtract logical with borrow 32" }, + { "alc", OP48(0xe30000000098LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 0, "add logical with carry 32" }, + { "alc", OP48(0xe30000000098LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 2, 0, "add logical with carry 32" }, + { "dl", OP48(0xe30000000097LL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 3, 3, 0, "divide logical 32" }, + { "dl", OP48(0xe30000000097LL), MASK_RXE_RERRD, INSTR_RXE_RERRD, 3, 2, 0, "divide logical 32" }, + { "ml", OP48(0xe30000000096LL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 3, 3, 0, "multiply logical 32" }, + { "ml", OP48(0xe30000000096LL), MASK_RXE_RERRD, INSTR_RXE_RERRD, 3, 2, 0, "multiply logical 32" }, + { "llh", OP48(0xe30000000095LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 4, 0, "load logical halfword 32" }, + { "llc", OP48(0xe30000000094LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 4, 0, "load logical character 32" }, + { "llgh", OP48(0xe30000000091LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load logical halfword" }, + { "llgh", OP48(0xe30000000091LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load logical halfword" }, + { "llgc", OP48(0xe30000000090LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load logical character" }, + { "llgc", OP48(0xe30000000090LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load logical character" }, + { "lpq", OP48(0xe3000000008fLL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 2, 3, 0, "load pair from quadword" }, + { "lpq", OP48(0xe3000000008fLL), MASK_RXE_RERRD, INSTR_RXE_RERRD, 2, 2, 0, "load pair from quadword" }, + { "stpq", OP48(0xe3000000008eLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "store pair to quadword" }, + { "stpq", OP48(0xe3000000008eLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "store pair to quadword" }, + { "slbg", OP48(0xe30000000089LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract logical with borrow 64" }, + { "slbg", OP48(0xe30000000089LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "subtract logical with borrow 64" }, + { "alcg", OP48(0xe30000000088LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add logical with carry 64" }, + { "alcg", OP48(0xe30000000088LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "add logical with carry 64" }, + { "dlg", OP48(0xe30000000087LL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 2, 3, 0, "divide logical 64" }, + { "dlg", OP48(0xe30000000087LL), MASK_RXE_RERRD, INSTR_RXE_RERRD, 2, 2, 0, "divide logical 64" }, + { "mlg", OP48(0xe30000000086LL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 2, 3, 0, "multiply logical 64" }, + { "mlg", OP48(0xe30000000086LL), MASK_RXE_RERRD, INSTR_RXE_RERRD, 2, 2, 0, "multiply logical 64" }, + { "lgat", OP48(0xe30000000085LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 8, 0, "load and trap 64 bit" }, + { "mg", OP48(0xe30000000084LL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 2, 10, 0, "multiply 64x64mem -> 128" }, + { "msgc", OP48(0xe30000000083LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "multiply single 64x64mem -> 64" }, + { "xg", OP48(0xe30000000082LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "exclusive or with long offset 64" }, + { "xg", OP48(0xe30000000082LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "exclusive or 64" }, + { "og", OP48(0xe30000000081LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "or with long offset 64" }, + { "og", OP48(0xe30000000081LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "or 64" }, + { "ng", OP48(0xe30000000080LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "and with long offset 64" }, + { "ng", OP48(0xe30000000080LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "and 64" }, + { "mhy", OP48(0xe3000000007cLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 6, 0, "multiply halfword" }, + { "shy", OP48(0xe3000000007bLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract halfword with long offset" }, + { "ahy", OP48(0xe3000000007aLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add halfword with long offset" }, + { "chy", OP48(0xe30000000079LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "compare halfword with long offset" }, + { "lhy", OP48(0xe30000000078LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load halfword with long offset" }, + { "lgb", OP48(0xe30000000077LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load byte with long offset 64" }, + { "lb", OP48(0xe30000000076LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load byte with long offset" }, + { "laey", OP48(0xe30000000075LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 6, 0, "load address extended" }, + { "icy", OP48(0xe30000000073LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "insert character with long offset" }, + { "stcy", OP48(0xe30000000072LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "store character with long offset" }, + { "lay", OP48(0xe30000000071LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load address with long offset" }, + { "sthy", OP48(0xe30000000070LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "store halfword with long offset" }, + { "llxaq", OP48(0xe30000000069LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load logical indexed address (shift left 4)" }, + { "lxaq", OP48(0xe30000000068LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load indexed address (shift left 4)" }, + { "llxag", OP48(0xe30000000067LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load logical indexed address (shift left 3)" }, + { "lxag", OP48(0xe30000000066LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load indexed address (shift left 3)" }, + { "llxaf", OP48(0xe30000000065LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load logical indexed address (shift left 2)" }, + { "lxaf", OP48(0xe30000000064LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load indexed address (shift left 2)" }, + { "llxah", OP48(0xe30000000063LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load logical indexed address (shift left 1)" }, + { "lxah", OP48(0xe30000000062LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load indexed address (shift left 1)" }, + { "llxab", OP48(0xe30000000061LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load logical indexed address (shift left 0)" }, + { "lxab", OP48(0xe30000000060LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 13, 0, "load indexed address (shift left 0)" }, + { "sly", OP48(0xe3000000005fLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract logical with long offset" }, + { "aly", OP48(0xe3000000005eLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add logical with long offset" }, + { "mfy", OP48(0xe3000000005cLL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 2, 6, 0, "multiply" }, + { "sy", OP48(0xe3000000005bLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract with long offset" }, + { "ay", OP48(0xe3000000005aLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add with long offset" }, + { "cy", OP48(0xe30000000059LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "compare with long offset" }, + { "ly", OP48(0xe30000000058LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load with long offset" }, + { "xy", OP48(0xe30000000057LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "exclusive or with long offset" }, + { "oy", OP48(0xe30000000056LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "or with long offset" }, + { "cly", OP48(0xe30000000055LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "compare logical with long offset" }, + { "ny", OP48(0xe30000000054LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "and with long offset" }, + { "msc", OP48(0xe30000000053LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "multiply single 32x32mem -> 32" }, + { "msy", OP48(0xe30000000051LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "multiply single with long offset" }, + { "sty", OP48(0xe30000000050LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "store with long offset" }, + { "lgsc", OP48(0xe3000000004dLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "load guarded storage controls" }, + { "lgg", OP48(0xe3000000004cLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "load guarded 64 bit" }, + { "stgsc", OP48(0xe30000000049LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "store guarded storage controls" }, + { "llgfsg", OP48(0xe30000000048LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "load logical and shift guarded 64 bit" }, + { "bic", OP48(0xe30000000047LL), MASK_RXY_URRD, INSTR_RXY_URRD, 2, 10, 0, "branch indirect on condition" }, + { "bctg", OP48(0xe30000000046LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "branch on count 64" }, + { "bctg", OP48(0xe30000000046LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "branch on count 64" }, + { "strvh", OP48(0xe3000000003fLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "store reversed 64" }, + { "strvh", OP48(0xe3000000003fLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 2, 0, "store reversed 64" }, + { "strv", OP48(0xe3000000003eLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 0, "store reversed 32" }, + { "strv", OP48(0xe3000000003eLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 2, 0, "store reversed 32" }, + { "mgh", OP48(0xe3000000003cLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "multiply halfword 64x16mem -> 64" }, + { "lzrf", OP48(0xe3000000003bLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 9, 0, "load and zero rightmost byte 32->32" }, + { "llzrgf", OP48(0xe3000000003aLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 9, 0, "load logical and zero rightmost bytes 32->64" }, + { "sgh", OP48(0xe30000000039LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "subtract halfword from 64 bit value" }, + { "agh", OP48(0xe30000000038LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 10, 0, "add halfword to 64 bit value" }, + { "pfd", OP48(0xe30000000036LL), MASK_RXY_URRD, INSTR_RXY_URRD, 2, 6, 0, "prefetch data" }, + { "cgh", OP48(0xe30000000034LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 6, 0, "compare halfword (64<16)" }, + { "ltgf", OP48(0xe30000000032LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 6, 0, "load and test (64<32)" }, + { "clgf", OP48(0xe30000000031LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "compare logical with long offset 64<32" }, + { "clgf", OP48(0xe30000000031LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "compare logical 64<32" }, + { "cgf", OP48(0xe30000000030LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "compare with long offset 64<32" }, + { "cgf", OP48(0xe30000000030LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "compare 64<32" }, + { "strvg", OP48(0xe3000000002fLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "store reversed 64" }, + { "strvg", OP48(0xe3000000002fLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "store reversed 64" }, + { "cvdg", OP48(0xe3000000002eLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "convert to decimal with long offset 64" }, + { "cvdg", OP48(0xe3000000002eLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "convert to decimal 64" }, + { "lzrg", OP48(0xe3000000002aLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 9, 0, "load and zero rightmost byte 64->64" }, + { "cvdy", OP48(0xe30000000026LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "convert to decimal with long offset" }, + { "ntstg", OP48(0xe30000000025LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 8, 4, "nontransactional store" }, + { "stg", OP48(0xe30000000024LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "store with long offset 64" }, + { "stg", OP48(0xe30000000024LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "store 64" }, + { "clg", OP48(0xe30000000021LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "compare logical with long offset 64" }, + { "clg", OP48(0xe30000000021LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "compare logical 64" }, + { "cg", OP48(0xe30000000020LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "compare with long offset 64" }, + { "cg", OP48(0xe30000000020LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "compare 64" }, + { "lrvh", OP48(0xe3000000001fLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 0, "load reversed 16" }, + { "lrvh", OP48(0xe3000000001fLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 2, 0, "load reversed 16" }, + { "lrv", OP48(0xe3000000001eLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 3, 3, 0, "load reversed 32" }, + { "lrv", OP48(0xe3000000001eLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 3, 2, 0, "load reversed 32" }, + { "dsgf", OP48(0xe3000000001dLL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 2, 3, 0, "divide single 64<32" }, + { "dsgf", OP48(0xe3000000001dLL), MASK_RXE_RERRD, INSTR_RXE_RERRD, 2, 2, 0, "divide single 64<32" }, + { "msgf", OP48(0xe3000000001cLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "multiply single with long offset 64<32" }, + { "msgf", OP48(0xe3000000001cLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "multiply single 64<32" }, + { "slgf", OP48(0xe3000000001bLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract logical with long offset 64<32" }, + { "slgf", OP48(0xe3000000001bLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "subtract logical 64<32" }, + { "algf", OP48(0xe3000000001aLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add logical with long offset 64<32" }, + { "algf", OP48(0xe3000000001aLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "add logical 64<32" }, + { "sgf", OP48(0xe30000000019LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract with long offset 64<32" }, + { "sgf", OP48(0xe30000000019LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "subtract 64<32" }, + { "agf", OP48(0xe30000000018LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add with long offset 64<32" }, + { "agf", OP48(0xe30000000018LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "add 64<32" }, + { "llgt", OP48(0xe30000000017LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load logical thirty one bits" }, + { "llgt", OP48(0xe30000000017LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load logical thirty one bits" }, + { "llgf", OP48(0xe30000000016LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load logical 64<32" }, + { "llgf", OP48(0xe30000000016LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load logical 64<32" }, + { "lgh", OP48(0xe30000000015LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load halfword 64" }, + { "lgh", OP48(0xe30000000015LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load halfword 64" }, + { "lgf", OP48(0xe30000000014LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load 64<32" }, + { "lgf", OP48(0xe30000000014LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load 64<32" }, + { "lray", OP48(0xe30000000013LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load real address with long offset" }, + { "lt", OP48(0xe30000000012LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 4, 0, "load and test 32" }, + { "lrvg", OP48(0xe3000000000fLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load reversed 64" }, + { "lrvg", OP48(0xe3000000000fLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load reversed 64" }, + { "cvbg", OP48(0xe3000000000eLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "convert to binary with long offset 64" }, + { "cvbg", OP48(0xe3000000000eLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "convert to binary 64" }, + { "dsg", OP48(0xe3000000000dLL), MASK_RXY_RERRD, INSTR_RXY_RERRD, 2, 3, 0, "divide single 64" }, + { "dsg", OP48(0xe3000000000dLL), MASK_RXE_RERRD, INSTR_RXE_RERRD, 2, 2, 0, "divide single 64" }, + { "msg", OP48(0xe3000000000cLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "multiply single with long offset 64" }, + { "msg", OP48(0xe3000000000cLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "multiply single 64" }, + { "slg", OP48(0xe3000000000bLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract logical with long offset 64" }, + { "slg", OP48(0xe3000000000bLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "subtract logical 64" }, + { "alg", OP48(0xe3000000000aLL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add logical with long offset 64" }, + { "alg", OP48(0xe3000000000aLL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "add logical 64" }, + { "sg", OP48(0xe30000000009LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "subtract with long offset 64" }, + { "sg", OP48(0xe30000000009LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "subtract 64" }, + { "ag", OP48(0xe30000000008LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "add with long offset 64" }, + { "ag", OP48(0xe30000000008LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "add 64" }, + { "cvby", OP48(0xe30000000006LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "convert to binary with long offset" }, + { "lg", OP48(0xe30000000004LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load 64" }, + { "lg", OP48(0xe30000000004LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load 64" }, + { "lrag", OP48(0xe30000000003LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 3, 0, "load real address with long offset 64" }, + { "lrag", OP48(0xe30000000003LL), MASK_RXE_RRRD, INSTR_RXE_RRRD, 2, 2, 0, "load real address 64" }, + { "ltg", OP48(0xe30000000002LL), MASK_RXY_RRRD, INSTR_RXY_RRRD, 2, 4, 0, "load and test 64" }, + { "unpku", OP8(0xe2LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "unpack unicode" }, + { "pku", OP8(0xe1LL), MASK_SS_L2RDRD, INSTR_SS_L2RDRD, 3, 0, 0, "pack unicode" }, + { "edmk", OP8(0xdfLL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "edit and mark" }, + { "ed", OP8(0xdeLL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "edit" }, + { "trt", OP8(0xddLL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "translate and test" }, + { "tr", OP8(0xdcLL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "translate" }, + { "mvcs", OP8(0xdbLL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 0, "move to secondary" }, + { "mvcp", OP8(0xdaLL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 0, "move to primary" }, + { "mvck", OP8(0xd9LL), MASK_SS_RRRDRD, INSTR_SS_RRRDRD, 3, 0, 0, "move with key" }, + { "xc", OP8(0xd7LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "exclusive or" }, + { "oc", OP8(0xd6LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "or" }, + { "clc", OP8(0xd5LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "compare logical" }, + { "nc", OP8(0xd4LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "and" }, + { "mvz", OP8(0xd3LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "move zones" }, + { "mvc", OP8(0xd2LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "move" }, + { "mvn", OP8(0xd1LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 3, 0, 0, "move numerics" }, + { "trtr", OP8(0xd0LL), MASK_SS_L0RDRD, INSTR_SS_L0RDRD, 2, 4, 0, "tranlate and test reverse" }, + { "clih", OP16(0xcc0fLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 7, 0, "compare logical immediate" }, + { "cih", OP16(0xcc0dLL), MASK_RIL_RI, INSTR_RIL_RI, 2, 7, 0, "compare immediate high" }, + { "alsihn", OP16(0xcc0bLL), MASK_RIL_RI, INSTR_RIL_RI, 2, 7, 0, "add logical with signed immediate high no cc" }, + { "alsih", OP16(0xcc0aLL), MASK_RIL_RI, INSTR_RIL_RI, 2, 7, 0, "add logical with signed immediate high with cc" }, + { "aih", OP16(0xcc08LL), MASK_RIL_RI, INSTR_RIL_RI, 2, 7, 0, "add immediate high" }, + { "brcth", OP16(0xcc06LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 7, 112, "branch relative on count high" }, + { "jcth", OP16(0xcc06LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 7, 112, "jump on count high" }, + { "calgf", OP16(0xc80fLL), MASK_SSF_RRDRD2, INSTR_SSF_RRDRD2, 2, 13, 0, "compare and load 64<32" }, + { "calg", OP16(0xc807LL), MASK_SSF_RRDRD2, INSTR_SSF_RRDRD2, 2, 13, 0, "compare and load 64" }, + { "cal", OP16(0xc806LL), MASK_SSF_RRDRD2, INSTR_SSF_RRDRD2, 2, 13, 0, "compare and load 32" }, + { "lpdg", OP16(0xc805LL), MASK_SSF_RERDRD2, INSTR_SSF_RERDRD2, 2, 7, 0, "load pair disjoint 64 bit" }, + { "lpd", OP16(0xc804LL), MASK_SSF_RERDRD2, INSTR_SSF_RERDRD2, 2, 7, 0, "load pair disjoint 32 bit" }, + { "csst", OP16(0xc802LL), MASK_SSF_RRDRD, INSTR_SSF_RRDRD, 2, 5, 0, "compare and swap and store" }, + { "ectg", OP16(0xc801LL), MASK_SSF_RRDRD, INSTR_SSF_RRDRD, 2, 5, 0, "extract cpu time" }, + { "mvcos", OP16(0xc800LL), MASK_SSF_RRDRD, INSTR_SSF_RRDRD, 2, 4, 0, "move with optional specifications" }, + { "bpp", OP8(0xc7LL), MASK_SMI_U0RDP, INSTR_SMI_U0RDP, 2, 8, 0, "branch prediction preload" }, + { "clrl", OP16(0xc60fLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare logical relative long (32)" }, + { "clgfrl", OP16(0xc60eLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare logical relative long (64<32)" }, + { "crl", OP16(0xc60dLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare relative long (32)" }, + { "cgfrl", OP16(0xc60cLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare relative long (64<32)" }, + { "clgrl", OP16(0xc60aLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare logical relative long (64)" }, + { "cgrl", OP16(0xc608LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare relative long (64)" }, + { "clhrl", OP16(0xc607LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare logical relative long (32<16)" }, + { "clghrl", OP16(0xc606LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare logical relative long (64<16)" }, + { "chrl", OP16(0xc605LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare halfword relative long (32<8)" }, + { "cghrl", OP16(0xc604LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "compare halfword relative long (64<8)" }, + { "pfdrl", OP16(0xc602LL), MASK_RIL_UP, INSTR_RIL_UP, 2, 6, 0, "prefetch data relative long" }, + { "exrl", OP16(0xc600LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "execute relative long" }, + { "bprp", OP8(0xc5LL), MASK_MII_UPP, INSTR_MII_UPP, 2, 8, 0, "branch prediction relative preload" }, + { "strl", OP16(0xc40fLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "store relative long (32)" }, + { "llgfrl", OP16(0xc40eLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load logical relative long (64<32)" }, + { "lrl", OP16(0xc40dLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load relative long (32)" }, + { "lgfrl", OP16(0xc40cLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load relative long (64<32)" }, + { "stgrl", OP16(0xc40bLL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "store relative long (64)" }, + { "lgrl", OP16(0xc408LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load relative long (64)" }, + { "sthrl", OP16(0xc407LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "store halfword relative long" }, + { "llghrl", OP16(0xc406LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load logical halfword relative long (64<16)" }, + { "lhrl", OP16(0xc405LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load halfword relative long (32<16)" }, + { "lghrl", OP16(0xc404LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load halfword relative long (64<16)" }, + { "llhrl", OP16(0xc402LL), MASK_RIL_RP, INSTR_RIL_RP, 2, 6, 0, "load logical halfword relative long (32<16)" }, + { "clfi", OP16(0xc20fLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "compare logical immediate 32" }, + { "clgfi", OP16(0xc20eLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "compare logical immediate 64<32" }, + { "cfi", OP16(0xc20dLL), MASK_RIL_RI, INSTR_RIL_RI, 2, 4, 0, "compare immediate 32" }, + { "cgfi", OP16(0xc20cLL), MASK_RIL_RI, INSTR_RIL_RI, 2, 4, 0, "compare immediate 64<32" }, + { "alfi", OP16(0xc20bLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "add logical immediate 32" }, + { "algfi", OP16(0xc20aLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "add logical immediate 64<32" }, + { "afi", OP16(0xc209LL), MASK_RIL_RI, INSTR_RIL_RI, 2, 4, 0, "add immediate 32" }, + { "agfi", OP16(0xc208LL), MASK_RIL_RI, INSTR_RIL_RI, 2, 4, 0, "add immediate 64<32" }, + { "slfi", OP16(0xc205LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "subtract logical immediate 32" }, + { "slgfi", OP16(0xc204LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "subtract logical immediate 64<32" }, + { "msfi", OP16(0xc201LL), MASK_RIL_RI, INSTR_RIL_RI, 2, 6, 0, "multiply single immediate (32)" }, + { "msgfi", OP16(0xc200LL), MASK_RIL_RI, INSTR_RIL_RI, 2, 6, 0, "multiply single immediate (64)" }, + { "jg", OP16(0xc0f4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 48, "unconditional jump long" }, + { "brul", OP16(0xc0f4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 48, "unconditional jump long" }, + { "jgno", OP16(0xc0e4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not overflow / if not ones" }, + { "brnol", OP16(0xc0e4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not overflow / if not ones" }, + { "jgnh", OP16(0xc0d4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A not high" }, + { "jgnp", OP16(0xc0d4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not plus" }, + { "brnhl", OP16(0xc0d4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A not high" }, + { "brnpl", OP16(0xc0d4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not plus" }, + { "jgle", OP16(0xc0c4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on low or equal" }, + { "brlel", OP16(0xc0c4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on low or equal" }, + { "jgnl", OP16(0xc0b4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A not low" }, + { "jgnm", OP16(0xc0b4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not minus / if not mixed" }, + { "brnll", OP16(0xc0b4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A not low" }, + { "brnml", OP16(0xc0b4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not minus / if not mixed" }, + { "jghe", OP16(0xc0a4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on high or equal" }, + { "brhel", OP16(0xc0a4LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on high or equal" }, + { "jgnlh", OP16(0xc094LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not low or high" }, + { "brnlhl", OP16(0xc094LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not low or high" }, + { "jge", OP16(0xc084LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A equal B" }, + { "jgz", OP16(0xc084LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on zero / if zeros" }, + { "brel", OP16(0xc084LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A equal B" }, + { "brzl", OP16(0xc084LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on zero / if zeros" }, + { "jgne", OP16(0xc074LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A not equal B" }, + { "jgnz", OP16(0xc074LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not zero / if not zeros" }, + { "brnel", OP16(0xc074LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A not equal B" }, + { "brnzl", OP16(0xc074LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not zero / if not zeros" }, + { "jglh", OP16(0xc064LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on low or high" }, + { "brlhl", OP16(0xc064LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on low or high" }, + { "jgnhe", OP16(0xc054LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not high or equal" }, + { "brnhel", OP16(0xc054LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not high or equal" }, + { "jgl", OP16(0xc044LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A low" }, + { "jgm", OP16(0xc044LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on minus / if mixed" }, + { "brll", OP16(0xc044LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A low" }, + { "brml", OP16(0xc044LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on minus / if mixed" }, + { "jgnle", OP16(0xc034LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not low or equal" }, + { "brnlel", OP16(0xc034LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on not low or equal" }, + { "jgh", OP16(0xc024LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A high" }, + { "jgp", OP16(0xc024LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on plus" }, + { "brhl", OP16(0xc024LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on A high" }, + { "brpl", OP16(0xc024LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on plus" }, + { "jgo", OP16(0xc014LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on overflow / if ones" }, + { "brol", OP16(0xc014LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 112, "conditional jump long on overflow / if ones" }, + { "llilf", OP16(0xc00fLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "load logical immediate low" }, + { "llgfi", OP16(0xc00fLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "load logical immediate" }, + { "llihf", OP16(0xc00eLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "load logical immediate high" }, + { "oilf", OP16(0xc00dLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "or immediate low" }, + { "oihf", OP16(0xc00cLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "or immediate high" }, + { "nilf", OP16(0xc00bLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "and immediate low" }, + { "nihf", OP16(0xc00aLL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "and immediate high" }, + { "iilf", OP16(0xc009LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "insert immediate low" }, + { "lfi", OP16(0xc009LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "insert immediate 32" }, + { "iihf", OP16(0xc008LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "insert immediate high" }, + { "xilf", OP16(0xc007LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "exclusive or immediate low" }, + { "xihf", OP16(0xc006LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 0, "exclusive or immediate high" }, + { "brasl", OP16(0xc005LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 2, 176, "branch relative and save long" }, + { "jasl", OP16(0xc005LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 2, 176, "branch relative and save long" }, + { "brcl", OP16(0xc004LL), MASK_RIL_UP, INSTR_RIL_UP, 3, 2, 112, "branch relative on condition long" }, + { "jgnop", OP16(0xc004LL), MASK_RIL_0P, INSTR_RIL_0P, 3, 2, 0, "nop jump long" }, + { "lgfi", OP16(0xc001LL), MASK_RIL_RI, INSTR_RIL_RI, 2, 4, 0, "load immediate 64<32" }, + { "larl", OP16(0xc000LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 2, 0, "load address relative long" }, + { "icm", OP8(0xbfLL), MASK_RS_RURD, INSTR_RS_RURD, 3, 0, 0, "insert characters under mask" }, + { "stcm", OP8(0xbeLL), MASK_RS_RURD, INSTR_RS_RURD, 3, 0, 0, "store characters under mask" }, + { "clm", OP8(0xbdLL), MASK_RS_RURD, INSTR_RS_RURD, 3, 0, 0, "compare logical characters under mask" }, + { "cds", OP8(0xbbLL), MASK_RS_RERERD, INSTR_RS_RERERD, 3, 0, 0, "compare double and swap" }, + { "cs", OP8(0xbaLL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "compare and swap" }, + { "msrkc", OP16(0xb9fdLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 10, 0, "multiply single 32x32 -> 32" }, + { "slrk", OP16(0xb9fbLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract logical 3 operands 32 bit" }, + { "alrk", OP16(0xb9faLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add logical 3 operands 32 bit" }, + { "srk", OP16(0xb9f9LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract 3 operands 32 bit" }, + { "ark", OP16(0xb9f8LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add 3 operands 32 bit" }, + { "xrk", OP16(0xb9f7LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "xor 3 operands 32 bit" }, + { "ork", OP16(0xb9f6LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "or 3 operands 32 bit" }, + { "ncrk", OP16(0xb9f5LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "and with complement 32 bit" }, + { "nrk", OP16(0xb9f4LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "and 3 operands 32 bit" }, + { "locrno", OP32(0xb9f2e000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on not overflow / if not ones" }, + { "locrnh", OP32(0xb9f2d000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on A not high" }, + { "locrnp", OP32(0xb9f2d000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on not plus" }, + { "locrle", OP32(0xb9f2c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on low or equal" }, + { "locrnl", OP32(0xb9f2b000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on A not low" }, + { "locrnm", OP32(0xb9f2b000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on not minus / if not mixed" }, + { "locrhe", OP32(0xb9f2a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on high or equal" }, + { "locrnlh", OP32(0xb9f29000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on not low or high" }, + { "locre", OP32(0xb9f28000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on A equal B" }, + { "locrz", OP32(0xb9f28000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on zero / if zeros" }, + { "locrne", OP32(0xb9f27000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on A not equal B" }, + { "locrnz", OP32(0xb9f27000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on not zero / if not zeros" }, + { "locrlh", OP32(0xb9f26000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on low or high" }, + { "locrnhe", OP32(0xb9f25000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on not high or equal" }, + { "locrl", OP32(0xb9f24000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on A low" }, + { "locrm", OP32(0xb9f24000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on minus / if mixed" }, + { "locrnle", OP32(0xb9f23000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on not low or equal" }, + { "locrh", OP32(0xb9f22000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on A high" }, + { "locrp", OP32(0xb9f22000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on plus" }, + { "locro", OP32(0xb9f21000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 32 bit on overflow / if ones" }, + { "locr", OP16(0xb9f2LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 7, 0, "load on condition 32 bit" }, + { "selrno", OP32(0xb9f00e00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on not overflow / if not ones" }, + { "selrnh", OP32(0xb9f00d00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on A not high" }, + { "selrnp", OP32(0xb9f00d00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on not plus" }, + { "selrle", OP32(0xb9f00c00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on low or equal" }, + { "selrnl", OP32(0xb9f00b00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on A not low" }, + { "selrnm", OP32(0xb9f00b00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on not minus / if not mixed" }, + { "selrhe", OP32(0xb9f00a00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on high or equal" }, + { "selrnlh", OP32(0xb9f00900LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on not low or high" }, + { "selre", OP32(0xb9f00800LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on A equal B" }, + { "selrz", OP32(0xb9f00800LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on zero / if zeros" }, + { "selrne", OP32(0xb9f00700LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on A not equal B" }, + { "selrnz", OP32(0xb9f00700LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on not zero / if not zeros" }, + { "selrlh", OP32(0xb9f00600LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on low or high" }, + { "selrnhe", OP32(0xb9f00500LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on not high or equal" }, + { "selrl", OP32(0xb9f00400LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on A low" }, + { "selrm", OP32(0xb9f00400LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on minus / if mixed" }, + { "selrnle", OP32(0xb9f00300LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on not low or equal" }, + { "selrh", OP32(0xb9f00200LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on A high" }, + { "selrp", OP32(0xb9f00200LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on plus" }, + { "selro", OP32(0xb9f00100LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 32 bit on overflow / if ones" }, + { "selr", OP16(0xb9f0LL), MASK_RRF_RURR, INSTR_RRF_RURR, 2, 11, 0, "select 32 bit" }, + { "msgrkc", OP16(0xb9edLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 10, 0, "multiply single 64x64 -> 64" }, + { "mgrk", OP16(0xb9ecLL), MASK_RRF_R0RER, INSTR_RRF_R0RER, 2, 10, 0, "multiply 64x64reg -> 128" }, + { "slgrk", OP16(0xb9ebLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract logical 3 operands 64 bit" }, + { "algrk", OP16(0xb9eaLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add logical 3 operands 64 bit" }, + { "sgrk", OP16(0xb9e9LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract 3 operands 64 bit" }, + { "agrk", OP16(0xb9e8LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add 3 operands 64 bit" }, + { "xgrk", OP16(0xb9e7LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "xor 3 operands 64 bit" }, + { "ogrk", OP16(0xb9e6LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "or 3 operands 64 bit" }, + { "ncgrk", OP16(0xb9e5LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "and with complement 64 bit" }, + { "ngrk", OP16(0xb9e4LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "and 3 operands 64 bit" }, + { "selgrno", OP32(0xb9e30e00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on not overflow / if not ones" }, + { "selgrnh", OP32(0xb9e30d00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on A not high" }, + { "selgrnp", OP32(0xb9e30d00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on not plus" }, + { "selgrle", OP32(0xb9e30c00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on low or equal" }, + { "selgrnl", OP32(0xb9e30b00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on A not low" }, + { "selgrnm", OP32(0xb9e30b00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on not minus / if not mixed" }, + { "selgrhe", OP32(0xb9e30a00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on high or equal" }, + { "selgrnlh", OP32(0xb9e30900LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on not low or high" }, + { "selgre", OP32(0xb9e30800LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on A equal B" }, + { "selgrz", OP32(0xb9e30800LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on zero / if zeros" }, + { "selgrne", OP32(0xb9e30700LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on A not equal B" }, + { "selgrnz", OP32(0xb9e30700LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on not zero / if not zeros" }, + { "selgrlh", OP32(0xb9e30600LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on low or high" }, + { "selgrnhe", OP32(0xb9e30500LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on not high or equal" }, + { "selgrl", OP32(0xb9e30400LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on A low" }, + { "selgrm", OP32(0xb9e30400LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on minus / if mixed" }, + { "selgrnle", OP32(0xb9e30300LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on not low or equal" }, + { "selgrh", OP32(0xb9e30200LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on A high" }, + { "selgrp", OP32(0xb9e30200LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on plus" }, + { "selgro", OP32(0xb9e30100LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select 64 bit on overflow / if ones" }, + { "selgr", OP16(0xb9e3LL), MASK_RRF_RURR, INSTR_RRF_RURR, 2, 11, 0, "select 64 bit" }, + { "locgrno", OP32(0xb9e2e000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on not overflow / if not ones" }, + { "locgrnh", OP32(0xb9e2d000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on A not high" }, + { "locgrnp", OP32(0xb9e2d000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on not plus" }, + { "locgrle", OP32(0xb9e2c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on low or equal" }, + { "locgrnl", OP32(0xb9e2b000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on A not low" }, + { "locgrnm", OP32(0xb9e2b000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on not minus / if not mixed" }, + { "locgrhe", OP32(0xb9e2a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on high or equal" }, + { "locgrnlh", OP32(0xb9e29000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on not low or high" }, + { "locgre", OP32(0xb9e28000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on A equal B" }, + { "locgrz", OP32(0xb9e28000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on zero / if zeros" }, + { "locgrne", OP32(0xb9e27000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on A not equal B" }, + { "locgrnz", OP32(0xb9e27000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on not zero / if not zeros" }, + { "locgrlh", OP32(0xb9e26000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on low or high" }, + { "locgrnhe", OP32(0xb9e25000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on not high or equal" }, + { "locgrl", OP32(0xb9e24000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on A low" }, + { "locgrm", OP32(0xb9e24000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on minus / if mixed" }, + { "locgrnle", OP32(0xb9e23000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on not low or equal" }, + { "locgrh", OP32(0xb9e22000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on A high" }, + { "locgrp", OP32(0xb9e22000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on plus" }, + { "locgro", OP32(0xb9e21000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 7, 0, "load on condition 64 bit on overflow / if ones" }, + { "locgr", OP16(0xb9e2LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 7, 0, "load on condition 64 bit" }, + { "popcnt", OP16(0xb9e1LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 11, 1, "population count arch13" }, + { "popcnt", OP16(0xb9e1LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "population count" }, + { "locfhrno", OP32(0xb9e0e000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on not overflow / if not ones" }, + { "locfhrnh", OP32(0xb9e0d000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on A not high" }, + { "locfhrnp", OP32(0xb9e0d000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on not plus" }, + { "locfhrle", OP32(0xb9e0c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on low or equal" }, + { "locfhrnl", OP32(0xb9e0b000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on A not low" }, + { "locfhrnm", OP32(0xb9e0b000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on not minus / if not mixed" }, + { "locfhrhe", OP32(0xb9e0a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on high or equal" }, + { "locfhrnlh", OP32(0xb9e09000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on not low or high" }, + { "locfhre", OP32(0xb9e08000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on A equal B" }, + { "locfhrz", OP32(0xb9e08000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on zero / if zeros" }, + { "locfhrne", OP32(0xb9e07000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on A not equal B" }, + { "locfhrnz", OP32(0xb9e07000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on not zero / if not zeros" }, + { "locfhrlh", OP32(0xb9e06000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on low or high" }, + { "locfhrnhe", OP32(0xb9e05000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on not high or equal" }, + { "locfhrl", OP32(0xb9e04000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on A low" }, + { "locfhrm", OP32(0xb9e04000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on minus / if mixed" }, + { "locfhrnle", OP32(0xb9e03000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on not low or equal" }, + { "locfhrh", OP32(0xb9e02000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on A high" }, + { "locfhrp", OP32(0xb9e02000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on plus" }, + { "locfhro", OP32(0xb9e01000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 9, 0, "load high on condition from gpr on overflow / if ones" }, + { "locfhr", OP16(0xb9e0LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 9, 0, "load high on condition from gpr" }, + { "clhlr", OP16(0xb9dfLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "compare logical high low" }, + { "chlr", OP16(0xb9ddLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "compare high low" }, + { "slhhlr", OP16(0xb9dbLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract logical high low" }, + { "alhhlr", OP16(0xb9daLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add logical high low" }, + { "shhlr", OP16(0xb9d9LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract high low" }, + { "ahhlr", OP16(0xb9d8LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add high low" }, + { "clhhr", OP16(0xb9cfLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "compare logical high high" }, + { "chhr", OP16(0xb9cdLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "compare high high" }, + { "slhhhr", OP16(0xb9cbLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract logical high high" }, + { "alhhhr", OP16(0xb9caLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add logical high high" }, + { "shhhr", OP16(0xb9c9LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "subtract high high" }, + { "ahhhr", OP16(0xb9c8LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 7, 0, "add high high" }, + { "selfhrno", OP32(0xb9c00e00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on not overflow / if not ones" }, + { "selfhrnh", OP32(0xb9c00d00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on A not high" }, + { "selfhrnp", OP32(0xb9c00d00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on not plus" }, + { "selfhrle", OP32(0xb9c00c00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on low or equal" }, + { "selfhrnl", OP32(0xb9c00b00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on A not low" }, + { "selfhrnm", OP32(0xb9c00b00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on not minus / if not mixed" }, + { "selfhrhe", OP32(0xb9c00a00LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on high or equal" }, + { "selfhrnlh", OP32(0xb9c00900LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on not low or high" }, + { "selfhre", OP32(0xb9c00800LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on A equal B" }, + { "selfhrz", OP32(0xb9c00800LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on zero / if zeros" }, + { "selfhrne", OP32(0xb9c00700LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on A not equal B" }, + { "selfhrnz", OP32(0xb9c00700LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on not zero / if not zeros" }, + { "selfhrlh", OP32(0xb9c00600LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on low or high" }, + { "selfhrnhe", OP32(0xb9c00500LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on not high or equal" }, + { "selfhrl", OP32(0xb9c00400LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on A low" }, + { "selfhrm", OP32(0xb9c00400LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on minus / if mixed" }, + { "selfhrnle", OP32(0xb9c00300LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on not low or equal" }, + { "selfhrh", OP32(0xb9c00200LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on A high" }, + { "selfhrp", OP32(0xb9c00200LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on plus" }, + { "selfhro", OP32(0xb9c00100LL), MASK_RRF_R0RR3, INSTR_RRF_R0RR3, 2, 11, 0, "select high on overflow / if ones" }, + { "selfhr", OP16(0xb9c0LL), MASK_RRF_RURR, INSTR_RRF_RURR, 2, 11, 0, "select high" }, + { "trte", OP16(0xb9bfLL), MASK_RRF_U0RER, INSTR_RRF_U0RER, 2, 6, 1, "translate and test extended" }, + { "srstu", OP16(0xb9beLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "search string unicode" }, + { "trtre", OP16(0xb9bdLL), MASK_RRF_U0RER, INSTR_RRF_U0RER, 2, 6, 1, "translate and test reverse extended" }, + { "cu42", OP16(0xb9b3LL), MASK_RRE_RERE, INSTR_RRE_RERE, 2, 4, 0, "convert utf-32 to utf-16" }, + { "cu41", OP16(0xb9b2LL), MASK_RRE_RERE, INSTR_RRE_RERE, 2, 4, 0, "convert utf-32 to utf-8" }, + { "cu24", OP16(0xb9b1LL), MASK_RRF_U0RERE, INSTR_RRF_U0RERE, 2, 4, 1, "convert utf-16 to utf-32" }, + { "cu14", OP16(0xb9b0LL), MASK_RRF_U0RERE, INSTR_RRF_U0RERE, 2, 4, 1, "convert utf-8 to utf-32" }, + { "pfmf", OP16(0xb9afLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 6, 0, "perform frame management function" }, + { "rrbm", OP16(0xb9aeLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "reset reference bits multiple" }, + { "irbm", OP16(0xb9acLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 10, 0, "insert reference bits multiple" }, + { "lptea", OP16(0xb9aaLL), MASK_RRF_RURR2, INSTR_RRF_RURR2, 2, 4, 0, "load page-table-entry address" }, + { "ptf", OP16(0xb9a2LL), MASK_RRE_R0, INSTR_RRE_R0, 2, 6, 0, "perform topology function" }, + { "tpei", OP16(0xb9a1LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 10, 0, "test pending external interruption" }, + { "ssair", OP16(0xb99fLL), MASK_RRE_R0, INSTR_RRE_R0, 3, 3, 0, "set secondary ASN with instance" }, + { "pti", OP16(0xb99eLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 3, 0, "program transfer with instance" }, + { "esea", OP16(0xb99dLL), MASK_RRE_R0, INSTR_RRE_R0, 2, 2, 0, "extract and set extended authority" }, + { "esair", OP16(0xb99bLL), MASK_RRE_R0, INSTR_RRE_R0, 3, 3, 0, "extract secondary ASN and instance" }, + { "epair", OP16(0xb99aLL), MASK_RRE_R0, INSTR_RRE_R0, 3, 3, 0, "extract primary ASN and instance" }, + { "slbr", OP16(0xb999LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 2, 0, "subtract logical with borrow 32" }, + { "alcr", OP16(0xb998LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 2, 0, "add logical with carry 32" }, + { "dlr", OP16(0xb997LL), MASK_RRE_RER, INSTR_RRE_RER, 3, 2, 0, "divide logical 32" }, + { "mlr", OP16(0xb996LL), MASK_RRE_RER, INSTR_RRE_RER, 3, 2, 0, "multiply logical 32" }, + { "llhr", OP16(0xb995LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load logical halfword 32" }, + { "llcr", OP16(0xb994LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load logical character 32" }, + { "troo", OP16(0xb993LL), MASK_RRF_U0RER, INSTR_RRF_U0RER, 3, 4, 1, "translate one to one" }, + { "troo", OP16(0xb993LL), MASK_RRE_RER, INSTR_RRE_RER, 3, 0, 0, "translate one to one" }, + { "trot", OP16(0xb992LL), MASK_RRF_U0RER, INSTR_RRF_U0RER, 3, 4, 1, "translate one to two" }, + { "trot", OP16(0xb992LL), MASK_RRE_RER, INSTR_RRE_RER, 3, 0, 0, "translate one to two" }, + { "trto", OP16(0xb991LL), MASK_RRF_U0RER, INSTR_RRF_U0RER, 3, 4, 1, "translate two to one" }, + { "trto", OP16(0xb991LL), MASK_RRE_RER, INSTR_RRE_RER, 3, 0, 0, "translate two to one" }, + { "trtt", OP16(0xb990LL), MASK_RRF_U0RER, INSTR_RRF_U0RER, 3, 4, 1, "translate two to two" }, + { "trtt", OP16(0xb990LL), MASK_RRE_RER, INSTR_RRE_RER, 3, 0, 0, "translate two to two" }, + { "crdte", OP16(0xb98fLL), MASK_RRF_RURR2, INSTR_RRF_RURR2, 2, 8, 1, "compare and replace DAT table entry" }, + { "idte", OP16(0xb98eLL), MASK_RRF_RURR2, INSTR_RRF_RURR2, 2, 3, 1, "invalidate dat table entry" }, + { "epsw", OP16(0xb98dLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 2, 0, "extract psw" }, + { "rdp", OP16(0xb98bLL), MASK_RRF_RURR2, INSTR_RRF_RURR2, 2, 12, 1, "reset dat protection" }, + { "cspg", OP16(0xb98aLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 3, 0, "compare and swap and purge" }, + { "slbgr", OP16(0xb989LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "subtract logical with borrow 64" }, + { "alcgr", OP16(0xb988LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "add logical with carry 64" }, + { "dlgr", OP16(0xb987LL), MASK_RRE_RER, INSTR_RRE_RER, 2, 2, 0, "divide logical 64" }, + { "mlgr", OP16(0xb986LL), MASK_RRE_RER, INSTR_RRE_RER, 2, 2, 0, "multiply logical 64" }, + { "llghr", OP16(0xb985LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load logical halfword 64" }, + { "llgcr", OP16(0xb984LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load logical character 64" }, + { "flogr", OP16(0xb983LL), MASK_RRE_RER, INSTR_RRE_RER, 2, 4, 0, "find leftmost one" }, + { "xgr", OP16(0xb982LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "exclusive or 64" }, + { "ogr", OP16(0xb981LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "or 64" }, + { "ngr", OP16(0xb980LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "and 64" }, + { "nxrk", OP16(0xb977LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "not exclusive or 32 bit" }, + { "nork", OP16(0xb976LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "nor 32 bit" }, + { "notr", OP16(0xb976LL), MASK_RRF_R0RR4, INSTR_RRF_R0RR4, 2, 11, 0, "not 32 bit" }, + { "ocrk", OP16(0xb975LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "or with complement 32 bit" }, + { "nnrk", OP16(0xb974LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "nand 32 bit" }, + { "clrtnh", OP32(0xb973c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on A not high" }, + { "clrtle", OP32(0xb973c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on low or equal" }, + { "clrtnl", OP32(0xb973a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on A not low" }, + { "clrthe", OP32(0xb973a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on high or equal" }, + { "clrte", OP32(0xb9738000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on A equal B" }, + { "clrtnlh", OP32(0xb9738000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on not low or high" }, + { "clrtne", OP32(0xb9736000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on A not equal B" }, + { "clrtlh", OP32(0xb9736000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on low or high" }, + { "clrtl", OP32(0xb9734000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on A low" }, + { "clrtnhe", OP32(0xb9734000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on not high or equal" }, + { "clrth", OP32(0xb9732000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on A high" }, + { "clrtnle", OP32(0xb9732000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (32) on not low or equal" }, + { "clrt", OP16(0xb973LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 6, 0, "compare logical and trap (32)" }, + { "crtnh", OP32(0xb972c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on A not high" }, + { "crtle", OP32(0xb972c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on low or equal" }, + { "crtnl", OP32(0xb972a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on A not low" }, + { "crthe", OP32(0xb972a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on high or equal" }, + { "crte", OP32(0xb9728000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on A equal B" }, + { "crtnlh", OP32(0xb9728000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on not low or high" }, + { "crtne", OP32(0xb9726000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on A not equal B" }, + { "crtlh", OP32(0xb9726000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on low or high" }, + { "crtl", OP32(0xb9724000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on A low" }, + { "crtnhe", OP32(0xb9724000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on not high or equal" }, + { "crth", OP32(0xb9722000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on A high" }, + { "crtnle", OP32(0xb9722000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap on not low or equal" }, + { "crt", OP16(0xb972LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 6, 0, "compare and trap" }, + { "bdepg", OP16(0xb96dLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 13, 0, "bit deposit" }, + { "bextg", OP16(0xb96cLL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 13, 0, "bit extract" }, + { "ctzg", OP16(0xb969LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 13, 0, "count trailing zeros" }, + { "clzg", OP16(0xb968LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 13, 0, "count leading zeros" }, + { "nxgrk", OP16(0xb967LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "not exclusive or 64 bit" }, + { "nogrk", OP16(0xb966LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "nor 64 bit" }, + { "notgr", OP16(0xb966LL), MASK_RRF_R0RR4, INSTR_RRF_R0RR4, 2, 11, 0, "not 64 bit" }, + { "ocgrk", OP16(0xb965LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "or with complement 64 bit" }, + { "nngrk", OP16(0xb964LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "nand 64 bit" }, + { "clgrtnh", OP32(0xb961c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on A not high" }, + { "clgrtle", OP32(0xb961c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on low or equal" }, + { "clgrtnl", OP32(0xb961a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on A not low" }, + { "clgrthe", OP32(0xb961a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on high or equal" }, + { "clgrte", OP32(0xb9618000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on A equal B" }, + { "clgrtnlh", OP32(0xb9618000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on not low or high" }, + { "clgrtne", OP32(0xb9616000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on A not equal B" }, + { "clgrtlh", OP32(0xb9616000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on low or high" }, + { "clgrtl", OP32(0xb9614000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on A low" }, + { "clgrtnhe", OP32(0xb9614000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on not high or equal" }, + { "clgrth", OP32(0xb9612000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on A high" }, + { "clgrtnle", OP32(0xb9612000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare logical and trap (64) on not low or equal" }, + { "clgrt", OP16(0xb961LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 6, 0, "compare logical and trap (64)" }, + { "cgrtnh", OP32(0xb960c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on A not high" }, + { "cgrtle", OP32(0xb960c000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on low or equal" }, + { "cgrtnl", OP32(0xb960a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on A not low" }, + { "cgrthe", OP32(0xb960a000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on high or equal" }, + { "cgrte", OP32(0xb9608000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on A equal B" }, + { "cgrtnlh", OP32(0xb9608000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on not low or high" }, + { "cgrtne", OP32(0xb9606000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on A not equal B" }, + { "cgrtlh", OP32(0xb9606000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on low or high" }, + { "cgrtl", OP32(0xb9604000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on A low" }, + { "cgrtnhe", OP32(0xb9604000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on not high or equal" }, + { "cgrth", OP32(0xb9602000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on A high" }, + { "cgrtnle", OP32(0xb9602000LL), MASK_RRF_00RR, INSTR_RRF_00RR, 2, 6, 0, "compare and trap 64 on not low or equal" }, + { "cgrt", OP16(0xb960LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 6, 0, "compare and trap 64" }, + { "cxlftr", OP16(0xb95bLL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 32 bit fixed logical to extended dfp with rounding mode" }, + { "cxlgtr", OP16(0xb95aLL), MASK_RRF_UUFER, INSTR_RRF_UUFER, 2, 7, 0, "convert from 64 bit fixed logical to extended dfp with rounding mode" }, + { "cxftr", OP16(0xb959LL), MASK_RRF_UUFER, INSTR_RRF_UUFER, 2, 7, 0, "convert from 32 bit fixed to extended dfp with rounding mode" }, + { "cdlftr", OP16(0xb953LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 32 bit fixed logical to long dfp with rounding mode" }, + { "cdlgtr", OP16(0xb952LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 64 bit fixed logical to long dfp with rounding mode" }, + { "cdftr", OP16(0xb951LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 32 bit fixed to long dfp with rounding mode" }, + { "clfxtr", OP16(0xb94bLL), MASK_RRF_UURFE, INSTR_RRF_UURFE, 2, 7, 0, "convert to 32 bit fixed logical from extended dfp with rounding mode" }, + { "clgxtr", OP16(0xb94aLL), MASK_RRF_UURFE, INSTR_RRF_UURFE, 2, 7, 0, "convert to 64 bit fixed logical from extended dfp with rounding mode" }, + { "cfxtr", OP16(0xb949LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 32 bit fixed from extended dfp source with rounding mode" }, + { "bctgr", OP16(0xb946LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "branch on count 64" }, + { "clfdtr", OP16(0xb943LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 32 bit fixed logical from long dfp with rounding mode" }, + { "clgdtr", OP16(0xb942LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 64 bit fixed logical from long dfp with rounding mode" }, + { "cfdtr", OP16(0xb941LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 32 bit fixed from long dfp source with rounding mode" }, + { "klmd", OP16(0xb93fLL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 13, 1, "compute last message digest" }, + { "klmd", OP16(0xb93fLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 3, 0, "compute last message digest" }, + { "kimd", OP16(0xb93eLL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 13, 1, "compute intermediate message digest" }, + { "kimd", OP16(0xb93eLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 3, 0, "compute intermediate message digest" }, + { "prno", OP16(0xb93cLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 10, 0, "perform random number operation" }, + { "ppno", OP16(0xb93cLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 9, 0, "perform pseudorandom number operation" }, + { "nnpa", OP16(0xb93bLL), MASK_RRE_00, INSTR_RRE_00, 2, 12, 0, "neural network processing assist" }, + { "kdsa", OP16(0xb93aLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 11, 0, "compute digital signature authentication" }, + { "dfltcc", OP16(0xb939LL), MASK_RRF_R0RR2, INSTR_RRF_R0RR2, 2, 11, 0, "deflate conversion call" }, + { "sortl", OP16(0xb938LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 11, 0, "sort lists" }, + { "clgfr", OP16(0xb931LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "compare logical 64<32" }, + { "cgfr", OP16(0xb930LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "compare 64<32" }, + { "kmc", OP16(0xb92fLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 3, 0, "cipher message with chaining" }, + { "km", OP16(0xb92eLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 3, 0, "cipher message" }, + { "kmctr", OP16(0xb92dLL), MASK_RRF_R0RR, INSTR_RRF_R0RR, 2, 7, 0, "cipher message with counter" }, + { "pcc", OP16(0xb92cLL), MASK_RRE_00, INSTR_RRE_00, 2, 7, 0, "perform cryptographic computation" }, + { "kmo", OP16(0xb92bLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "cipher message with OFB" }, + { "kmf", OP16(0xb92aLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 7, 0, "cipher message with CFB" }, + { "kma", OP16(0xb929LL), MASK_RRF_R0RR, INSTR_RRF_R0RR, 2, 10, 0, "cipher message with galois counter mode" }, + { "pckmo", OP16(0xb928LL), MASK_RRE_00, INSTR_RRE_00, 2, 7, 0, "perform cryptographic key management operation" }, + { "lhr", OP16(0xb927LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load halfword 32" }, + { "lbr", OP16(0xb926LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load byte 32" }, + { "sturg", OP16(0xb925LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "store using real address 64" }, + { "clgr", OP16(0xb921LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "compare logical 64" }, + { "cgr", OP16(0xb920LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "compare 64" }, + { "lrvr", OP16(0xb91fLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 2, 0, "load reversed 32" }, + { "kmac", OP16(0xb91eLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 3, 0, "compute message authentication code" }, + { "dsgfr", OP16(0xb91dLL), MASK_RRE_RER, INSTR_RRE_RER, 2, 2, 0, "divide single 64<32" }, + { "msgfr", OP16(0xb91cLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "multiply single 64<32" }, + { "slgfr", OP16(0xb91bLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "subtract logical 64<32" }, + { "algfr", OP16(0xb91aLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "add logical 64<32" }, + { "sgfr", OP16(0xb919LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "subtract 64<32" }, + { "agfr", OP16(0xb918LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "add 64<32" }, + { "llgtr", OP16(0xb917LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load logical thirty one bits" }, + { "llgfr", OP16(0xb916LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load logical 64<32" }, + { "lgfr", OP16(0xb914LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load 64<32" }, + { "lcgfr", OP16(0xb913LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load complement 64<32" }, + { "ltgfr", OP16(0xb912LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load and test 64<32" }, + { "lngfr", OP16(0xb911LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load negative 64<32" }, + { "lpgfr", OP16(0xb910LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load positive 64<32" }, + { "lrvgr", OP16(0xb90fLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load reversed 64" }, + { "eregg", OP16(0xb90eLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "extract stacked registers 64" }, + { "dsgr", OP16(0xb90dLL), MASK_RRE_RER, INSTR_RRE_RER, 2, 2, 0, "divide single 64" }, + { "msgr", OP16(0xb90cLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "multiply single 64" }, + { "slgr", OP16(0xb90bLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "subtract logical 64" }, + { "algr", OP16(0xb90aLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "add logical 64" }, + { "sgr", OP16(0xb909LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "subtract 64" }, + { "agr", OP16(0xb908LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "add 64" }, + { "lghr", OP16(0xb907LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load halfword 64" }, + { "lgbr", OP16(0xb906LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 4, 0, "load byte 64" }, + { "lurag", OP16(0xb905LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load using real address 64" }, + { "lgr", OP16(0xb904LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load 64" }, + { "lcgr", OP16(0xb903LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load complement 64" }, + { "ltgr", OP16(0xb902LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load and test 64" }, + { "lngr", OP16(0xb901LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load negative 64" }, + { "lpgr", OP16(0xb900LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 2, 0, "load positive 64" }, + { "lctl", OP8(0xb7LL), MASK_RS_CCRD, INSTR_RS_CCRD, 3, 0, 0, "load control" }, + { "stctl", OP8(0xb6LL), MASK_RS_CCRD, INSTR_RS_CCRD, 3, 0, 0, "store control" }, + { "rrxtr", OP16(0xb3ffLL), MASK_RRF_FEFERU, INSTR_RRF_FEFERU, 2, 5, 0, "Reround extended dfp" }, + { "iextr", OP16(0xb3feLL), MASK_RRF_FE0FER, INSTR_RRF_FE0FER, 2, 5, 0, "insert biased exponent extended dfp" }, + { "qaxtr", OP16(0xb3fdLL), MASK_RRF_FEUFEFE, INSTR_RRF_FEUFEFE, 2, 5, 0, "Quantize extended dfp" }, + { "cextr", OP16(0xb3fcLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 2, 5, 0, "compare exponent extended dfp" }, + { "cxstr", OP16(0xb3fbLL), MASK_RRE_FR, INSTR_RRE_FR, 2, 5, 0, "convert from signed bcd extended dfp" }, + { "cxutr", OP16(0xb3faLL), MASK_RRE_FER, INSTR_RRE_FER, 2, 5, 0, "convert from unsigned bcd to extended dfp" }, + { "cxgtra", OP16(0xb3f9LL), MASK_RRF_UUFER, INSTR_RRF_UUFER, 2, 7, 0, "convert from fixed extended dfp with rounding mode" }, + { "cxgtr", OP16(0xb3f9LL), MASK_RRE_FER, INSTR_RRE_FER, 2, 5, 0, "convert from fixed extended dfp" }, + { "rrdtr", OP16(0xb3f7LL), MASK_RRF_FFRU, INSTR_RRF_FFRU, 2, 5, 0, "Reround long dfp" }, + { "iedtr", OP16(0xb3f6LL), MASK_RRF_F0FR, INSTR_RRF_F0FR, 2, 5, 0, "insert biased exponent long dfp" }, + { "qadtr", OP16(0xb3f5LL), MASK_RRF_FUFF, INSTR_RRF_FUFF, 2, 5, 0, "Quantize long dfp" }, + { "cedtr", OP16(0xb3f4LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "compare exponent long dfp" }, + { "cdstr", OP16(0xb3f3LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 5, 0, "convert from signed bcd long dfp" }, + { "cdutr", OP16(0xb3f2LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 5, 0, "convert from unsigned bcd to long dfp" }, + { "cdgtra", OP16(0xb3f1LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from fixed long dfp with rounding mode" }, + { "cdgtr", OP16(0xb3f1LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 5, 0, "convert from fixed long dfp" }, + { "esxtr", OP16(0xb3efLL), MASK_RRE_RFE, INSTR_RRE_RFE, 2, 5, 0, "extract significance from extended dfp" }, + { "eextr", OP16(0xb3edLL), MASK_RRE_RFE, INSTR_RRE_RFE, 2, 5, 0, "extract biased exponent from extended dfp" }, + { "cxtr", OP16(0xb3ecLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 2, 5, 0, "compare extended dfp" }, + { "csxtr", OP16(0xb3ebLL), MASK_RRF_0UREFE, INSTR_RRF_0UREFE, 2, 5, 0, "convert from extended dfp to signed bcd" }, + { "cuxtr", OP16(0xb3eaLL), MASK_RRE_RFE, INSTR_RRE_RFE, 2, 5, 0, "convert from extended dfp to unsigned bcd" }, + { "cgxtra", OP16(0xb3e9LL), MASK_RRF_UURFE, INSTR_RRF_UURFE, 2, 7, 0, "convert to 64 bit fixed from extended dfp with rounding mode" }, + { "cgxtr", OP16(0xb3e9LL), MASK_RRF_U0RFE, INSTR_RRF_U0RFE, 2, 5, 0, "convert from extended dfp to fixed" }, + { "kxtr", OP16(0xb3e8LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "compare and signal extended dfp" }, + { "esdtr", OP16(0xb3e7LL), MASK_RRE_RF, INSTR_RRE_RF, 2, 5, 0, "extract significance from long dfp" }, + { "eedtr", OP16(0xb3e5LL), MASK_RRE_RF, INSTR_RRE_RF, 2, 5, 0, "extract biased exponent from long dfp" }, + { "cdtr", OP16(0xb3e4LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "compare long dfp" }, + { "csdtr", OP16(0xb3e3LL), MASK_RRF_0URF, INSTR_RRF_0URF, 2, 5, 0, "convert from long dfp to signed bcd" }, + { "cudtr", OP16(0xb3e2LL), MASK_RRE_RF, INSTR_RRE_RF, 2, 5, 0, "convert from long dfp to unsigned bcd" }, + { "cgdtra", OP16(0xb3e1LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 64 bit fixed from long dfp with rounding mode" }, + { "cgdtr", OP16(0xb3e1LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 2, 5, 0, "convert from long dfp to fixed" }, + { "kdtr", OP16(0xb3e0LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "compare and signal long dfp" }, + { "fixtr", OP16(0xb3dfLL), MASK_RRF_UUFEFE, INSTR_RRF_UUFEFE, 2, 5, 0, "load fp integer extended dfp" }, + { "ltxtr", OP16(0xb3deLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 2, 5, 0, "load and test extended dfp" }, + { "ldxtr", OP16(0xb3ddLL), MASK_RRF_UUFFE, INSTR_RRF_UUFFE, 2, 5, 0, "load rounded extended dfp" }, + { "lxdtr", OP16(0xb3dcLL), MASK_RRF_0UFEF, INSTR_RRF_0UFEF, 2, 5, 0, "load lengthened extended dfp" }, + { "sxtra", OP16(0xb3dbLL), MASK_RRF_FEUFEFE2, INSTR_RRF_FEUFEFE2, 2, 7, 0, "subtract extended dfp with rounding mode" }, + { "sxtr", OP16(0xb3dbLL), MASK_RRR_FE0FEFE, INSTR_RRR_FE0FEFE, 2, 5, 0, "subtract extended dfp" }, + { "axtra", OP16(0xb3daLL), MASK_RRF_FEUFEFE2, INSTR_RRF_FEUFEFE2, 2, 7, 0, "add extended dfp with rounding mode" }, + { "axtr", OP16(0xb3daLL), MASK_RRR_FE0FEFE, INSTR_RRR_FE0FEFE, 2, 5, 0, "add extended dfp" }, + { "dxtra", OP16(0xb3d9LL), MASK_RRF_FEUFEFE2, INSTR_RRF_FEUFEFE2, 2, 7, 0, "divide extended dfp with rounding mode" }, + { "dxtr", OP16(0xb3d9LL), MASK_RRR_FE0FEFE, INSTR_RRR_FE0FEFE, 2, 5, 0, "divide extended dfp" }, + { "mxtra", OP16(0xb3d8LL), MASK_RRF_FEUFEFE2, INSTR_RRF_FEUFEFE2, 2, 7, 0, "multiply extended dfp with rounding mode" }, + { "mxtr", OP16(0xb3d8LL), MASK_RRR_FE0FEFE, INSTR_RRR_FE0FEFE, 2, 5, 0, "multiply extended dfp" }, + { "fidtr", OP16(0xb3d7LL), MASK_RRF_UUFF, INSTR_RRF_UUFF, 2, 5, 0, "load fp integer long dfp" }, + { "ltdtr", OP16(0xb3d6LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "load and test long dfp" }, + { "ledtr", OP16(0xb3d5LL), MASK_RRF_UUFF, INSTR_RRF_UUFF, 2, 5, 0, "load rounded long dfp" }, + { "ldetr", OP16(0xb3d4LL), MASK_RRF_0UFF, INSTR_RRF_0UFF, 2, 5, 0, "load lengthened long dfp" }, + { "sdtra", OP16(0xb3d3LL), MASK_RRF_FUFF2, INSTR_RRF_FUFF2, 2, 7, 0, "subtract long dfp with rounding mode" }, + { "sdtr", OP16(0xb3d3LL), MASK_RRR_F0FF, INSTR_RRR_F0FF, 2, 5, 0, "subtract long dfp" }, + { "adtra", OP16(0xb3d2LL), MASK_RRF_FUFF2, INSTR_RRF_FUFF2, 2, 7, 0, "add long dfp with rounding mode" }, + { "adtr", OP16(0xb3d2LL), MASK_RRR_F0FF, INSTR_RRR_F0FF, 2, 5, 0, "add long dfp" }, + { "ddtra", OP16(0xb3d1LL), MASK_RRF_FUFF2, INSTR_RRF_FUFF2, 2, 7, 0, "divide long dfp with rounding mode" }, + { "ddtr", OP16(0xb3d1LL), MASK_RRR_F0FF, INSTR_RRR_F0FF, 2, 5, 0, "divide long dfp" }, + { "mdtra", OP16(0xb3d0LL), MASK_RRF_FUFF2, INSTR_RRF_FUFF2, 2, 7, 0, "multiply long dfp with rounding mode" }, + { "mdtr", OP16(0xb3d0LL), MASK_RRR_F0FF, INSTR_RRR_F0FF, 2, 5, 0, "multiply long dfp" }, + { "lgdr", OP16(0xb3cdLL), MASK_RRE_RF, INSTR_RRE_RF, 2, 5, 0, "load GR from FPR" }, + { "cgxr", OP16(0xb3caLL), MASK_RRF_U0RFE, INSTR_RRF_U0RFE, 2, 2, 0, "convert to fixed extended hfp to 64" }, + { "cgdr", OP16(0xb3c9LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 2, 2, 0, "convert to fixed long hfp to 64" }, + { "cger", OP16(0xb3c8LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 2, 2, 0, "convert to fixed short hfp to 64" }, + { "cxgr", OP16(0xb3c6LL), MASK_RRE_FER, INSTR_RRE_FER, 2, 2, 0, "convert from fixed 64 to extended hfp" }, + { "cdgr", OP16(0xb3c5LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 2, 0, "convert from fixed 64 to long hfp" }, + { "cegr", OP16(0xb3c4LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 2, 0, "convert from fixed 64 to short hfp" }, + { "ldgr", OP16(0xb3c1LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 5, 0, "load FPR from GR" }, + { "cfxr", OP16(0xb3baLL), MASK_RRF_U0RFE, INSTR_RRF_U0RFE, 3, 0, 0, "convert to fixed extended hfp to 32" }, + { "cfdr", OP16(0xb3b9LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 3, 0, 0, "convert to fixed long hfp to 32" }, + { "cfer", OP16(0xb3b8LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 3, 0, 0, "convert to fixed short hfp to 32" }, + { "cxfr", OP16(0xb3b6LL), MASK_RRE_FER, INSTR_RRE_FER, 3, 0, 0, "convert from fixed 32 to extended hfp" }, + { "cdfr", OP16(0xb3b5LL), MASK_RRE_FR, INSTR_RRE_FR, 3, 0, 0, "convert from fixed 32 to long hfp" }, + { "cefr", OP16(0xb3b4LL), MASK_RRE_FR, INSTR_RRE_FR, 3, 0, 0, "convert from fixed 32 to short hfp" }, + { "clgxbr", OP16(0xb3aeLL), MASK_RRF_UURFE, INSTR_RRF_UURFE, 2, 7, 0, "convert to 64 bit fixed logical from extended bfp with rounding mode" }, + { "clgdbr", OP16(0xb3adLL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 64 bit fixed logical from long bfp with rounding mode" }, + { "clgebr", OP16(0xb3acLL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 64 bit fixed logical from short bfp with rounding mode" }, + { "cgxbra", OP16(0xb3aaLL), MASK_RRF_UURFE, INSTR_RRF_UURFE, 2, 7, 0, "convert to 64 bit fixed from extended bfp with rounding mode" }, + { "cgxbr", OP16(0xb3aaLL), MASK_RRF_U0RFE, INSTR_RRF_U0RFE, 2, 2, 0, "convert to fixed extended bfp to 64" }, + { "cgdbra", OP16(0xb3a9LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 64 bit fixed from long bfp with rounding mode" }, + { "cgdbr", OP16(0xb3a9LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 2, 2, 0, "convert to fixed long bfp to 64" }, + { "cgebra", OP16(0xb3a8LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 64 bit fixed from short bfp with rounding mode" }, + { "cgebr", OP16(0xb3a8LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 2, 2, 0, "convert to fixed short bfd to 64" }, + { "cxgbra", OP16(0xb3a6LL), MASK_RRF_UUFER, INSTR_RRF_UUFER, 2, 7, 0, "convert from 64 bit fixed to extended bfp with rounding mode" }, + { "cxgbr", OP16(0xb3a6LL), MASK_RRE_FER, INSTR_RRE_FER, 2, 2, 0, "convert from fixed 64 to extended bfp" }, + { "cdgbra", OP16(0xb3a5LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 64 bit fixed to long bfp with rounding mode" }, + { "cdgbr", OP16(0xb3a5LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 2, 0, "convert from fixed 64 to long bfp" }, + { "cegbra", OP16(0xb3a4LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 64 bit fixed to short bfp with rounding mode" }, + { "cegbr", OP16(0xb3a4LL), MASK_RRE_FR, INSTR_RRE_FR, 2, 2, 0, "convert from fixed 64 to short bfp" }, + { "cxlgbr", OP16(0xb3a2LL), MASK_RRF_UUFER, INSTR_RRF_UUFER, 2, 7, 0, "convert from 64 bit logical fixed to extended bfp with rounding mode" }, + { "cdlgbr", OP16(0xb3a1LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 64 bit logical fixed to long bfp with rounding mode" }, + { "celgbr", OP16(0xb3a0LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 64 bit logical fixed to short bfp with rounding mode" }, + { "clfxbr", OP16(0xb39eLL), MASK_RRF_UURFE, INSTR_RRF_UURFE, 2, 7, 0, "convert to 32 bit fixed logical from extended bfp with rounding mode" }, + { "clfdbr", OP16(0xb39dLL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 32 bit fixed logical from long bfp with rounding mode" }, + { "clfebr", OP16(0xb39cLL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 32 bit fixed logical from short bfp with rounding mode" }, + { "cfxbra", OP16(0xb39aLL), MASK_RRF_UURFE, INSTR_RRF_UURFE, 2, 7, 0, "convert to 32 bit fixed from extended bfp with rounding mode" }, + { "cfxbr", OP16(0xb39aLL), MASK_RRF_U0RFE, INSTR_RRF_U0RFE, 3, 0, 0, "convert to fixed extended bfp to 32" }, + { "cfdbra", OP16(0xb399LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 32 bit fixed from long bfp with rounding mode" }, + { "cfdbr", OP16(0xb399LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 3, 0, 0, "convert to fixed long bfp to 32" }, + { "cfebra", OP16(0xb398LL), MASK_RRF_UURF, INSTR_RRF_UURF, 2, 7, 0, "convert to 32 bit fixed from short bfp with rounding mode" }, + { "cfebr", OP16(0xb398LL), MASK_RRF_U0RF, INSTR_RRF_U0RF, 3, 0, 0, "convert to fixed short bfp to 32" }, + { "cxfbra", OP16(0xb396LL), MASK_RRF_UUFER, INSTR_RRF_UUFER, 2, 7, 0, "convert from 32 bit fixed to extended bfp with rounding mode" }, + { "cxfbr", OP16(0xb396LL), MASK_RRE_FER, INSTR_RRE_FER, 3, 0, 0, "convert from fixed 32 to extended bfp" }, + { "cdfbra", OP16(0xb395LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 32 bit fixed to long bfp with rounding mode" }, + { "cdfbr", OP16(0xb395LL), MASK_RRE_FR, INSTR_RRE_FR, 3, 0, 0, "convert from fixed 32 to long bfp" }, + { "cefbra", OP16(0xb394LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 32 bit fixed to short bfp with rounding mode" }, + { "cefbr", OP16(0xb394LL), MASK_RRE_FR, INSTR_RRE_FR, 3, 0, 0, "convert from fixed 32 to short bfp" }, + { "cxlfbr", OP16(0xb392LL), MASK_RRF_UUFER, INSTR_RRF_UUFER, 2, 7, 0, "convert from 32 bit logical fixed to extended bfp with rounding mode" }, + { "cdlfbr", OP16(0xb391LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 32 bit logical fixed to long bfp with rounding mode" }, + { "celfbr", OP16(0xb390LL), MASK_RRF_UUFR, INSTR_RRF_UUFR, 2, 7, 0, "convert from 32 bit logical fixed to short bfp with rounding mode" }, + { "efpc", OP16(0xb38cLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 1, "extract fpc" }, + { "sfasr", OP16(0xb385LL), MASK_RRE_R0, INSTR_RRE_R0, 2, 5, 0, "set fpc and signal" }, + { "sfpc", OP16(0xb384LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 1, "set fpc" }, + { "fidr", OP16(0xb37fLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load fp integer long hfp" }, + { "fier", OP16(0xb377LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load fp integer short hfp" }, + { "lzxr", OP16(0xb376LL), MASK_RRE_FE0, INSTR_RRE_FE0, 3, 0, 0, "load extended zero" }, + { "lzdr", OP16(0xb375LL), MASK_RRE_F0, INSTR_RRE_F0, 3, 0, 0, "load long zero" }, + { "lzer", OP16(0xb374LL), MASK_RRE_F0, INSTR_RRE_F0, 3, 0, 0, "load short zero" }, + { "lcdfr", OP16(0xb373LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "load complement no cc" }, + { "cpsdr", OP16(0xb372LL), MASK_RRF_F0FF2, INSTR_RRF_F0FF2, 2, 5, 0, "copy sign" }, + { "lndfr", OP16(0xb371LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "load negative no cc" }, + { "lpdfr", OP16(0xb370LL), MASK_RRE_FF, INSTR_RRE_FF, 2, 5, 0, "load positive no cc" }, + { "cxr", OP16(0xb369LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "compare extended hfp" }, + { "fixr", OP16(0xb367LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load fp integer extended hfp" }, + { "lexr", OP16(0xb366LL), MASK_RRE_FFE, INSTR_RRE_FFE, 3, 0, 0, "load rounded extended to short hfp" }, + { "lxr", OP16(0xb365LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load extended fp" }, + { "lcxr", OP16(0xb363LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load complement extended hfp" }, + { "ltxr", OP16(0xb362LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load and test extended hfp" }, + { "lnxr", OP16(0xb361LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load negative extended hfp" }, + { "lpxr", OP16(0xb360LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load positive extended hfp" }, + { "fidbra", OP16(0xb35fLL), MASK_RRF_UUFF, INSTR_RRF_UUFF, 2, 7, 0, "load fp integer long bfp with inexact suppression" }, + { "fidbr", OP16(0xb35fLL), MASK_RRF_U0FF, INSTR_RRF_U0FF, 3, 0, 0, "load fp integer long bfp" }, + { "didbr", OP16(0xb35bLL), MASK_RRF_FUFF, INSTR_RRF_FUFF, 3, 0, 0, "divide to integer long bfp" }, + { "thdr", OP16(0xb359LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "convert long bfp to long hfp" }, + { "thder", OP16(0xb358LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "convert short bfp to long hfp" }, + { "fiebra", OP16(0xb357LL), MASK_RRF_UUFF, INSTR_RRF_UUFF, 2, 7, 0, "load fp integer short bfp with inexact suppression" }, + { "fiebr", OP16(0xb357LL), MASK_RRF_U0FF, INSTR_RRF_U0FF, 3, 0, 0, "load fp integer short bfp" }, + { "diebr", OP16(0xb353LL), MASK_RRF_FUFF, INSTR_RRF_FUFF, 3, 0, 0, "divide to integer short bfp" }, + { "tbdr", OP16(0xb351LL), MASK_RRF_U0FF, INSTR_RRF_U0FF, 3, 0, 0, "convert long hfp to long bfp" }, + { "tbedr", OP16(0xb350LL), MASK_RRF_U0FF, INSTR_RRF_U0FF, 3, 0, 0, "convert long hfp to short bfp" }, + { "dxbr", OP16(0xb34dLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "divide extended bfp" }, + { "mxbr", OP16(0xb34cLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "multiply extended bfp" }, + { "sxbr", OP16(0xb34bLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "subtract extended bfp" }, + { "axbr", OP16(0xb34aLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "add extended bfp" }, + { "cxbr", OP16(0xb349LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "compare extended bfp" }, + { "kxbr", OP16(0xb348LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "compare and signal extended bfp" }, + { "fixbra", OP16(0xb347LL), MASK_RRF_UUFEFE, INSTR_RRF_UUFEFE, 2, 7, 0, "load fp integer extended bfp with inexact suppression" }, + { "fixbr", OP16(0xb347LL), MASK_RRF_U0FEFE, INSTR_RRF_U0FEFE, 3, 0, 0, "load fp integer extended bfp" }, + { "lexbra", OP16(0xb346LL), MASK_RRF_UUFEFE, INSTR_RRF_UUFEFE, 2, 7, 0, "load rounded short/extended bfp to short/extended bfp with rounding mode" }, + { "lexbr", OP16(0xb346LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load rounded extended to short bfp" }, + { "ldxbra", OP16(0xb345LL), MASK_RRF_UUFEFE, INSTR_RRF_UUFEFE, 2, 7, 0, "load rounded long/extended bfp to long/extended bfp with rounding mode" }, + { "ldxbr", OP16(0xb345LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load rounded extended to long bfp" }, + { "ledbra", OP16(0xb344LL), MASK_RRF_UUFF, INSTR_RRF_UUFF, 2, 7, 0, "load rounded short/long bfp to short/long bfp with rounding mode" }, + { "ledbr", OP16(0xb344LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load rounded long to short bfp" }, + { "lcxbr", OP16(0xb343LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load complement extended bfp" }, + { "ltxbr", OP16(0xb342LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load and test extended bfp" }, + { "lnxbr", OP16(0xb341LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load negative extended bfp" }, + { "lpxbr", OP16(0xb340LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "load positive extended bfp" }, + { "msdr", OP16(0xb33fLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 3, 0, "multiply and subtract long hfp" }, + { "madr", OP16(0xb33eLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 3, 0, "multiply and add long hfp" }, + { "myhr", OP16(0xb33dLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 2, 4, 0, "multiply unnormalized long hfp high" }, + { "mayhr", OP16(0xb33cLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 2, 4, 0, "multiply and add unnormalized long hfp high" }, + { "myr", OP16(0xb33bLL), MASK_RRF_FE0FF, INSTR_RRF_FE0FF, 2, 4, 0, "multiply unnormalized long hfp" }, + { "mayr", OP16(0xb33aLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 2, 4, 0, "multiply and add unnormalized long hfp" }, + { "mylr", OP16(0xb339LL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 2, 4, 0, "multiply unnormalized long hfp low" }, + { "maylr", OP16(0xb338LL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 2, 4, 0, "multiply and add unnormalized long hfp low" }, + { "meer", OP16(0xb337LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "multiply short hfp" }, + { "sqxr", OP16(0xb336LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "square root extended hfp" }, + { "mser", OP16(0xb32fLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 3, 0, "mutliply and subtract short hfp" }, + { "maer", OP16(0xb32eLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 3, 0, "multiply and add short hfp" }, + { "lxer", OP16(0xb326LL), MASK_RRE_FEF, INSTR_RRE_FEF, 3, 0, 0, "load lengthened short to extended hfp" }, + { "lxdr", OP16(0xb325LL), MASK_RRE_FEF, INSTR_RRE_FEF, 3, 0, 0, "load lengthened long to extended hfp" }, + { "lder", OP16(0xb324LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load lengthened short to long hfp" }, + { "msdbr", OP16(0xb31fLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 0, 0, "multiply and subtract long bfp" }, + { "madbr", OP16(0xb31eLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 0, 0, "multiply and add long bfp" }, + { "ddbr", OP16(0xb31dLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "divide long bfp" }, + { "mdbr", OP16(0xb31cLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "multiply long bfp" }, + { "sdbr", OP16(0xb31bLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "subtract long bfp" }, + { "adbr", OP16(0xb31aLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "add long bfp" }, + { "cdbr", OP16(0xb319LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "compare long bfp" }, + { "kdbr", OP16(0xb318LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "compare and signal long bfp" }, + { "meebr", OP16(0xb317LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "multiply short bfp" }, + { "sqxbr", OP16(0xb316LL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "square root extended bfp" }, + { "sqdbr", OP16(0xb315LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "square root long bfp" }, + { "sqebr", OP16(0xb314LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "square root short bfp" }, + { "lcdbr", OP16(0xb313LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load complement long bfp" }, + { "ltdbr", OP16(0xb312LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load and test long bfp" }, + { "lndbr", OP16(0xb311LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load negative long bfp" }, + { "lpdbr", OP16(0xb310LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load positive long bfp" }, + { "msebr", OP16(0xb30fLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 0, 0, "multiply and subtract short bfp" }, + { "maebr", OP16(0xb30eLL), MASK_RRF_F0FF, INSTR_RRF_F0FF, 3, 0, 0, "multiply and add short bfp" }, + { "debr", OP16(0xb30dLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "divide short bfp" }, + { "mdebr", OP16(0xb30cLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "multiply short to long bfp" }, + { "sebr", OP16(0xb30bLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "subtract short bfp" }, + { "aebr", OP16(0xb30aLL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "add short bfp" }, + { "cebr", OP16(0xb309LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "compare short bfp" }, + { "kebr", OP16(0xb308LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "compare and signal short bfp" }, + { "mxdbr", OP16(0xb307LL), MASK_RRE_FEF, INSTR_RRE_FEF, 3, 0, 0, "multiply long to extended bfp" }, + { "lxebr", OP16(0xb306LL), MASK_RRE_FEF, INSTR_RRE_FEF, 3, 0, 0, "load lengthened short to extended bfp" }, + { "lxdbr", OP16(0xb305LL), MASK_RRE_FEF, INSTR_RRE_FEF, 3, 0, 0, "load lengthened long to extended bfp" }, + { "ldebr", OP16(0xb304LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load lengthened short to long bfp" }, + { "lcebr", OP16(0xb303LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load complement short bfp" }, + { "ltebr", OP16(0xb302LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load and test short bfp" }, + { "lnebr", OP16(0xb301LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load negative short bfp" }, + { "lpebr", OP16(0xb300LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "load positive short bfp" }, + { "trap4", OP16(0xb2ffLL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "trap4" }, + { "tabort", OP16(0xb2fcLL), MASK_S_RD, INSTR_S_RD, 2, 8, 4, "transaction abort" }, + { "niai", OP16(0xb2faLL), MASK_IE_UU, INSTR_IE_UU, 2, 8, 0, "next instruction access intent" }, + { "tend", OP16(0xb2f8LL), MASK_S_00, INSTR_S_00, 2, 8, 4, "transaction end" }, + { "ecpga", OP16(0xb2edLL), MASK_RRE_RR, INSTR_RRE_RR, 2, 6, 0, "extract coprocessor-group address" }, + { "etnd", OP16(0xb2ecLL), MASK_RRE_R0, INSTR_RRE_R0, 2, 8, 4, "extract transaction nesting depth" }, + { "ppa", OP16(0xb2e8LL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 8, 4, "perform processor assist" }, + { "epctr", OP16(0xb2e5LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 6, 0, "extract peripheral counter" }, + { "ecctr", OP16(0xb2e4LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 6, 0, "extract cpu counter" }, + { "spctr", OP16(0xb2e1LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 6, 0, "set peripheral counter" }, + { "scctr", OP16(0xb2e0LL), MASK_RRE_RR, INSTR_RRE_RR, 2, 6, 0, "set cpu counter" }, + { "lfas", OP16(0xb2bdLL), MASK_S_RD, INSTR_S_RD, 2, 5, 0, "load fpd and signal" }, + { "srnmt", OP16(0xb2b9LL), MASK_S_RD, INSTR_S_RD, 2, 5, 0, "set rounding mode dfp" }, + { "srnmb", OP16(0xb2b8LL), MASK_S_RD, INSTR_S_RD, 2, 7, 0, "set 3 bit bfp rounding mode" }, + { "lpswe", OP16(0xb2b2LL), MASK_S_RD, INSTR_S_RD, 2, 2, 0, "load psw extended" }, + { "stfl", OP16(0xb2b1LL), MASK_S_RD, INSTR_S_RD, 3, 2, 0, "store facility list" }, + { "stfle", OP16(0xb2b0LL), MASK_S_RD, INSTR_S_RD, 2, 4, 0, "store facility list extended" }, + { "cu12", OP16(0xb2a7LL), MASK_RRF_U0RERE, INSTR_RRF_U0RERE, 2, 4, 1, "convert utf-8 to utf-16" }, + { "cutfu", OP16(0xb2a7LL), MASK_RRF_U0RERE, INSTR_RRF_U0RERE, 2, 4, 1, "convert utf-8 to unicode" }, + { "cutfu", OP16(0xb2a7LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "convert utf-8 to unicode" }, + { "cu21", OP16(0xb2a6LL), MASK_RRF_U0RERE, INSTR_RRF_U0RERE, 2, 4, 1, "convert utf-16 to utf-8" }, + { "cuutf", OP16(0xb2a6LL), MASK_RRF_U0RERE, INSTR_RRF_U0RERE, 2, 4, 1, "convert unicode to utf-8" }, + { "cuutf", OP16(0xb2a6LL), MASK_RRE_RERE, INSTR_RRE_RERE, 3, 0, 0, "convert unicode to utf-8" }, + { "tre", OP16(0xb2a5LL), MASK_RRE_RER, INSTR_RRE_RER, 3, 0, 0, "translate extended" }, + { "lfpc", OP16(0xb29dLL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "load fpc" }, + { "stfpc", OP16(0xb29cLL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store fpc" }, + { "srnm", OP16(0xb299LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set rounding mode" }, + { "qpaci", OP16(0xb28fLL), MASK_S_RD, INSTR_S_RD, 2, 12, 0, "query processor activity counter information" }, + { "qctri", OP16(0xb28eLL), MASK_S_RD, INSTR_S_RD, 2, 6, 0, "query counter information" }, + { "lsctl", OP16(0xb287LL), MASK_S_RD, INSTR_S_RD, 2, 6, 0, "load sampling controls" }, + { "qsi", OP16(0xb286LL), MASK_S_RD, INSTR_S_RD, 2, 6, 0, "query sampling information" }, + { "lpctl", OP16(0xb285LL), MASK_S_RD, INSTR_S_RD, 2, 6, 0, "load peripheral-counter-set controls" }, + { "lcctl", OP16(0xb284LL), MASK_S_RD, INSTR_S_RD, 2, 6, 0, "load cpu-counter-set controls" }, + { "lpp", OP16(0xb280LL), MASK_S_RD, INSTR_S_RD, 2, 6, 0, "load program parameter" }, + { "stsi", OP16(0xb27dLL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store system information" }, + { "stckf", OP16(0xb27cLL), MASK_S_RD, INSTR_S_RD, 2, 4, 0, "store clock fast" }, + { "sacf", OP16(0xb279LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set address space control fast" }, + { "stcke", OP16(0xb278LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store clock extended" }, + { "rp", OP16(0xb277LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "resume program" }, + { "xsch", OP16(0xb276LL), MASK_S_00, INSTR_S_00, 3, 0, 0, "cancel subchannel" }, + { "siga", OP16(0xb274LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "signal adapter" }, + { "cmpsc", OP16(0xb263LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "compression call" }, + { "srst", OP16(0xb25eLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "search string" }, + { "clst", OP16(0xb25dLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "compare logical string" }, + { "bsa", OP16(0xb25aLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "branch and set authority" }, + { "bsg", OP16(0xb258LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "branch in subspace group" }, + { "cuse", OP16(0xb257LL), MASK_RRE_RERE, INSTR_RRE_RERE, 3, 0, 0, "compare until substring equal" }, + { "mvst", OP16(0xb255LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "move string" }, + { "mvpg", OP16(0xb254LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "move page" }, + { "msr", OP16(0xb252LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "multiply single" }, + { "csp", OP16(0xb250LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "compare and swap and purge" }, + { "ear", OP16(0xb24fLL), MASK_RRE_RA, INSTR_RRE_RA, 3, 0, 0, "extract access" }, + { "sar", OP16(0xb24eLL), MASK_RRE_AR, INSTR_RRE_AR, 3, 0, 0, "set access" }, + { "cpya", OP16(0xb24dLL), MASK_RRE_AA, INSTR_RRE_AA, 3, 0, 0, "copy access" }, + { "tar", OP16(0xb24cLL), MASK_RRE_AR, INSTR_RRE_AR, 3, 0, 0, "test access" }, + { "lura", OP16(0xb24bLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "load using real address" }, + { "esta", OP16(0xb24aLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "extract stacked state" }, + { "ereg", OP16(0xb249LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "extract stacked registers" }, + { "palb", OP16(0xb248LL), MASK_RRE_00, INSTR_RRE_00, 3, 0, 0, "purge ALB" }, + { "msta", OP16(0xb247LL), MASK_RRE_R0, INSTR_RRE_R0, 3, 0, 0, "modify stacked state" }, + { "stura", OP16(0xb246LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "store using real address" }, + { "sqer", OP16(0xb245LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "square root (short)" }, + { "sqdr", OP16(0xb244LL), MASK_RRE_FF, INSTR_RRE_FF, 3, 0, 0, "square root (long)" }, + { "cksm", OP16(0xb241LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "checksum" }, + { "bakr", OP16(0xb240LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "branch and stack" }, + { "schm", OP16(0xb23cLL), MASK_S_00, INSTR_S_00, 3, 0, 0, "set channel monitor" }, + { "rchp", OP16(0xb23bLL), MASK_S_00, INSTR_S_00, 3, 0, 0, "reset channel path" }, + { "stcps", OP16(0xb23aLL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store channel path status" }, + { "stcrw", OP16(0xb239LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store channel report word" }, + { "rsch", OP16(0xb238LL), MASK_S_00, INSTR_S_00, 3, 0, 0, "resume subchannel" }, + { "sal", OP16(0xb237LL), MASK_S_00, INSTR_S_00, 3, 0, 0, "set address limit" }, + { "tpi", OP16(0xb236LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "test pending interruption" }, + { "tsch", OP16(0xb235LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "test subchannel" }, + { "stsch", OP16(0xb234LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store subchannel" }, + { "ssch", OP16(0xb233LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "start subchannel" }, + { "msch", OP16(0xb232LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "modify subchannel" }, + { "hsch", OP16(0xb231LL), MASK_S_00, INSTR_S_00, 3, 0, 0, "halt subchannel" }, + { "csch", OP16(0xb230LL), MASK_S_00, INSTR_S_00, 3, 0, 0, "clear subchannel" }, + { "pgout", OP16(0xb22fLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "page out" }, + { "pgin", OP16(0xb22eLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "page in" }, + { "dxr", OP16(0xb22dLL), MASK_RRE_FEFE, INSTR_RRE_FEFE, 3, 0, 0, "divide (ext.)" }, + { "tb", OP16(0xb22cLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "test block" }, + { "sske", OP16(0xb22bLL), MASK_RRF_U0RR, INSTR_RRF_U0RR, 2, 4, 1, "set storage key extended" }, + { "sske", OP16(0xb22bLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "set storage key extended" }, + { "rrbe", OP16(0xb22aLL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "reset reference bit extended" }, + { "iske", OP16(0xb229LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "insert storage key extended" }, + { "pt", OP16(0xb228LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "program transfer" }, + { "esar", OP16(0xb227LL), MASK_RRE_R0, INSTR_RRE_R0, 3, 0, 0, "extract secondary ASN" }, + { "epar", OP16(0xb226LL), MASK_RRE_R0, INSTR_RRE_R0, 3, 0, 0, "extract primary ASN" }, + { "ssar", OP16(0xb225LL), MASK_RRE_R0, INSTR_RRE_R0, 3, 0, 0, "set secondary ASN" }, + { "iac", OP16(0xb224LL), MASK_RRE_R0, INSTR_RRE_R0, 3, 0, 0, "insert address space control" }, + { "ivsk", OP16(0xb223LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 0, "insert virtual storage key" }, + { "ipm", OP16(0xb222LL), MASK_RRE_R0, INSTR_RRE_R0, 3, 0, 0, "insert program mask" }, + { "ipte", OP16(0xb221LL), MASK_RRF_RURR, INSTR_RRF_RURR, 3, 0, 2, "invalidate page table entry" }, + { "cfc", OP16(0xb21aLL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "compare and form codeword" }, + { "sac", OP16(0xb219LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set address space control" }, + { "pc", OP16(0xb218LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "program call" }, + { "sie", OP16(0xb214LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "start interpretive execution" }, + { "stap", OP16(0xb212LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store CPU address" }, + { "stpx", OP16(0xb211LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store prefix" }, + { "spx", OP16(0xb210LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set prefix" }, + { "ptlb", OP16(0xb20dLL), MASK_S_00, INSTR_S_00, 3, 0, 0, "purge TLB" }, + { "ipk", OP16(0xb20bLL), MASK_S_00, INSTR_S_00, 3, 0, 0, "insert PSW key" }, + { "spka", OP16(0xb20aLL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set PSW key from address" }, + { "stpt", OP16(0xb209LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store CPU timer" }, + { "spt", OP16(0xb208LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set CPU timer" }, + { "stckc", OP16(0xb207LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store clock comparator" }, + { "sckc", OP16(0xb206LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set clock comparator" }, + { "stck", OP16(0xb205LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store clock" }, + { "sck", OP16(0xb204LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "set clock" }, + { "stidp", OP16(0xb202LL), MASK_S_RD, INSTR_S_RD, 3, 0, 0, "store CPU id" }, + { "stbear", OP16(0xb201LL), MASK_S_RD, INSTR_S_RD, 2, 12, 0, "store bear" }, + { "lbear", OP16(0xb200LL), MASK_S_RD, INSTR_S_RD, 2, 12, 0, "load bear" }, + { "lra", OP8(0xb1LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "load real address" }, + { "mc", OP16(0xaf00LL), MASK_SI_URD, INSTR_SI_URD, 2, 6, 0, "monitor call" }, + { "mc", OP8(0xafLL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "monitor call" }, + { "sigp", OP8(0xaeLL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "signal processor" }, + { "stosm", OP8(0xadLL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "store then or system mask" }, + { "stnsm", OP8(0xacLL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "store then and system mask" }, + { "clcle", OP8(0xa9LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "compare logical long extended" }, + { "mvcle", OP8(0xa8LL), MASK_RS_RERERD, INSTR_RS_RERERD, 3, 0, 0, "move long extended" }, + { "j", OP16(0xa7f4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 48, "unconditional jump" }, + { "bru", OP16(0xa7f4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 48, "unconditional jump" }, + { "jno", OP16(0xa7e4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not overflow / if not ones" }, + { "brno", OP16(0xa7e4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not overflow / if not ones" }, + { "jnh", OP16(0xa7d4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A not high" }, + { "jnp", OP16(0xa7d4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not plus" }, + { "brnh", OP16(0xa7d4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A not high" }, + { "brnp", OP16(0xa7d4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not plus" }, + { "jle", OP16(0xa7c4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on low or equal" }, + { "brle", OP16(0xa7c4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on low or equal" }, + { "jnl", OP16(0xa7b4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A not low" }, + { "jnm", OP16(0xa7b4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not minus / if not mixed" }, + { "brnl", OP16(0xa7b4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A not low" }, + { "brnm", OP16(0xa7b4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not minus / if not mixed" }, + { "jhe", OP16(0xa7a4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on high or equal" }, + { "brhe", OP16(0xa7a4LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on high or equal" }, + { "jnlh", OP16(0xa794LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not low or high" }, + { "brnlh", OP16(0xa794LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not low or high" }, + { "je", OP16(0xa784LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A equal B" }, + { "jz", OP16(0xa784LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on zero / if zeros" }, + { "bre", OP16(0xa784LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A equal B" }, + { "brz", OP16(0xa784LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on zero / if zeros" }, + { "jne", OP16(0xa774LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A not equal B" }, + { "jnz", OP16(0xa774LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not zero / if not zeros" }, + { "brne", OP16(0xa774LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A not equal B" }, + { "brnz", OP16(0xa774LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not zero / if not zeros" }, + { "jlh", OP16(0xa764LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on low or high" }, + { "brlh", OP16(0xa764LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on low or high" }, + { "jnhe", OP16(0xa754LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not high or equal" }, + { "brnhe", OP16(0xa754LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not high or equal" }, + { "jl", OP16(0xa744LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A low" }, + { "jm", OP16(0xa744LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on minus / if mixed" }, + { "brl", OP16(0xa744LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A low" }, + { "brm", OP16(0xa744LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on minus / if mixed" }, + { "jnle", OP16(0xa734LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not low or equal" }, + { "brnle", OP16(0xa734LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on not low or equal" }, + { "jh", OP16(0xa724LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A high" }, + { "jp", OP16(0xa724LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on plus" }, + { "brh", OP16(0xa724LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on A high" }, + { "brp", OP16(0xa724LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on plus" }, + { "jo", OP16(0xa714LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on overflow / if ones" }, + { "bro", OP16(0xa714LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 112, "conditional jump on overflow / if ones" }, + { "cghi", OP16(0xa70fLL), MASK_RI_RI, INSTR_RI_RI, 2, 2, 0, "compare halfword immediate 64" }, + { "chi", OP16(0xa70eLL), MASK_RI_RI, INSTR_RI_RI, 3, 0, 0, "compare halfword immediate" }, + { "mghi", OP16(0xa70dLL), MASK_RI_RI, INSTR_RI_RI, 2, 2, 0, "multiply halfword immediate 64" }, + { "mhi", OP16(0xa70cLL), MASK_RI_RI, INSTR_RI_RI, 3, 0, 0, "multiply halfword immediate" }, + { "aghi", OP16(0xa70bLL), MASK_RI_RI, INSTR_RI_RI, 2, 2, 0, "add halfword immediate 64" }, + { "ahi", OP16(0xa70aLL), MASK_RI_RI, INSTR_RI_RI, 3, 0, 0, "add halfword immediate" }, + { "lghi", OP16(0xa709LL), MASK_RI_RI, INSTR_RI_RI, 2, 2, 0, "load halfword immediate 64" }, + { "lhi", OP16(0xa708LL), MASK_RI_RI, INSTR_RI_RI, 3, 0, 0, "load halfword immediate" }, + { "brctg", OP16(0xa707LL), MASK_RI_RP, INSTR_RI_RP, 2, 2, 112, "branch relative on count 64" }, + { "jctg", OP16(0xa707LL), MASK_RI_RP, INSTR_RI_RP, 2, 2, 112, "branch relative on count 64" }, + { "brct", OP16(0xa706LL), MASK_RI_RP, INSTR_RI_RP, 3, 0, 112, "branch relative on count" }, + { "jct", OP16(0xa706LL), MASK_RI_RP, INSTR_RI_RP, 3, 0, 112, "branch relative on count" }, + { "bras", OP16(0xa705LL), MASK_RI_RP, INSTR_RI_RP, 3, 0, 176, "branch relative and save" }, + { "jas", OP16(0xa705LL), MASK_RI_RP, INSTR_RI_RP, 3, 0, 176, "branch relative and save" }, + { "brc", OP16(0xa704LL), MASK_RI_UP, INSTR_RI_UP, 3, 0, 112, "branch relative on condition" }, + { "jc", OP16(0xa704LL), MASK_RI_UP, INSTR_RI_UP, 3, 0, 112, "conditional jump" }, + { "jnop", OP16(0xa704LL), MASK_RI_0P, INSTR_RI_0P, 3, 0, 0, "nop jump" }, + { "tmhl", OP16(0xa703LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "test under mask high low" }, + { "tmhh", OP16(0xa702LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "test under mask high high" }, + { "tmll", OP16(0xa701LL), MASK_RI_RU, INSTR_RI_RU, 3, 0, 0, "test under mask low low" }, + { "tml", OP16(0xa701LL), MASK_RI_RU, INSTR_RI_RU, 3, 0, 0, "test under mask low" }, + { "tmlh", OP16(0xa700LL), MASK_RI_RU, INSTR_RI_RU, 3, 0, 0, "test under mask low high" }, + { "tmh", OP16(0xa700LL), MASK_RI_RU, INSTR_RI_RU, 3, 0, 0, "test under mask high" }, + { "llill", OP16(0xa50fLL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "load logical immediate low low" }, + { "llghi", OP16(0xa50fLL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "load logical immediate" }, + { "llilh", OP16(0xa50eLL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "load logical immediate low high" }, + { "llihl", OP16(0xa50dLL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "load logical immediate high low" }, + { "llihh", OP16(0xa50cLL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "load logical immediate high high" }, + { "oill", OP16(0xa50bLL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "or immediate low low" }, + { "oilh", OP16(0xa50aLL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "or immediate low high" }, + { "oihl", OP16(0xa509LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "or immediate high low" }, + { "oihh", OP16(0xa508LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "or immediate high high" }, + { "nill", OP16(0xa507LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "and immediate low low" }, + { "nilh", OP16(0xa506LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "and immediate low high" }, + { "nihl", OP16(0xa505LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "and immediate high low" }, + { "nihh", OP16(0xa504LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "and immediate high high" }, + { "iill", OP16(0xa503LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "insert immediate low low" }, + { "iilh", OP16(0xa502LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "insert immediate low high" }, + { "iihl", OP16(0xa501LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "insert immediate high low" }, + { "iihh", OP16(0xa500LL), MASK_RI_RU, INSTR_RI_RU, 2, 2, 0, "insert immediate high high" }, + { "stam", OP8(0x9bLL), MASK_RS_AARD, INSTR_RS_AARD, 3, 0, 0, "store access multiple" }, + { "lam", OP8(0x9aLL), MASK_RS_AARD, INSTR_RS_AARD, 3, 0, 0, "load access multiple" }, + { "trace", OP8(0x99LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "trace" }, + { "lm", OP8(0x98LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "load multiple" }, + { "xi", OP8(0x97LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "exclusive or" }, + { "oi", OP8(0x96LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "or" }, + { "cli", OP8(0x95LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "compare logical" }, + { "ni", OP8(0x94LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "and" }, + { "ts", OP8(0x93LL), MASK_SI_RD, INSTR_SI_RD, 3, 0, 0, "test and set" }, + { "mvi", OP8(0x92LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "move" }, + { "tm", OP8(0x91LL), MASK_SI_URD, INSTR_SI_URD, 3, 0, 0, "test under mask" }, + { "stm", OP8(0x90LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "store multiple" }, + { "slda", OP8(0x8fLL), MASK_RS_RE0RD, INSTR_RS_RE0RD, 3, 0, 0, "shift left double (long)" }, + { "srda", OP8(0x8eLL), MASK_RS_RE0RD, INSTR_RS_RE0RD, 3, 0, 0, "shift right double (long)" }, + { "sldl", OP8(0x8dLL), MASK_RS_RE0RD, INSTR_RS_RE0RD, 3, 0, 0, "shift left double logical (long)" }, + { "srdl", OP8(0x8cLL), MASK_RS_RE0RD, INSTR_RS_RE0RD, 3, 0, 0, "shift right double logical (long)" }, + { "sla", OP8(0x8bLL), MASK_RS_R0RD, INSTR_RS_R0RD, 3, 0, 0, "shift left single" }, + { "sra", OP8(0x8aLL), MASK_RS_R0RD, INSTR_RS_R0RD, 3, 0, 0, "shift right single" }, + { "sll", OP8(0x89LL), MASK_RS_R0RD, INSTR_RS_R0RD, 3, 0, 0, "shift left single logical" }, + { "srl", OP8(0x88LL), MASK_RS_R0RD, INSTR_RS_R0RD, 3, 0, 0, "shift right single logical" }, + { "bxle", OP8(0x87LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "branch on index low or equal" }, + { "bxh", OP8(0x86LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "branch on index high" }, + { "brxle", OP8(0x85LL), MASK_RSI_RRP, INSTR_RSI_RRP, 3, 0, 112, "branch relative on index low or equal" }, + { "jxle", OP8(0x85LL), MASK_RSI_RRP, INSTR_RSI_RRP, 3, 0, 112, "branch relative on index low or equal" }, + { "brxh", OP8(0x84LL), MASK_RSI_RRP, INSTR_RSI_RRP, 3, 0, 112, "branch relative on index high" }, + { "jxh", OP8(0x84LL), MASK_RSI_RRP, INSTR_RSI_RRP, 3, 0, 112, "branch relative on index high" }, + { "diag", OP8(0x83LL), MASK_RS_RRRD, INSTR_RS_RRRD, 3, 0, 0, "diagnose" }, + { "lpsw", OP8(0x82LL), MASK_SI_RD, INSTR_SI_RD, 3, 0, 0, "load PSW" }, + { "ssm", OP8(0x80LL), MASK_SI_RD, INSTR_SI_RD, 3, 0, 0, "set system mask" }, + { "su", OP8(0x7fLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "subtract unnormalized (short)" }, + { "au", OP8(0x7eLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "add unnormalized (short)" }, + { "de", OP8(0x7dLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "divide (short)" }, + { "mde", OP8(0x7cLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "multiply (short to long)" }, + { "me", OP8(0x7cLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "multiply (short to long)" }, + { "se", OP8(0x7bLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "subtract normalized (short)" }, + { "ae", OP8(0x7aLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "add normalized (short)" }, + { "ce", OP8(0x79LL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "compare (short)" }, + { "le", OP8(0x78LL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "load (short)" }, + { "ms", OP8(0x71LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "multiply single" }, + { "ste", OP8(0x70LL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "store (short)" }, + { "sw", OP8(0x6fLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "subtract unnormalized (long)" }, + { "aw", OP8(0x6eLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "add unnormalized (long)" }, + { "dd", OP8(0x6dLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "divide (long)" }, + { "md", OP8(0x6cLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "multiply (long)" }, + { "sd", OP8(0x6bLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "subtract normalized (long)" }, + { "ad", OP8(0x6aLL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "add normalized (long)" }, + { "cd", OP8(0x69LL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "compare (long)" }, + { "ld", OP8(0x68LL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "load (long)" }, + { "mxd", OP8(0x67LL), MASK_RX_FERRD, INSTR_RX_FERRD, 3, 0, 0, "multiply (long to ext.)" }, + { "std", OP8(0x60LL), MASK_RX_FRRD, INSTR_RX_FRRD, 3, 0, 0, "store (long)" }, + { "sl", OP8(0x5fLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "subtract logical" }, + { "al", OP8(0x5eLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "add logical" }, + { "d", OP8(0x5dLL), MASK_RX_RERRD, INSTR_RX_RERRD, 3, 0, 0, "divide" }, + { "m", OP8(0x5cLL), MASK_RX_RERRD, INSTR_RX_RERRD, 3, 0, 0, "multiply" }, + { "s", OP8(0x5bLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "subtract" }, + { "a", OP8(0x5aLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "add" }, + { "c", OP8(0x59LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "compare" }, + { "l", OP8(0x58LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "load" }, + { "x", OP8(0x57LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "exclusive or" }, + { "o", OP8(0x56LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "or" }, + { "cl", OP8(0x55LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "compare logical" }, + { "n", OP8(0x54LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "and" }, + { "lae", OP8(0x51LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "load address extended" }, + { "st", OP8(0x50LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "store" }, + { "cvb", OP8(0x4fLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "convert to binary" }, + { "cvd", OP8(0x4eLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "convert to decimal" }, + { "bas", OP8(0x4dLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "branch and save" }, + { "mh", OP8(0x4cLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "multiply halfword" }, + { "sh", OP8(0x4bLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "subtract halfword" }, + { "ah", OP8(0x4aLL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "add halfword" }, + { "ch", OP8(0x49LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "compare halfword" }, + { "lh", OP8(0x48LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "load halfword" }, + { "b", OP16(0x47f0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "unconditional branch" }, + { "bno", OP16(0x47e0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on not overflow / if not ones" }, + { "bnh", OP16(0x47d0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on A not high" }, + { "bnp", OP16(0x47d0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on not plus" }, + { "ble", OP16(0x47c0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on low or equal" }, + { "bnl", OP16(0x47b0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on A not low" }, + { "bnm", OP16(0x47b0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on not minus / if not mixed" }, + { "bhe", OP16(0x47a0LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on high or equal" }, + { "bnlh", OP16(0x4790LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on not low or high" }, + { "be", OP16(0x4780LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on A equal B" }, + { "bz", OP16(0x4780LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on zero / if zeros" }, + { "bne", OP16(0x4770LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on A not equal B" }, + { "bnz", OP16(0x4770LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on not zero / if not zeros" }, + { "blh", OP16(0x4760LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on low or high" }, + { "bnhe", OP16(0x4750LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on not high or equal" }, + { "bl", OP16(0x4740LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on A low" }, + { "bm", OP16(0x4740LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on minus / if mixed" }, + { "bnle", OP16(0x4730LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on not low or equal" }, + { "bh", OP16(0x4720LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on A high" }, + { "bp", OP16(0x4720LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on plus" }, + { "bo", OP16(0x4710LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 0, "conditional branch on overflow / if ones" }, + { "bc", OP8(0x47LL), MASK_RX_URRD, INSTR_RX_URRD, 3, 0, 0, "branch on condition" }, + { "nop", OP16(0x4700LL), MASK_RX_0RRD, INSTR_RX_0RRD, 3, 0, 1, "no operation" }, + { "bct", OP8(0x46LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "branch on count" }, + { "bal", OP8(0x45LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "branch and link" }, + { "ex", OP8(0x44LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "execute" }, + { "ic", OP8(0x43LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "insert character" }, + { "stc", OP8(0x42LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "store character" }, + { "la", OP8(0x41LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "load address" }, + { "sth", OP8(0x40LL), MASK_RX_RRRD, INSTR_RX_RRRD, 3, 0, 0, "store halfword" }, + { "sur", OP8(0x3fLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "subtract unnormalized (short)" }, + { "aur", OP8(0x3eLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "add unnormalized (short)" }, + { "der", OP8(0x3dLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "divide (short)" }, + { "mder", OP8(0x3cLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "multiply short to long hfp" }, + { "mer", OP8(0x3cLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "multiply (short to long)" }, + { "ser", OP8(0x3bLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "subtract normalized (short)" }, + { "aer", OP8(0x3aLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "add normalized (short)" }, + { "cer", OP8(0x39LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "compare (short)" }, + { "ler", OP8(0x38LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load (short)" }, + { "sxr", OP8(0x37LL), MASK_RR_FEFE, INSTR_RR_FEFE, 3, 0, 0, "subtract normalized (ext.)" }, + { "axr", OP8(0x36LL), MASK_RR_FEFE, INSTR_RR_FEFE, 3, 0, 0, "add normalized" }, + { "ledr", OP8(0x35LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load rounded (long to short)" }, + { "lrer", OP8(0x35LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load rounded (long to short)" }, + { "her", OP8(0x34LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "halve (short)" }, + { "lcer", OP8(0x33LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load complement (short)" }, + { "lter", OP8(0x32LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load and test (short)" }, + { "lner", OP8(0x31LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load negative (short)" }, + { "lper", OP8(0x30LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load positive (short)" }, + { "swr", OP8(0x2fLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "subtract unnormalized (long)" }, + { "awr", OP8(0x2eLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "add unnormalized (long)" }, + { "ddr", OP8(0x2dLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "divide (long)" }, + { "mdr", OP8(0x2cLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "multiply (long)" }, + { "sdr", OP8(0x2bLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "subtract normalized (long)" }, + { "adr", OP8(0x2aLL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "add normalized (long)" }, + { "cdr", OP8(0x29LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "compare (long)" }, + { "ldr", OP8(0x28LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load (long)" }, + { "mxdr", OP8(0x27LL), MASK_RR_FEF, INSTR_RR_FEF, 3, 0, 0, "multiply (long to ext.)" }, + { "mxr", OP8(0x26LL), MASK_RR_FEFE, INSTR_RR_FEFE, 3, 0, 0, "multiply (ext.)" }, + { "ldxr", OP8(0x25LL), MASK_RR_FFE, INSTR_RR_FFE, 3, 0, 0, "load rounded (ext. to long)" }, + { "lrdr", OP8(0x25LL), MASK_RR_FFE, INSTR_RR_FFE, 3, 0, 0, "load rounded (ext. to long)" }, + { "hdr", OP8(0x24LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "halve (long)" }, + { "lcdr", OP8(0x23LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load complement (long)" }, + { "ltdr", OP8(0x22LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load and test (long)" }, + { "lndr", OP8(0x21LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load negative (long)" }, + { "lpdr", OP8(0x20LL), MASK_RR_FF, INSTR_RR_FF, 3, 0, 0, "load positive (long)" }, + { "slr", OP8(0x1fLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "subtract logical" }, + { "alr", OP8(0x1eLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "add logical" }, + { "dr", OP8(0x1dLL), MASK_RR_RER, INSTR_RR_RER, 3, 0, 0, "divide" }, + { "mr", OP8(0x1cLL), MASK_RR_RER, INSTR_RR_RER, 3, 0, 0, "multiply" }, + { "sr", OP8(0x1bLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "subtract" }, + { "ar", OP8(0x1aLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "add" }, + { "cr", OP8(0x19LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "compare" }, + { "lr", OP8(0x18LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "load" }, + { "xr", OP8(0x17LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "exclusive or" }, + { "or", OP8(0x16LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "or" }, + { "clr", OP8(0x15LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "compare logical" }, + { "nr", OP8(0x14LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "and" }, + { "lcr", OP8(0x13LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "load complement" }, + { "ltr", OP8(0x12LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "load and test" }, + { "lnr", OP8(0x11LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "load negative" }, + { "lpr", OP8(0x10LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "load positive" }, + { "clcl", OP8(0x0fLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "compare logical long" }, + { "mvcl", OP8(0x0eLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "move long" }, + { "basr", OP8(0x0dLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "branch and save" }, + { "bassm", OP8(0x0cLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "branch and save and set mode" }, + { "bsm", OP8(0x0bLL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "branch and set mode" }, + { "svc", OP8(0x0aLL), MASK_RR_U0, INSTR_RR_U0, 3, 0, 0, "supervisor call" }, + { "br", OP16(0x07f0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "unconditional branch" }, + { "bnor", OP16(0x07e0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on not overflow / if not ones" }, + { "bnhr", OP16(0x07d0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on A not high" }, + { "bnpr", OP16(0x07d0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on not plus" }, + { "bler", OP16(0x07c0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on low or equal" }, + { "bnlr", OP16(0x07b0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on A not low" }, + { "bnmr", OP16(0x07b0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on not minus / if not mixed" }, + { "bher", OP16(0x07a0LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on high or equal" }, + { "bnlhr", OP16(0x0790LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on not low or high" }, + { "ber", OP16(0x0780LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on A equal B" }, + { "bzr", OP16(0x0780LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on zero / if zeros" }, + { "bner", OP16(0x0770LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on A not equal B" }, + { "bnzr", OP16(0x0770LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on not zero / if not zeros" }, + { "blhr", OP16(0x0760LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on low or high" }, + { "bnher", OP16(0x0750LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on not high or equal" }, + { "blr", OP16(0x0740LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on A low" }, + { "bmr", OP16(0x0740LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on minus / if mixed" }, + { "bnler", OP16(0x0730LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on not low or equal" }, + { "bhr", OP16(0x0720LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on A high" }, + { "bpr", OP16(0x0720LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on plus" }, + { "bor", OP16(0x0710LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 0, "conditional branch on overflow / if ones" }, + { "bcr", OP8(0x07LL), MASK_RR_UR, INSTR_RR_UR, 3, 0, 0, "branch on condition" }, + { "nopr", OP16(0x0700LL), MASK_RR_0R, INSTR_RR_0R, 3, 0, 1, "no operation" }, + { "bctr", OP8(0x06LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "branch on count" }, + { "balr", OP8(0x05LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 0, "branch and link" }, + { "spm", OP8(0x04LL), MASK_RR_R0, INSTR_RR_R0, 3, 0, 0, "set program mask" }, + { "trap2", OP16(0x01ffLL), MASK_E, INSTR_E, 3, 0, 0, "trap" }, + { "sam64", OP16(0x010eLL), MASK_E, INSTR_E, 2, 2, 0, "set addressing mode 64" }, + { "sam31", OP16(0x010dLL), MASK_E, INSTR_E, 3, 2, 0, "set addressing mode 31" }, + { "sam24", OP16(0x010cLL), MASK_E, INSTR_E, 3, 2, 0, "set addressing mode 24" }, + { "tam", OP16(0x010bLL), MASK_E, INSTR_E, 3, 2, 0, "test addressing mode" }, + { "pfpo", OP16(0x010aLL), MASK_E, INSTR_E, 2, 5, 0, "perform floating point operation" }, + { "sckpf", OP16(0x0107LL), MASK_E, INSTR_E, 3, 0, 0, "set clock programmable field" }, + { "ptff", OP16(0x0104LL), MASK_E, INSTR_E, 2, 4, 0, "perform timing facility function" }, + { "upt", OP16(0x0102LL), MASK_E, INSTR_E, 3, 0, 0, "update tree" }, + { "pr", OP16(0x0101LL), MASK_E, INSTR_E, 3, 0, 0, "program return" } +}; + +const int s390_num_opcodes = + sizeof (s390_opcodes) / sizeof (s390_opcodes[0]); diff --git a/VEX/priv/objdump/s390.h b/VEX/priv/objdump/s390.h new file mode 100644 index 000000000..c0a396fc9 --- /dev/null +++ b/VEX/priv/objdump/s390.h @@ -0,0 +1,197 @@ +/* s390.h -- Header file for S390 opcode table + Copyright (C) 2000-2025 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + +#ifndef S390_H +#define S390_H + +/* List of instruction sets variations. */ + +enum s390_opcode_mode_val + { + S390_OPCODE_ESA = 0, + S390_OPCODE_ZARCH + }; + +enum s390_opcode_cpu_val + { + S390_OPCODE_G5 = 0, + S390_OPCODE_G6, + S390_OPCODE_Z900, + S390_OPCODE_Z990, + S390_OPCODE_Z9_109, + S390_OPCODE_Z9_EC, + S390_OPCODE_Z10, + S390_OPCODE_Z196, + S390_OPCODE_ZEC12, + S390_OPCODE_Z13, + S390_OPCODE_ARCH12, + S390_OPCODE_ARCH13, + S390_OPCODE_ARCH14, + S390_OPCODE_ARCH15, + S390_OPCODE_MAXCPU + }; + +/* Values defined for the flags field of a struct s390_opcode. */ + +/* Last one or two instruction operands are optional. */ +#define S390_INSTR_FLAG_OPTPARM 0x1 +#define S390_INSTR_FLAG_OPTPARM2 0x2 + +/* Instruction requires a specific facility. */ +#define S390_INSTR_FLAG_HTM 0x4 +#define S390_INSTR_FLAG_VX 0x8 +#define S390_INSTR_FLAG_FACILITY_MASK 0xc + +/* Instruction annotations for jump visualization. */ +#define S390_INSTR_FLAG_CLASS_BRANCH 0x10 +#define S390_INSTR_FLAG_CLASS_RELATIVE 0x20 +#define S390_INSTR_FLAG_CLASS_CONDITIONAL 0x40 +#define S390_INSTR_FLAG_CLASS_SUBROUTINE 0x80 +#define S390_INSTR_FLAG_CLASS_MASK 0xf0 + +#define S390_INSTR_FLAGS_CLASS_JUMP \ + (S390_INSTR_FLAG_CLASS_BRANCH | S390_INSTR_FLAG_CLASS_RELATIVE) + +#define S390_INSTR_FLAGS_CLASS_CONDJUMP \ + (S390_INSTR_FLAG_CLASS_BRANCH | S390_INSTR_FLAG_CLASS_RELATIVE \ + | S390_INSTR_FLAG_CLASS_CONDITIONAL) + +#define S390_INSTR_FLAGS_CLASS_JUMPSR \ + (S390_INSTR_FLAG_CLASS_BRANCH | S390_INSTR_FLAG_CLASS_RELATIVE \ + | S390_INSTR_FLAG_CLASS_SUBROUTINE) + +/* Instruction is an .insn pseudo-mnemonic. */ +#define S390_INSTR_FLAG_PSEUDO_MNEMONIC 0x100 + +/* The opcode table is an array of struct s390_opcode. */ + +struct s390_opcode + { + /* The opcode name (mnemonic). */ + const char * name; + + /* The opcode itself. Those bits which will be filled in with + operands are zeroes. */ + unsigned char opcode[6]; + + /* The opcode mask. This is used by the disassembler. This is a + mask containing ones indicating those bits which must match the + opcode field, and zeroes indicating those bits which need not + match (and are presumably filled in by operands). */ + unsigned char mask[6]; + + /* The opcode length in bytes. */ + int oplen; + + /* An array of operand codes. Each code is an index into the + operand table. They appear in the order which the operands must + appear in assembly code, and are terminated by a zero. */ + unsigned char operands[6]; + + /* Bitmask of execution modes this opcode is available for. */ + unsigned int modes; + + /* First cpu this opcode is available for. */ + enum s390_opcode_cpu_val min_cpu; + + /* Instruction specific flags. */ + unsigned int flags; + + /* Instruction description. */ + const char * description; + }; + +/* The table itself is sorted by major opcode number, and is otherwise + in the order in which the disassembler should consider + instructions. */ +extern const struct s390_opcode s390_opcodes[]; +extern const int s390_num_opcodes; + +/* A opcode format table for the .insn pseudo mnemonic. */ +extern const struct s390_opcode s390_opformats[]; +extern const int s390_num_opformats; + +/* The operands table is an array of struct s390_operand. */ + +struct s390_operand + { + /* The number of bits in the operand. */ + int bits; + + /* How far the operand is left shifted in the instruction. */ + int shift; + + /* One bit syntax flags. */ + unsigned long flags; + }; + +/* Elements in the table are retrieved by indexing with values from + the operands field of the s390_opcodes table. */ + +extern const struct s390_operand s390_operands[]; + +/* Values defined for the flags field of a struct s390_operand. */ + +/* This operand names a register. The disassembler uses this to print + register names with a leading 'r'. */ +#define S390_OPERAND_GPR 0x1 + +/* This operand names a floating point register. The disassembler + prints these with a leading 'f'. */ +#define S390_OPERAND_FPR 0x2 + +/* This operand names an access register. The disassembler + prints these with a leading 'a'. */ +#define S390_OPERAND_AR 0x4 + +/* This operand names a control register. The disassembler + prints these with a leading 'c'. */ +#define S390_OPERAND_CR 0x8 + +/* This operand is a displacement. */ +#define S390_OPERAND_DISP 0x10 + +/* This operand names a base register. */ +#define S390_OPERAND_BASE 0x20 + +/* This operand names an index register, it can be skipped. */ +#define S390_OPERAND_INDEX 0x40 + +/* This operand is a relative branch displacement. The disassembler + prints these symbolically if possible. */ +#define S390_OPERAND_PCREL 0x80 + +/* This operand takes signed values. */ +#define S390_OPERAND_SIGNED 0x100 + +/* This operand is a length. */ +#define S390_OPERAND_LENGTH 0x200 + +/* The operand needs to be a valid GP or FP register pair. */ +#define S390_OPERAND_REG_PAIR 0x400 + +/* This operand names a vector register. The disassembler uses this + to print register names with a leading 'v'. */ +#define S390_OPERAND_VR 0x800 + +#define S390_OPERAND_CP16 0x1000 + +#endif /* S390_H */ diff --git a/VEX/priv/objdump/stubs.h b/VEX/priv/objdump/stubs.h new file mode 100644 index 000000000..0b71c6908 --- /dev/null +++ b/VEX/priv/objdump/stubs.h @@ -0,0 +1,49 @@ +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __VEX_STUBS_H +#define __VEX_STUBS_H + +/* This file contains things that need to be defined to get the + objdump stuff compiled and to avoid pulling in more header files. */ + +#define bool _Bool +#define true 1 +#define false 0 + +typedef unsigned char bfd_byte; // uint8_t originally +typedef unsigned long long bfd_vma; // uint64_t originally +typedef unsigned long size_t; + +#define ATTRIBUTE_FPTR_PRINTF_2 \ + __attribute__ ((__format__ (__printf__, 2, 3))) \ + __attribute__ ((__nonnull__ (2))); +#define ATTRIBUTE_FPTR_PRINTF_3 \ + __attribute__ ((__format__ (__printf__, 3, 4))) \ + __attribute__ ((__nonnull__ (3))) +#define ATTRIBUTE_UNUSED __attribute__ ((unused)) + +/* This is defined in VEX, too. But we want to avoid mixing VEX + and binutils headers. */ +#ifndef NULL +#define NULL ((void *)0) +#endif + +#endif // __VEX_STUBS_H diff --git a/VEX/priv/s390_disasm.c b/VEX/priv/s390_disasm.c deleted file mode 100644 index d2325e7ca..000000000 --- a/VEX/priv/s390_disasm.c +++ /dev/null @@ -1,1267 +0,0 @@ -/* -*- mode: C; c-basic-offset: 3; -*- */ - -/*---------------------------------------------------------------*/ -/*--- begin s390_disasm.c ---*/ -/*---------------------------------------------------------------*/ - -/* - This file is part of Valgrind, a dynamic binary instrumentation - framework. - - Copyright IBM Corp. 2010-2017 - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . - - The GNU General Public License is contained in the file COPYING. -*/ - -/* Contributed by Florian Krohm */ - -#include "libvex_basictypes.h" -#include "main_util.h" // vassert -#include "main_globals.h" // vex_traceflags -#include "s390_defs.h" // S390_MAX_MNEMONIC_LEN -#include "s390_disasm.h" - -static HChar *s390_disasm_aux(const s390_opnd *, const HChar *, HChar *, - Int (*)(UInt, UInt, UInt *)); - -/* Return the mnemonic padded with blanks to its right */ -static const HChar * -padmnm(const HChar *mnm) -{ - vassert(vex_strlen(mnm) <= S390_MAX_MNEMONIC_LEN); - - static HChar buf[S390_MAX_MNEMONIC_LEN + 1]; - - vex_sprintf(buf, "%-*s", S390_MAX_MNEMONIC_LEN, mnm); - - return buf; -} - - -/* Return the name of a general purpose register for dis-assembly purposes. */ -static const HChar * -gpr_operand(UInt archreg) -{ - static const HChar names[16][5] = { - "%r0", "%r1", "%r2", "%r3", - "%r4", "%r5", "%r6", "%r7", - "%r8", "%r9", "%r10", "%r11", - "%r12", "%r13", "%r14", "%r15", - }; - - vassert(archreg < 16); - - return names[archreg]; -} - - -/* Return the name of a floating point register for dis-assembly purposes. */ -static const HChar * -fpr_operand(UInt archreg) -{ - static const HChar names[16][5] = { - "%f0", "%f1", "%f2", "%f3", - "%f4", "%f5", "%f6", "%f7", - "%f8", "%f9", "%f10", "%f11", - "%f12", "%f13", "%f14", "%f15", - }; - - vassert(archreg < 16); - - return names[archreg]; -} - - -/* Return the name of an access register for dis-assembly purposes. */ -static const HChar * -ar_operand(UInt archreg) -{ - static const HChar names[16][5] = { - "%a0", "%a1", "%a2", "%a3", - "%a4", "%a5", "%a6", "%a7", - "%a8", "%a9", "%a10", "%a11", - "%a12", "%a13", "%a14", "%a15", - }; - - vassert(archreg < 16); - - return names[archreg]; -} - - -/* Return the name of a vector register for dis-assembly purposes. */ -static const HChar * -vr_operand(UInt archreg) -{ - static const HChar names[32][5] = { - "%v0", "%v1", "%v2", "%v3", - "%v4", "%v5", "%v6", "%v7", - "%v8", "%v9", "%v10", "%v11", - "%v12", "%v13", "%v14", "%v15", - "%v16", "%v17", "%v18", "%v19", - "%v20", "%v21", "%v22", "%v23", - "%v24", "%v25", "%v26", "%v27", - "%v28", "%v29", "%v30", "%v31", - }; - - vassert(archreg < 32); - - return names[archreg]; -} - - -/* Common function used to construct a mnemonic based on a condition code - mask. */ -static const HChar * -construct_mnemonic(const HChar *prefix, const HChar *suffix, UInt mask) -{ - static HChar buf[S390_MAX_MNEMONIC_LEN + 1]; - - static HChar mask_id[16][4] = { - "", /* 0 -> unused */ - "o", "h", "nle", "l", "nhe", "lh", "ne", - "e", "nlh", "he", "nl", "le", "nh", "no", - "" /* 15 -> unused */ - }; - - /* Guard against buffer overflow */ - vassert(vex_strlen(prefix) + vex_strlen(suffix) + - sizeof mask_id[0] <= sizeof buf); - - HChar *p = buf; - - p += vex_sprintf(p, "%s%s%s", prefix, mask_id[mask], suffix); - *p = '\0'; - - return buf; -} - - -/* An operand with a base register, an index register, and a displacement. - If the displacement is signed, the rightmost 20 bit of D need to be - sign extended */ -static HChar * -dxb_operand(HChar *p, UInt d, UInt x, UInt b, Bool displacement_is_signed) -{ - if (displacement_is_signed) { - Int displ = (Int)(d << 12) >> 12; /* sign extend */ - - p += vex_sprintf(p, "%d", displ); - } else { - p += vex_sprintf(p, "%u", d); - } - if (x != 0) { - p += vex_sprintf(p, "(%s,%s)", gpr_operand(x), - b != 0 ? gpr_operand(b) : "0"); - } else { - if (b != 0) { - p += vex_sprintf(p, "(%s)", gpr_operand(b)); - } - } - - return p; -} - - -/* An operand with base register, unsigned length, and a 12-bit - unsigned displacement */ -static HChar * -udlb_operand(HChar *p, UInt d, UInt length, UInt b) -{ - p += vex_sprintf(p, "%u", d); - p += vex_sprintf(p, "(%u", length + 1); // actual length is +1 - p += vex_sprintf(p, ",%s", b != 0 ? gpr_operand(b) : "0"); - p += vex_sprintf(p, ")"); - - return p; -} - - -/* An operand with a base register, an vector register, and a displacement. - If the displacement is signed, the rightmost 20 bit of D need to be - sign extended */ -static HChar * -dvb_operand(HChar *p, UInt d, UInt v, UInt b, Bool displacement_is_signed) -{ - if (displacement_is_signed) { - Int displ = (Int)(d << 12) >> 12; /* sign extend */ - - p += vex_sprintf(p, "%d", displ); - } else { - p += vex_sprintf(p, "%u", d); - } - p += vex_sprintf(p, "(%s", vr_operand(v)); - p += vex_sprintf(p, ",%s", b != 0 ? gpr_operand(b) : "0"); - p += vex_sprintf(p, ")"); - - return p; -} - - -/* Return the number of MASK operands */ -static UInt -mask_count(const s390_opnd *opnds) -{ - UInt num_masks = 0; - - for (UInt ix = 0; opnds[ix].kind != S390_OPND_DONE; ++ix) { - if (opnds[ix].kind == S390_OPND_MASK) { - ++num_masks; - } - } - return num_masks; -} - - -/* Given the mask number return its index in the operands array. - Mask numbers begin at 1. */ -static UInt -get_mask_index(const s390_opnd *opnds, UInt mask_no) -{ - vassert(mask_no <= mask_count(opnds)); - - UInt count = 0; - - for (UInt ix = 0; opnds[ix].kind != S390_OPND_DONE; ++ix) { - if (opnds[ix].kind == S390_OPND_MASK) { - ++count; - if (count == mask_no) - return ix; - } - } - /* not reachable */ - return 0; -} - - -/* It is expected that OPNDS contains exactly one MASK operand. Return - its index. Assert, if there is no mask or multiple mask fields. */ -static UInt -unique_mask_index(const s390_opnd *opnds) -{ - vassert(mask_count(opnds) == 1); - - return get_mask_index(opnds, 1); -} - - -/* Special handling for the BCR opcode */ -HChar * -bcr_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *xmnm; - UInt mask = opnds[1].mask; - - if (mask == 0) - xmnm = "nopr"; - else if (mask == 15) - xmnm = "br"; - else - xmnm = construct_mnemonic("b", "r", mask); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -/* Special handling for the BC opcode */ -HChar * -bc_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *xmnm; - UInt mask = opnds[1].mask; - - if (mask == 0) { - xmnm = "nop"; - if (opnds[2].d == 0 && opnds[2].b == 0 && opnds[2].x == 0) - return p += vex_sprintf(p, "nop"); - } else if (mask == 15) - xmnm = "b"; - else - xmnm = construct_mnemonic("b", "", mask); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -/* Special handling for the BRC opcode */ -HChar * -brc_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *xmnm; - UInt mask = opnds[1].mask; - - if (mask == 0) - xmnm = "jnop"; - else if (mask == 15) - xmnm = "j"; - else - xmnm = construct_mnemonic("j", "", mask); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -/* Special handling for the BRCL opcode */ -HChar * -brcl_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *xmnm; - UInt mask = opnds[1].mask; - - if (mask == 0) - xmnm = "jgnop"; - else if (mask == 15) - xmnm = "jg"; - else - xmnm = construct_mnemonic("jg", "", mask); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -/* Return 1, if mask should be printed. In *VALUE return the mask value - that should be printed. */ -static Int -cabt_mh(UInt ix __attribute__((unused)), UInt mask, UInt *value) -{ - *value = mask; - return (mask & 1) || mask == 0 || mask == 14; -} - - -/* Special handling for the various compare and branch / trap opcodes: - CLFIT, CLGIT, C[G]IT, C[L][G]RJ, C[L][G]IJ, C[L][G]IB, C[L][G]RB, - CL[G]T, C[L][G]RT -*/ -HChar * -cabt_disasm(const s390_opnd *opnds, HChar *p) -{ - static HChar xmnm[S390_MAX_MNEMONIC_LEN + 1]; - - static const HChar suffix[8][3] = { - "", "h", "l", "ne", "e", "nl", "nh", "" - }; - - const HChar *base = opnds[0].xmnm.base; - - /* Guard against buffer overflow */ - vassert(vex_strlen(base) + sizeof suffix[0] <= sizeof xmnm); - - HChar *x = xmnm; - UInt mask = opnds[unique_mask_index(opnds)].mask; - - x += vex_sprintf(x, "%s", base); - if (! (mask & 0x1)) { - x += vex_sprintf(x, "%s", suffix[mask >> 1]); - } - *x = '\0'; - - return s390_disasm_aux(opnds, xmnm, p, cabt_mh); -} - - -static Int -cls_mh(UInt ix __attribute__((unused)), UInt mask, UInt *value) -{ - *value = mask; - return mask == 0 || mask == 15; -} - - -/* Special handling for the various conditional load / store opcodes: - LOC[G]R, LOCFHR, LOC[G]HI, LOCHHI, LOC[G], LOCFH, STOC[G], STOFH - Also used for SEL[G]R and SELFHR -*/ -HChar * -cls_disasm(const s390_opnd *opnds, HChar *p) -{ - UInt mask = opnds[unique_mask_index(opnds)].mask; - const HChar *base = opnds[0].xmnm.base; - const HChar *xmnm = construct_mnemonic(base, "", mask); - - return s390_disasm_aux(opnds, xmnm, p, cls_mh); -} - - -static Int -bic_mh(UInt ix __attribute__((unused)), UInt mask, UInt *value) -{ - *value = mask; - return mask == 0; -} - - -/* Special handling for the BIC opcode */ -HChar * -bic_disasm(const s390_opnd *opnds, HChar *p) -{ - UInt mask = opnds[1].mask; - const HChar *xmnm; - - if (mask == 0) { - /* There is no special opcode when mask == 0. */ - xmnm = opnds[0].xmnm.base; - } else { - xmnm = construct_mnemonic("bi", "", mask); - } - - return s390_disasm_aux(opnds, xmnm, p, bic_mh); -} - - -/* Special handling for the VGBM opcode */ -HChar * -vgbm_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *xmnm; - const HChar *v1 = vr_operand(opnds[1].regno); - UInt i2 = opnds[2].u; - - if (i2 == 0) { - xmnm = padmnm("vzero"); - p += vex_sprintf(p, "%s %s", xmnm, v1); - } else if (i2 == 0xffff) { - xmnm = padmnm("vone"); - p += vex_sprintf(p, "%s %s", xmnm, v1); - } else { - xmnm = padmnm(opnds[0].xmnm.base); - p += vex_sprintf(p, "%s %s,%u", xmnm, v1, i2); - } - return p; -} - - -static Int -mask0_mh(UInt ix __attribute__((unused)), UInt mask, UInt *value) -{ - *value = mask; - return mask != 0; -} - - -/* Write out the operands, except if the unique mask is 0 do not write it */ -HChar * -mask0_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 1); - - const HChar *mnm = opnds[0].xmnm.base; - - if (vex_streq(mnm, "cu12") && opnds[unique_mask_index(opnds)].mask == 0) - mnm = "cutfu"; - if (vex_streq(mnm, "cu21") && opnds[unique_mask_index(opnds)].mask == 0) - mnm = "cuutf"; - - return s390_disasm_aux(opnds, mnm, p, mask0_mh); -} - - -/* Opcode is expected to have a single MASK operand. Use its value - to determine a single-character suffix to be appended to the base - mnemonic. The mask itself is not printed. */ -HChar * -va_like_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar suffix[] = { 'b', 'h', 'f', 'g', 'q' }; - const HChar *base = opnds[0].xmnm.base; - UInt mask = opnds[unique_mask_index(opnds)].mask; - HChar xmnm[vex_strlen(base) + 2 + 1]; - HChar extra = '\0'; - - vassert(mask < sizeof suffix); - - if (mask == 1 && - (vex_streq(base, "vupl") || vex_streq(base, "vmal") || - vex_streq(base, "vml"))) { - extra = 'w'; - } - vex_sprintf(xmnm, "%s%c%c", base, suffix[mask], extra); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -/* Opcode is expected to have two MASK operands. Use their values - to determine a suffix to be appended to the base mnemonic. The - masks themselves are not printed. */ -HChar * -vch_like_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix1[] = { 'b', 'h', 'f', 'g' }; - const HChar suffix2[] = { '\0', 's' }; - const HChar *base = opnds[0].xmnm.base; - UInt m4 = opnds[get_mask_index(opnds, 1)].mask; - UInt m5 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + 2 + 1]; - - vassert(m4 < sizeof suffix1); - vassert(m5 < sizeof suffix2); - - vex_sprintf(xmnm, "%s%c%c", base, suffix1[m4], suffix2[m5]); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -static Int -always_mh(UInt ix __attribute__((unused)), - UInt mask, UInt *value) -{ - *value = mask; - return 1; -} - - -static Int -never_mh(UInt ix __attribute__((unused)), - UInt mask, UInt *value) -{ - *value = mask; - return 0; -} - - -HChar * -vfce_like_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 3); - - const HChar suffix1[][3] = { "sb", "db", "xb" }; - const HChar suffix2[] = { '\0', 's' }; - const HChar *base = opnds[0].xmnm.base; - UInt m4 = opnds[get_mask_index(opnds, 1)].mask; - UInt m5 = opnds[get_mask_index(opnds, 2)].mask; - UInt m6 = opnds[get_mask_index(opnds, 3)].mask; - HChar xmnm[vex_strlen(base) + (sizeof *suffix1 - 1) + 1 + 1]; - - if (m4 == 4 && (m5 == 0 || m5 == 4)) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(m4 - 2 < sizeof suffix1 / sizeof *suffix1); - vassert(m6 < sizeof suffix2); - - vex_sprintf(xmnm, "%s%s%c", base, suffix1[m4 - 2], suffix2[m6]); - - if (m5 & 0x8) xmnm[0] = 'w'; - if (m5 & 0x4) xmnm[2] = 'k'; - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -HChar * -vfmix_like_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[][3] = { "sb", "db", "xb" }; - const HChar *base = opnds[0].xmnm.base; - UInt m4 = opnds[get_mask_index(opnds, 1)].mask; - UInt m5 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + (sizeof *suffix - 1) + 1]; - - if (m4 == 4 && m5 == 0) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(m4 - 2 < sizeof suffix / sizeof *suffix); - - vex_sprintf(xmnm, "%s%s", base, suffix[m4 - 2]); - - if (m5 & 0x8) xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -HChar * -vfa_like_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[][3] = { "sb", "db", "xb" }; - const HChar *base = opnds[0].xmnm.base; - UInt m4 = opnds[get_mask_index(opnds, 1)].mask; - UInt m5 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + (sizeof *suffix - 1) + 1]; - - if (m4 == 4 && m5 == 0) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(m4 - 2 < sizeof suffix / sizeof *suffix); - - vex_sprintf(xmnm, "%s%s", base, suffix[m4 - 2]); - - if (m5 & 0x8) xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -/* Also used for VFEE, VFENE, and VSTRS. But for those opcodes m5 < 8. - Hence, the return value is 0 and no mask will be written for - those opcodes. */ -static Int -vfae_mh(UInt ix, UInt mask, UInt *value) -{ - *value = mask & 0xC; - return (ix == 5) && (mask & 0xC); -} - - -HChar * -vfae_like_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[] = { 'b', 'h', 'f' }; - const HChar *base = opnds[0].xmnm.base; - - UInt m4 = opnds[get_mask_index(opnds, 1)].mask; - UInt m5 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + 3 + 1]; - - HChar s = (m5 & 0x1) ? 's' : '\0'; - HChar z = (m5 & 0x2) ? 'z' : '\0'; - - vex_sprintf(xmnm, "%s%c%c%c", base, z, suffix[m4], s); - - return s390_disasm_aux(opnds, xmnm, p, vfae_mh); -} - - -HChar * -vfms_like_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[][3] = { "sb", "db", "xb" }; - const HChar *base = opnds[0].xmnm.base; - UInt m5 = opnds[get_mask_index(opnds, 1)].mask; - UInt m6 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + (sizeof *suffix - 1) + 1]; - - if (m6 == 4 && m5 == 0) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(m6 - 2 < sizeof suffix / sizeof *suffix); - - vex_sprintf(xmnm, "%s%s", base, suffix[m6 - 2]); - - if (m5 & 0x8) xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -static Int -vmsl_mh(UInt ix, UInt mask, UInt *value) -{ - *value = mask; - return ix == 6; -} - - -HChar * -vmsl_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[] = { 'g' }; - const HChar *base = opnds[0].xmnm.base; - UInt m5 = opnds[get_mask_index(opnds, 1)].mask; - /* m6 does not influence the extended mnemonic */ - HChar xmnm[vex_strlen(base) + 1 + 1]; - - vassert(m5 - 3 < sizeof suffix); - - vex_sprintf(xmnm, "%s%c", base, suffix[m5 - 3]); - - return s390_disasm_aux(opnds, xmnm, p, vmsl_mh); -} - - -static Int -vstrc_mh(UInt ix, UInt mask, UInt *value) -{ - *value = mask & 0xC; - return (ix == 6) && (mask & 0xC); -} - - -HChar * -vstrc_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[] = { 'b', 'h', 'f' }; - const HChar *base = opnds[0].xmnm.base; - - UInt m5 = opnds[get_mask_index(opnds, 1)].mask; - UInt m6 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + 3 + 1]; - - HChar s = (m6 & 0x1) ? 's' : '\0'; - HChar z = (m6 & 0x2) ? 'z' : '\0'; - - vex_sprintf(xmnm, "%s%c%c%c", base, z, suffix[m5], s); - - return s390_disasm_aux(opnds, xmnm, p, vstrc_mh); -} - - -HChar * -vllebrz_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 1); - - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - const HChar *xmnm; - - switch (m3) { - case 1: xmnm = "vllebrzh"; break; - case 2: xmnm = "vllebrzf"; break; - case 3: xmnm = "ldrv"; break; - case 6: xmnm = "lerv"; break; - default: vassert(0); - } - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -HChar * -vstebrf_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 1); - - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - const HChar *xmnm; - - if (m3 == 0) - xmnm = "sterv"; - else - xmnm = opnds[0].xmnm.base; - - return s390_disasm_aux(opnds, xmnm, p, mask0_mh); -} - - -HChar * -vstebrg_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 1); - - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - const HChar *xmnm; - - if (m3 == 0) - xmnm = "stdrv"; - else - xmnm = opnds[0].xmnm.base; - - return s390_disasm_aux(opnds, xmnm, p, mask0_mh); -} - - -HChar * -vllez_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 1); - - const HChar suffix[][3] = { "b", "h", "f", "g", "", "", "lf" }; - const HChar *base = opnds[0].xmnm.base; - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - HChar xmnm[vex_strlen(base) + (sizeof *suffix - 1) + 1]; - - vassert(m3 < sizeof suffix / sizeof *suffix); - vex_sprintf(xmnm, "%s%s", base, suffix[m3]); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -HChar * -wfc_like_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[][3] = { "sb", "db", "xb" }; - const HChar *base = opnds[0].xmnm.base; - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - HChar xmnm[vex_strlen(base) + (sizeof *suffix - 1) + 1]; - - vassert(m3 - 2 < sizeof suffix / sizeof *suffix); - - vex_sprintf(xmnm, "%s%s", base, suffix[m3 - 2]); - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -HChar * -vfll_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[] = { 's', 'd' }; - const HChar *base = opnds[0].xmnm.base; - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - UInt m4 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + 1 + 1]; - - if (m3 == 3 && m4 == 0) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(m3 - 2 < sizeof suffix); - vex_sprintf(xmnm, "%s%c", base, suffix[m3 - 2]); - - if (m4 == 8) - xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -static Int -always_m4(UInt ix, UInt mask, UInt *value) -{ - *value = mask & 0x4; - return ix == 4; -} - - -HChar * -vflr_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[] = { 'd', 'x' }; - const HChar *base = opnds[0].xmnm.base; - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - UInt m4 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + 1 + 1]; - - if (m3 == 4 && m4 < 8) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(m3 - 3 < sizeof suffix); - vex_sprintf(xmnm, "%s%c", base, suffix[m3 - 3]); - - if (m4 & 0x8) - xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, always_m4); -} - - -HChar * -vfi_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar suffix[][3] = { "sb", "db", "xb" }; - const HChar *base = opnds[0].xmnm.base; - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - UInt m4 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(base) + (sizeof *suffix - 1) + 1]; - - if (m3 == 4 && m4 < 8) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(m3 - 2 < sizeof suffix / sizeof *suffix); - vex_sprintf(xmnm, "%s%s", base, suffix[m3 - 2]); - - if (m4 & 0x8) - xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, always_m4); -} - - -HChar * -vfpso_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 3); - - const HChar suffix1[] = { 'c', 'n', 'p' }; - const HChar suffix2[][3] = { "sb", "db", "xb" }; - const HChar *base = opnds[0].xmnm.base; - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - UInt m4 = opnds[get_mask_index(opnds, 2)].mask; - UInt m5 = opnds[get_mask_index(opnds, 3)].mask; - HChar xmnm[vex_strlen(base) + 1 + (sizeof *suffix2 - 1) + 1]; - - if (m3 == 4 && m4 == 0) - return s390_disasm_aux(opnds, base, p, always_mh); - - vassert(vex_strlen("vfl") <= vex_strlen(base)); - vassert(m5 < sizeof suffix1); - vassert(m3 - 2 < sizeof suffix2 / sizeof *suffix2); - vex_sprintf(xmnm, "%s%c%s", "vfl", suffix1[m5], suffix2[m3 - 2]); - - if (m4 & 0x8) - xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, NULL); -} - - -static Int -vcgd_mh(UInt ix, UInt mask, UInt *value) -{ - *value = mask; - if (ix == 5) - return 1; - if (ix == 4) { - if (mask >= 8) - *value = mask - 8; - return 1; - } - return 0; -} - - -static HChar * -vcgd_like_disasm(const s390_opnd *opnds, const HChar *mnm[2], HChar *p) -{ - vassert(mask_count(opnds) == 3); - vassert(vex_strlen(mnm[0]) == vex_strlen(mnm[1])); - - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - UInt m4 = opnds[get_mask_index(opnds, 2)].mask; - HChar xmnm[vex_strlen(mnm[0]) + 1]; - - vex_sprintf(xmnm, "%s", mnm[m3 - 2]); - if (m4 & 0x8) - xmnm[0] = 'w'; - - return s390_disasm_aux(opnds, xmnm, p, vcgd_mh); -} - - -HChar * -vcgd_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *mnm[2] = { "vcfeb", "vcgdb" }; - - return vcgd_like_disasm(opnds, mnm, p); -} - - -HChar * -vcdg_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *mnm[2] = { "vcefb", "vcdgb" }; - - return vcgd_like_disasm(opnds, mnm, p); -} - - -HChar * -vclgd_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *mnm[2] = { "vclfeb", "vclgdb" }; - - return vcgd_like_disasm(opnds, mnm, p); -} - - -HChar * -vcgld_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *mnm[2] = { "vcelfb", "vcdlgb" }; - - return vcgd_like_disasm(opnds, mnm, p); -} - - -/* Used by BFP / DFP convert from fixed / logical opcodes - - 1) Mnemonics ending in 'A', e.g. CEFBRA - a) m3 == m4 == 0 --> CEFBR and no mask values written - b) otherwise --> CEFBRA and both mask values written - - 2) Mnemonics for "logical" opcodes, e.g. CELFBR - These do not end in 'A' - --> mnemonic unchanged, both mask values written - - 3) Neither #1 nor #2, e.g. CDFTR - --> mnemonic unchanged, both mask values written -*/ -HChar * -fp_convf_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar *base = opnds[0].xmnm.base; - UInt m3 = opnds[get_mask_index(opnds, 1)].mask; - UInt m4 = opnds[get_mask_index(opnds, 2)].mask; - UInt len = vex_strlen(base); - - HChar xmnm[len + 1]; - - vex_sprintf(xmnm, "%s", base); - - if (xmnm[len - 1] == 'a' && m3 + m4 == 0) { - xmnm[len - 1] = '\0'; - return s390_disasm_aux(opnds, xmnm, p, never_mh); - } - return s390_disasm_aux(opnds, xmnm, p, always_mh); -} - - -/* Return 1, if mask should be printed. In *VALUE return the mask value - that should be printed. */ -static Int -fp_convt_mh(UInt ix __attribute__((unused)), UInt mask, UInt *value) -{ - *value = mask; - return (ix == 2 || mask != 0) ? 1 : 0; -} - - -/* Used by BFP / DFP convert to fixed / logical opcodes - - 1) Mnemonics ending in 'A', e.g. CFEBRA - a) m4 == 0 --> CFEBR and no mask values written - b) otherwise --> CFEBRA and both mask values written - - 2) Mnemonics for "logical" opcodes, e.g. CLFEBR - These do not end in 'A' - --> mnemonic unchanged, both mask values written - - 3) Neither #1 nor #2, e.g. CFDTR - --> mnemonic unchanged, both mask values written -*/ -HChar * -fp_convt_disasm(const s390_opnd *opnds, HChar *p) -{ - vassert(mask_count(opnds) == 2); - - const HChar *base = opnds[0].xmnm.base; - UInt m4 = opnds[get_mask_index(opnds, 2)].mask; - UInt len = vex_strlen(base); - - HChar xmnm[len + 1]; - - vex_sprintf(xmnm, "%s", base); - - if (xmnm[len - 1] == 'a' && m4 == 0) { - xmnm[len - 1] = '\0'; - return s390_disasm_aux(opnds, xmnm, p, fp_convt_mh); - } - return s390_disasm_aux(opnds, xmnm, p, always_mh); -} - - -HChar * -adtra_like_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *base = opnds[0].xmnm.base; - UInt m4 = opnds[get_mask_index(opnds, 1)].mask; - UInt len = vex_strlen(base); - - HChar xmnm[len + 1]; - - vex_sprintf(xmnm, "%s", base); - - if (xmnm[len - 1] == 'a' && m4 == 0) { - xmnm[len - 1] = '\0'; - } - return s390_disasm_aux(opnds, xmnm, p, mask0_mh); -} - - -static Int -rotate_mh(UInt ix __attribute__((unused)), UInt mask, UInt *value) -{ - *value = mask; - if (ix == 5 && mask == 0) return 0; - if (ix == 3) // rosbg, etc - *value = mask & ~0x80; - if (ix == 4) // risbg - *value = mask & ~0x80; - return 1; -} - - -HChar * -rotate_disasm(const s390_opnd *opnds, HChar *p) -{ - const HChar *base = opnds[0].xmnm.base; - UInt len = vex_strlen(base); - HChar xmnm[len + 1]; - - if (opnds[0].xmnm.base[1] == 'i') - vex_sprintf(xmnm, "%s%c", base, (opnds[4].u & 0x80) ? 'z' : '\0'); - else - vex_sprintf(xmnm, "%s%c", base, (opnds[3].u & 0x80) ? 't' : '\0'); - - return s390_disasm_aux(opnds, xmnm, p, rotate_mh); -} - - -/* Write out OPNDS. MH is a mask handler. It decides whether or not a - MASK operand is written and if so, massages the mask value as needed. */ -static HChar * -s390_disasm_aux(const s390_opnd *opnds, const HChar *xmnm, HChar *p, - Int (*mh)(UInt, UInt, UInt *)) -{ - vassert(opnds[0].kind == S390_OPND_MNM || - opnds[0].kind == S390_OPND_XMNM); - - Int write_separator = 0; // no separator after mnemonic - - for (UInt ix = 0; opnds[ix].kind != S390_OPND_DONE; ++ix) { - const s390_opnd *opnd = opnds + ix; - - switch (opnd->kind) { - case S390_OPND_MNM: - p += vex_sprintf(p, "%s", padmnm(opnd->mnm)); - *p++ = ' '; - break; - - case S390_OPND_XMNM: - p += vex_sprintf(p, "%s", padmnm(xmnm)); - *p++ = ' '; - break; - - case S390_OPND_GPR: - p += vex_sprintf(p, "%s", gpr_operand(opnd->regno)); - break; - - case S390_OPND_FPR: - p += vex_sprintf(p, "%s", fpr_operand(opnd->regno)); - break; - - case S390_OPND_AR: - p += vex_sprintf(p, "%s", ar_operand(opnd->regno)); - break; - - case S390_OPND_VR: - p += vex_sprintf(p, "%s", vr_operand(opnd->regno)); - break; - - case S390_OPND_MASK: { - UInt value; - if (mh && mh(ix, opnd->mask, &value)) - p += vex_sprintf(p, "%u", value); - else - write_separator = 0; - break; - } - - case S390_OPND_UINT: - p += vex_sprintf(p, "%u", opnd->u); - break; - - case S390_OPND_INT: - p += vex_sprintf(p, "%d", opnd->i); - break; - - case S390_OPND_PCREL: { - Long offset = opnd->pcrel; - - /* Convert # halfwords to # bytes */ - offset <<= 1; - - if (offset < 0) { - p += vex_sprintf(p, ".%lld", offset); - } else { - p += vex_sprintf(p, ".+%lld", offset); - } - break; - } - - case S390_OPND_SDXB: { - UInt d = opnd->d; - UInt x = opnd->x; - UInt b = opnd->b; - - p = dxb_operand(p, d, x, b, 1 /* signed_displacement */); - break; - } - - case S390_OPND_UDXB: { - UInt d = opnd->d; - UInt x = opnd->x; - UInt b = opnd->b; - - p = dxb_operand(p, d, x, b, 0 /* signed_displacement */); - break; - } - - case S390_OPND_UDLB: { - UInt d = opnd->d; - UInt l = opnd->l; - UInt b = opnd->b; - - p = udlb_operand(p, d, l, b); - break; - } - - case S390_OPND_UDVB: { - UInt d = opnd->d; - UInt v = opnd->v; - UInt b = opnd->b; - - p = dvb_operand(p, d, v, b, 0 /* signed_displacement */); - break; - } - - case S390_OPND_DONE: // silence GCC - vassert(0); - break; - } - - if (write_separator) - *p++ = ','; - write_separator = 1; - } - - if (p[-1] == ',') // remove trailing separator, if any - *--p = '\0'; - - return p; -} - - -void -s390_disasm(const s390_opnd *opnds) -{ - HChar buf[128]; /* holds the disassembled insn */ - HChar *p = buf; - - if (opnds[0].kind == S390_OPND_MNM) { - p = s390_disasm_aux(opnds, NULL, p, NULL); - } else if (opnds[0].kind == S390_OPND_XMNM) { - p = opnds[0].xmnm.handler(opnds, p); - } else { - vassert(0); - } - *p = '\0'; - - vassert(p < buf + sizeof buf); /* detect buffer overwrite */ - - /* Finally, write out the disassembled insn */ - vex_printf("%s\n", buf); -} - -/*---------------------------------------------------------------*/ -/*--- end s390_disasm.c ---*/ -/*---------------------------------------------------------------*/ diff --git a/VEX/priv/s390_disasm.h b/VEX/priv/s390_disasm.h index d3096fd47..eec3dbca1 100644 --- a/VEX/priv/s390_disasm.h +++ b/VEX/priv/s390_disasm.h @@ -31,114 +31,7 @@ #include "libvex_basictypes.h" -/* The different kinds of operands in an asm insn */ -typedef enum { - S390_OPND_DONE, - S390_OPND_GPR, - S390_OPND_FPR, - S390_OPND_AR, - S390_OPND_VR, - S390_OPND_INT, - S390_OPND_UINT, - S390_OPND_PCREL, - S390_OPND_SDXB, - S390_OPND_UDXB, - S390_OPND_UDLB, - S390_OPND_UDVB, - S390_OPND_MNM, - S390_OPND_XMNM, - S390_OPND_MASK, // used for operands that modify the mnemonic -} opnd_t; - -typedef struct s390_opnd s390_opnd; - -struct s390_opnd { - opnd_t kind; // S390_OPND_.... - union { - const HChar *mnm; // MNM - UInt regno; // GPR, AR, FPR, VR - UInt mask; // MASK - Int pcrel; // PCREL - UInt u; // UINT - Int i; // INT - struct { // UDXB, SDXB, UDLB, UDVB - UInt d : 20; - union { - UInt x : 4; - UInt l : 8; - UInt v : 5; - }; - UInt b : 4; - }; - struct { - const HChar *base; - HChar *(*handler)(const s390_opnd *, HChar *); - } xmnm; - }; -}; - -/* Convenience macro to piece together a 20-bit displacement value. */ -#define D20(dh,dl) (((dh) << 12) | (dl)) - -/* Macros for operand construction */ -#define MNM(x) { S390_OPND_MNM, .mnm = (x) } -#define GPR(x) { S390_OPND_GPR, .regno = (x) } -#define FPR(x) { S390_OPND_FPR, .regno = (x) } -#define AR(x) { S390_OPND_AR, .regno = (x) } -#define VR(x) { S390_OPND_VR, .regno = (x) } -#define MASK(x) { S390_OPND_MASK, .mask = (x) } -#define UINT(x) { S390_OPND_UINT, .u = (x) } -#define INT(x) { S390_OPND_INT, .i = (x) } -#define PCREL(x) { S390_OPND_PCREL, .pcrel = (x) } -#define UDXB(_d,_x,_b) { S390_OPND_UDXB, .d = (_d), .x = (_x), .b = (_b) } -#define UDVB(_d,_v,_b) { S390_OPND_UDVB, .d = (_d), .v = (_v), .b = (_b) } -#define UDLB(_d,_l,_b) { S390_OPND_UDLB, .d = (_d), .l = (_l), .b = (_b) } -#define SDXB(dh,dl,_x,_b) \ - { S390_OPND_SDXB, .d = D20((dh), (dl)), .x = (_x), .b = (_b) } -#define XMNM(mnm,h) \ - { S390_OPND_XMNM, .xmnm.base = (mnm), .xmnm.handler = (h) } - -#define S390_DISASM(...) \ - s390_disasm((s390_opnd []){ __VA_ARGS__, { S390_OPND_DONE } }) - -void s390_disasm(const s390_opnd *); - -/* Handlers for extended mnemonics */ -HChar *bc_disasm(const s390_opnd *, HChar *); -HChar *bcr_disasm(const s390_opnd *, HChar *); -HChar *brc_disasm(const s390_opnd *, HChar *); -HChar *bic_disasm(const s390_opnd *, HChar *); -HChar *cls_disasm(const s390_opnd *, HChar *); -HChar *brcl_disasm(const s390_opnd *, HChar *); -HChar *cabt_disasm(const s390_opnd *, HChar *); -HChar *mask0_disasm(const s390_opnd *, HChar *); -HChar *vcdg_disasm(const s390_opnd *, HChar *); -HChar *vcgd_disasm(const s390_opnd *, HChar *); -HChar *vcgld_disasm(const s390_opnd *, HChar *); -HChar *vclgd_disasm(const s390_opnd *, HChar *); -HChar *vfi_disasm(const s390_opnd *, HChar *); -HChar *vfll_disasm(const s390_opnd *, HChar *); -HChar *vflr_disasm(const s390_opnd *, HChar *); -HChar *vfms_like_disasm(const s390_opnd *, HChar *); -HChar *vfpso_disasm(const s390_opnd *, HChar *); -HChar *vgbm_disasm(const s390_opnd *, HChar *); -HChar *vllez_disasm(const s390_opnd *, HChar *); -HChar *vllebrz_disasm(const s390_opnd *, HChar *); -HChar *vmsl_disasm(const s390_opnd *, HChar *); -HChar *vstebrf_disasm(const s390_opnd *, HChar *); -HChar *vstebrg_disasm(const s390_opnd *, HChar *); -HChar *vstrc_disasm(const s390_opnd *, HChar *); -HChar *va_like_disasm(const s390_opnd *, HChar *); -HChar *vch_like_disasm(const s390_opnd *, HChar *); -HChar *vfa_like_disasm(const s390_opnd *, HChar *); -HChar *wfc_like_disasm(const s390_opnd *, HChar *); -HChar *vfae_like_disasm(const s390_opnd *, HChar *); -HChar *vfce_like_disasm(const s390_opnd *, HChar *); -HChar *vfmix_like_disasm(const s390_opnd *, HChar *); -HChar *fp_convf_disasm(const s390_opnd *, HChar *); -HChar *fp_convt_disasm(const s390_opnd *, HChar *); -HChar *adtra_like_disasm(const s390_opnd *, HChar *); -HChar *rotate_disasm(const s390_opnd *, HChar *); +void s390_disasm(const UChar *); /*---------------------------------------------------------------*/ /*--- end s390_disasm.h ---*/ From 4fa4d04a6f636e680c407eb680c29da91c7e262a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 3 Jan 2026 14:08:08 +0100 Subject: [PATCH 219/502] VEX: Fix srcdir != builddir build commit 370531396ad1 ("s390: Use objdump machinery to disassemble insns") broke srcdir != builddir builds with: ../../../VEX/priv/objdump/s390-dis.c:26:10: fatal error: main_util.h: No such file or directory 26 | #include "main_util.h" // vex_strlen | ^~~~~~~~~~~~~ This comes from including the "wrong" priv directory for main_util.h in Makefile.vex.am. Fix this by adding -I$(srcdir)/priv. This was always wrong but didn't cause issues till now because of the extra objdump subdir. --- Makefile.vex.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.vex.am b/Makefile.vex.am index 437053e03..f7371df78 100644 --- a/Makefile.vex.am +++ b/Makefile.vex.am @@ -203,13 +203,13 @@ LIBVEX_CFLAGS = ${LTO_CFLAGS} \ libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON) libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \ - $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv + $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -I$(srcdir)/priv libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \ $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS) if VGCONF_HAVE_PLATFORM_SEC libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON) libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \ - $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv + $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -I$(srcdir)/priv libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \ $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS) endif @@ -217,14 +217,14 @@ endif libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ $(LIBVEXMULTIARCH_SOURCES) libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \ - $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv + $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -I$(srcdir)/priv libvexmultiarch_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \ $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS) if VGCONF_HAVE_PLATFORM_SEC libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \ $(LIBVEXMULTIARCH_SOURCES) libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \ - $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv + $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -I$(srcdir)/priv libvexmultiarch_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \ $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS) endif From bf154d815a9fd7f4aaae97e31aa03cecf69448d4 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 3 Jan 2026 18:24:34 +0100 Subject: [PATCH 220/502] Solaris: set VG_(resolved_exename) in load_client() Haven't needed it yet, but I would like to try using it in the readlink syscall wrapper. --- coregrind/m_initimg/initimg-solaris.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coregrind/m_initimg/initimg-solaris.c b/coregrind/m_initimg/initimg-solaris.c index 79072f3a8..bd2d822e5 100644 --- a/coregrind/m_initimg/initimg-solaris.c +++ b/coregrind/m_initimg/initimg-solaris.c @@ -94,6 +94,15 @@ static void load_client(/*OUT*/ExeInfo *info, /*NOTREACHED*/ } VG_(strcpy)(out_exe_name, exe_name); + if (VG_(resolved_exename) == NULL) { + HChar interp_name[VKI_PATH_MAX]; + if (VG_(try_get_interp)(exe_name, interp_name, VKI_PATH_MAX)) { + exe_name = interp_name; + } + HChar resolved_name[VKI_PATH_MAX]; + VG_(realpath)(exe_name, resolved_name); + VG_(resolved_exename) = VG_(strdup)("initimg-solaris.lc.1", resolved_name); + } /* Set initial brk values. */ if (info->ldsoexec) { From 5c0f5e604bc3a4e8822ea59c488c123af6284afd Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 3 Jan 2026 13:48:50 +0100 Subject: [PATCH 221/502] Bug 514094 - readlink("/proc/self/exe") overwrites buffer beyond its return value Used the reproducer as the basis for a test on Solaris and Linux. --- .gitignore | 1 + NEWS | 1 + coregrind/m_syswrap/syswrap-generic.c | 24 +++++++++++++---------- none/tests/Makefile.am | 2 ++ none/tests/bug514094.c | 28 +++++++++++++++++++++++++++ none/tests/bug514094.stderr.exp | 2 ++ none/tests/bug514094.vgtest | 2 ++ 7 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 none/tests/bug514094.c create mode 100644 none/tests/bug514094.stderr.exp create mode 100644 none/tests/bug514094.vgtest diff --git a/.gitignore b/.gitignore index 039ce52a9..5ac1f3cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1579,6 +1579,7 @@ /none/tests/bug290061 /none/tests/bug491394 /none/tests/bug492678 +/none/tests/bug514094 /none/tests/closeall /none/tests/coolo_sigaction /none/tests/coolo_strlen diff --git a/NEWS b/NEWS index e0bdc122c..1da711b26 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 513522 m_libcassert.c: 'ordered comparison of pointer with integer zero' compiler warning 513475 Add SSE4.1 PMULLD instruction for x86 32 bit +514094 readlink("/proc/self/exe") overwrites buffer beyond its return value To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 2c113c69c..c0e717d27 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -5065,20 +5065,16 @@ POST(sys_poll) PRE(sys_readlink) { - FUSE_COMPATIBLE_MAY_BLOCK(); PRINT("sys_readlink ( %#" FMT_REGWORD "x(%s), %#" FMT_REGWORD "x, %llu )", ARG1, (char*)(Addr)ARG1, ARG2, (ULong)ARG3); PRE_REG_READ3(long, "readlink", const char *, path, char *, buf, int, bufsiz); PRE_MEM_RASCIIZ( "readlink(path)", ARG1 ); PRE_MEM_WRITE( "readlink(buf)", ARG2,ARG3 ); -} -POST(sys_readlink) -{ + Bool fuse_may_block = True; #if defined(VGO_linux) || defined(VGO_solaris) { - Word saved = SYSNO; #if defined(VGO_linux) #define PID_EXEPATH "/proc/%d/exe" #define SELF_EXEPATH "/proc/self/exe" @@ -5097,14 +5093,22 @@ POST(sys_readlink) VG_(sprintf)(name, PID_EXEPATH, VG_(getpid)()); if (ML_(safe_to_deref)(arg1s, 1) && (VG_STREQ(arg1s, name) || VG_STREQ(arg1s, SELF_EXEPATH))) { - VG_(sprintf)(name, SELF_EXEFD, VG_(cl_exec_fd)); - SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, (UWord)name, - ARG2, ARG3)); + HChar* out_name = (HChar*)ARG2; + SizeT res = VG_(strlen)(VG_(resolved_exename)); + VG_(strncpy)(out_name, VG_(resolved_exename), res); + SET_STATUS_Success(res); + fuse_may_block = False; } } #endif - if (SUCCESS && RES > 0) - POST_MEM_WRITE( ARG2, RES ); + + if (fuse_may_block) + FUSE_COMPATIBLE_MAY_BLOCK(); +} + +POST(sys_readlink) +{ + POST_MEM_WRITE( ARG2, RES ); } PRE(sys_readv) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 0cc4ca8b0..3147d784c 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -111,6 +111,7 @@ EXTRA_DIST = \ bug290061.vgtest bug290061.stderr.exp \ bug491394.vgtest bug491394.stderr.exp \ bug492678.vgtest bug492678.stderr.exp \ + bug514094,vgtest bug514094.stderr.exp \ closeall.stderr.exp closeall.vgtest \ cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \ cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \ @@ -285,6 +286,7 @@ check_PROGRAMS = \ bug129866 bug234814 \ bug290061 \ bug492678 \ + bug514094 \ closeall coolo_strlen \ discard exec-sigmask execve faultstatus fcntl_setown \ fdleak_cmsg fdleak_creat fdleak_doubleclose0 fdleak_dup fdleak_dup2 \ diff --git a/none/tests/bug514094.c b/none/tests/bug514094.c new file mode 100644 index 000000000..d5fcd299a --- /dev/null +++ b/none/tests/bug514094.c @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include +#include +#include +#include "../../config.h" + +int main(int argc, char** argv) +{ + char buf[PATH_MAX]; + memset(buf, 0, PATH_MAX); +#if defined(VGO_solaris) + int ret = readlink("/proc/self/path/a.out", buf, PATH_MAX); +#else + // Linux, and maybe one day NetBSD + // other platforms excluded by .vgtest prereq + int ret = readlink("/proc/self/exe", buf, PATH_MAX); +#endif + if (argc > 1) { + printf("ret = %d, buf = %.64s\n", ret, buf); + } + char resolved[PATH_MAX]; + realpath(argv[0], resolved); + assert(strcmp(resolved, buf) == 0); +} + diff --git a/none/tests/bug514094.stderr.exp b/none/tests/bug514094.stderr.exp new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/none/tests/bug514094.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/bug514094.vgtest b/none/tests/bug514094.vgtest new file mode 100644 index 000000000..292428cb7 --- /dev/null +++ b/none/tests/bug514094.vgtest @@ -0,0 +1,2 @@ +prereq: ../../tests/os_test solaris || ../../tests/os_test linux +prog: bug514094 From bd9edb8fcd0a8692d865e08fab2a573a4cde4c16 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 3 Jan 2026 21:17:00 +0100 Subject: [PATCH 222/502] readlink[at] syswrap: limit copy to bufsiz when path is proc self exe --- .gitignore | 1 + coregrind/m_syswrap/syswrap-generic.c | 1 + coregrind/m_syswrap/syswrap-linux.c | 24 ++++++++++++++---------- none/tests/bug514094.c | 12 ++++++++++++ none/tests/linux/Makefile.am | 2 ++ 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 5ac1f3cb9..5754f271f 100644 --- a/.gitignore +++ b/.gitignore @@ -1921,6 +1921,7 @@ /none/tests/linux/mremap6 /none/tests/linux/open_client /none/tests/linux/pthread-stack +/none/tests/linux/readlinkat_self /none/tests/linux/stack-overflow /none/tests/linux/getdents_filter diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index c0e717d27..406e6960b 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -5095,6 +5095,7 @@ PRE(sys_readlink) && (VG_STREQ(arg1s, name) || VG_STREQ(arg1s, SELF_EXEPATH))) { HChar* out_name = (HChar*)ARG2; SizeT res = VG_(strlen)(VG_(resolved_exename)); + res = VG_MIN(res, ARG3); VG_(strncpy)(out_name, VG_(resolved_exename), res); SET_STATUS_Success(res); fuse_may_block = False; diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 10e63348d..53b620585 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -6684,14 +6684,10 @@ PRE(sys_readlinkat) ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "readlinkat", tid, status); PRE_MEM_RASCIIZ( "readlinkat(path)", ARG2 ); PRE_MEM_WRITE( "readlinkat(buf)", ARG3,ARG4 ); -} -POST(sys_readlinkat) -{ + Bool fuse_may_block = True; HChar name[30]; // large enough - Word saved = SYSNO; - // @todo PJF why is this done in POST and not in PRE? /* * Handle the case where readlinkat is looking at /proc/self/exe or * /proc//exe. @@ -6700,13 +6696,21 @@ POST(sys_readlinkat) if (ML_(safe_to_deref)((void*)(Addr)ARG2, 1) && (VG_(strcmp)((HChar *)(Addr)ARG2, name) == 0 || VG_(strcmp)((HChar *)(Addr)ARG2, "/proc/self/exe") == 0)) { - VG_(sprintf)(name, "/proc/self/fd/%d", VG_(cl_exec_fd)); - SET_STATUS_from_SysRes( VG_(do_syscall4)(saved, ARG1, (UWord)name, - ARG3, ARG4)); + HChar* out_name = (HChar*)ARG3; + SizeT res = VG_(strlen)(VG_(resolved_exename)); + res = VG_MIN(res, ARG4); + VG_(strncpy)(out_name, VG_(resolved_exename), res); + SET_STATUS_Success(res); + fuse_may_block = False; } - if (SUCCESS && RES > 0) - POST_MEM_WRITE( ARG3, RES ); + if (fuse_may_block) + FUSE_COMPATIBLE_MAY_BLOCK(); +} + +POST(sys_readlinkat) +{ + POST_MEM_WRITE( ARG3, RES ); } PRE(sys_fchmodat) diff --git a/none/tests/bug514094.c b/none/tests/bug514094.c index d5fcd299a..848db1d82 100644 --- a/none/tests/bug514094.c +++ b/none/tests/bug514094.c @@ -24,5 +24,17 @@ int main(int argc, char** argv) char resolved[PATH_MAX]; realpath(argv[0], resolved); assert(strcmp(resolved, buf) == 0); + + const size_t small_buf_size = 11; + char small_buf[11]; + memset(small_buf, '#', 11); +#if defined(VGO_solaris) + ret = readlink("/proc/self/path/a.out", small_buf, 10); +#else + ret = readlink("/proc/self/exe", small_buf, 10); +#endif + assert(strncmp(resolved, small_buf, 10) == 0); + assert(small_buf[10] == '#'); + } diff --git a/none/tests/linux/Makefile.am b/none/tests/linux/Makefile.am index 519eb7dd6..20540247f 100644 --- a/none/tests/linux/Makefile.am +++ b/none/tests/linux/Makefile.am @@ -20,6 +20,7 @@ EXTRA_DIST = \ mremap6.stderr.exp mremap6.vgtest \ open_client.stderr.exp open_client.vgtest \ pthread-stack.stderr.exp pthread-stack.vgtest \ + readlinkat_self.stderr.exp readlinkat_self.vgtest \ stack-overflow.stderr.exp stack-overflow.vgtest check_PROGRAMS = \ @@ -36,6 +37,7 @@ check_PROGRAMS = \ mremap5 \ mremap6 \ pthread-stack \ + readlinkat_self \ stack-overflow if HAVE_OPENAT2 From 987034c44105cdc2f6f8d84751135d23bd5c37b6 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 3 Jan 2026 22:16:58 +0100 Subject: [PATCH 223/502] Regtest: add missing readlinkat_self files --- none/tests/linux/readlinkat_self.c | 22 +++++++++++++++++++++ none/tests/linux/readlinkat_self.stderr.exp | 2 ++ none/tests/linux/readlinkat_self.vgtest | 1 + 3 files changed, 25 insertions(+) create mode 100644 none/tests/linux/readlinkat_self.c create mode 100644 none/tests/linux/readlinkat_self.stderr.exp create mode 100644 none/tests/linux/readlinkat_self.vgtest diff --git a/none/tests/linux/readlinkat_self.c b/none/tests/linux/readlinkat_self.c new file mode 100644 index 000000000..5a36d55d8 --- /dev/null +++ b/none/tests/linux/readlinkat_self.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include +#include +#include +#include +#include "../../config.h" + +int main(int argc, char** argv) +{ + char buf[PATH_MAX]; + memset(buf, 0, PATH_MAX); + int ret = readlinkat(99, "/proc/self/exe", buf, PATH_MAX); + if (argc > 1) { + printf("ret = %d, buf = %.64s\n", ret, buf); + } + char resolved[PATH_MAX]; + realpath(argv[0], resolved); + assert(strcmp(resolved, buf) == 0); +} + diff --git a/none/tests/linux/readlinkat_self.stderr.exp b/none/tests/linux/readlinkat_self.stderr.exp new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/none/tests/linux/readlinkat_self.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/linux/readlinkat_self.vgtest b/none/tests/linux/readlinkat_self.vgtest new file mode 100644 index 000000000..3b91da54c --- /dev/null +++ b/none/tests/linux/readlinkat_self.vgtest @@ -0,0 +1 @@ +prog: readlinkat_self From dae37ecd2692e0e5beba77c296c2648ebbf47637 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 3 Jan 2026 22:32:56 +0100 Subject: [PATCH 224/502] regtest: fix warning Added a nice const named variable then didn't use it --- none/tests/bug514094.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/none/tests/bug514094.c b/none/tests/bug514094.c index 848db1d82..5010272cb 100644 --- a/none/tests/bug514094.c +++ b/none/tests/bug514094.c @@ -26,8 +26,8 @@ int main(int argc, char** argv) assert(strcmp(resolved, buf) == 0); const size_t small_buf_size = 11; - char small_buf[11]; - memset(small_buf, '#', 11); + char small_buf[small_buf_size]; + memset(small_buf, '#', small_buf_size); #if defined(VGO_solaris) ret = readlink("/proc/self/path/a.out", small_buf, 10); #else From 294742a2d9f431fd2dcd73db161f67fb12ddd833 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 3 Jan 2026 22:50:28 +0100 Subject: [PATCH 225/502] Fix bug514094,vgtest typo in none/tests/Makefile.am --- none/tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 3147d784c..4b9b1fe94 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -111,7 +111,7 @@ EXTRA_DIST = \ bug290061.vgtest bug290061.stderr.exp \ bug491394.vgtest bug491394.stderr.exp \ bug492678.vgtest bug492678.stderr.exp \ - bug514094,vgtest bug514094.stderr.exp \ + bug514094.vgtest bug514094.stderr.exp \ closeall.stderr.exp closeall.vgtest \ cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \ cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \ From 8d8023d107699c7c2d97acf2dcb77bae71c0b1cf Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 4 Jan 2026 09:34:54 +0100 Subject: [PATCH 226/502] syswrap readlink and linux readlinkat: check that buf is accessible for proc self exe case Also update the t testcases to cover this. --- coregrind/m_syswrap/syswrap-generic.c | 8 ++++++-- coregrind/m_syswrap/syswrap-linux.c | 8 ++++++-- none/tests/Makefile.am | 1 + none/tests/bug514094.c | 8 ++++++++ none/tests/linux/Makefile.am | 1 + none/tests/linux/readlinkat_self.c | 12 ++++++++++++ 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 406e6960b..aa4a0caf1 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -5096,8 +5096,12 @@ PRE(sys_readlink) HChar* out_name = (HChar*)ARG2; SizeT res = VG_(strlen)(VG_(resolved_exename)); res = VG_MIN(res, ARG3); - VG_(strncpy)(out_name, VG_(resolved_exename), res); - SET_STATUS_Success(res); + if (ML_(safe_to_deref)(out_name, res)) { + VG_(strncpy)(out_name, VG_(resolved_exename), res); + SET_STATUS_Success(res); + } else { + SET_STATUS_Failure(VKI_EFAULT); + } fuse_may_block = False; } } diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 53b620585..6853e5e94 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -6699,8 +6699,12 @@ PRE(sys_readlinkat) HChar* out_name = (HChar*)ARG3; SizeT res = VG_(strlen)(VG_(resolved_exename)); res = VG_MIN(res, ARG4); - VG_(strncpy)(out_name, VG_(resolved_exename), res); - SET_STATUS_Success(res); + if (ML_(safe_to_deref)(out_name, res)) { + VG_(strncpy)(out_name, VG_(resolved_exename), res); + SET_STATUS_Success(res); + } else { + SET_STATUS_Failure(VKI_EFAULT); + } fuse_may_block = False; } diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 4b9b1fe94..51b5a5b17 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -392,6 +392,7 @@ bug290061_LDFLAGS = @FLAG_PIE@ bug491394_LDADD = -lc bug491394_LDFLAGS = -nostdlib -static bug491394_CFLAGS = ${AM_CFLAGS} -Os +bug514094_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_STRINGOP_OVERFLOW@ execve_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ if VGCONF_OS_IS_SOLARIS fcntl_setown_LDADD = -lsocket -lnsl diff --git a/none/tests/bug514094.c b/none/tests/bug514094.c index 5010272cb..a62a6406b 100644 --- a/none/tests/bug514094.c +++ b/none/tests/bug514094.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "../../config.h" int main(int argc, char** argv) @@ -36,5 +37,12 @@ int main(int argc, char** argv) assert(strncmp(resolved, small_buf, 10) == 0); assert(small_buf[10] == '#'); +#if defined(VGO_solaris) + ret = readlink("/proc/self/path/a.out", (char*)1, 100); +#else + ret = readlink("/proc/self/exe", (char*)1, 100); +#endif + assert(ret == -1); + assert(errno = EFAULT); } diff --git a/none/tests/linux/Makefile.am b/none/tests/linux/Makefile.am index 20540247f..a1389fe0d 100644 --- a/none/tests/linux/Makefile.am +++ b/none/tests/linux/Makefile.am @@ -59,6 +59,7 @@ open_client_SOURCES = open_client.cpp endif clonev_LDADD = -lpthread pthread_stack_LDADD = -lpthread +readlinkat_self_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_STRINGOP_OVERFLOW@ stack_overflow_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ \ @FLAG_W_NO_INFINITE_RECURSION@ diff --git a/none/tests/linux/readlinkat_self.c b/none/tests/linux/readlinkat_self.c index 5a36d55d8..586581a0d 100644 --- a/none/tests/linux/readlinkat_self.c +++ b/none/tests/linux/readlinkat_self.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "../../config.h" int main(int argc, char** argv) @@ -18,5 +19,16 @@ int main(int argc, char** argv) char resolved[PATH_MAX]; realpath(argv[0], resolved); assert(strcmp(resolved, buf) == 0); + + const size_t small_buf_size = 11; + char small_buf[small_buf_size]; + memset(small_buf, '#', small_buf_size); + ret = readlinkat(100, "/proc/self/exe", small_buf, 10); + assert(strncmp(resolved, small_buf, 10) == 0); + assert(small_buf[10] == '#'); + + ret = readlinkat(101, "/proc/self/exe", (char*)1, 100); + assert(ret == -1); + assert(errno = EFAULT); } From 827a1b8c307a2eafa001788565e14af3445f2151 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 4 Jan 2026 10:17:15 +0100 Subject: [PATCH 227/502] solaris readlinkat: check that buf is accessible for proc self path a.out --- .gitignore | 1 + coregrind/m_syswrap/syswrap-solaris.c | 13 ++++--- none/tests/solaris/Makefile.am | 3 ++ none/tests/solaris/readlinkat_self.c | 34 +++++++++++++++++++ none/tests/solaris/readlinkat_self.stderr.exp | 2 ++ none/tests/solaris/readlinkat_self.vgtest | 1 + 6 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 none/tests/solaris/readlinkat_self.c create mode 100644 none/tests/solaris/readlinkat_self.stderr.exp create mode 100644 none/tests/solaris/readlinkat_self.vgtest diff --git a/.gitignore b/.gitignore index 5754f271f..12221dc8d 100644 --- a/.gitignore +++ b/.gitignore @@ -2322,6 +2322,7 @@ /none/tests/solaris/proc_auxv_multiple /none/tests/solaris/proc_psinfo /none/tests/solaris/pthread-stack +/none/tests/solaris/readlinkat_self /none/tests/solaris/reserve_sysstat_addr /none/tests/solaris/reserve_sysstat_zone_addr /none/tests/solaris/resolv diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 2665633f4..57af54fdc 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -2295,7 +2295,6 @@ PRE(sys_readlinkat) /* ssize_t readlinkat(int dfd, const char *path, char *buf, size_t bufsiz); */ HChar name[30]; // large enough - Word saved = SYSNO; /* Interpret the first argument as 32-bit value even on 64-bit architecture. This is different from Linux, for example, where glibc sign-extends it. */ @@ -2317,9 +2316,15 @@ PRE(sys_readlinkat) if (ML_(safe_to_deref)((void*)ARG2, 1) && (!VG_(strcmp)((HChar*)ARG2, name) || !VG_(strcmp)((HChar*)ARG2, "/proc/self/path/a.out"))) { - VG_(sprintf)(name, "/proc/self/path/%d", VG_(cl_exec_fd)); - SET_STATUS_from_SysRes(VG_(do_syscall4)(saved, dfd, (UWord)name, ARG3, - ARG4)); + HChar* out_name = (HChar*)ARG3; + SizeT res = VG_(strlen)(VG_(resolved_exename)); + res = VG_MIN(res, ARG4); + if (ML_(safe_to_deref)(out_name, res)) { + VG_(strncpy)(out_name, VG_(resolved_exename), res); + SET_STATUS_Success(res); + } else { + SET_STATUS_Failure(VKI_EFAULT); + } } } diff --git a/none/tests/solaris/Makefile.am b/none/tests/solaris/Makefile.am index e7d7a0778..80565493f 100644 --- a/none/tests/solaris/Makefile.am +++ b/none/tests/solaris/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST = \ proc_psinfo.stderr.exp proc_psinfo.stdout.exp proc_psinfo.vgtest \ posix_spawn.stderr.exp posix_spawn.vgtest \ pthread-stack.stderr.exp pthread-stack.vgtest \ + readlinkat_self.stderr.exp readlinkat_self.vgtest \ reserve_sysstat_addr.map reserve_sysstat_addr.stderr.exp reserve_sysstat_addr.vgtest \ reserve_sysstat_zone_addr.map reserve_sysstat_zone_addr.stderr.exp reserve_sysstat_zone_addr.vgtest \ resolv.stdout.exp resolv.stderr.exp resolv.vgtest \ @@ -47,6 +48,7 @@ check_PROGRAMS = \ proc_psinfo \ posix_spawn \ pthread-stack \ + readlinkat_self \ resolv \ sigresend \ stack_overflow \ @@ -57,6 +59,7 @@ AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) pthread_stack_LDADD = -lpthread +readlinkat_self_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_STRINGOP_OVERFLOW@ resolv_LDADD = -lresolv stack_overflow_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_INFINITE_RECURSION@ stack_prot_LDFLAGS = -Wl,-M,/usr/lib/ld/map.noexstk diff --git a/none/tests/solaris/readlinkat_self.c b/none/tests/solaris/readlinkat_self.c new file mode 100644 index 000000000..ca60834ae --- /dev/null +++ b/none/tests/solaris/readlinkat_self.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../config.h" + +int main(int argc, char** argv) +{ + char buf[PATH_MAX]; + memset(buf, 0, PATH_MAX); + int ret = readlinkat(99, "/proc/self/path/a.out", buf, PATH_MAX); + if (argc > 1) { + printf("ret = %d, buf = %.64s\n", ret, buf); + } + char resolved[PATH_MAX]; + realpath(argv[0], resolved); + assert(strcmp(resolved, buf) == 0); + + const size_t small_buf_size = 11; + char small_buf[small_buf_size]; + memset(small_buf, '#', small_buf_size); + ret = readlinkat(100, "/proc/self/path/a.out", small_buf, 10); + assert(strncmp(resolved, small_buf, 10) == 0); + assert(small_buf[10] == '#'); + + ret = readlinkat(101, "/proc/self/path/a.out", (char*)1, 100); + assert(ret == -1); + assert(errno = EFAULT); +} + diff --git a/none/tests/solaris/readlinkat_self.stderr.exp b/none/tests/solaris/readlinkat_self.stderr.exp new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/none/tests/solaris/readlinkat_self.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/solaris/readlinkat_self.vgtest b/none/tests/solaris/readlinkat_self.vgtest new file mode 100644 index 000000000..3b91da54c --- /dev/null +++ b/none/tests/solaris/readlinkat_self.vgtest @@ -0,0 +1 @@ +prog: readlinkat_self From 21e5da76b5b0a830eda9143efa66e44ce25073f4 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 6 Jan 2026 20:33:16 +0100 Subject: [PATCH 228/502] valgrind.h: FreeBSD cleanup Wasn't undefining the PLAT macros Add FreeBSD to the head and tail comments for each arch amd64 is getting crowded, if we add any more OSes then I think just "amd64 platforms" will be enough rather than listing 5 or 6 or more platforms. --- include/valgrind.h.in | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/include/valgrind.h.in b/include/valgrind.h.in index 24a659998..c49be6b3c 100644 --- a/include/valgrind.h.in +++ b/include/valgrind.h.in @@ -266,7 +266,7 @@ inline asm stuff to be useful. */ -/* ----------------- x86-{linux,darwin,solaris} ---------------- */ +/* -------------- x86-{linux,darwin,solaris,freebsd} ------------- */ #if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin) \ || (defined(PLAT_x86_win32) && defined(__GNUC__)) \ @@ -331,7 +331,7 @@ typedef } while (0) #endif /* PLAT_x86_linux || PLAT_x86_darwin || (PLAT_x86_win32 && __GNUC__) - || PLAT_x86_solaris */ + || PLAT_x86_solaris || PLAT_x86_freebsd */ /* ------------------------- x86-Win32 ------------------------- */ @@ -406,7 +406,7 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, #endif /* PLAT_x86_win32 */ -/* ----------------- amd64-{linux,darwin,solaris} --------------- */ +/* -------------- amd64-{linux,darwin,solaris,freebsd} ------------ */ #if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ || defined(PLAT_amd64_solaris) \ @@ -471,7 +471,8 @@ typedef ); \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ +#endif /* PLAT_amd64_linux || PLAT_amd64_darwin + || PLAT_amd64_solaris || PLAT_amd64_freebsd */ /* ------------------------- amd64-Win64 ------------------------- */ @@ -774,7 +775,7 @@ typedef #endif /* PLAT_arm_linux */ -/* ------------------------ arm64-{linux,freebsd} ------------------------- */ +/* -------------------- arm64-{linux,freebsd} -------------------- */ #if defined(PLAT_arm64_linux) || defined(PLAT_arm64_freebsd) @@ -1310,7 +1311,7 @@ typedef do { volatile unsigned long _junk; \ CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0) -/* ----------------- x86-{linux,darwin,solaris} ---------------- */ +/* -------------- x86-{linux,darwin,solaris,freebsd} ------------- */ #if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin) \ || defined(PLAT_x86_solaris) || defined(PLAT_x86_freebsd) @@ -1740,9 +1741,10 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) -#endif /* PLAT_x86_linux || PLAT_x86_darwin || PLAT_x86_solaris */ +#endif /* PLAT_x86_linux || PLAT_x86_darwin + || PLAT_x86_solaris || PLAT_x86_freebsd */ -/* ---------------- amd64-{linux,darwin,solaris} --------------- */ +/* ------------- amd64-{linux,darwin,solaris,freebsd} ------------ */ #if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ || defined(PLAT_amd64_solaris) || defined(PLAT_amd64_freebsd) @@ -2294,7 +2296,8 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ +#endif /* PLAT_amd64_linux || PLAT_amd64_darwin + || PLAT_amd64_solaris || PLAT_amd64_freebsd */ /* ------------------------ ppc32-linux ------------------------ */ @@ -4368,7 +4371,7 @@ typedef #endif /* PLAT_arm_linux */ -/* ------------------------ arm64-linux ------------------------ */ +/* ------------------- arm64-{linux,freebsd} -------------------- */ #if defined(PLAT_arm64_linux) || defined(PLAT_arm64_freebsd) @@ -4817,7 +4820,7 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) -#endif /* PLAT_arm64_linux */ +#endif /* PLAT_arm64_linux || PLAT_arm64_freebsd */ /* ------------------------- s390x-linux ------------------------- */ @@ -7684,6 +7687,9 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) #undef PLAT_x86_darwin #undef PLAT_amd64_darwin +#undef PLAT_x86_freebsd +#undef PLAT_amd64_freebsd +#undef PLAT_arm64_freebsd #undef PLAT_x86_win32 #undef PLAT_amd64_win64 #undef PLAT_x86_linux From 19a34d1d9376f459cf0a19feb39ea4ab27690390 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 7 Jan 2026 22:20:49 +0100 Subject: [PATCH 229/502] Disable linux madvise MADV_GUARD_INSTALL glibc 2.42+ (with linux 6.13+) uses MADV_GUARD_INSTALL to setup stack guard pages. valgrind currently isn't able to track this and such guard pages also don't show up in /proc maps (only in /proc pagemap since linux 6.14). For now valgrind fails a madvise MADV_GUARD_INSTALL syscall with EINVAL. This causes glibc to fall back to mprotect PROT_NONE which valgrind is able to track. https://bugs.kde.org/show_bug.cgi?id=511717 --- NEWS | 14 +++++++++++++- coregrind/m_syswrap/syswrap-generic.c | 10 ++++++++++ include/vki/vki-linux.h | 7 +++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1da711b26..d5188f7c6 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,17 @@ X86/Android, X86/Solaris, AMD64/Solaris, X86/macOS, AMD64/macOS. X86/FreeBSD, AMD64/FreeBSD and ARM64/FreeBSD. There is preliminary support for nanoMIPS/Linux. macOS is supported up to version 12 Monterey (amd64 only). - ==================== CORE CHANGES =================== +* ==================== CORE CHANGES =================== + +* linux madvise MADV_GUARD_INSTALL unsupported + + glibc 2.42+ (with linux 6.13+) uses MADV_GUARD_INSTALL to setup + stack guard pages. valgrind currently isn't able to track this and + such guard pages also don't show up in /proc maps (only in /proc + pagemap since linux 6.14). For now valgrind fails a madvise + MADV_GUARD_INSTALL syscall with EINVAL. This causes glibc to fall + back to mprotect PROT_NONE which valgrind is able to track. + See also https://bugs.kde.org/show_bug.cgi?id=514297 * ================== PLATFORM CHANGES ================= @@ -45,6 +55,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 511329 Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) 511713 Refactor syscall argument handling +511717 gdbserver (valgrind_read_memory) the 'impossible' happened: + Killed by fatal signal (SIGSEGV) 511972 valgrind-3.26.0 tests fail to build on upcomig gcc-16: unrecognized command-line option '-Wno-alloc-size-larger-than=18446744073709551615' diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index aa4a0caf1..d8910fdba 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -3112,6 +3112,16 @@ PRE(sys_madvise) ARG1, ARG2, SARG3); PRE_REG_READ3(long, "madvise", unsigned long, start, vki_size_t, length, int, advice); + /* Ugly hack to try to bypass the problem of guard pages not being + understood by valgrind aspace manager. + By making the syscall fail, we expect glibc to fallback + on implementing guard pages with mprotect PROT_NONE to ensure + the valgrind address space manager is not confused wrongly + believing the guard page is rw. */ +#ifdef VKI_MADV_GUARD_INSTALL + if (ARG3 == VKI_MADV_GUARD_INSTALL) + SET_STATUS_Failure( VKI_EINVAL ); +#endif } #if HAVE_MREMAP diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h index bb6b8d72d..00e228a83 100644 --- a/include/vki/vki-linux.h +++ b/include/vki/vki-linux.h @@ -1364,6 +1364,13 @@ struct vki_seminfo { #define VKI_MREMAP_MAYMOVE 1 #define VKI_MREMAP_FIXED 2 +//---------------------------------------------------------------------- +// Common madvise flags mman-common.h +//---------------------------------------------------------------------- + +#define VKI_MADV_GUARD_INSTALL 102 +#define VKI_MADV_GUARD_REMOVE 103 + //---------------------------------------------------------------------- // From linux-2.6.31-rc4/include/linux/futex.h //---------------------------------------------------------------------- From 5d20965ee0aaecbb049ddf6cebcd79704a7a36ae Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 9 Jan 2026 19:34:18 +0100 Subject: [PATCH 230/502] Fix typo --- coregrind/m_redir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c index e0f596fbe..e705a767f 100644 --- a/coregrind/m_redir.c +++ b/coregrind/m_redir.c @@ -539,7 +539,7 @@ void VG_(redir_notify_new_DebugInfo)( DebugInfo* newdi ) * set a global flag. * * https://bugs.kde.org/show_bug.cgi?id=497723 but not for - * callgrind because demangled overloaded manes get + * callgrind because demangled overloaded names get * incorrectly counted together. */ if (!isText && VG_(strcmp)(*names, "__gnat_ada_main_program_name") == 0 && From a859a42723c66929b70d16656e462d21d2c4ff59 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 9 Jan 2026 19:48:42 +0100 Subject: [PATCH 231/502] regtest: clean a bit of unused code --- exp-bbv/tests/x86/million.S | 3 --- 1 file changed, 3 deletions(-) diff --git a/exp-bbv/tests/x86/million.S b/exp-bbv/tests/x86/million.S index ffef1e554..6ddd27a8a 100644 --- a/exp-bbv/tests/x86/million.S +++ b/exp-bbv/tests/x86/million.S @@ -31,9 +31,6 @@ exit: #elif defined(VGO_solaris) pushl $0 # we return 0 int $0x91 # and exit -#elif defined(VGO_freebsd) - mov $0x1,%eax # we return 0 - int $0x80 # and exit #else # error "Unknown OS" #endif From 80c17e5e70d00a56bc51d37b47799a0d5f897429 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 10 Jan 2026 15:53:43 +0100 Subject: [PATCH 232/502] regtest: undo changes to str_tester as a workaround for darwin checked functions I had added parens to force the use of the function rarther than a macro expanding to the _chk version. The _chk functions are now wrapped so no longer need to keep the workaround. --- memcheck/tests/str_tester.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c index d910b6909..1201bbfc2 100644 --- a/memcheck/tests/str_tester.c +++ b/memcheck/tests/str_tester.c @@ -979,14 +979,14 @@ static void test_memcmp (void) { it = "memcmp"; - check((memcmp)("a", "a", 1) == 0, 1); /* Identity. */ - check((memcmp)("abc", "abc", 3) == 0, 2); /* Multicharacter. */ - check((memcmp)("abcd", "abce", 4) < 0, 3); /* Honestly unequal. */ - check((memcmp)("abce", "abcd", 4) > 0, 4); - check((memcmp)("alph", "beta", 4) < 0, 5); - check((memcmp)("a\203", "a\003", 2) > 0, 6); - check((memcmp)("abce", "abcd", 3) == 0, 7); /* Count limited. */ - check((memcmp)("abc", "def", 0) == 0, 8); /* Zero count. */ + check(memcmp("a", "a", 1) == 0, 1); /* Identity. */ + check(memcmp("abc", "abc", 3) == 0, 2); /* Multicharacter. */ + check(memcmp("abcd", "abce", 4) < 0, 3); /* Honestly unequal. */ + check(memcmp("abce", "abcd", 4) > 0, 4); + check(memcmp("alph", "beta", 4) < 0, 5); + check(memcmp("a\203", "a\003", 2) > 0, 6); + check(memcmp("abce", "abcd", 3) == 0, 7); /* Count limited. */ + check(memcmp("abc", "def", 0) == 0, 8); /* Zero count. */ } static void From cf84985d5bdfff56d1877406dc351ad111cd7faf Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 10 Jan 2026 16:04:59 +0100 Subject: [PATCH 233/502] Code cleaning: remove duplicate conditional blocks vg_replace_strmem.c contained stpcpy twice for VGO_freebsd --- shared/vg_replace_strmem.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index 24ea6c37b..4cf28a670 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -1300,11 +1300,6 @@ static inline void my_exit ( int x ) STPCPY(VG_Z_LD_ELF32_SO_1, stpcpy) STPCPY(VG_Z_LIBC_SONAME, stpcpy) -#elif defined(VGO_freebsd) - STPCPY(VG_Z_LD_ELF_SO_1, stpcpy) - STPCPY(VG_Z_LD_ELF32_SO_1, stpcpy) - STPCPY(VG_Z_LIBC_SONAME, stpcpy) - #elif defined(VGO_darwin) //STPCPY(VG_Z_LIBC_SONAME, stpcpy) //STPCPY(VG_Z_DYLD, stpcpy) From 656a88b9eec1e538a6f8fac8101c5a50149eddc1 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 11 Jan 2026 11:39:55 +0100 Subject: [PATCH 234/502] Code cleaning: use #elif in coregrind/m_trampoline.S The code was using #else #if with an ever growing list of Chained #elifs with just one #endif is nicer. --- coregrind/m_trampoline.S | 68 ++++++++++------------------------------ 1 file changed, 17 insertions(+), 51 deletions(-) diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S index 6ba42613e..ec25136ef 100644 --- a/coregrind/m_trampoline.S +++ b/coregrind/m_trampoline.S @@ -144,8 +144,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------------- amd64-linux ----------------------*/ -#else -#if defined(VGP_amd64_linux) +#elif defined(VGP_amd64_linux) # define UD2_16 ud2 ; ud2 ; ud2 ; ud2 ;ud2 ; ud2 ; ud2 ; ud2 # define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16 @@ -356,8 +355,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- ppc32-linux ----------------*/ -#else -#if defined(VGP_ppc32_linux) +#elif defined(VGP_ppc32_linux) # define UD2_16 trap ; trap ; trap; trap # define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16 @@ -479,8 +477,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- ppc64-linux ----------------*/ -#else -#if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux) +#elif defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux) # define UD2_16 trap ; trap ; trap; trap # define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16 @@ -662,8 +659,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- arm-linux ----------------*/ -#else -#if defined(VGP_arm_linux) +#elif defined(VGP_arm_linux) # define UD2_4 .word 0xFFFFFFFF # define UD2_16 UD2_4 ; UD2_4 ; UD2_4 ; UD2_4 @@ -839,8 +835,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- arm64-linux ----------------*/ -#else -#if defined(VGP_arm64_linux) +#elif defined(VGP_arm64_linux) # define UD2_4 .word 0xFFFFFFFF # define UD2_16 UD2_4 ; UD2_4 ; UD2_4 ; UD2_4 @@ -939,8 +934,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- x86-freebsd ----------------*/ -#else -#if defined(VGP_x86_freebsd) +#elif defined(VGP_x86_freebsd) .global VG_(trampoline_stuff_start) VG_(trampoline_stuff_start): @@ -967,8 +961,7 @@ VG_(x86_freebsd_SUBST_FOR_sigreturn): .global VG_(trampoline_stuff_end) VG_(trampoline_stuff_end): -#else -#if defined(VGP_amd64_freebsd) +#elif defined(VGP_amd64_freebsd) # define UD2_16 ud2 ; ud2 ; ud2 ; ud2 ;ud2 ; ud2 ; ud2 ; ud2 # define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16 @@ -1027,8 +1020,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- arm64-freebsd ----------------*/ -#else -#if defined(VGP_arm64_freebsd) +#elif defined(VGP_arm64_freebsd) # define UD2_4 .word 0xFFFFFFFF # define UD2_16 UD2_4 ; UD2_4 ; UD2_4 ; UD2_4 @@ -1069,8 +1061,7 @@ VG_(trampoline_stuff_end): /*---------------- x86-darwin ----------------*/ -#else -#if defined(VGP_x86_darwin) +#elif defined(VGP_x86_darwin) /* a leading page of unexecutable code */ .fill 2048, 2, 0x0b0f /* `ud2` */ @@ -1229,8 +1220,7 @@ VG_(trampoline_stuff_end): /*---------------- amd64-darwin ----------------*/ -#else -#if defined(VGP_amd64_darwin) +#elif defined(VGP_amd64_darwin) /* a leading page of unexecutable code */ .fill 2048, 2, 0x0b0f /* `ud2` */ @@ -1400,8 +1390,7 @@ VG_(trampoline_stuff_end): /*---------------- s390x-linux ----------------*/ -#else -#if defined(VGP_s390x_linux) +#elif defined(VGP_s390x_linux) /* a leading page of unexecutable code */ .fill 2048, 2, 0x0000 @@ -1455,8 +1444,7 @@ VG_(trampoline_stuff_end): .fill 2048, 2, 0x0000 /*---------------------- mips32-linux ----------------------*/ -#else -#if defined(VGP_mips32_linux) +#elif defined(VGP_mips32_linux) # define UD2_16 trap ; trap ; trap; trap # define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16 @@ -1532,8 +1520,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------------- nanomips-linux --------------------*/ -#else -#if defined(VGP_nanomips_linux) +#elif defined(VGP_nanomips_linux) .global VG_(trampoline_stuff_start) VG_(trampoline_stuff_start): @@ -1581,8 +1568,7 @@ VG_(trampoline_stuff_end): /*---------------------- mips64-linux ----------------------*/ -#else -#if defined(VGP_mips64_linux) +#elif defined(VGP_mips64_linux) # define UD2_16 trap ; trap ; trap; trap # define UD2_64 UD2_16 ; UD2_16 ; UD2_16 ; UD2_16 @@ -1650,8 +1636,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- riscv64-linux ----------------*/ -#else -#if defined(VGP_riscv64_linux) +#elif defined(VGP_riscv64_linux) # define UD2_4 .word 0 # define UD2_16 UD2_4 ; UD2_4 ; UD2_4 ; UD2_4 @@ -1742,8 +1727,7 @@ VG_(trampoline_stuff_end): # undef UD2_PAGE /*---------------- x86-solaris ----------------*/ -#else -#if defined(VGP_x86_solaris) +#elif defined(VGP_x86_solaris) .global VG_(trampoline_stuff_start) VG_(trampoline_stuff_start): @@ -1796,8 +1780,7 @@ VG_(x86_solaris_REDIR_FOR_strlen): VG_(trampoline_stuff_end): /*---------------- amd64-solaris ----------------*/ -#else -#if defined(VGP_amd64_solaris) +#elif defined(VGP_amd64_solaris) .global VG_(trampoline_stuff_start) VG_(trampoline_stuff_start): @@ -1924,23 +1907,6 @@ VG_(trampoline_stuff_end): #else # error Unknown platform -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif -#endif #endif /* Let the linker know we don't need an executable stack */ From 52ab3d85f0dbc08cc8debcb21372e3642d3db0dd Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 11 Jan 2026 17:54:59 +0000 Subject: [PATCH 235/502] vg_regtest: Miscellaneous tweaks Drop the requirement that there must be at least one .stderr.exp file. That way we can eliminate some 440 empty stderr.exp files and a few stderrB.exp files. Drop the requirement that there must be a "filter_stderr" script. If there is nothing to filter (e.g. iropt-test) a filter script is not meaningful. In that is so desired, specify an empty stderr_filter and stderrB_filter in the .vgtest file. --- cachegrind/tests/Makefile.am | 2 +- cachegrind/tests/clreq.stderr.exp | 0 drd/tests/Makefile.am | 3 - drd/tests/getaddrinfo.stderr.exp | 0 drd/tests/local_static.stderr.exp | 0 drd/tests/sem_clockwait_np.stderr.exp | 0 gdbserver_tests/Makefile.am | 19 ---- gdbserver_tests/hgtls.stderr.exp | 0 gdbserver_tests/hgtls.stderrB.exp | 0 gdbserver_tests/mcblocklistsearch.stderr.exp | 0 gdbserver_tests/mcbreak.stderr.exp | 0 gdbserver_tests/mchelp.stderr.exp | 0 gdbserver_tests/mcinfcallRU.stderrB.exp | 0 gdbserver_tests/mcinvokeRU.stderr.exp | 0 gdbserver_tests/mcinvokeWS.stderr.exp | 0 gdbserver_tests/mcsignopass.stderrB.exp | 0 gdbserver_tests/mcsigpass.stderrB.exp | 0 gdbserver_tests/mcvabits.stderr.exp | 0 gdbserver_tests/mcwatchpoints.stderrB.exp | 0 gdbserver_tests/mssnapshot.stderr.exp | 0 gdbserver_tests/nlcontrolc.stderrB.exp | 0 gdbserver_tests/nlgone_abrt.stderrB.exp | 0 gdbserver_tests/nlgone_exit.stderrB.exp | 0 gdbserver_tests/nlgone_return.stderrB.exp | 0 gdbserver_tests/nlself_invalidate.stderrB.exp | 0 gdbserver_tests/nlvgdbsigqueue.stderrB.exp | 0 gdbserver_tests/solaris/Makefile.am | 1 - .../solaris/nlcontrolc.stderrB.exp | 0 helgrind/tests/Makefile.am | 17 ++- helgrind/tests/annotate_hbefore.stderr.exp | 0 helgrind/tests/bar_trivial.stderr.exp | 0 helgrind/tests/bug327548.stderr.exp | 0 helgrind/tests/bug392331_supp.stderr.exp | 0 helgrind/tests/bug484480.stderr.exp | 0 helgrind/tests/getaddrinfo.stderr.exp | 0 .../tests/pth_mempcpy_false_races.stderr.exp | 0 helgrind/tests/sem_clockwait_np.stderr.exp | 0 helgrind/tests/sem_timedwait.stderr.exp | 0 massif/tests/Makefile.am | 7 +- massif/tests/inlinfomalloc.stderr.exp | 0 massif/tests/malloc_usable.stderr.exp | 0 massif/tests/mmapunmap.stderr.exp | 0 memcheck/tests/Makefile.am | 101 +++++++++--------- memcheck/tests/amd64-linux/Makefile.am | 2 +- .../tests/amd64-linux/int3-amd64.stderr.exp | 0 memcheck/tests/amd64-solaris/Makefile.am | 4 +- .../amd64-solaris/context_rflags.stderr.exp | 0 .../tests/amd64-solaris/ldsoexec.stderr.exp | 0 memcheck/tests/amd64/Makefile.am | 24 ++--- memcheck/tests/amd64/bt_everything.stderr.exp | 0 memcheck/tests/amd64/bug132146.stderr.exp | 0 memcheck/tests/amd64/bug279698.stderr.exp | 0 memcheck/tests/amd64/bug492210_2.stderr.exp | 0 memcheck/tests/amd64/fxsave-amd64.stderr.exp | 0 memcheck/tests/amd64/insn_basic.stderr.exp | 1 - memcheck/tests/amd64/insn_fpu.stderr.exp | 1 - memcheck/tests/amd64/insn_mmx.stderr.exp | 1 - memcheck/tests/amd64/insn_sse.stderr.exp | 1 - memcheck/tests/amd64/insn_sse2.stderr.exp | 1 - memcheck/tests/amd64/more_x87_fp.stderr.exp | 0 memcheck/tests/amd64/rh2257546_128.stderr.exp | 0 memcheck/tests/amd64/rh2257546_256.stderr.exp | 0 memcheck/tests/amd64/shr_edx.stderr.exp | 0 memcheck/tests/amd64/sse_memory.stderr.exp | 0 memcheck/tests/arm64/Makefile.am | 2 +- memcheck/tests/arm64/bug484935.stderr.exp | 0 memcheck/tests/atomic_incs.stderr.exp | 0 .../tests/big_debuginfo_symbol.stderr.exp | 0 memcheck/tests/bug340392.stderr.exp | 0 memcheck/tests/bug401284.stderr.exp | 0 memcheck/tests/bug472219.stderr.exp | 0 memcheck/tests/bug484002.stderr.exp | 0 memcheck/tests/custom-overlap.stderr.exp | 0 memcheck/tests/darwin/Makefile.am | 14 +-- .../tests/darwin/aligned_alloc.stderr.exp | 0 memcheck/tests/darwin/bug437790.stderr.exp | 0 memcheck/tests/darwin/env.stderr.exp | 0 .../tests/darwin/ioctl-tiocsbrk.stderr.exp | 0 memcheck/tests/darwin/mkfifo.stderr.exp | 0 memcheck/tests/darwin/pth-supp.stderr.exp | 0 .../tests/darwin/pth-undocumented.stderr.exp | 0 memcheck/tests/freebsd/Makefile.am | 19 +--- memcheck/tests/freebsd/aio_read.stderr.exp | 0 memcheck/tests/freebsd/bug464476.stderr.exp | 0 .../freebsd/bug464476_abs_symlink.stderr.exp | 0 .../freebsd/bug464476_rel_symlink.stderr.exp | 0 memcheck/tests/freebsd/bug470713.stderr.exp | 0 memcheck/tests/freebsd/eventfd1.stderr.exp | 0 memcheck/tests/freebsd/fbsd278566.stderr.exp | 0 memcheck/tests/freebsd/kqueue.stderr.exp | 0 memcheck/tests/freebsd/kqueuex.stderr.exp | 0 memcheck/tests/freebsd/openpty.stderr.exp | 0 memcheck/tests/freebsd/sctp.stderr.exp | 0 .../tests/freebsd/setproctitle.stderr.exp | 0 memcheck/tests/freebsd/utrace.stderr.exp | 0 memcheck/tests/inlinfosupp.stderr.exp | 0 memcheck/tests/linux/Makefile.am | 18 ++-- memcheck/tests/linux/bug420682_1.stderr.exp | 0 memcheck/tests/linux/bug480706.stderr.exp | 0 memcheck/tests/linux/enomem.stderr.exp | 0 memcheck/tests/linux/getregset.stderr.exp | 0 memcheck/tests/linux/ioctl-tiocsig.stderr.exp | 0 .../linux/ioctl_procmap_query.stderr.exp | 0 memcheck/tests/linux/stack_changes.stderr.exp | 0 memcheck/tests/linux/stack_switch.stderr.exp | 0 memcheck/tests/long-supps.stderr.exp | 0 memcheck/tests/malloc_usable.stderr.exp | 0 memcheck/tests/match-overrun.stderr.exp | 0 memcheck/tests/memccpy1.stderr.exp | 0 memcheck/tests/memmem.stderr.exp | 0 memcheck/tests/mmaptest.stderr.exp | 0 memcheck/tests/nanoleak2.stderr.exp | 0 memcheck/tests/nanoleak_dynsupp.stderr.exp | 0 memcheck/tests/nanoleak_supp.stderr.exp | 0 memcheck/tests/new_nothrow.stderr.exp | 0 memcheck/tests/null_socket.stderr.exp | 0 memcheck/tests/pdb-realloc.stderr.exp | 0 memcheck/tests/pdb-realloc2.stderr.exp | 0 memcheck/tests/pipe.stderr.exp | 0 memcheck/tests/ppc64/Makefile.am | 4 +- memcheck/tests/ppc64/power_ISA2_05.stderr.exp | 0 memcheck/tests/ppc64/power_ISA2_07.stderr.exp | 0 memcheck/tests/realloc1.stderr.exp | 0 memcheck/tests/realloc2.stderr.exp | 0 .../tests/realloc_size_zero_off.stderr.exp | 0 .../tests/realloc_size_zero_supp.stderr.exp | 0 memcheck/tests/s390x/Makefile.am | 7 +- memcheck/tests/s390x/ltgjhe.stderr.exp | 0 memcheck/tests/s390x/tmxx.stderr.exp | 0 memcheck/tests/sem.stderr.exp | 0 memcheck/tests/sh-mem-random.stderr.exp | 0 memcheck/tests/solaris/Makefile.am | 24 ++--- memcheck/tests/solaris/door_data.stderr.exp | 0 memcheck/tests/solaris/door_kill.stderr.exp | 0 memcheck/tests/solaris/gethrtime.stderr.exp | 0 memcheck/tests/solaris/gethrusec.stderr.exp | 0 .../tests/solaris/getzoneoffset.stderr.exp | 0 memcheck/tests/solaris/lsframe1.stderr.exp | 0 memcheck/tests/solaris/lsframe2.stderr.exp | 0 .../tests/solaris/mmapobj_bssonly.stderr.exp | 0 memcheck/tests/solaris/shmat.stderr.exp | 0 memcheck/tests/solaris/spawn.stderr.exp | 0 .../solaris/thr_daemon_exit_libc.stderr.exp | 0 .../thr_daemon_exit_standalone.stderr.exp | 0 memcheck/tests/str_tester.stderr.exp | 0 memcheck/tests/supp1.stderr.exp | 0 memcheck/tests/supp2.stderr.exp | 0 memcheck/tests/suppfreecollision.stderr.exp | 0 memcheck/tests/suppsrc_sanlineno.stderr.exp | 0 memcheck/tests/thread_alloca.stderr.exp | 0 memcheck/tests/unit_libcbase.stderr.exp | 0 memcheck/tests/unit_oset.stderr.exp | 0 memcheck/tests/vbit-test/Makefile.am | 6 +- memcheck/tests/vbit-test/filter_stderr | 3 - .../tests/vbit-test/vbit-test-sec.stderr.exp | 0 memcheck/tests/vbit-test/vbit-test-sec.vgtest | 2 + memcheck/tests/vbit-test/vbit-test.stderr.exp | 0 memcheck/tests/vbit-test/vbit-test.vgtest | 2 + memcheck/tests/vcpu_bz2.stderr.exp | 0 memcheck/tests/vcpu_fbench.stderr.exp | 0 memcheck/tests/vcpu_fnfns.stderr.exp | 0 memcheck/tests/wcscat.stderr.exp | 0 memcheck/tests/wcsncpy.stderr.exp | 0 memcheck/tests/wmemcmp.stderr.exp | 0 memcheck/tests/wrap1.stderr.exp | 0 memcheck/tests/wrap2.stderr.exp | 0 memcheck/tests/wrap3.stderr.exp | 0 memcheck/tests/wrap4.stderr.exp | 0 memcheck/tests/wrap5.stderr.exp | 0 memcheck/tests/wrap6.stderr.exp | 0 memcheck/tests/wrap7.stderr.exp | 0 memcheck/tests/wrapmalloc.stderr.exp | 0 memcheck/tests/wrapmallocstatic.stderr.exp | 0 memcheck/tests/x86-linux/Makefile.am | 4 +- memcheck/tests/x86-linux/bug133694.stderr.exp | 0 memcheck/tests/x86-linux/int3-x86.stderr.exp | 0 memcheck/tests/x86-solaris/Makefile.am | 4 +- .../x86-solaris/context_eflags.stderr.exp | 0 .../tests/x86-solaris/ldsoexec.stderr.exp | 0 memcheck/tests/x86/Makefile.am | 25 +++-- memcheck/tests/x86/bug152022.stderr.exp | 0 memcheck/tests/x86/bug487993.stderr.exp | 0 memcheck/tests/x86/espindola2.stderr.exp | 0 memcheck/tests/x86/fpeflags.stderr.exp | 0 memcheck/tests/x86/fprem.stderr.exp | 0 memcheck/tests/x86/fxsave.stderr.exp | 0 memcheck/tests/x86/insn_basic.stderr.exp | 1 - memcheck/tests/x86/insn_cmov.stderr.exp | 1 - memcheck/tests/x86/insn_fpu.stderr.exp | 1 - memcheck/tests/x86/insn_mmx.stderr.exp | 1 - memcheck/tests/x86/insn_mmxext.stderr.exp | 1 - memcheck/tests/x86/insn_sse.stderr.exp | 1 - memcheck/tests/x86/insn_sse2.stderr.exp | 1 - memcheck/tests/x86/more_x86_fp.stderr.exp | 0 memcheck/tests/x86/pushfw_x86.stderr.exp | 0 memcheck/tests/x86/pushpopmem.stderr.exp | 0 memcheck/tests/x86/sse1_memory.stderr.exp | 0 memcheck/tests/x86/sse2_memory.stderr.exp | 0 memcheck/tests/x86/tronical.stderr.exp | 0 none/tests/Makefile.am | 54 +++++----- none/tests/amd64-darwin/Makefile.am | 2 +- .../tests/amd64-darwin/cet_nops_gs.stderr.exp | 1 - none/tests/amd64-linux/Makefile.am | 4 +- none/tests/amd64-linux/cet_nops_fs.stderr.exp | 0 none/tests/amd64-linux/cet_nops_gs.stderr.exp | 0 none/tests/amd64-solaris/Makefile.am | 4 +- .../amd64-solaris/cet_nops_fs.stderr.exp | 1 - .../syscall_return_args.stderr.exp | 0 none/tests/amd64/Makefile.am | 61 +++++------ none/tests/amd64/aes.stderr.exp | 0 none/tests/amd64/avx-1.stderr.exp | 0 none/tests/amd64/avx-vmovq.stderr.exp | 0 none/tests/amd64/avx2-1.stderr.exp | 0 none/tests/amd64/avx_estimate_insn.stderr.exp | 0 none/tests/amd64/bmi.stderr.exp | 0 none/tests/amd64/bug137714-amd64.stderr.exp | 0 none/tests/amd64/bug485148.stderr.exp | 0 none/tests/amd64/bug487439.stderr.exp | 0 none/tests/amd64/cet_nops.stderr.exp | 0 none/tests/amd64/crc32.stderr.exp | 0 none/tests/amd64/f16c.stderr.exp | 0 none/tests/amd64/fma.stderr.exp | 0 none/tests/amd64/fma4.stderr.exp | 0 none/tests/amd64/getseg.stderr.exp | 0 none/tests/amd64/insn_basic.stderr.exp | 0 none/tests/amd64/insn_fpu.stderr.exp | 0 none/tests/amd64/insn_mmx.stderr.exp | 0 none/tests/amd64/insn_pclmulqdq.stderr.exp | 0 none/tests/amd64/insn_sse.stderr.exp | 0 none/tests/amd64/insn_sse2.stderr.exp | 0 none/tests/amd64/insn_sse3.stderr.exp | 0 none/tests/amd64/insn_ssse3.stderr.exp | 0 none/tests/amd64/lzcnt64.stderr.exp | 0 none/tests/amd64/movbe.stderr.exp | 0 none/tests/amd64/mpx.stderr.exp | 0 none/tests/amd64/pcmpstr64.stderr.exp | 0 none/tests/amd64/pcmpstr64w.stderr.exp | 0 none/tests/amd64/pcmpxstrx64.stderr.exp | 0 none/tests/amd64/pcmpxstrx64w.stderr.exp | 0 none/tests/amd64/rcl-amd64.stderr.exp | 0 none/tests/amd64/rdrand.stderr.exp | 0 none/tests/amd64/rdseed.stderr.exp | 0 none/tests/amd64/slahf-amd64.stderr.exp | 0 none/tests/amd64/sse4-64.stderr.exp | 0 none/tests/amd64/xadd.stderr.exp | 0 none/tests/arm/Makefile.am | 35 +++--- none/tests/arm/intdiv.stderr.exp | 0 none/tests/arm/ldrt.stderr.exp | 0 none/tests/arm/ldrt_arm.stderr.exp | 0 none/tests/arm/neon128.stderr.exp | 0 none/tests/arm/neon64.stderr.exp | 0 none/tests/arm/v6intARM.stderr.exp | 0 none/tests/arm/v6intThumb.stderr.exp | 0 none/tests/arm/v6media.stderr.exp | 0 none/tests/arm/v8crypto_a.stderr.exp | 0 none/tests/arm/v8crypto_t.stderr.exp | 1 - none/tests/arm/v8fpsimd_a.stderr.exp | 0 none/tests/arm/v8fpsimd_t.stderr.exp | 1 - none/tests/arm/v8memory_a.stderr.exp | 0 none/tests/arm/v8memory_t.stderr.exp | 1 - .../tests/arm/vcvt_fixed_float_VFP.stderr.exp | 0 none/tests/arm/vfp.stderr.exp | 0 none/tests/arm/vfpv4_fma.stderr.exp | 0 none/tests/arm64/Makefile.am | 39 ++++--- none/tests/arm64/atomics_v81.stderr.exp | 0 none/tests/arm64/bug484426.stderr.exp | 0 none/tests/arm64/bug489338.stderr.exp | 0 none/tests/arm64/crc32.stderr.exp | 0 none/tests/arm64/cvtf_imm.stderr.exp | 0 none/tests/arm64/dc_cvax.stderr.exp | 0 none/tests/arm64/fcvta_s_u.stderr.exp | 0 none/tests/arm64/fmadd_sub.stderr.exp | 0 none/tests/arm64/fp_and_simd.stderr.exp | 0 none/tests/arm64/fp_and_simd_v82.stderr.exp | 0 none/tests/arm64/frinta_frintn.stderr.exp | 0 none/tests/arm64/integer.stderr.exp | 0 .../arm64/ldxp_stxp_basisimpl.stderr.exp | 0 .../arm64/ldxp_stxp_fallbackimpl.stderr.exp | 0 none/tests/arm64/memory_test.stderr.exp | 0 none/tests/arm64/sha512_v82.stderr.exp | 0 none/tests/arm64/simd_dotprod.stderr.exp | 0 none/tests/arm64/simd_v81.stderr.exp | 0 none/tests/bug290061.stderr.exp | 0 none/tests/bug491394.stderr.exp | 0 none/tests/bug492678.stderr.exp | 0 none/tests/cmd-with-special.stderr.exp | 0 none/tests/cmdline0.stderr.exp | 0 none/tests/cmdline1.stderr.exp | 0 none/tests/cmdline2.stderr.exp | 0 none/tests/darwin/Makefile.am | 10 +- none/tests/darwin/apple-main-arg.stderr.exp | 0 none/tests/darwin/bug228343.stderr.exp | 0 none/tests/darwin/bug254164.stderr.exp | 0 none/tests/darwin/bug390269.stderr.exp | 0 none/tests/darwin/bug411369.stderr.exp | 0 none/tests/fdleak_cat.stderr.exp | 0 none/tests/fork.stderr.exp | 0 none/tests/freebsd/Makefile.am | 19 +--- none/tests/freebsd/bash_test.stderr.exp | 0 none/tests/freebsd/bug452274.stderr.exp | 0 none/tests/freebsd/bug498317.stderr.exp | 0 none/tests/freebsd/bug499212.stderr.exp | 0 none/tests/freebsd/cp.stderr.exp | 0 none/tests/freebsd/csh_test.stderr.exp | 0 none/tests/freebsd/fexecve_hw1.stderr.exp | 0 none/tests/freebsd/fexecve_hw2.stderr.exp | 0 none/tests/freebsd/fexecve_script2.stderr.exp | 0 none/tests/freebsd/ksh_test.stderr.exp | 0 none/tests/freebsd/open_client.stderr.exp | 0 none/tests/freebsd/osrel.stderr.exp | 0 none/tests/freebsd/proc_pid_file.stderr.exp | 0 none/tests/freebsd/readlinkat.stderr.exp | 0 none/tests/freebsd/readlinkat2.stderr.exp | 0 .../freebsd/sanity_level_thread.stderr.exp | 0 none/tests/freebsd/swapcontext.stderr.exp | 0 none/tests/freebsd/usrstack.stderr.exp | 0 none/tests/iropt-test/Makefile.am | 6 +- none/tests/iropt-test/filter_stderr | 6 -- .../iropt-test/iropt-test-sec.stderr.exp | 0 none/tests/iropt-test/iropt-test-sec.vgtest | 2 + none/tests/iropt-test/iropt-test.stderr.exp | 0 none/tests/iropt-test/iropt-test.vgtest | 2 + none/tests/libvex_test.stderr.exp | 0 none/tests/libvexmultiarch_test.stderr.exp | 0 none/tests/linux/Makefile.am | 14 +-- none/tests/linux/bug498317.stderr.exp | 0 none/tests/linux/clonev.stderr.exp | 0 none/tests/linux/getdents_filter.stderr.exp | 0 none/tests/linux/mremap4.stderr.exp | 0 none/tests/linux/mremap5.stderr.exp | 0 none/tests/linux/mremap6.stderr.exp | 0 none/tests/linux/open_client.stderr.exp | 0 none/tests/log-track-fds.stderr.exp | 0 none/tests/mips32/FPUarithmetic.stderr.exp | 0 none/tests/mips32/LoadStore.stderr.exp | 0 none/tests/mips32/LoadStore1.stderr.exp | 0 none/tests/mips32/MIPS32int.stderr.exp | 0 none/tests/mips32/MIPS32r6int.stderr.exp | 0 none/tests/mips32/Makefile.am | 65 ++++++----- none/tests/mips32/MemCpyTest.stderr.exp | 0 none/tests/mips32/MoveIns.stderr.exp | 0 none/tests/mips32/block_size.stderr.exp | 0 none/tests/mips32/branch_pc.stderr.exp | 0 none/tests/mips32/branches.stderr.exp | 0 none/tests/mips32/branches_r6.stderr.exp | 0 none/tests/mips32/bug320057-mips32.stderr.exp | 0 none/tests/mips32/change_fp_mode.stderr.exp | 0 none/tests/mips32/fp_r6.stderr.exp | 0 none/tests/mips32/fpu_branches.stderr.exp | 0 none/tests/mips32/mips32_dsp.stderr.exp | 0 none/tests/mips32/mips32_dspr2.stderr.exp | 0 none/tests/mips32/msa_arithmetic.stderr.exp | 0 none/tests/mips32/msa_comparison.stderr.exp | 0 .../tests/mips32/msa_data_transfer.stderr.exp | 0 none/tests/mips32/msa_fpu.stderr.exp | 0 .../mips32/msa_logical_and_shift.stderr.exp | 0 none/tests/mips32/msa_shuffle.stderr.exp | 0 .../mips32/pc_instructions_r6.stderr.exp | 0 none/tests/mips32/round.stderr.exp | 0 none/tests/mips32/round_fpu64.stderr.exp | 0 none/tests/mips32/test_fcsr.stderr.exp | 0 none/tests/mips32/test_math.stderr.exp | 0 .../mips32/unaligned_load_store.stderr.exp | 0 none/tests/mips32/vfp.stderr.exp | 0 none/tests/mips64/MIPS64r6int.stderr.exp | 1 - none/tests/mips64/Makefile.am | 86 +++++++-------- .../mips64/arithmetic_instruction.stderr.exp | 0 .../branch_and_jump_instructions.stderr.exp | 0 none/tests/mips64/branch_pc.stderr.exp | 1 - none/tests/mips64/branches.stderr.exp | 0 none/tests/mips64/branches_r6.stderr.exp | 1 - none/tests/mips64/change_fp_mode.stderr.exp | 0 none/tests/mips64/cvm_atomic.stderr.exp | 0 .../tests/mips64/cvm_atomic_thread.stderr.exp | 0 none/tests/mips64/cvm_bbit.stderr.exp | 0 none/tests/mips64/cvm_ins.stderr.exp | 0 none/tests/mips64/cvm_lx_ins.stderr.exp | 0 .../extract_insert_bit_field.stderr.exp | 0 none/tests/mips64/fp_r6.stderr.exp | 1 - none/tests/mips64/fpu_arithmetic.stderr.exp | 0 none/tests/mips64/fpu_branches.stderr.exp | 0 none/tests/mips64/fpu_control_word.stderr.exp | 0 none/tests/mips64/fpu_load_store.stderr.exp | 0 .../load_indexed_instructions.stderr.exp | 0 none/tests/mips64/load_store.stderr.exp | 0 .../mips64/load_store_multiple.stderr.exp | 0 .../mips64/load_store_unaligned.stderr.exp | 0 .../mips64/logical_instructions.stderr.exp | 0 .../tests/mips64/move_instructions.stderr.exp | 0 none/tests/mips64/msa_arithmetic.stderr.exp | 1 - none/tests/mips64/msa_comparison.stderr.exp | 1 - .../tests/mips64/msa_data_transfer.stderr.exp | 0 none/tests/mips64/msa_fpu.stderr.exp | 1 - .../mips64/msa_logical_and_shift.stderr.exp | 1 - none/tests/mips64/msa_shuffle.stderr.exp | 1 - .../mips64/pc_instructions_r6.stderr.exp | 1 - none/tests/mips64/r6_instructions.stderr.exp | 0 none/tests/mips64/rotate_swap.stderr.exp | 0 none/tests/mips64/round.stderr.exp | 0 .../mips64/shift_instructions.stderr.exp | 0 none/tests/mips64/test_block_size.stderr.exp | 0 none/tests/mips64/test_fcsr.stderr.exp | 0 none/tests/mips64/test_math.stderr.exp | 0 none/tests/mips64/unaligned_load.stderr.exp | 0 .../mips64/unaligned_load_store.stderr.exp | 0 none/tests/mmap_o_direct.stderr.exp | 0 none/tests/nanomips/Makefile.am | 12 +-- none/tests/nanomips/arithmetic.stderr.exp | 0 none/tests/nanomips/bits.stderr.exp | 0 none/tests/nanomips/branches.stderr.exp | 0 none/tests/nanomips/load_store.stderr.exp | 0 none/tests/nanomips/move.stderr.exp | 0 .../tests/nanomips/pc_instructions.stderr.exp | 0 none/tests/ppc32/Makefile.am | 6 +- none/tests/ppc32/bug129390-ppc32.stderr.exp | 0 none/tests/ppc32/bug139050-ppc32.stderr.exp | 0 none/tests/ppc64/Makefile.am | 2 +- none/tests/ppc64/std_reg_imm.stderr.exp | 0 none/tests/ppoll_alarm.stderr.exp | 0 none/tests/pselect_alarm.stderr.exp | 0 none/tests/pselect_sigmask_null.stderr.exp | 0 none/tests/pth_self_kill_15_other.stderr.exp | 0 none/tests/pth_self_kill_9.stderr.exp | 0 none/tests/rc_option_with_spaces.stderr.exp | 0 none/tests/require-text-symbol-1.stderr.exp | 0 none/tests/res_search.stderr.exp | 0 none/tests/riscv64/Makefile.am | 14 +-- none/tests/riscv64/atomic.stderr.exp | 0 none/tests/riscv64/compressed.stderr.exp | 0 none/tests/riscv64/csr.stderr.exp | 0 none/tests/riscv64/float32.stderr.exp | 0 none/tests/riscv64/float64.stderr.exp | 0 none/tests/riscv64/integer.stderr.exp | 0 none/tests/riscv64/muldiv.stderr.exp | 0 none/tests/s390x/disasm-test/Makefile.am | 5 +- .../s390x/disasm-test/disasm-test.stderr.exp | 0 .../s390x/disasm-test/disasm-test.vgtest | 3 + none/tests/s390x/disasm-test/filter_stderr | 4 - none/tests/scripts/Makefile.am | 19 ++-- none/tests/scripts/nointerp1.stderr.exp | 0 none/tests/scripts/nointerp2.stderr.exp | 0 none/tests/scripts/nointerp3.stderr.exp | 0 none/tests/scripts/nointerp4.stderr.exp | 0 none/tests/scripts/nointerp5.stderr.exp | 0 none/tests/scripts/relative1.stderr.exp | 0 none/tests/scripts/relative2.stderr.exp | 0 none/tests/scripts/shell_valid1.stderr.exp | 0 none/tests/scripts/shell_valid4.stderr.exp | 0 none/tests/sigprocmask.stderr.exp | 0 none/tests/sigsusp.stderr.exp | 0 none/tests/solaris/Makefile.am | 22 ++-- none/tests/solaris/context_link.stderr.exp | 0 none/tests/solaris/context_link2.stderr.exp | 0 none/tests/solaris/context_null.stderr.exp | 0 none/tests/solaris/context_stack.stderr.exp | 0 none/tests/solaris/mmap_noreserve.stderr.exp | 0 none/tests/solaris/proc_aout.stderr.exp | 0 none/tests/solaris/proc_auxv.stderr.exp | 0 .../solaris/proc_auxv_multiple.stderr.exp | 0 none/tests/solaris/sigresend.stderr.exp | 0 none/tests/solaris/stack_prot.stderr.exp | 0 none/tests/solaris/threads_exitall.stderr.exp | 0 none/tests/syslog.stderr.exp | 0 none/tests/threadederrno.stderr.exp | 0 none/tests/timer_delete.stderr.exp | 0 none/tests/track-fds-exec-children.stderr.exp | 0 none/tests/x86-darwin/Makefile.am | 2 +- none/tests/x86-darwin/cet_nops_gs.stderr.exp | 1 - none/tests/x86-freebsd/Makefile.am | 3 +- none/tests/x86-freebsd/bug445032.stderr.exp | 0 none/tests/x86-linux/Makefile.am | 4 +- none/tests/x86-linux/cet_nops_fs.stderr.exp | 1 - none/tests/x86-linux/cet_nops_gs.stderr.exp | 1 - none/tests/x86-solaris/Makefile.am | 4 +- none/tests/x86-solaris/cet_nops_fs.stderr.exp | 1 - none/tests/x86-solaris/syscalls.stderr.exp | 0 none/tests/x86/Makefile.am | 31 +++--- none/tests/x86/aad_aam.stderr.exp | 0 none/tests/x86/bswapw.stderr.exp | 0 none/tests/x86/bug137714-x86.stderr.exp | 0 none/tests/x86/cet_nops.stderr.exp | 1 - none/tests/x86/cse_fail.stderr.exp | 0 none/tests/x86/gnu_binutils_nop.stderr.exp | 0 none/tests/x86/insn_basic.stderr.exp | 0 none/tests/x86/insn_cmov.stderr.exp | 0 none/tests/x86/insn_fpu.stderr.exp | 0 none/tests/x86/insn_mmx.stderr.exp | 0 none/tests/x86/insn_mmxext.stderr.exp | 0 none/tests/x86/insn_sse.stderr.exp | 0 none/tests/x86/insn_sse2.stderr.exp | 0 none/tests/x86/insn_sse3.stderr.exp | 0 none/tests/x86/insn_ssse3.stderr.exp | 0 none/tests/x86/jcxz.stderr.exp | 0 none/tests/x86/lzcnt32.stderr.exp | 0 none/tests/x86/movbe.stderr.exp | 0 none/tests/x86/sse4-x86.stderr.exp | 0 none/tests/x86/xadd.stderr.exp | 0 tests/vg_regtest.in | 67 ++++++++---- 498 files changed, 429 insertions(+), 524 deletions(-) delete mode 100644 cachegrind/tests/clreq.stderr.exp delete mode 100644 drd/tests/getaddrinfo.stderr.exp delete mode 100644 drd/tests/local_static.stderr.exp delete mode 100644 drd/tests/sem_clockwait_np.stderr.exp delete mode 100644 gdbserver_tests/hgtls.stderr.exp delete mode 100644 gdbserver_tests/hgtls.stderrB.exp delete mode 100644 gdbserver_tests/mcblocklistsearch.stderr.exp delete mode 100644 gdbserver_tests/mcbreak.stderr.exp delete mode 100644 gdbserver_tests/mchelp.stderr.exp delete mode 100644 gdbserver_tests/mcinfcallRU.stderrB.exp delete mode 100644 gdbserver_tests/mcinvokeRU.stderr.exp delete mode 100644 gdbserver_tests/mcinvokeWS.stderr.exp delete mode 100644 gdbserver_tests/mcsignopass.stderrB.exp delete mode 100644 gdbserver_tests/mcsigpass.stderrB.exp delete mode 100644 gdbserver_tests/mcvabits.stderr.exp delete mode 100644 gdbserver_tests/mcwatchpoints.stderrB.exp delete mode 100644 gdbserver_tests/mssnapshot.stderr.exp delete mode 100644 gdbserver_tests/nlcontrolc.stderrB.exp delete mode 100644 gdbserver_tests/nlgone_abrt.stderrB.exp delete mode 100644 gdbserver_tests/nlgone_exit.stderrB.exp delete mode 100644 gdbserver_tests/nlgone_return.stderrB.exp delete mode 100644 gdbserver_tests/nlself_invalidate.stderrB.exp delete mode 100644 gdbserver_tests/nlvgdbsigqueue.stderrB.exp delete mode 100644 gdbserver_tests/solaris/nlcontrolc.stderrB.exp delete mode 100644 helgrind/tests/annotate_hbefore.stderr.exp delete mode 100644 helgrind/tests/bar_trivial.stderr.exp delete mode 100644 helgrind/tests/bug327548.stderr.exp delete mode 100644 helgrind/tests/bug392331_supp.stderr.exp delete mode 100644 helgrind/tests/bug484480.stderr.exp delete mode 100644 helgrind/tests/getaddrinfo.stderr.exp delete mode 100644 helgrind/tests/pth_mempcpy_false_races.stderr.exp delete mode 100644 helgrind/tests/sem_clockwait_np.stderr.exp delete mode 100644 helgrind/tests/sem_timedwait.stderr.exp delete mode 100644 massif/tests/inlinfomalloc.stderr.exp delete mode 100644 massif/tests/malloc_usable.stderr.exp delete mode 100644 massif/tests/mmapunmap.stderr.exp delete mode 100644 memcheck/tests/amd64-linux/int3-amd64.stderr.exp delete mode 100644 memcheck/tests/amd64-solaris/context_rflags.stderr.exp delete mode 100644 memcheck/tests/amd64-solaris/ldsoexec.stderr.exp delete mode 100644 memcheck/tests/amd64/bt_everything.stderr.exp delete mode 100644 memcheck/tests/amd64/bug132146.stderr.exp delete mode 100644 memcheck/tests/amd64/bug279698.stderr.exp delete mode 100644 memcheck/tests/amd64/bug492210_2.stderr.exp delete mode 100644 memcheck/tests/amd64/fxsave-amd64.stderr.exp delete mode 120000 memcheck/tests/amd64/insn_basic.stderr.exp delete mode 120000 memcheck/tests/amd64/insn_fpu.stderr.exp delete mode 120000 memcheck/tests/amd64/insn_mmx.stderr.exp delete mode 120000 memcheck/tests/amd64/insn_sse.stderr.exp delete mode 120000 memcheck/tests/amd64/insn_sse2.stderr.exp delete mode 100644 memcheck/tests/amd64/more_x87_fp.stderr.exp delete mode 100644 memcheck/tests/amd64/rh2257546_128.stderr.exp delete mode 100644 memcheck/tests/amd64/rh2257546_256.stderr.exp delete mode 100644 memcheck/tests/amd64/shr_edx.stderr.exp delete mode 100644 memcheck/tests/amd64/sse_memory.stderr.exp delete mode 100644 memcheck/tests/arm64/bug484935.stderr.exp delete mode 100644 memcheck/tests/atomic_incs.stderr.exp delete mode 100644 memcheck/tests/big_debuginfo_symbol.stderr.exp delete mode 100644 memcheck/tests/bug340392.stderr.exp delete mode 100644 memcheck/tests/bug401284.stderr.exp delete mode 100644 memcheck/tests/bug472219.stderr.exp delete mode 100644 memcheck/tests/bug484002.stderr.exp delete mode 100644 memcheck/tests/custom-overlap.stderr.exp delete mode 100644 memcheck/tests/darwin/aligned_alloc.stderr.exp delete mode 100644 memcheck/tests/darwin/bug437790.stderr.exp delete mode 100644 memcheck/tests/darwin/env.stderr.exp delete mode 100644 memcheck/tests/darwin/ioctl-tiocsbrk.stderr.exp delete mode 100644 memcheck/tests/darwin/mkfifo.stderr.exp delete mode 100644 memcheck/tests/darwin/pth-supp.stderr.exp delete mode 100644 memcheck/tests/darwin/pth-undocumented.stderr.exp delete mode 100644 memcheck/tests/freebsd/aio_read.stderr.exp delete mode 100644 memcheck/tests/freebsd/bug464476.stderr.exp delete mode 100644 memcheck/tests/freebsd/bug464476_abs_symlink.stderr.exp delete mode 100644 memcheck/tests/freebsd/bug464476_rel_symlink.stderr.exp delete mode 100644 memcheck/tests/freebsd/bug470713.stderr.exp delete mode 100644 memcheck/tests/freebsd/eventfd1.stderr.exp delete mode 100644 memcheck/tests/freebsd/fbsd278566.stderr.exp delete mode 100644 memcheck/tests/freebsd/kqueue.stderr.exp delete mode 100644 memcheck/tests/freebsd/kqueuex.stderr.exp delete mode 100644 memcheck/tests/freebsd/openpty.stderr.exp delete mode 100644 memcheck/tests/freebsd/sctp.stderr.exp delete mode 100644 memcheck/tests/freebsd/setproctitle.stderr.exp delete mode 100644 memcheck/tests/freebsd/utrace.stderr.exp delete mode 100644 memcheck/tests/inlinfosupp.stderr.exp delete mode 100644 memcheck/tests/linux/bug420682_1.stderr.exp delete mode 100644 memcheck/tests/linux/bug480706.stderr.exp delete mode 100644 memcheck/tests/linux/enomem.stderr.exp delete mode 100644 memcheck/tests/linux/getregset.stderr.exp delete mode 100644 memcheck/tests/linux/ioctl-tiocsig.stderr.exp delete mode 100644 memcheck/tests/linux/ioctl_procmap_query.stderr.exp delete mode 100644 memcheck/tests/linux/stack_changes.stderr.exp delete mode 100644 memcheck/tests/linux/stack_switch.stderr.exp delete mode 100644 memcheck/tests/long-supps.stderr.exp delete mode 100644 memcheck/tests/malloc_usable.stderr.exp delete mode 100644 memcheck/tests/match-overrun.stderr.exp delete mode 100644 memcheck/tests/memccpy1.stderr.exp delete mode 100644 memcheck/tests/memmem.stderr.exp delete mode 100644 memcheck/tests/mmaptest.stderr.exp delete mode 100644 memcheck/tests/nanoleak2.stderr.exp delete mode 100644 memcheck/tests/nanoleak_dynsupp.stderr.exp delete mode 100644 memcheck/tests/nanoleak_supp.stderr.exp delete mode 100644 memcheck/tests/new_nothrow.stderr.exp delete mode 100644 memcheck/tests/null_socket.stderr.exp delete mode 100644 memcheck/tests/pdb-realloc.stderr.exp delete mode 100644 memcheck/tests/pdb-realloc2.stderr.exp delete mode 100644 memcheck/tests/pipe.stderr.exp delete mode 100644 memcheck/tests/ppc64/power_ISA2_05.stderr.exp delete mode 100644 memcheck/tests/ppc64/power_ISA2_07.stderr.exp delete mode 100644 memcheck/tests/realloc1.stderr.exp delete mode 100644 memcheck/tests/realloc2.stderr.exp delete mode 100644 memcheck/tests/realloc_size_zero_off.stderr.exp delete mode 100644 memcheck/tests/realloc_size_zero_supp.stderr.exp delete mode 100644 memcheck/tests/s390x/ltgjhe.stderr.exp delete mode 100644 memcheck/tests/s390x/tmxx.stderr.exp delete mode 100644 memcheck/tests/sem.stderr.exp delete mode 100644 memcheck/tests/sh-mem-random.stderr.exp delete mode 100644 memcheck/tests/solaris/door_data.stderr.exp delete mode 100644 memcheck/tests/solaris/door_kill.stderr.exp delete mode 100644 memcheck/tests/solaris/gethrtime.stderr.exp delete mode 100644 memcheck/tests/solaris/gethrusec.stderr.exp delete mode 100644 memcheck/tests/solaris/getzoneoffset.stderr.exp delete mode 100644 memcheck/tests/solaris/lsframe1.stderr.exp delete mode 100644 memcheck/tests/solaris/lsframe2.stderr.exp delete mode 100644 memcheck/tests/solaris/mmapobj_bssonly.stderr.exp delete mode 100644 memcheck/tests/solaris/shmat.stderr.exp delete mode 100644 memcheck/tests/solaris/spawn.stderr.exp delete mode 100644 memcheck/tests/solaris/thr_daemon_exit_libc.stderr.exp delete mode 100644 memcheck/tests/solaris/thr_daemon_exit_standalone.stderr.exp delete mode 100644 memcheck/tests/str_tester.stderr.exp delete mode 100644 memcheck/tests/supp1.stderr.exp delete mode 100644 memcheck/tests/supp2.stderr.exp delete mode 100644 memcheck/tests/suppfreecollision.stderr.exp delete mode 100644 memcheck/tests/suppsrc_sanlineno.stderr.exp delete mode 100644 memcheck/tests/thread_alloca.stderr.exp delete mode 100644 memcheck/tests/unit_libcbase.stderr.exp delete mode 100644 memcheck/tests/unit_oset.stderr.exp delete mode 100755 memcheck/tests/vbit-test/filter_stderr delete mode 100644 memcheck/tests/vbit-test/vbit-test-sec.stderr.exp delete mode 100644 memcheck/tests/vbit-test/vbit-test.stderr.exp delete mode 100644 memcheck/tests/vcpu_bz2.stderr.exp delete mode 100644 memcheck/tests/vcpu_fbench.stderr.exp delete mode 100644 memcheck/tests/vcpu_fnfns.stderr.exp delete mode 100644 memcheck/tests/wcscat.stderr.exp delete mode 100644 memcheck/tests/wcsncpy.stderr.exp delete mode 100644 memcheck/tests/wmemcmp.stderr.exp delete mode 100644 memcheck/tests/wrap1.stderr.exp delete mode 100644 memcheck/tests/wrap2.stderr.exp delete mode 100644 memcheck/tests/wrap3.stderr.exp delete mode 100644 memcheck/tests/wrap4.stderr.exp delete mode 100644 memcheck/tests/wrap5.stderr.exp delete mode 100644 memcheck/tests/wrap6.stderr.exp delete mode 100644 memcheck/tests/wrap7.stderr.exp delete mode 100644 memcheck/tests/wrapmalloc.stderr.exp delete mode 100644 memcheck/tests/wrapmallocstatic.stderr.exp delete mode 100644 memcheck/tests/x86-linux/bug133694.stderr.exp delete mode 100644 memcheck/tests/x86-linux/int3-x86.stderr.exp delete mode 100644 memcheck/tests/x86-solaris/context_eflags.stderr.exp delete mode 100644 memcheck/tests/x86-solaris/ldsoexec.stderr.exp delete mode 100644 memcheck/tests/x86/bug152022.stderr.exp delete mode 100644 memcheck/tests/x86/bug487993.stderr.exp delete mode 100644 memcheck/tests/x86/espindola2.stderr.exp delete mode 100644 memcheck/tests/x86/fpeflags.stderr.exp delete mode 100644 memcheck/tests/x86/fprem.stderr.exp delete mode 100644 memcheck/tests/x86/fxsave.stderr.exp delete mode 120000 memcheck/tests/x86/insn_basic.stderr.exp delete mode 120000 memcheck/tests/x86/insn_cmov.stderr.exp delete mode 120000 memcheck/tests/x86/insn_fpu.stderr.exp delete mode 120000 memcheck/tests/x86/insn_mmx.stderr.exp delete mode 120000 memcheck/tests/x86/insn_mmxext.stderr.exp delete mode 120000 memcheck/tests/x86/insn_sse.stderr.exp delete mode 120000 memcheck/tests/x86/insn_sse2.stderr.exp delete mode 100644 memcheck/tests/x86/more_x86_fp.stderr.exp delete mode 100644 memcheck/tests/x86/pushfw_x86.stderr.exp delete mode 100644 memcheck/tests/x86/pushpopmem.stderr.exp delete mode 100644 memcheck/tests/x86/sse1_memory.stderr.exp delete mode 100644 memcheck/tests/x86/sse2_memory.stderr.exp delete mode 100644 memcheck/tests/x86/tronical.stderr.exp delete mode 120000 none/tests/amd64-darwin/cet_nops_gs.stderr.exp delete mode 100644 none/tests/amd64-linux/cet_nops_fs.stderr.exp delete mode 100644 none/tests/amd64-linux/cet_nops_gs.stderr.exp delete mode 120000 none/tests/amd64-solaris/cet_nops_fs.stderr.exp delete mode 100644 none/tests/amd64-solaris/syscall_return_args.stderr.exp delete mode 100644 none/tests/amd64/aes.stderr.exp delete mode 100644 none/tests/amd64/avx-1.stderr.exp delete mode 100644 none/tests/amd64/avx-vmovq.stderr.exp delete mode 100644 none/tests/amd64/avx2-1.stderr.exp delete mode 100644 none/tests/amd64/avx_estimate_insn.stderr.exp delete mode 100644 none/tests/amd64/bmi.stderr.exp delete mode 100644 none/tests/amd64/bug137714-amd64.stderr.exp delete mode 100644 none/tests/amd64/bug485148.stderr.exp delete mode 100644 none/tests/amd64/bug487439.stderr.exp delete mode 100644 none/tests/amd64/cet_nops.stderr.exp delete mode 100644 none/tests/amd64/crc32.stderr.exp delete mode 100644 none/tests/amd64/f16c.stderr.exp delete mode 100644 none/tests/amd64/fma.stderr.exp delete mode 100644 none/tests/amd64/fma4.stderr.exp delete mode 100644 none/tests/amd64/getseg.stderr.exp delete mode 100644 none/tests/amd64/insn_basic.stderr.exp delete mode 100644 none/tests/amd64/insn_fpu.stderr.exp delete mode 100644 none/tests/amd64/insn_mmx.stderr.exp delete mode 100644 none/tests/amd64/insn_pclmulqdq.stderr.exp delete mode 100644 none/tests/amd64/insn_sse.stderr.exp delete mode 100644 none/tests/amd64/insn_sse2.stderr.exp delete mode 100644 none/tests/amd64/insn_sse3.stderr.exp delete mode 100644 none/tests/amd64/insn_ssse3.stderr.exp delete mode 100644 none/tests/amd64/lzcnt64.stderr.exp delete mode 100644 none/tests/amd64/movbe.stderr.exp delete mode 100644 none/tests/amd64/mpx.stderr.exp delete mode 100644 none/tests/amd64/pcmpstr64.stderr.exp delete mode 100644 none/tests/amd64/pcmpstr64w.stderr.exp delete mode 100644 none/tests/amd64/pcmpxstrx64.stderr.exp delete mode 100644 none/tests/amd64/pcmpxstrx64w.stderr.exp delete mode 100644 none/tests/amd64/rcl-amd64.stderr.exp delete mode 100644 none/tests/amd64/rdrand.stderr.exp delete mode 100644 none/tests/amd64/rdseed.stderr.exp delete mode 100644 none/tests/amd64/slahf-amd64.stderr.exp delete mode 100644 none/tests/amd64/sse4-64.stderr.exp delete mode 100644 none/tests/amd64/xadd.stderr.exp delete mode 100644 none/tests/arm/intdiv.stderr.exp delete mode 100644 none/tests/arm/ldrt.stderr.exp delete mode 100644 none/tests/arm/ldrt_arm.stderr.exp delete mode 100644 none/tests/arm/neon128.stderr.exp delete mode 100644 none/tests/arm/neon64.stderr.exp delete mode 100644 none/tests/arm/v6intARM.stderr.exp delete mode 100644 none/tests/arm/v6intThumb.stderr.exp delete mode 100644 none/tests/arm/v6media.stderr.exp delete mode 100644 none/tests/arm/v8crypto_a.stderr.exp delete mode 120000 none/tests/arm/v8crypto_t.stderr.exp delete mode 100644 none/tests/arm/v8fpsimd_a.stderr.exp delete mode 120000 none/tests/arm/v8fpsimd_t.stderr.exp delete mode 100644 none/tests/arm/v8memory_a.stderr.exp delete mode 120000 none/tests/arm/v8memory_t.stderr.exp delete mode 100644 none/tests/arm/vcvt_fixed_float_VFP.stderr.exp delete mode 100644 none/tests/arm/vfp.stderr.exp delete mode 100644 none/tests/arm/vfpv4_fma.stderr.exp delete mode 100644 none/tests/arm64/atomics_v81.stderr.exp delete mode 100644 none/tests/arm64/bug484426.stderr.exp delete mode 100644 none/tests/arm64/bug489338.stderr.exp delete mode 100644 none/tests/arm64/crc32.stderr.exp delete mode 100644 none/tests/arm64/cvtf_imm.stderr.exp delete mode 100644 none/tests/arm64/dc_cvax.stderr.exp delete mode 100644 none/tests/arm64/fcvta_s_u.stderr.exp delete mode 100644 none/tests/arm64/fmadd_sub.stderr.exp delete mode 100644 none/tests/arm64/fp_and_simd.stderr.exp delete mode 100644 none/tests/arm64/fp_and_simd_v82.stderr.exp delete mode 100644 none/tests/arm64/frinta_frintn.stderr.exp delete mode 100644 none/tests/arm64/integer.stderr.exp delete mode 100644 none/tests/arm64/ldxp_stxp_basisimpl.stderr.exp delete mode 100644 none/tests/arm64/ldxp_stxp_fallbackimpl.stderr.exp delete mode 100644 none/tests/arm64/memory_test.stderr.exp delete mode 100644 none/tests/arm64/sha512_v82.stderr.exp delete mode 100644 none/tests/arm64/simd_dotprod.stderr.exp delete mode 100644 none/tests/arm64/simd_v81.stderr.exp delete mode 100644 none/tests/bug290061.stderr.exp delete mode 100644 none/tests/bug491394.stderr.exp delete mode 100644 none/tests/bug492678.stderr.exp delete mode 100644 none/tests/cmd-with-special.stderr.exp delete mode 100644 none/tests/cmdline0.stderr.exp delete mode 100644 none/tests/cmdline1.stderr.exp delete mode 100644 none/tests/cmdline2.stderr.exp delete mode 100644 none/tests/darwin/apple-main-arg.stderr.exp delete mode 100644 none/tests/darwin/bug228343.stderr.exp delete mode 100644 none/tests/darwin/bug254164.stderr.exp delete mode 100644 none/tests/darwin/bug390269.stderr.exp delete mode 100644 none/tests/darwin/bug411369.stderr.exp delete mode 100644 none/tests/fdleak_cat.stderr.exp delete mode 100644 none/tests/fork.stderr.exp delete mode 100644 none/tests/freebsd/bash_test.stderr.exp delete mode 100644 none/tests/freebsd/bug452274.stderr.exp delete mode 100644 none/tests/freebsd/bug498317.stderr.exp delete mode 100644 none/tests/freebsd/bug499212.stderr.exp delete mode 100644 none/tests/freebsd/cp.stderr.exp delete mode 100644 none/tests/freebsd/csh_test.stderr.exp delete mode 100644 none/tests/freebsd/fexecve_hw1.stderr.exp delete mode 100644 none/tests/freebsd/fexecve_hw2.stderr.exp delete mode 100644 none/tests/freebsd/fexecve_script2.stderr.exp delete mode 100644 none/tests/freebsd/ksh_test.stderr.exp delete mode 100644 none/tests/freebsd/open_client.stderr.exp delete mode 100644 none/tests/freebsd/osrel.stderr.exp delete mode 100644 none/tests/freebsd/proc_pid_file.stderr.exp delete mode 100644 none/tests/freebsd/readlinkat.stderr.exp delete mode 100644 none/tests/freebsd/readlinkat2.stderr.exp delete mode 100644 none/tests/freebsd/sanity_level_thread.stderr.exp delete mode 100644 none/tests/freebsd/swapcontext.stderr.exp delete mode 100644 none/tests/freebsd/usrstack.stderr.exp delete mode 100755 none/tests/iropt-test/filter_stderr delete mode 100644 none/tests/iropt-test/iropt-test-sec.stderr.exp delete mode 100644 none/tests/iropt-test/iropt-test.stderr.exp delete mode 100644 none/tests/libvex_test.stderr.exp delete mode 100644 none/tests/libvexmultiarch_test.stderr.exp delete mode 100644 none/tests/linux/bug498317.stderr.exp delete mode 100644 none/tests/linux/clonev.stderr.exp delete mode 100644 none/tests/linux/getdents_filter.stderr.exp delete mode 100644 none/tests/linux/mremap4.stderr.exp delete mode 100644 none/tests/linux/mremap5.stderr.exp delete mode 100644 none/tests/linux/mremap6.stderr.exp delete mode 100644 none/tests/linux/open_client.stderr.exp delete mode 100644 none/tests/log-track-fds.stderr.exp delete mode 100644 none/tests/mips32/FPUarithmetic.stderr.exp delete mode 100644 none/tests/mips32/LoadStore.stderr.exp delete mode 100644 none/tests/mips32/LoadStore1.stderr.exp delete mode 100644 none/tests/mips32/MIPS32int.stderr.exp delete mode 100644 none/tests/mips32/MIPS32r6int.stderr.exp delete mode 100644 none/tests/mips32/MemCpyTest.stderr.exp delete mode 100644 none/tests/mips32/MoveIns.stderr.exp delete mode 100644 none/tests/mips32/block_size.stderr.exp delete mode 100644 none/tests/mips32/branch_pc.stderr.exp delete mode 100644 none/tests/mips32/branches.stderr.exp delete mode 100644 none/tests/mips32/branches_r6.stderr.exp delete mode 100644 none/tests/mips32/bug320057-mips32.stderr.exp delete mode 100644 none/tests/mips32/change_fp_mode.stderr.exp delete mode 100644 none/tests/mips32/fp_r6.stderr.exp delete mode 100644 none/tests/mips32/fpu_branches.stderr.exp delete mode 100644 none/tests/mips32/mips32_dsp.stderr.exp delete mode 100644 none/tests/mips32/mips32_dspr2.stderr.exp delete mode 100644 none/tests/mips32/msa_arithmetic.stderr.exp delete mode 100644 none/tests/mips32/msa_comparison.stderr.exp delete mode 100644 none/tests/mips32/msa_data_transfer.stderr.exp delete mode 100644 none/tests/mips32/msa_fpu.stderr.exp delete mode 100644 none/tests/mips32/msa_logical_and_shift.stderr.exp delete mode 100644 none/tests/mips32/msa_shuffle.stderr.exp delete mode 100644 none/tests/mips32/pc_instructions_r6.stderr.exp delete mode 100644 none/tests/mips32/round.stderr.exp delete mode 100644 none/tests/mips32/round_fpu64.stderr.exp delete mode 100644 none/tests/mips32/test_fcsr.stderr.exp delete mode 100644 none/tests/mips32/test_math.stderr.exp delete mode 100644 none/tests/mips32/unaligned_load_store.stderr.exp delete mode 100644 none/tests/mips32/vfp.stderr.exp delete mode 120000 none/tests/mips64/MIPS64r6int.stderr.exp delete mode 100644 none/tests/mips64/arithmetic_instruction.stderr.exp delete mode 100644 none/tests/mips64/branch_and_jump_instructions.stderr.exp delete mode 120000 none/tests/mips64/branch_pc.stderr.exp delete mode 100644 none/tests/mips64/branches.stderr.exp delete mode 120000 none/tests/mips64/branches_r6.stderr.exp delete mode 100644 none/tests/mips64/change_fp_mode.stderr.exp delete mode 100644 none/tests/mips64/cvm_atomic.stderr.exp delete mode 100644 none/tests/mips64/cvm_atomic_thread.stderr.exp delete mode 100644 none/tests/mips64/cvm_bbit.stderr.exp delete mode 100644 none/tests/mips64/cvm_ins.stderr.exp delete mode 100644 none/tests/mips64/cvm_lx_ins.stderr.exp delete mode 100644 none/tests/mips64/extract_insert_bit_field.stderr.exp delete mode 120000 none/tests/mips64/fp_r6.stderr.exp delete mode 100644 none/tests/mips64/fpu_arithmetic.stderr.exp delete mode 100644 none/tests/mips64/fpu_branches.stderr.exp delete mode 100644 none/tests/mips64/fpu_control_word.stderr.exp delete mode 100644 none/tests/mips64/fpu_load_store.stderr.exp delete mode 100644 none/tests/mips64/load_indexed_instructions.stderr.exp delete mode 100644 none/tests/mips64/load_store.stderr.exp delete mode 100644 none/tests/mips64/load_store_multiple.stderr.exp delete mode 100644 none/tests/mips64/load_store_unaligned.stderr.exp delete mode 100644 none/tests/mips64/logical_instructions.stderr.exp delete mode 100644 none/tests/mips64/move_instructions.stderr.exp delete mode 120000 none/tests/mips64/msa_arithmetic.stderr.exp delete mode 120000 none/tests/mips64/msa_comparison.stderr.exp delete mode 100644 none/tests/mips64/msa_data_transfer.stderr.exp delete mode 120000 none/tests/mips64/msa_fpu.stderr.exp delete mode 120000 none/tests/mips64/msa_logical_and_shift.stderr.exp delete mode 120000 none/tests/mips64/msa_shuffle.stderr.exp delete mode 120000 none/tests/mips64/pc_instructions_r6.stderr.exp delete mode 100644 none/tests/mips64/r6_instructions.stderr.exp delete mode 100644 none/tests/mips64/rotate_swap.stderr.exp delete mode 100644 none/tests/mips64/round.stderr.exp delete mode 100644 none/tests/mips64/shift_instructions.stderr.exp delete mode 100644 none/tests/mips64/test_block_size.stderr.exp delete mode 100644 none/tests/mips64/test_fcsr.stderr.exp delete mode 100644 none/tests/mips64/test_math.stderr.exp delete mode 100644 none/tests/mips64/unaligned_load.stderr.exp delete mode 100644 none/tests/mips64/unaligned_load_store.stderr.exp delete mode 100644 none/tests/mmap_o_direct.stderr.exp delete mode 100644 none/tests/nanomips/arithmetic.stderr.exp delete mode 100644 none/tests/nanomips/bits.stderr.exp delete mode 100644 none/tests/nanomips/branches.stderr.exp delete mode 100644 none/tests/nanomips/load_store.stderr.exp delete mode 100644 none/tests/nanomips/move.stderr.exp delete mode 100644 none/tests/nanomips/pc_instructions.stderr.exp delete mode 100644 none/tests/ppc32/bug129390-ppc32.stderr.exp delete mode 100644 none/tests/ppc32/bug139050-ppc32.stderr.exp delete mode 100644 none/tests/ppc64/std_reg_imm.stderr.exp delete mode 100644 none/tests/ppoll_alarm.stderr.exp delete mode 100644 none/tests/pselect_alarm.stderr.exp delete mode 100644 none/tests/pselect_sigmask_null.stderr.exp delete mode 100644 none/tests/pth_self_kill_15_other.stderr.exp delete mode 100644 none/tests/pth_self_kill_9.stderr.exp delete mode 100644 none/tests/rc_option_with_spaces.stderr.exp delete mode 100644 none/tests/require-text-symbol-1.stderr.exp delete mode 100644 none/tests/res_search.stderr.exp delete mode 100644 none/tests/riscv64/atomic.stderr.exp delete mode 100644 none/tests/riscv64/compressed.stderr.exp delete mode 100644 none/tests/riscv64/csr.stderr.exp delete mode 100644 none/tests/riscv64/float32.stderr.exp delete mode 100644 none/tests/riscv64/float64.stderr.exp delete mode 100644 none/tests/riscv64/integer.stderr.exp delete mode 100644 none/tests/riscv64/muldiv.stderr.exp delete mode 100644 none/tests/s390x/disasm-test/disasm-test.stderr.exp delete mode 100755 none/tests/s390x/disasm-test/filter_stderr delete mode 100644 none/tests/scripts/nointerp1.stderr.exp delete mode 100644 none/tests/scripts/nointerp2.stderr.exp delete mode 100644 none/tests/scripts/nointerp3.stderr.exp delete mode 100644 none/tests/scripts/nointerp4.stderr.exp delete mode 100644 none/tests/scripts/nointerp5.stderr.exp delete mode 100644 none/tests/scripts/relative1.stderr.exp delete mode 100644 none/tests/scripts/relative2.stderr.exp delete mode 100644 none/tests/scripts/shell_valid1.stderr.exp delete mode 100644 none/tests/scripts/shell_valid4.stderr.exp delete mode 100644 none/tests/sigprocmask.stderr.exp delete mode 100644 none/tests/sigsusp.stderr.exp delete mode 100644 none/tests/solaris/context_link.stderr.exp delete mode 100644 none/tests/solaris/context_link2.stderr.exp delete mode 100644 none/tests/solaris/context_null.stderr.exp delete mode 100644 none/tests/solaris/context_stack.stderr.exp delete mode 100644 none/tests/solaris/mmap_noreserve.stderr.exp delete mode 100644 none/tests/solaris/proc_aout.stderr.exp delete mode 100644 none/tests/solaris/proc_auxv.stderr.exp delete mode 100644 none/tests/solaris/proc_auxv_multiple.stderr.exp delete mode 100644 none/tests/solaris/sigresend.stderr.exp delete mode 100644 none/tests/solaris/stack_prot.stderr.exp delete mode 100644 none/tests/solaris/threads_exitall.stderr.exp delete mode 100644 none/tests/syslog.stderr.exp delete mode 100644 none/tests/threadederrno.stderr.exp delete mode 100644 none/tests/timer_delete.stderr.exp delete mode 100644 none/tests/track-fds-exec-children.stderr.exp delete mode 120000 none/tests/x86-darwin/cet_nops_gs.stderr.exp delete mode 100644 none/tests/x86-freebsd/bug445032.stderr.exp delete mode 120000 none/tests/x86-linux/cet_nops_fs.stderr.exp delete mode 120000 none/tests/x86-linux/cet_nops_gs.stderr.exp delete mode 120000 none/tests/x86-solaris/cet_nops_fs.stderr.exp delete mode 100644 none/tests/x86-solaris/syscalls.stderr.exp delete mode 100644 none/tests/x86/aad_aam.stderr.exp delete mode 100644 none/tests/x86/bswapw.stderr.exp delete mode 100644 none/tests/x86/bug137714-x86.stderr.exp delete mode 120000 none/tests/x86/cet_nops.stderr.exp delete mode 100644 none/tests/x86/cse_fail.stderr.exp delete mode 100644 none/tests/x86/gnu_binutils_nop.stderr.exp delete mode 100644 none/tests/x86/insn_basic.stderr.exp delete mode 100644 none/tests/x86/insn_cmov.stderr.exp delete mode 100644 none/tests/x86/insn_fpu.stderr.exp delete mode 100644 none/tests/x86/insn_mmx.stderr.exp delete mode 100644 none/tests/x86/insn_mmxext.stderr.exp delete mode 100644 none/tests/x86/insn_sse.stderr.exp delete mode 100644 none/tests/x86/insn_sse2.stderr.exp delete mode 100644 none/tests/x86/insn_sse3.stderr.exp delete mode 100644 none/tests/x86/insn_ssse3.stderr.exp delete mode 100644 none/tests/x86/jcxz.stderr.exp delete mode 100644 none/tests/x86/lzcnt32.stderr.exp delete mode 100644 none/tests/x86/movbe.stderr.exp delete mode 100644 none/tests/x86/sse4-x86.stderr.exp delete mode 100644 none/tests/x86/xadd.stderr.exp diff --git a/cachegrind/tests/Makefile.am b/cachegrind/tests/Makefile.am index 33242dfb9..0ea0be07e 100644 --- a/cachegrind/tests/Makefile.am +++ b/cachegrind/tests/Makefile.am @@ -36,7 +36,7 @@ EXTRA_DIST = \ ann2-basic.rs ann2-more-recent-than-cgout.rs \ ann2-negatives.rs ann2-past-the-end.rs \ chdir.vgtest chdir.stderr.exp \ - clreq.vgtest clreq.stderr.exp \ + clreq.vgtest \ clreq2a.vgtest clreq2a.stderr.exp \ clreq2b.vgtest clreq2b.stderr.exp \ clreq3.vgtest clreq3.stderr.exp \ diff --git a/cachegrind/tests/clreq.stderr.exp b/cachegrind/tests/clreq.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/drd/tests/Makefile.am b/drd/tests/Makefile.am index 257edeef3..01fc672df 100644 --- a/drd/tests/Makefile.am +++ b/drd/tests/Makefile.am @@ -158,14 +158,12 @@ EXTRA_DIST = \ hold_lock_1.vgtest \ hold_lock_2.stderr.exp \ hold_lock_2.vgtest \ - getaddrinfo.stderr.exp \ getaddrinfo.vgtest \ linuxthreads_det.stderr.exp \ linuxthreads_det.stderr.exp-linuxthreads \ linuxthreads_det.stdout.exp \ linuxthreads_det.stdout.exp-linuxthreads \ linuxthreads_det.vgtest \ - local_static.stderr.exp \ local_static.vgtest \ matinv.stderr.exp \ matinv.stdout.exp \ @@ -268,7 +266,6 @@ EXTRA_DIST = \ sem_as_mutex3.stderr.exp-mips32-be \ sem_as_mutex3.stderr.exp-mips32-le \ sem_as_mutex3.vgtest \ - sem_clockwait_np.stderr.exp \ sem_clockwait_np.stdout.exp \ sem_clockwait_np.vgtest \ sem_open.stderr.exp \ diff --git a/drd/tests/getaddrinfo.stderr.exp b/drd/tests/getaddrinfo.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/drd/tests/local_static.stderr.exp b/drd/tests/local_static.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/drd/tests/sem_clockwait_np.stderr.exp b/drd/tests/sem_clockwait_np.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/Makefile.am b/gdbserver_tests/Makefile.am index 6b73a24e9..ef3b1767e 100644 --- a/gdbserver_tests/Makefile.am +++ b/gdbserver_tests/Makefile.am @@ -32,17 +32,13 @@ EXTRA_DIST = \ hginfo.stdinB.gdb \ hginfo.stdoutB.exp \ hginfo.vgtest \ - hgtls.stderrB.exp \ - hgtls.stderr.exp \ hgtls.stdinB.gdb \ hgtls.stdoutB.exp \ hgtls.vgtest \ - mcblocklistsearch.stderr.exp \ mcblocklistsearch.stdinB.gdb \ mcblocklistsearch.vgtest \ mcblocklistsearch.stderrB.exp \ mcbreak.stderrB.exp \ - mcbreak.stderr.exp \ mcbreak.stdinB.gdb \ mcbreak.stdoutB.exp \ mcbreak.stdout.exp \ @@ -53,10 +49,8 @@ EXTRA_DIST = \ mcclean_after_fork.stdoutB.exp \ mcclean_after_fork.vgtest \ mchelp.stderrB.exp \ - mchelp.stderr.exp \ mchelp.stdoutB.exp \ mchelp.vgtest \ - mcinfcallRU.stderrB.exp \ mcinfcallRU.stderr.exp \ mcinfcallRU.stdinB.gdb \ mcinfcallRU.vgtest \ @@ -65,11 +59,9 @@ EXTRA_DIST = \ mcinfcallWSRU.stdinB.gdb \ mcinfcallWSRU.vgtest \ mcinvokeRU.stderrB.exp \ - mcinvokeRU.stderr.exp \ mcinvokeRU.stdoutB.exp \ mcinvokeRU.vgtest \ mcinvokeWS.stderrB.exp \ - mcinvokeWS.stderr.exp \ mcinvokeWS.stdoutB.exp \ mcinvokeWS.vgtest \ mcleak.stderrB.exp \ @@ -89,34 +81,28 @@ EXTRA_DIST = \ mcmain_pic.stdinB.gdb \ mcmain_pic.stdoutB.exp \ mcmain_pic.stdout.exp \ - mcsignopass.stderrB.exp \ mcsignopass.stderr.exp \ mcsignopass.stdinB.gdb \ mcsignopass.stdoutB.exp \ mcsignopass.stdoutB.exp-freebsd \ mcsignopass.vgtest \ - mcsigpass.stderrB.exp \ mcsigpass.stderr.exp \ mcsigpass.stdinB.gdb \ mcsigpass.stdoutB.exp \ mcsigpass.stdoutB.exp-freebsd \ mcsigpass.vgtest \ mcvabits.stderrB.exp \ - mcvabits.stderr.exp \ mcvabits.stdinB.gdb \ mcvabits.stdoutB.exp \ mcvabits.vgtest \ - mcwatchpoints.stderrB.exp \ mcwatchpoints.stderr.exp \ mcwatchpoints.stdinB.gdb \ mcwatchpoints.stdoutB.exp \ mcwatchpoints.vgtest \ mssnapshot.stderrB.exp \ - mssnapshot.stderr.exp \ mssnapshot.stdinB.gdb \ mssnapshot.stdoutB.exp \ mssnapshot.vgtest \ - nlcontrolc.stderrB.exp \ nlcontrolc.stderr.exp \ nlcontrolc.stdinB.gdb \ nlcontrolc.stdoutB.exp \ @@ -126,17 +112,14 @@ EXTRA_DIST = \ nlfork_chain.stdout.exp \ nlfork_chain.vgtest \ nlgone_abrt.stderr.exp \ - nlgone_abrt.stderrB.exp \ nlgone_abrt.stdinB.gdb \ nlgone_abrt.stdoutB.exp \ nlgone_abrt.vgtest \ nlgone_exit.stderr.exp \ - nlgone_exit.stderrB.exp \ nlgone_exit.stdinB.gdb \ nlgone_exit.stdoutB.exp \ nlgone_exit.vgtest \ nlgone_return.stderr.exp \ - nlgone_return.stderrB.exp \ nlgone_return.stdinB.gdb \ nlgone_return.stdoutB.exp \ nlgone_return.vgtest \ @@ -145,7 +128,6 @@ EXTRA_DIST = \ nlpasssigalrm.stderr.exp \ nlpasssigalrm.stdinB.gdb \ nlpasssigalrm.stdoutB.exp \ - nlself_invalidate.stderrB.exp \ nlself_invalidate.stderr.exp \ nlself_invalidate.stdinB.gdb \ nlself_invalidate.vgtest \ @@ -154,7 +136,6 @@ EXTRA_DIST = \ nlsigvgdb.stderrB.exp \ nlsigvgdb.stdinB.gdb \ nlvgdbsigqueue.vgtest \ - nlvgdbsigqueue.stderrB.exp \ nlvgdbsigqueue.stderr.exp \ nlvgdbsigqueue.stdinB.gdb \ nlvgdbsigqueue.stdoutB.exp \ diff --git a/gdbserver_tests/hgtls.stderr.exp b/gdbserver_tests/hgtls.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/hgtls.stderrB.exp b/gdbserver_tests/hgtls.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcblocklistsearch.stderr.exp b/gdbserver_tests/mcblocklistsearch.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcbreak.stderr.exp b/gdbserver_tests/mcbreak.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mchelp.stderr.exp b/gdbserver_tests/mchelp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcinfcallRU.stderrB.exp b/gdbserver_tests/mcinfcallRU.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcinvokeRU.stderr.exp b/gdbserver_tests/mcinvokeRU.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcinvokeWS.stderr.exp b/gdbserver_tests/mcinvokeWS.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcsignopass.stderrB.exp b/gdbserver_tests/mcsignopass.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcsigpass.stderrB.exp b/gdbserver_tests/mcsigpass.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcvabits.stderr.exp b/gdbserver_tests/mcvabits.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mcwatchpoints.stderrB.exp b/gdbserver_tests/mcwatchpoints.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/mssnapshot.stderr.exp b/gdbserver_tests/mssnapshot.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/nlcontrolc.stderrB.exp b/gdbserver_tests/nlcontrolc.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/nlgone_abrt.stderrB.exp b/gdbserver_tests/nlgone_abrt.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/nlgone_exit.stderrB.exp b/gdbserver_tests/nlgone_exit.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/nlgone_return.stderrB.exp b/gdbserver_tests/nlgone_return.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/nlself_invalidate.stderrB.exp b/gdbserver_tests/nlself_invalidate.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/nlvgdbsigqueue.stderrB.exp b/gdbserver_tests/nlvgdbsigqueue.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/gdbserver_tests/solaris/Makefile.am b/gdbserver_tests/solaris/Makefile.am index e9ebcc8fc..7108f44c7 100644 --- a/gdbserver_tests/solaris/Makefile.am +++ b/gdbserver_tests/solaris/Makefile.am @@ -5,7 +5,6 @@ dist_noinst_SCRIPTS = \ filter_stderr EXTRA_DIST = \ - nlcontrolc.stderrB.exp \ nlcontrolc.stderr.exp \ nlcontrolc.stdinB.gdb \ nlcontrolc.stdoutB.exp \ diff --git a/gdbserver_tests/solaris/nlcontrolc.stderrB.exp b/gdbserver_tests/solaris/nlcontrolc.stderrB.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index aa1948463..f7b2b1980 100644 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -15,15 +15,15 @@ noinst_SCRIPTS = \ filter_stderr EXTRA_DIST = \ - annotate_hbefore.vgtest annotate_hbefore.stderr.exp \ + annotate_hbefore.vgtest \ annotate_rwlock.vgtest annotate_rwlock.stderr.exp \ annotate_smart_pointer.vgtest annotate_smart_pointer.stderr.exp \ bug322621.vgtest bug322621.stderr.exp \ - bug327548.vgtest bug327548.stderr.exp \ + bug327548.vgtest \ bug392331.vgtest bug392331.stdout.exp bug392331.stderr.exp \ - bug392331_supp.vgtest bug392331_supp.stdout.exp bug392331_supp.stderr.exp \ + bug392331_supp.vgtest bug392331_supp.stdout.exp \ bug392331.supp \ - bug484480.vgtest bug484480.stderr.exp bug484480.stdout.exp \ + bug484480.vgtest bug484480.stdout.exp \ cond_init_destroy.vgtest cond_init_destroy.stderr.exp \ cond_timedwait_invalid.vgtest cond_timedwait_invalid.stderr.exp \ cond_timedwait_test.vgtest cond_timedwait_test.stderr.exp \ @@ -31,9 +31,9 @@ EXTRA_DIST = \ bar_bad.stderr.exp-destroy-hang \ bar_bad.stderr.exp-freebsd \ bar_bad.stderr.exp-illumos \ - bar_trivial.vgtest bar_trivial.stdout.exp bar_trivial.stderr.exp \ + bar_trivial.vgtest bar_trivial.stdout.exp \ free_is_write.vgtest free_is_write.stderr.exp \ - getaddrinfo.vgtest getaddrinfo.stderr.exp \ + getaddrinfo.vgtest \ hg01_all_ok.vgtest hg01_all_ok.stderr.exp \ hg02_deadlock.vgtest hg02_deadlock.stderr.exp \ hg03_inherit.vgtest hg03_inherit.stderr.exp \ @@ -60,13 +60,12 @@ EXTRA_DIST = \ pth_cond_destroy_busy.stderr.exp-ppc64 \ pth_cond_destroy_busy.stderr.exp-solaris \ pth_cond_destroy_busy.stderr.exp-freebsd \ - pth_mempcpy_false_races.vgtest pth_mempcpy_false_races.stderr.exp \ + pth_mempcpy_false_races.vgtest \ pth_spinlock.vgtest pth_spinlock.stderr.exp \ rwlock_race.vgtest rwlock_race.stderr.exp \ rwlock_test.vgtest rwlock_test.stderr.exp \ sem_clockwait_np.vgtest sem_clockwait_np.stdout.exp \ - sem_clockwait_np.stderr.exp \ - sem_timedwait.vgtest sem_timedwait.stdout.exp sem_timedwait.stderr.exp \ + sem_timedwait.vgtest sem_timedwait.stdout.exp \ shared_timed_mutex.vgtest shared_timed_mutex.stderr.exp \ shmem_abits.vgtest shmem_abits.stderr.exp \ stackteardown.vgtest stackteardown.stderr.exp \ diff --git a/helgrind/tests/annotate_hbefore.stderr.exp b/helgrind/tests/annotate_hbefore.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/bar_trivial.stderr.exp b/helgrind/tests/bar_trivial.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/bug327548.stderr.exp b/helgrind/tests/bug327548.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/bug392331_supp.stderr.exp b/helgrind/tests/bug392331_supp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/bug484480.stderr.exp b/helgrind/tests/bug484480.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/getaddrinfo.stderr.exp b/helgrind/tests/getaddrinfo.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/pth_mempcpy_false_races.stderr.exp b/helgrind/tests/pth_mempcpy_false_races.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/sem_clockwait_np.stderr.exp b/helgrind/tests/sem_clockwait_np.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/helgrind/tests/sem_timedwait.stderr.exp b/helgrind/tests/sem_timedwait.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index a79373876..776c6c6f6 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -21,13 +21,13 @@ EXTRA_DIST = \ custom_alloc.post.exp custom_alloc.stderr.exp custom_alloc.vgtest \ ignored.post.exp ignored.stderr.exp ignored.vgtest \ ignoring.post.exp ignoring.stderr.exp ignoring.vgtest \ - inlinfomalloc.post.exp inlinfomalloc.stderr.exp inlinfomalloc.vgtest \ + inlinfomalloc.post.exp inlinfomalloc.vgtest \ insig.post.exp insig.stderr.exp insig.vgtest \ long-names.post.exp long-names.stderr.exp long-names.vgtest \ long-time.post.exp long-time.stderr.exp long-time.vgtest \ - malloc_usable.stderr.exp malloc_usable.vgtest \ + malloc_usable.vgtest \ mmapunmap.post.exp mmapunmap.post.exp-ppc64 \ - mmapunmap.stderr.exp mmapunmap.vgtest \ + mmapunmap.vgtest \ new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \ no-stack-no-heap.post.exp no-stack-no-heap.stderr.exp no-stack-no-heap.vgtest \ null.post.exp null.stderr.exp null.vgtest \ @@ -114,4 +114,3 @@ one_CFLAGS = $(AM_CFLAGS) -Wno-unused-result pages_as_heap_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_DEPRECATED_DECLARATIONS@ realloc_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_FREE_NONHEAP_OBJECT@ thresholds_CFLAGS = $(AM_CFLAGS) -Wno-unused-result - diff --git a/massif/tests/inlinfomalloc.stderr.exp b/massif/tests/inlinfomalloc.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/massif/tests/malloc_usable.stderr.exp b/massif/tests/malloc_usable.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/massif/tests/mmapunmap.stderr.exp b/massif/tests/mmapunmap.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 8f8f90015..eb6014053 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -110,7 +110,7 @@ noinst_HEADERS = leak.h EXTRA_DIST = \ accounting.stderr.exp accounting.vgtest \ addressable.stderr.exp addressable.stdout.exp addressable.vgtest \ - atomic_incs.stderr.exp atomic_incs.vgtest \ + atomic_incs.vgtest \ atomic_incs.stdout.exp-32bit atomic_incs.stdout.exp-64bit \ atomic_incs.stdout.exp-64bit-and-128bit \ badaddrvalue.stderr.exp \ @@ -131,13 +131,13 @@ EXTRA_DIST = \ buflen_check.stderr.exp-kfail \ bug155125.stderr.exp bug155125.vgtest \ bug287260.stderr.exp bug287260.vgtest \ - bug340392.stderr.exp bug340392.vgtest \ + bug340392.vgtest \ bug445235_ada_demangle.stderr.exp bug445235_ada_demangle.vgtest \ - bug401284.stderr.exp bug401284.stdout.exp bug401284.vgtest \ + bug401284.stdout.exp bug401284.vgtest \ bug464969_d_demangle.stderr.exp bug464969_d_demangle.vgtest \ bug464969_d_demangle.stdout.exp \ - bug472219.stderr.exp bug472219.vgtest \ - bug484002.stderr.exp bug484002.stdout.exp bug484002.vgtest \ + bug472219.vgtest \ + bug484002.stdout.exp bug484002.vgtest \ calloc-overflow.stderr.exp calloc-overflow.vgtest\ cdebug_zstd.vgtest cdebug_zstd.stderr.exp \ cdebug_zlib.stderr.exp cdebug_zlib.vgtest \ @@ -163,7 +163,7 @@ EXTRA_DIST = \ leak_cpp_interior.stderr.exp-arm \ custom_alloc.stderr.exp custom_alloc.vgtest \ custom_alloc.stderr.exp-s390x-mvc \ - custom-overlap.stderr.exp custom-overlap.vgtest \ + custom-overlap.vgtest \ cxx17_aligned_new.stderr.exp cxx17_aligned_new.vgtest \ cxx17_aligned_new.stderr.exp_32 \ darwin.supp \ @@ -208,7 +208,7 @@ EXTRA_DIST = \ new_delete_mismatch_size_supp.supp \ deep-backtrace.vgtest deep-backtrace.stderr.exp \ demangle.stderr.exp demangle.vgtest \ - big_debuginfo_symbol.stderr.exp big_debuginfo_symbol.vgtest \ + big_debuginfo_symbol.vgtest \ describe-block.stderr.exp describe-block.vgtest \ descr_belowsp.vgtest descr_belowsp.stderr.exp \ doublefree.stderr.exp doublefree.vgtest \ @@ -239,7 +239,7 @@ EXTRA_DIST = \ inits.stderr.exp inits.vgtest \ inline.stderr.exp inline.stdout.exp inline.vgtest \ inlinfo.stderr.exp inlinfo.vgtest \ - inlinfosupp.stderr.exp inlinfosupp.supp inlinfosupp.vgtest \ + inlinfosupp.supp inlinfosupp.vgtest \ inlinfosuppobj.stderr.exp inlinfosuppobj.supp inlinfosuppobj.vgtest \ inltemplate.vgtest inltemplate.stderr.exp inltemplate.stderr.exp-old-gcc \ leak-0.vgtest leak-0.stderr.exp \ @@ -267,12 +267,12 @@ EXTRA_DIST = \ lks.vgtest lks.supp lks.stderr.exp \ long_namespace_xml.vgtest long_namespace_xml.stdout.exp \ long_namespace_xml.stderr.exp long_namespace_xml.stderr.exp-freebsd \ - long-supps.vgtest long-supps.stderr.exp long-supps.supp \ + long-supps.vgtest long-supps.supp \ mallinfo.stderr.exp mallinfo.vgtest \ mallinfo2.stderr.exp mallinfo2.vgtest \ malloc_free_fill.vgtest \ malloc_free_fill.stderr.exp \ - malloc_usable.stderr.exp malloc_usable.vgtest \ + malloc_usable.vgtest \ malloc1.stderr.exp malloc1.vgtest \ malloc1_ks_none.stderr.exp malloc1_ks_none.vgtest \ malloc1_ks_alloc.stderr.exp malloc1_ks_alloc.vgtest \ @@ -284,7 +284,7 @@ EXTRA_DIST = \ manuel2.stderr.exp manuel2.stderr.exp64 manuel2.stdout.exp \ manuel2.vgtest \ manuel3.stderr.exp manuel3.vgtest \ - match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \ + match-overrun.vgtest match-overrun.supp \ memalign_test.stderr.exp memalign_test.vgtest \ memalign_args.vgtest memalign_args.stderr.exp \ memalign_args.stderr.exp-glibc \ @@ -292,11 +292,11 @@ EXTRA_DIST = \ memalign_args.stderr.exp-darwin2 \ memalign_args.stderr.exp-darwin3 \ memalign_args.stderr.exp-solaris \ - memccpy1.stderr.exp memccpy1.stdout.exp memccpy1.vgtest \ + memccpy1.stdout.exp memccpy1.vgtest \ memccpy2.stderr.exp memccpy2.vgtest \ memcmptest.stderr.exp \ memcmptest.stdout.exp memcmptest.vgtest \ - memmem.stderr.exp memmem.vgtest \ + memmem.vgtest \ mempool.stderr.exp mempool.vgtest \ mempool2.stderr.exp mempool2.vgtest \ metadata.stderr.exp metadata.stdout.exp metadata.vgtest \ @@ -304,14 +304,14 @@ EXTRA_DIST = \ mismatches.stderr.exp2 \ mismatches_xml.stderr.exp mismatches_xml.vgtest \ mismatches_xml.stderr.exp2 \ - mmaptest.stderr.exp mmaptest.vgtest \ - nanoleak_supp.stderr.exp nanoleak_supp.vgtest nanoleak.supp \ - nanoleak_dynsupp.stderr.exp nanoleak_dynsupp.vgtest \ - nanoleak2.stderr.exp nanoleak2.vgtest \ - new_nothrow.stderr.exp new_nothrow.vgtest \ + mmaptest.vgtest \ + nanoleak_supp.vgtest nanoleak.supp \ + nanoleak_dynsupp.vgtest \ + nanoleak2.vgtest \ + new_nothrow.vgtest \ new_override.stderr.exp new_override.stdout.exp new_override.vgtest \ noisy_child.vgtest noisy_child.stderr.exp \ - null_socket.stderr.exp null_socket.vgtest \ + null_socket.vgtest \ origin1-yes.vgtest origin1-yes.stderr.exp \ origin1-yes.stderr.exp-freebsd \ origin2-not-quite.vgtest origin2-not-quite.stderr.exp \ @@ -346,9 +346,9 @@ EXTRA_DIST = \ partial_load_dflt.stderr.exp64 \ partial_load_dflt.stderr.exp-ppc64 \ partial_load_dflt.stderr.expr-s390x-mvc \ - pdb-realloc.stderr.exp pdb-realloc.vgtest \ - pdb-realloc2.stderr.exp pdb-realloc2.stdout.exp pdb-realloc2.vgtest \ - pipe.stderr.exp pipe.vgtest \ + pdb-realloc.vgtest \ + pdb-realloc2.stdout.exp pdb-realloc2.vgtest \ + pipe.vgtest \ pointer-trace.vgtest \ pointer-trace.stderr.exp \ posix_memalign.stderr.exp posix_memalign.vgtest \ @@ -375,26 +375,26 @@ EXTRA_DIST = \ realloc_size_zero_no.vgtest \ realloc_size_zero_again_no.stderr.exp \ realloc_size_zero_again_no.vgtest \ - realloc_size_zero_off.stderr.exp realloc_size_zero_off.stdout.exp \ + realloc_size_zero_off.stdout.exp \ realloc_size_zero_off.vgtest \ realloc_size_zero_mismatch.stderr.exp \ realloc_size_zero_mismatch.stdout.exp \ realloc_size_zero_mismatch.vgtest \ - realloc_size_zero_supp.stderr.exp realloc_size_zero_supp.stdout.exp \ + realloc_size_zero_supp.stdout.exp \ realloc_size_zero_supp.vgtest \ realloc_size_zero.supp \ - realloc1.stderr.exp realloc1.vgtest \ - realloc2.stderr.exp realloc2.vgtest \ + realloc1.vgtest \ + realloc2.vgtest \ realloc3.stderr.exp realloc3.vgtest \ recursive-merge.stderr.exp recursive-merge.vgtest \ resvn_stack.stderr.exp resvn_stack.vgtest \ demangle-rust.vgtest demangle-rust.stderr.exp \ sbfragment.stdout.exp sbfragment.stderr.exp sbfragment.vgtest \ - sem.stderr.exp sem.vgtest \ + sem.vgtest \ sendmsg.stderr.exp sendmsg.stderr.exp-solaris sendmsg.vgtest \ sendmsg.stderr.exp-freebsd \ sh-mem.stderr.exp sh-mem.vgtest \ - sh-mem-random.stderr.exp sh-mem-random.stdout.exp64 \ + sh-mem-random.stdout.exp64 \ sh-mem-random.stdout.exp sh-mem-random.vgtest \ sigaltstack.stderr.exp sigaltstack.vgtest \ sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.stderr.exp-freebsd sigkill.stderr.exp-mips32 \ @@ -406,19 +406,19 @@ EXTRA_DIST = \ static_malloc.stderr.exp static_malloc.vgtest \ stpncpy.vgtest stpncpy.stderr.exp \ strchr.stderr.exp strchr.stderr.exp2 strchr.stderr.exp3 strchr.vgtest \ - str_tester.stderr.exp str_tester.vgtest \ + str_tester.vgtest \ supp-dir.vgtest supp-dir.stderr.exp \ supp_unknown.stderr.exp supp_unknown.vgtest supp_unknown.supp \ supp_unknown.stderr.exp-kfail \ - supp1.stderr.exp supp1.vgtest \ - supp2.stderr.exp supp2.vgtest \ + supp1.vgtest \ + supp2.vgtest \ supp.supp \ suppfree.stderr.exp suppfree.supp suppfree.vgtest \ - suppfreecollision.stderr.exp suppfreecollision.supp suppfreecollision.vgtest \ + suppfreecollision.supp suppfreecollision.vgtest \ supponlyobj.stderr.exp supponlyobj.supp supponlyobj.vgtest \ suppsrc_lineno.stderr.exp suppsrc_lineno.vgtest \ suppsrc_lineno.supp \ - suppsrc_sanlineno.stderr.exp suppsrc_sanlineno.vgtest \ + suppsrc_sanlineno.vgtest \ suppsrc_sanlineno.supp \ suppvarinfo5.stderr.exp suppvarinfo5.supp suppvarinfo5.vgtest \ test-plo-no.vgtest \ @@ -427,13 +427,13 @@ EXTRA_DIST = \ test-plo-yes.vgtest \ test-plo-yes.stderr.exp-le64 test-plo-yes.stderr.exp-le32 \ test-plo-no.stderr.exp-s390x-mvc \ - thread_alloca.stderr.exp thread_alloca.vgtest \ + thread_alloca.vgtest \ threadname.vgtest threadname.stderr.exp \ threadname_xml.vgtest threadname_xml.stderr.exp \ trivialleak.stderr.exp trivialleak.vgtest trivialleak.stderr.exp2 \ undef_malloc_args.stderr.exp undef_malloc_args.vgtest \ - unit_libcbase.stderr.exp unit_libcbase.vgtest \ - unit_oset.stderr.exp unit_oset.stdout.exp unit_oset.vgtest \ + unit_libcbase.vgtest \ + unit_oset.stdout.exp unit_oset.vgtest \ varinfo1.vgtest varinfo1.stderr.exp \ varinfo1.stderr.exp-ppc64 \ varinfo1.stderr.exp-freebsd \ @@ -452,29 +452,28 @@ EXTRA_DIST = \ varinfo6.vgtest varinfo6.stdout.exp varinfo6.stderr.exp \ varinfo6.stderr.exp-ppc64 \ varinforestrict.vgtest varinforestrict.stderr.exp \ - vcpu_bz2.stdout.exp vcpu_bz2.stderr.exp vcpu_bz2.vgtest \ - vcpu_fbench.stdout.exp vcpu_fbench.stderr.exp vcpu_fbench.vgtest \ + vcpu_bz2.stdout.exp vcpu_bz2.vgtest \ + vcpu_fbench.stdout.exp vcpu_fbench.vgtest \ vcpu_fnfns.stdout.exp vcpu_fnfns.stdout.exp-glibc28-amd64 \ vcpu_fnfns.stdout.exp-darwin vcpu_fnfns.stdout.exp-solaris \ vcpu_fnfns.stdout.exp-illumos \ - vcpu_fnfns.stderr.exp vcpu_fnfns.vgtest \ + vcpu_fnfns.vgtest \ wcpncpy1.stderr.exp wcpncpy1.vgtest \ wcs.vgtest wcs.stderr.exp \ - wcscat.vgtest wcscat.stderr.exp wcscat.stdout.exp \ - wcsncpy.vgtest wcsncpy.stderr.exp \ - wmemcmp.vgtest wmemcmp.stderr.exp \ - wrap1.vgtest wrap1.stdout.exp wrap1.stderr.exp \ - wrap2.vgtest wrap2.stdout.exp wrap2.stderr.exp \ - wrap3.vgtest wrap3.stdout.exp wrap3.stderr.exp \ - wrap4.vgtest wrap4.stdout.exp wrap4.stderr.exp \ - wrap5.vgtest wrap5.stdout.exp wrap5.stderr.exp \ - wrap6.vgtest wrap6.stdout.exp wrap6.stderr.exp \ - wrap7.vgtest wrap7.stdout.exp wrap7.stderr.exp \ + wcscat.vgtest wcscat.stdout.exp \ + wcsncpy.vgtest \ + wmemcmp.vgtest \ + wrap1.vgtest wrap1.stdout.exp \ + wrap2.vgtest wrap2.stdout.exp \ + wrap3.vgtest wrap3.stdout.exp \ + wrap4.vgtest wrap4.stdout.exp \ + wrap5.vgtest wrap5.stdout.exp \ + wrap6.vgtest wrap6.stdout.exp \ + wrap7.vgtest wrap7.stdout.exp \ wrap8.vgtest wrap8.stdout.exp wrap8.stderr.exp \ wrap8.stdout.exp-ppc64 wrap8.stderr.exp-ppc64 \ - wrapmalloc.vgtest wrapmalloc.stdout.exp wrapmalloc.stderr.exp \ + wrapmalloc.vgtest wrapmalloc.stdout.exp \ wrapmallocstatic.vgtest wrapmallocstatic.stdout.exp \ - wrapmallocstatic.stderr.exp \ writev1.stderr.exp writev1.stderr.exp-solaris writev1.vgtest \ xml1.stderr.exp xml1.stdout.exp xml1.vgtest xml1.stderr.exp-s390x-mvc diff --git a/memcheck/tests/amd64-linux/Makefile.am b/memcheck/tests/amd64-linux/Makefile.am index 70738a0de..e09e88cc5 100644 --- a/memcheck/tests/amd64-linux/Makefile.am +++ b/memcheck/tests/amd64-linux/Makefile.am @@ -10,7 +10,7 @@ EXTRA_DIST = \ access_below_sp_1.vgtest access_below_sp_1.stderr.exp \ access_below_sp_2.vgtest access_below_sp_2.stderr.exp \ defcfaexpr.vgtest defcfaexpr.stderr.exp \ - int3-amd64.vgtest int3-amd64.stderr.exp int3-amd64.stdout.exp \ + int3-amd64.vgtest int3-amd64.stdout.exp \ scalar.stderr.exp scalar.vgtest \ reallocarray.vgtest reallocarray.stderr.exp diff --git a/memcheck/tests/amd64-linux/int3-amd64.stderr.exp b/memcheck/tests/amd64-linux/int3-amd64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64-solaris/Makefile.am b/memcheck/tests/amd64-solaris/Makefile.am index 587d8eab5..ec6863dbe 100644 --- a/memcheck/tests/amd64-solaris/Makefile.am +++ b/memcheck/tests/amd64-solaris/Makefile.am @@ -6,10 +6,10 @@ dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ context_fpu.stderr.exp context_fpu.stdout.exp context_fpu.vgtest \ context_gpr.stderr.exp context_gpr.stdout.exp context_gpr.vgtest \ - context_rflags.stderr.exp context_rflags.stdout.exp context_rflags.vgtest \ + context_rflags.stdout.exp context_rflags.vgtest \ context_rflags2.stderr.exp context_rflags2.vgtest \ context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest \ - ldsoexec.stderr.exp ldsoexec.vgtest \ + ldsoexec.vgtest \ scalar.stderr.exp scalar.vgtest check_PROGRAMS = \ diff --git a/memcheck/tests/amd64-solaris/context_rflags.stderr.exp b/memcheck/tests/amd64-solaris/context_rflags.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64-solaris/ldsoexec.stderr.exp b/memcheck/tests/amd64-solaris/ldsoexec.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/Makefile.am b/memcheck/tests/amd64/Makefile.am index 7c5553be5..60b2fc9f4 100644 --- a/memcheck/tests/amd64/Makefile.am +++ b/memcheck/tests/amd64/Makefile.am @@ -6,26 +6,22 @@ dist_noinst_SCRIPTS = filter_stderr filter_malloc_zone filter_pcmpgt INSN_TESTS = insn_basic insn_mmx insn_sse insn_sse2 insn_fpu EXTRA_DIST = \ - $(addsuffix .stderr.exp,$(INSN_TESTS)) \ $(addsuffix .stdout.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ - bt_everything.stderr.exp bt_everything.stdout.exp \ - bt_everything.vgtest \ - bug132146.vgtest bug132146.stderr.exp bug132146.stdout.exp \ - bug279698.vgtest bug279698.stderr.exp bug279698.stdout.exp \ + bt_everything.stdout.exp bt_everything.vgtest \ + bug132146.vgtest bug132146.stdout.exp \ + bug279698.vgtest bug279698.stdout.exp \ bug492210_1.vgtest bug492210_1.stderr.exp \ - bug492210_2.vgtest bug492210_2.stderr.exp \ - fxsave-amd64.vgtest fxsave-amd64.stdout.exp fxsave-amd64.stderr.exp \ + bug492210_2.vgtest \ + fxsave-amd64.vgtest fxsave-amd64.stdout.exp \ insn-bsfl.vgtest insn-bsfl.stdout.exp insn-bsfl.stderr.exp \ insn-pcmpistri.vgtest insn-pcmpistri.stdout.exp insn-pcmpistri.stderr.exp \ insn-pmovmskb.vgtest insn-pmovmskb.stdout.exp insn-pmovmskb.stderr.exp \ insn-pmovmskb.stderr.exp-clang \ - more_x87_fp.stderr.exp more_x87_fp.stdout.exp more_x87_fp.vgtest \ + more_x87_fp.stdout.exp more_x87_fp.vgtest \ pcmpgt.stderr.exp pcmpgt.vgtest \ - rh2257546_128.vgtest \ - rh2257546_128.stderr.exp rh2257546_128.stdout.exp \ - rh2257546_256.vgtest \ - rh2257546_256.stderr.exp rh2257546_256.stdout.exp \ + rh2257546_128.vgtest rh2257546_128.stdout.exp \ + rh2257546_256.vgtest rh2257546_256.stdout.exp \ sh-mem-vec128-plo-no.vgtest \ sh-mem-vec128-plo-no.stderr.exp \ sh-mem-vec128-plo-yes.vgtest \ @@ -34,8 +30,8 @@ EXTRA_DIST = \ sh-mem-vec256-plo-no.stderr.exp \ sh-mem-vec256-plo-yes.vgtest \ sh-mem-vec256-plo-yes.stderr.exp \ - shr_edx.stderr.exp shr_edx.stdout.exp shr_edx.vgtest \ - sse_memory.stderr.exp sse_memory.stdout.exp sse_memory.vgtest \ + shr_edx.stdout.exp shr_edx.vgtest \ + sse_memory.stdout.exp sse_memory.vgtest \ xor-undef-amd64.stderr.exp xor-undef-amd64.stdout.exp \ xor-undef-amd64.stderr.exp-freebsd xor-undef-amd64.vgtest \ xsave-avx.vgtest xsave-avx.stderr.exp diff --git a/memcheck/tests/amd64/bt_everything.stderr.exp b/memcheck/tests/amd64/bt_everything.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/bug132146.stderr.exp b/memcheck/tests/amd64/bug132146.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/bug279698.stderr.exp b/memcheck/tests/amd64/bug279698.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/bug492210_2.stderr.exp b/memcheck/tests/amd64/bug492210_2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/fxsave-amd64.stderr.exp b/memcheck/tests/amd64/fxsave-amd64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/insn_basic.stderr.exp b/memcheck/tests/amd64/insn_basic.stderr.exp deleted file mode 120000 index 1dbcf0ff1..000000000 --- a/memcheck/tests/amd64/insn_basic.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/amd64/insn_basic.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/amd64/insn_fpu.stderr.exp b/memcheck/tests/amd64/insn_fpu.stderr.exp deleted file mode 120000 index 592b0b3fb..000000000 --- a/memcheck/tests/amd64/insn_fpu.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/amd64/insn_fpu.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/amd64/insn_mmx.stderr.exp b/memcheck/tests/amd64/insn_mmx.stderr.exp deleted file mode 120000 index 60d688dbb..000000000 --- a/memcheck/tests/amd64/insn_mmx.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/amd64/insn_mmx.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/amd64/insn_sse.stderr.exp b/memcheck/tests/amd64/insn_sse.stderr.exp deleted file mode 120000 index 5162d1815..000000000 --- a/memcheck/tests/amd64/insn_sse.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/amd64/insn_sse.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/amd64/insn_sse2.stderr.exp b/memcheck/tests/amd64/insn_sse2.stderr.exp deleted file mode 120000 index 5cfa5178d..000000000 --- a/memcheck/tests/amd64/insn_sse2.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/amd64/insn_sse2.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/amd64/more_x87_fp.stderr.exp b/memcheck/tests/amd64/more_x87_fp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/rh2257546_128.stderr.exp b/memcheck/tests/amd64/rh2257546_128.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/rh2257546_256.stderr.exp b/memcheck/tests/amd64/rh2257546_256.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/shr_edx.stderr.exp b/memcheck/tests/amd64/shr_edx.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/amd64/sse_memory.stderr.exp b/memcheck/tests/amd64/sse_memory.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/arm64/Makefile.am b/memcheck/tests/arm64/Makefile.am index 790732f4f..078b7dbf5 100644 --- a/memcheck/tests/arm64/Makefile.am +++ b/memcheck/tests/arm64/Makefile.am @@ -5,7 +5,7 @@ dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ - bug484935.stderr.exp bug484935.vgtest + bug484935.vgtest check_PROGRAMS = \ bug484935 diff --git a/memcheck/tests/arm64/bug484935.stderr.exp b/memcheck/tests/arm64/bug484935.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/atomic_incs.stderr.exp b/memcheck/tests/atomic_incs.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/big_debuginfo_symbol.stderr.exp b/memcheck/tests/big_debuginfo_symbol.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/bug340392.stderr.exp b/memcheck/tests/bug340392.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/bug401284.stderr.exp b/memcheck/tests/bug401284.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/bug472219.stderr.exp b/memcheck/tests/bug472219.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/bug484002.stderr.exp b/memcheck/tests/bug484002.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/custom-overlap.stderr.exp b/memcheck/tests/custom-overlap.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/Makefile.am b/memcheck/tests/darwin/Makefile.am index 650b7a640..0a3118350 100644 --- a/memcheck/tests/darwin/Makefile.am +++ b/memcheck/tests/darwin/Makefile.am @@ -7,14 +7,14 @@ noinst_HEADERS = scalar.h EXTRA_DIST = \ aio.stderr.exp aio.vgtest \ - aligned_alloc.stderr.exp aligned_alloc.vgtest \ - bug437790.vgtest bug437790.stdout.exp bug437790.stderr.exp \ + aligned_alloc.vgtest \ + bug437790.vgtest bug437790.stdout.exp \ deep_badparam.stderr.exp deep_badparam.stdout.exp deep_badparam.vgtest \ - env.stderr.exp env.vgtest \ - ioctl-tiocsbrk.stderr.exp ioctl-tiocsbrk.vgtest \ - pth-supp.stderr.exp pth-supp.vgtest \ - pth-undocumented.stderr.exp pth-undocumented.vgtest \ - mkfifo.stderr.exp mkfifo.vgtest \ + env.vgtest \ + ioctl-tiocsbrk.vgtest \ + pth-supp.vgtest \ + pth-undocumented.vgtest \ + mkfifo.vgtest \ scalar.stderr.exp scalar.vgtest \ scalar_fork.stderr.exp scalar_fork.vgtest \ scalar_nocancel.stderr.exp scalar_nocancel.vgtest \ diff --git a/memcheck/tests/darwin/aligned_alloc.stderr.exp b/memcheck/tests/darwin/aligned_alloc.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/bug437790.stderr.exp b/memcheck/tests/darwin/bug437790.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/env.stderr.exp b/memcheck/tests/darwin/env.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/ioctl-tiocsbrk.stderr.exp b/memcheck/tests/darwin/ioctl-tiocsbrk.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/mkfifo.stderr.exp b/memcheck/tests/darwin/mkfifo.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/pth-supp.stderr.exp b/memcheck/tests/darwin/pth-supp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/darwin/pth-undocumented.stderr.exp b/memcheck/tests/darwin/pth-undocumented.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index 90f74f9c3..ba17000c4 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -11,7 +11,7 @@ EXTRA_DIST = \ access.stderr.exp \ aio.vgtest aio.stderr.exp \ aiov.vgtest aiov.stderr.exp \ - aio_read.vgtest aio_read.stderr.exp aio_read.stdout.exp \ + aio_read.vgtest aio_read.stdout.exp \ aio_read.in \ aligned_alloc.vgtest aligned_alloc.stderr.exp \ aligned_alloc_xml.vgtest aligned_alloc_xml.stderr.exp \ @@ -19,16 +19,12 @@ EXTRA_DIST = \ aligned_allocs_supp.stderr.exp \ aligned_allocs_supp.supp \ bug464476.vgtest \ - bug464476.stderr.exp \ bug464476.stdout.exp \ bug464476_abs_symlink.vgtest \ - bug464476_abs_symlink.stderr.exp \ bug464476_abs_symlink.stdout.exp \ bug464476_rel_symlink.vgtest \ - bug464476_rel_symlink.stderr.exp \ bug464476_rel_symlink.stdout.exp \ - bug470713.vgtest bug470713.stderr.exp \ - bug470713.stdout.exp \ + bug470713.vgtest bug470713.stdout.exp \ bug483786.vgtest bug483786.stderr.exp \ capsicum.vgtest \ capsicum.stderr.exp \ @@ -46,7 +42,7 @@ EXTRA_DIST = \ errno_aligned_allocs.vgtest \ errno_aligned_allocs.stderr.exp \ eventfd1.vgtest \ - eventfd1.stderr.exp eventfd1.stdout.exp \ + eventfd1.stdout.exp \ eventfd2.vgtest \ eventfd2.stderr.exp \ extattr.vgtest \ @@ -54,7 +50,6 @@ EXTRA_DIST = \ exterrctl.vgtest \ exterrctl.stderr.exp \ fbsd278566.vgtest \ - fbsd278566.stderr.exp \ fchroot.vgtest \ fchroot.stderr.exp \ fexecve.vgtest \ @@ -75,10 +70,8 @@ EXTRA_DIST = \ kenv.vgtest \ kenv.stderr.exp \ kqueue.vgtest \ - kqueue.stderr.exp \ kqueue.stdout.exp \ kqueuex.vgtest \ - kqueuex.stderr.exp \ kqueuex.stdout.exp \ linkat.vgtest \ linkat.stderr.exp \ @@ -88,7 +81,6 @@ EXTRA_DIST = \ misc.vgtest \ misc.stderr.exp \ openpty.vgtest \ - openpty.stderr.exp \ pdfork_pdkill.vgtest \ pdfork_pdkill.stderr.exp \ pdfork_pdkill.supp \ @@ -111,14 +103,12 @@ EXTRA_DIST = \ scalar_vfork.vgtest \ scalar_vfork.stderr.exp \ sctp.vgtest \ - sctp.stderr.exp \ sctp.stdout.exp \ sctp2.vgtest \ sctp2.stderr.exp \ setcred.vgtest \ setcred.stderr.exp \ setproctitle.vgtest \ - setproctitle.stderr.exp \ setproctitle.stdout.exp \ sigwait.vgtest \ sigwait.stdout.exp \ @@ -147,8 +137,7 @@ EXTRA_DIST = \ utimes.vgtest \ utimes.stderr.exp-x86 \ utimes.stderr.exp \ - utrace.vgtest \ - utrace.stderr.exp + utrace.vgtest check_PROGRAMS = \ diff --git a/memcheck/tests/freebsd/aio_read.stderr.exp b/memcheck/tests/freebsd/aio_read.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/bug464476.stderr.exp b/memcheck/tests/freebsd/bug464476.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/bug464476_abs_symlink.stderr.exp b/memcheck/tests/freebsd/bug464476_abs_symlink.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/bug464476_rel_symlink.stderr.exp b/memcheck/tests/freebsd/bug464476_rel_symlink.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/bug470713.stderr.exp b/memcheck/tests/freebsd/bug470713.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/eventfd1.stderr.exp b/memcheck/tests/freebsd/eventfd1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/fbsd278566.stderr.exp b/memcheck/tests/freebsd/fbsd278566.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/kqueue.stderr.exp b/memcheck/tests/freebsd/kqueue.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/kqueuex.stderr.exp b/memcheck/tests/freebsd/kqueuex.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/openpty.stderr.exp b/memcheck/tests/freebsd/openpty.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/sctp.stderr.exp b/memcheck/tests/freebsd/sctp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/setproctitle.stderr.exp b/memcheck/tests/freebsd/setproctitle.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/freebsd/utrace.stderr.exp b/memcheck/tests/freebsd/utrace.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/inlinfosupp.stderr.exp b/memcheck/tests/inlinfosupp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index 367af9913..12b4cd8ef 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -9,8 +9,8 @@ EXTRA_DIST = \ aligned_alloc.stderr.exp-musl \ aligned_alloc.stderr.exp-glibc238 \ brk.stderr.exp brk.vgtest \ - bug480706.stderr.exp bug480706.vgtest \ - bug420682_1.stderr.exp bug420682_1.vgtest \ + bug480706.vgtest \ + bug420682_1.vgtest \ bug420682_2.stderr.exp bug420682_2.vgtest \ capget.vgtest capget.stderr.exp capget.stderr.exp2 capget.stderr.exp3 \ capget.stderr.exp4 \ @@ -18,19 +18,17 @@ EXTRA_DIST = \ debuginfod-check.pl \ dlclose_leak-no-keep.stderr.exp dlclose_leak-no-keep.vgtest \ dlclose_leak.stderr.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 \ + ioctl_procmap_query.stdout.exp ioctl_procmap_query.vgtest \ + ioctl-tiocsig.vgtest \ lsframe1.vgtest lsframe1.stderr.exp \ lsframe2.vgtest lsframe2.stderr.exp \ memfd_create.vgtest memfd_create.stderr.exp \ memfd_create.stderr.exp-fcntl64 \ rfcomm.vgtest rfcomm.stderr.exp \ sigqueue.vgtest sigqueue.stderr.exp \ - stack_changes.stderr.exp stack_changes.stdout.exp \ + stack_changes.stdout.exp \ stack_changes.stdout.exp2 stack_changes.vgtest \ - stack_switch.stderr.exp stack_switch.vgtest \ + stack_switch.vgtest \ syscalls-2007.vgtest syscalls-2007.stderr.exp \ syslog-syscall.vgtest syslog-syscall.stderr.exp \ sys-copy_file_range.vgtest sys-copy_file_range.stderr.exp \ @@ -39,12 +37,12 @@ EXTRA_DIST = \ timerfd-syscall.vgtest timerfd-syscall.stderr.exp \ with-space.stderr.exp with-space.stdout.exp with-space.vgtest \ proc-auxv.vgtest proc-auxv.stderr.exp getregset.vgtest \ - getregset.stderr.exp getregset.stdout.exp \ + getregset.stdout.exp \ strlcat_strlcpy.vgtest strlcat_strlcpy.stderr.exp \ sys-preadv_pwritev.vgtest sys-preadv_pwritev.stderr.exp \ sys-preadv2_pwritev2.vgtest sys-preadv2_pwritev2.stderr.exp \ sys-execveat.vgtest sys-execveat.stderr.exp sys-execveat.stdout.exp \ - enomem.vgtest enomem.stderr.exp enomem.stdout.exp \ + enomem.vgtest enomem.stdout.exp \ memalign.vgtest memalign.stderr.exp \ memalign.stderr.exp-musl diff --git a/memcheck/tests/linux/bug420682_1.stderr.exp b/memcheck/tests/linux/bug420682_1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/bug480706.stderr.exp b/memcheck/tests/linux/bug480706.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/enomem.stderr.exp b/memcheck/tests/linux/enomem.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/getregset.stderr.exp b/memcheck/tests/linux/getregset.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/ioctl-tiocsig.stderr.exp b/memcheck/tests/linux/ioctl-tiocsig.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/ioctl_procmap_query.stderr.exp b/memcheck/tests/linux/ioctl_procmap_query.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/stack_changes.stderr.exp b/memcheck/tests/linux/stack_changes.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/linux/stack_switch.stderr.exp b/memcheck/tests/linux/stack_switch.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/long-supps.stderr.exp b/memcheck/tests/long-supps.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/malloc_usable.stderr.exp b/memcheck/tests/malloc_usable.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/match-overrun.stderr.exp b/memcheck/tests/match-overrun.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/memccpy1.stderr.exp b/memcheck/tests/memccpy1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/memmem.stderr.exp b/memcheck/tests/memmem.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/mmaptest.stderr.exp b/memcheck/tests/mmaptest.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/nanoleak2.stderr.exp b/memcheck/tests/nanoleak2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/nanoleak_dynsupp.stderr.exp b/memcheck/tests/nanoleak_dynsupp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/nanoleak_supp.stderr.exp b/memcheck/tests/nanoleak_supp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/new_nothrow.stderr.exp b/memcheck/tests/new_nothrow.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/null_socket.stderr.exp b/memcheck/tests/null_socket.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/pdb-realloc.stderr.exp b/memcheck/tests/pdb-realloc.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/pdb-realloc2.stderr.exp b/memcheck/tests/pdb-realloc2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/pipe.stderr.exp b/memcheck/tests/pipe.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/ppc64/Makefile.am b/memcheck/tests/ppc64/Makefile.am index 7d1f36470..f1ca6c4ae 100644 --- a/memcheck/tests/ppc64/Makefile.am +++ b/memcheck/tests/ppc64/Makefile.am @@ -4,10 +4,10 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = $(noinst_SCRIPTS) \ - power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ + power_ISA2_05.stdout.exp power_ISA2_05.vgtest \ power_ISA2_05.stdout.exp_Without_FPPO power_ISA2_05.stdout.exp_Without_FPPO_2 \ power_ISA2_07.stdout.exp power_ISA2_07.stdout.exp-LE \ - power_ISA2_07.stderr.exp power_ISA2_07.vgtest + power_ISA2_07.vgtest check_PROGRAMS = \ diff --git a/memcheck/tests/ppc64/power_ISA2_05.stderr.exp b/memcheck/tests/ppc64/power_ISA2_05.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/ppc64/power_ISA2_07.stderr.exp b/memcheck/tests/ppc64/power_ISA2_07.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/realloc1.stderr.exp b/memcheck/tests/realloc1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/realloc2.stderr.exp b/memcheck/tests/realloc2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/realloc_size_zero_off.stderr.exp b/memcheck/tests/realloc_size_zero_off.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/realloc_size_zero_supp.stderr.exp b/memcheck/tests/realloc_size_zero_supp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/Makefile.am b/memcheck/tests/s390x/Makefile.am index abeb97136..19153bbb0 100644 --- a/memcheck/tests/s390x/Makefile.am +++ b/memcheck/tests/s390x/Makefile.am @@ -2,14 +2,15 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr -INSN_TESTS = cdsg cli cu21 cu42 ltgjhe tmxx vstrc vfae vistr vstrs vme +INSN_TESTS = cdsg cli cu21 cu42 vstrc vfae vistr vstrs vme -check_PROGRAMS = $(INSN_TESTS) +check_PROGRAMS = $(INSN_TESTS) tmxx ltgjhe EXTRA_DIST = \ $(addsuffix .stderr.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ - tmxx.stdout.exp + tmxx.vgtest tmxx.stdout.exp \ + ltgjhe.vgtest AM_CFLAGS += @FLAG_M64@ AM_CXXFLAGS += @FLAG_M64@ diff --git a/memcheck/tests/s390x/ltgjhe.stderr.exp b/memcheck/tests/s390x/ltgjhe.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/s390x/tmxx.stderr.exp b/memcheck/tests/s390x/tmxx.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/sem.stderr.exp b/memcheck/tests/sem.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/sh-mem-random.stderr.exp b/memcheck/tests/sh-mem-random.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/Makefile.am b/memcheck/tests/solaris/Makefile.am index 1387c715a..36e3a1852 100644 --- a/memcheck/tests/solaris/Makefile.am +++ b/memcheck/tests/solaris/Makefile.am @@ -16,17 +16,17 @@ EXTRA_DIST = \ aligned_alloc.stderr.exp-solaris \ brk.stderr.exp brk.vgtest \ context_stack_die.stderr.exp context_stack_die.vgtest \ - door_data.stderr.exp door_data.stdout.exp door_data.vgtest \ - door_kill.stderr.exp door_kill.stdout.exp door_kill.vgtest \ + door_data.stdout.exp door_data.vgtest \ + door_kill.stdout.exp door_kill.vgtest \ execx.stderr.exp execx.stdout.exp execx.vgtest \ - getzoneoffset.stderr.exp getzoneoffset.vgtest \ - gethrtime.stderr.exp gethrtime.stdout.exp gethrtime.vgtest \ - gethrusec.stderr.exp gethrusec.stdout.exp gethrusec.vgtest \ + getzoneoffset.vgtest \ + gethrtime.stdout.exp gethrtime.vgtest \ + gethrusec.stdout.exp gethrusec.vgtest \ ioctl.stderr.exp ioctl.vgtest \ ldynsym.stderr.exp ldynsym.vgtest \ - lsframe1.stderr.exp lsframe1.stdout.exp lsframe1.vgtest \ - lsframe2.stderr.exp lsframe2.stdout.exp lsframe2.vgtest \ - mmapobj_bssonly.stderr.exp mmapobj_bssonly.stdout.exp mmapobj_bssonly.vgtest \ + lsframe1.stdout.exp lsframe1.vgtest \ + lsframe2.stdout.exp lsframe2.vgtest \ + mmapobj_bssonly.stdout.exp mmapobj_bssonly.vgtest \ name_service_door.stderr.exp-amd64 name_service_door.stderr.exp-x86 \ name_service_door.stdout.exp name_service_door.vgtest \ pkcs11.stderr.exp-illumos pkcs11.stderr.exp-solaris pkcs11.vgtest \ @@ -51,13 +51,13 @@ EXTRA_DIST = \ scalar_uuidsys.stderr.exp scalar_uuidsys.vgtest \ scalar_zone_defunct.stderr.exp scalar_zone_defunct.vgtest \ sendfilev.stderr.exp sendfilev.stdout.exp sendfilev.vgtest \ - shmat.stderr.exp shmat.stdout.exp shmat.vgtest \ - spawn.stderr.exp spawn.stdout.exp spawn.vgtest \ + shmat.stdout.exp shmat.vgtest \ + spawn.stdout.exp spawn.vgtest \ strlcpy.stderr.exp strlcpy.vgtest \ supponlyobj.stderr.exp supponlyobj.supp supponlyobj.vgtest \ syscall_at.stderr.exp syscall_at.vgtest \ - thr_daemon_exit_libc.stderr.exp thr_daemon_exit_libc.stdout.exp thr_daemon_exit_libc.vgtest \ - thr_daemon_exit_standalone.stderr.exp thr_daemon_exit_standalone.vgtest \ + thr_daemon_exit_libc.stdout.exp thr_daemon_exit_libc.vgtest \ + thr_daemon_exit_standalone.vgtest \ memalign.vgtest memalign.stderr.exp check_PROGRAMS = \ diff --git a/memcheck/tests/solaris/door_data.stderr.exp b/memcheck/tests/solaris/door_data.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/door_kill.stderr.exp b/memcheck/tests/solaris/door_kill.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/gethrtime.stderr.exp b/memcheck/tests/solaris/gethrtime.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/gethrusec.stderr.exp b/memcheck/tests/solaris/gethrusec.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/getzoneoffset.stderr.exp b/memcheck/tests/solaris/getzoneoffset.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/lsframe1.stderr.exp b/memcheck/tests/solaris/lsframe1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/lsframe2.stderr.exp b/memcheck/tests/solaris/lsframe2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/mmapobj_bssonly.stderr.exp b/memcheck/tests/solaris/mmapobj_bssonly.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/shmat.stderr.exp b/memcheck/tests/solaris/shmat.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/spawn.stderr.exp b/memcheck/tests/solaris/spawn.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/thr_daemon_exit_libc.stderr.exp b/memcheck/tests/solaris/thr_daemon_exit_libc.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/solaris/thr_daemon_exit_standalone.stderr.exp b/memcheck/tests/solaris/thr_daemon_exit_standalone.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/str_tester.stderr.exp b/memcheck/tests/str_tester.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/supp1.stderr.exp b/memcheck/tests/supp1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/supp2.stderr.exp b/memcheck/tests/supp2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/suppfreecollision.stderr.exp b/memcheck/tests/suppfreecollision.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/suppsrc_sanlineno.stderr.exp b/memcheck/tests/suppsrc_sanlineno.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/thread_alloca.stderr.exp b/memcheck/tests/thread_alloca.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/unit_libcbase.stderr.exp b/memcheck/tests/unit_libcbase.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/unit_oset.stderr.exp b/memcheck/tests/unit_oset.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/vbit-test/Makefile.am b/memcheck/tests/vbit-test/Makefile.am index d406da76b..8464ff0c4 100644 --- a/memcheck/tests/vbit-test/Makefile.am +++ b/memcheck/tests/vbit-test/Makefile.am @@ -1,9 +1,9 @@ include $(top_srcdir)/Makefile.all.am -EXTRA_DIST = vbit-test.vgtest vbit-test.stderr.exp \ - vbit-test-sec.vgtest vbit-test-sec.stderr.exp +EXTRA_DIST = vbit-test.vgtest \ + vbit-test-sec.vgtest -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = #---------------------------------------------------------------------------- # Headers diff --git a/memcheck/tests/vbit-test/filter_stderr b/memcheck/tests/vbit-test/filter_stderr deleted file mode 100755 index a778e971f..000000000 --- a/memcheck/tests/vbit-test/filter_stderr +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -../filter_stderr "$@" diff --git a/memcheck/tests/vbit-test/vbit-test-sec.stderr.exp b/memcheck/tests/vbit-test/vbit-test-sec.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/vbit-test/vbit-test-sec.vgtest b/memcheck/tests/vbit-test/vbit-test-sec.vgtest index 8d84e7e90..f3d1141b5 100644 --- a/memcheck/tests/vbit-test/vbit-test-sec.vgtest +++ b/memcheck/tests/vbit-test/vbit-test-sec.vgtest @@ -1,3 +1,5 @@ prog: vbit-test-sec prereq: test -x vbit-test-sec vgopts: -q --expensive-definedness-checks=yes --vex-guest-chase=no +stderr_filter: +stderrB_filter: diff --git a/memcheck/tests/vbit-test/vbit-test.stderr.exp b/memcheck/tests/vbit-test/vbit-test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/vbit-test/vbit-test.vgtest b/memcheck/tests/vbit-test/vbit-test.vgtest index 198c62351..71a9c2435 100644 --- a/memcheck/tests/vbit-test/vbit-test.vgtest +++ b/memcheck/tests/vbit-test/vbit-test.vgtest @@ -1,2 +1,4 @@ prog: vbit-test vgopts: -q --expensive-definedness-checks=yes --vex-guest-chase=no +stderr_filter: +stderrB_filter: diff --git a/memcheck/tests/vcpu_bz2.stderr.exp b/memcheck/tests/vcpu_bz2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/vcpu_fbench.stderr.exp b/memcheck/tests/vcpu_fbench.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/vcpu_fnfns.stderr.exp b/memcheck/tests/vcpu_fnfns.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wcscat.stderr.exp b/memcheck/tests/wcscat.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wcsncpy.stderr.exp b/memcheck/tests/wcsncpy.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wmemcmp.stderr.exp b/memcheck/tests/wmemcmp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrap1.stderr.exp b/memcheck/tests/wrap1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrap2.stderr.exp b/memcheck/tests/wrap2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrap3.stderr.exp b/memcheck/tests/wrap3.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrap4.stderr.exp b/memcheck/tests/wrap4.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrap5.stderr.exp b/memcheck/tests/wrap5.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrap6.stderr.exp b/memcheck/tests/wrap6.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrap7.stderr.exp b/memcheck/tests/wrap7.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrapmalloc.stderr.exp b/memcheck/tests/wrapmalloc.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/wrapmallocstatic.stderr.exp b/memcheck/tests/wrapmallocstatic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86-linux/Makefile.am b/memcheck/tests/x86-linux/Makefile.am index 1ce27054a..4e69637b3 100644 --- a/memcheck/tests/x86-linux/Makefile.am +++ b/memcheck/tests/x86-linux/Makefile.am @@ -9,8 +9,8 @@ dist_noinst_SCRIPTS = \ noinst_HEADERS = scalar.h EXTRA_DIST = \ - bug133694.vgtest bug133694.stderr.exp bug133694.stdout.exp \ - int3-x86.vgtest int3-x86.stderr.exp int3-x86.stdout.exp \ + bug133694.vgtest bug133694.stdout.exp \ + int3-x86.vgtest int3-x86.stdout.exp \ scalar.stderr.exp scalar.vgtest \ scalar_fork.stderr.exp scalar_fork.vgtest \ scalar_exit_group.stderr.exp \ diff --git a/memcheck/tests/x86-linux/bug133694.stderr.exp b/memcheck/tests/x86-linux/bug133694.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86-linux/int3-x86.stderr.exp b/memcheck/tests/x86-linux/int3-x86.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86-solaris/Makefile.am b/memcheck/tests/x86-solaris/Makefile.am index 472e98222..9eb609cb4 100644 --- a/memcheck/tests/x86-solaris/Makefile.am +++ b/memcheck/tests/x86-solaris/Makefile.am @@ -6,12 +6,12 @@ dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ scalar.stderr.exp scalar.vgtest \ scalar_obsolete.stderr.exp scalar_obsolete.vgtest \ - context_eflags.stderr.exp context_eflags.stdout.exp context_eflags.vgtest \ + context_eflags.stdout.exp context_eflags.vgtest \ context_eflags2.stderr.exp context_eflags2.vgtest \ context_fpu.stderr.exp context_fpu.stdout.exp context_fpu.vgtest \ context_gpr.stderr.exp context_gpr.stdout.exp context_gpr.vgtest \ context_sse.stderr.exp context_sse.stdout.exp context_sse.vgtest \ - ldsoexec.stderr.exp ldsoexec.vgtest + ldsoexec.vgtest check_PROGRAMS = \ scalar \ diff --git a/memcheck/tests/x86-solaris/context_eflags.stderr.exp b/memcheck/tests/x86-solaris/context_eflags.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86-solaris/ldsoexec.stderr.exp b/memcheck/tests/x86-solaris/ldsoexec.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/Makefile.am b/memcheck/tests/x86/Makefile.am index 788cdde21..c7e25c4eb 100644 --- a/memcheck/tests/x86/Makefile.am +++ b/memcheck/tests/x86/Makefile.am @@ -8,27 +8,26 @@ noinst_SCRIPTS = filter_pushfpopf INSN_TESTS = insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2 EXTRA_DIST = \ - bug152022.vgtest bug152022.stderr.exp \ - bug487993.vgtest bug487993.stderr.exp \ - espindola2.vgtest espindola2.stderr.exp \ - fpeflags.stderr.exp fpeflags.vgtest \ - fxsave.vgtest fxsave.stdout.exp fxsave.stderr.exp \ - $(addsuffix .stderr.exp,$(INSN_TESTS)) \ + bug152022.vgtest \ + bug487993.vgtest \ + espindola2.vgtest\ + fpeflags.vgtest \ + fxsave.vgtest fxsave.stdout.exp \ $(addsuffix .stdout.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ pushfpopf.stderr.exp pushfpopf.stdout.exp pushfpopf.vgtest \ - pushfw_x86.vgtest pushfw_x86.stdout.exp pushfw_x86.stderr.exp \ - pushpopmem.stderr.exp pushpopmem.stdout.exp pushpopmem.vgtest \ + pushfw_x86.vgtest pushfw_x86.stdout.exp \ + pushpopmem.stdout.exp pushpopmem.vgtest \ pcmpgt.stderr.exp pcmpgt.vgtest \ sh-mem-vec128-plo-no.vgtest \ sh-mem-vec128-plo-no.stderr.exp \ sh-mem-vec128-plo-yes.vgtest \ sh-mem-vec128-plo-yes.stderr.exp \ - sse1_memory.stderr.exp sse1_memory.stdout.exp sse1_memory.vgtest \ - sse2_memory.stderr.exp sse2_memory.stdout.exp sse2_memory.vgtest \ - tronical.stderr.exp tronical.vgtest \ - more_x86_fp.stderr.exp more_x86_fp.stdout.exp more_x86_fp.vgtest \ - fprem.stderr.exp fprem.stdout.exp fprem.vgtest \ + sse1_memory.stdout.exp sse1_memory.vgtest \ + sse2_memory.stdout.exp sse2_memory.vgtest \ + tronical.vgtest \ + more_x86_fp.stdout.exp more_x86_fp.vgtest \ + fprem.stdout.exp fprem.vgtest \ xor-undef-x86.stderr.exp xor-undef-x86.stdout.exp \ xor-undef-x86.vgtest diff --git a/memcheck/tests/x86/bug152022.stderr.exp b/memcheck/tests/x86/bug152022.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/bug487993.stderr.exp b/memcheck/tests/x86/bug487993.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/espindola2.stderr.exp b/memcheck/tests/x86/espindola2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/fpeflags.stderr.exp b/memcheck/tests/x86/fpeflags.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/fprem.stderr.exp b/memcheck/tests/x86/fprem.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/fxsave.stderr.exp b/memcheck/tests/x86/fxsave.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/insn_basic.stderr.exp b/memcheck/tests/x86/insn_basic.stderr.exp deleted file mode 120000 index 015157e60..000000000 --- a/memcheck/tests/x86/insn_basic.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/x86/insn_basic.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/x86/insn_cmov.stderr.exp b/memcheck/tests/x86/insn_cmov.stderr.exp deleted file mode 120000 index 849f3532e..000000000 --- a/memcheck/tests/x86/insn_cmov.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/x86/insn_cmov.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/x86/insn_fpu.stderr.exp b/memcheck/tests/x86/insn_fpu.stderr.exp deleted file mode 120000 index 8bfa148ae..000000000 --- a/memcheck/tests/x86/insn_fpu.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/x86/insn_fpu.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/x86/insn_mmx.stderr.exp b/memcheck/tests/x86/insn_mmx.stderr.exp deleted file mode 120000 index 81e2d03d4..000000000 --- a/memcheck/tests/x86/insn_mmx.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/x86/insn_mmx.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/x86/insn_mmxext.stderr.exp b/memcheck/tests/x86/insn_mmxext.stderr.exp deleted file mode 120000 index c9dace119..000000000 --- a/memcheck/tests/x86/insn_mmxext.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/x86/insn_mmxext.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/x86/insn_sse.stderr.exp b/memcheck/tests/x86/insn_sse.stderr.exp deleted file mode 120000 index a7b367ae1..000000000 --- a/memcheck/tests/x86/insn_sse.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/x86/insn_sse.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/x86/insn_sse2.stderr.exp b/memcheck/tests/x86/insn_sse2.stderr.exp deleted file mode 120000 index 397d27c0d..000000000 --- a/memcheck/tests/x86/insn_sse2.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../../../none/tests/x86/insn_sse2.stderr.exp \ No newline at end of file diff --git a/memcheck/tests/x86/more_x86_fp.stderr.exp b/memcheck/tests/x86/more_x86_fp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/pushfw_x86.stderr.exp b/memcheck/tests/x86/pushfw_x86.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/pushpopmem.stderr.exp b/memcheck/tests/x86/pushpopmem.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/sse1_memory.stderr.exp b/memcheck/tests/x86/sse1_memory.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/sse2_memory.stderr.exp b/memcheck/tests/x86/sse2_memory.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/memcheck/tests/x86/tronical.stderr.exp b/memcheck/tests/x86/tronical.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 51b5a5b17..963f3456d 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -108,15 +108,15 @@ EXTRA_DIST = \ bitfield1.stderr.exp bitfield1.vgtest \ bug129866.vgtest bug129866.stderr.exp bug129866.stdout.exp \ bug234814.vgtest bug234814.stderr.exp bug234814.stdout.exp \ - bug290061.vgtest bug290061.stderr.exp \ - bug491394.vgtest bug491394.stderr.exp \ - bug492678.vgtest bug492678.stderr.exp \ + bug290061.vgtest \ + bug491394.vgtest \ + bug492678.vgtest \ bug514094.vgtest bug514094.stderr.exp \ closeall.stderr.exp closeall.vgtest \ - cmdline0.stderr.exp cmdline0.stdout.exp cmdline0.vgtest \ - cmdline1.stderr.exp cmdline1.stdout.exp cmdline1.vgtest \ + cmdline0.stdout.exp cmdline0.vgtest \ + cmdline1.stdout.exp cmdline1.vgtest \ cmdline1.stdout.exp-non-linux \ - cmdline2.stderr.exp cmdline2.stdout.exp cmdline2.vgtest \ + cmdline2.stdout.exp cmdline2.vgtest \ cmdline2.stdout.exp-non-linux \ cmdline3.stderr.exp cmdline3.vgtest \ cmdline4.stderr.exp cmdline4.vgtest \ @@ -127,7 +127,7 @@ EXTRA_DIST = \ cmdline9.stderr.exp cmdline9.vgtest \ cmdline10.stderr.exp cmdline10.vgtest \ cmdline11.stderr.exp cmdline11.vgtest \ - cmd-with-special.stderr.exp cmd-with-special.vgtest \ + cmd-with-special.vgtest \ coolo_sigaction.stderr.exp \ coolo_sigaction.stdout.exp coolo_sigaction.vgtest \ coolo_strlen.stderr.exp coolo_strlen.vgtest \ @@ -143,7 +143,7 @@ EXTRA_DIST = \ execve.vgtest execve.stderr.exp \ faultstatus.vgtest faultstatus.stderr.exp faultstatus.stderr.exp-s390x \ fcntl_setown.vgtest fcntl_setown.stderr.exp \ - fdleak_cat.vgtest fdleak_cat.stderr.exp \ + fdleak_cat.vgtest \ fdleak_cmsg.stderr.exp fdleak_cmsg.vgtest \ fdleak_cmsg_xml.stderr.exp-ppc64le \ fdleak_cmsg_xml.stderr.exp fdleak_cmsg_xml.vgtest \ @@ -173,18 +173,18 @@ EXTRA_DIST = \ fdleak_socketpair_xml.stderr.exp fdleak_socketpair_xml.vgtest \ fdleak_socketpair_xml.stderr.exp-illumos \ floored.stderr.exp floored.stdout.exp floored.vgtest \ - fork.stderr.exp fork.stdout.exp fork.vgtest \ + fork.stdout.exp fork.vgtest \ fucomip.stderr.exp fucomip.vgtest \ gxx304.stderr.exp gxx304.vgtest \ ifunc.stderr.exp ifunc.stdout.exp ifunc.vgtest \ ioctl_moans.stderr.exp ioctl_moans.vgtest \ - libvex_test.stderr.exp libvex_test.vgtest \ - libvexmultiarch_test.stderr.exp libvexmultiarch_test.vgtest \ + libvex_test.vgtest \ + libvexmultiarch_test.vgtest \ manythreads.stdout.exp manythreads.stderr.exp manythreads.vgtest \ map_unaligned.stderr.exp map_unaligned.vgtest \ map_unmap.stderr.exp map_unmap.stdout.exp map_unmap.vgtest \ mmap_fcntl_bug.vgtest mmap_fcntl_bug.stderr.exp \ - mmap_o_direct.stderr.exp mmap_o_direct.vgtest \ + mmap_o_direct.vgtest \ mq.stderr.exp mq.vgtest \ munmap_exe.stderr.exp munmap_exe.vgtest \ nestedfns.stderr.exp nestedfns.stdout.exp nestedfns.vgtest \ @@ -193,15 +193,15 @@ EXTRA_DIST = \ nodir.stderr.exp nodir.vgtest \ nodir.stderr.exp-freebsd \ pending.stdout.exp pending.stderr.exp pending.vgtest \ - ppoll_alarm.stderr.exp ppoll_alarm.vgtest \ + ppoll_alarm.vgtest \ procfs-linux.stderr.exp-with-readlinkat \ procfs-linux.stderr.exp-without-readlinkat \ procfs-linux.vgtest \ procfs-non-linux.vgtest \ procfs-non-linux.stderr.exp-with-readlinkat \ procfs-non-linux.stderr.exp-without-readlinkat \ - pselect_alarm.stderr.exp pselect_alarm.vgtest \ - pselect_sigmask_null.vgtest pselect_sigmask_null.stderr.exp \ + pselect_alarm.vgtest \ + pselect_sigmask_null.vgtest \ pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \ pth_blockedsig.stderr.exp \ pth_blockedsig.stdout.exp pth_blockedsig.vgtest \ @@ -215,24 +215,23 @@ EXTRA_DIST = \ pth_mutexspeed.stdout.exp pth_mutexspeed.vgtest \ pth_once.stderr.exp pth_once.stdout.exp pth_once.vgtest \ pth_rwlock.stderr.exp pth_rwlock.vgtest \ - pth_self_kill_9.stderr.exp pth_self_kill_9.vgtest \ - pth_self_kill_15_other.stderr.exp pth_self_kill_15_other.vgtest \ + pth_self_kill_9.vgtest \ + pth_self_kill_15_other.vgtest \ pth_stackalign.stderr.exp \ pth_stackalign.stdout.exp pth_stackalign.vgtest \ pth_2sig.stderr.exp-linux pth_2sig.stderr.exp-solaris pth_2sig.vgtest \ pth_term_signal.stderr.exp pth_term_signal.vgtest \ - rc_option_with_spaces.stderr.exp rc_option_with_spaces.vgtest \ + rc_option_with_spaces.vgtest \ rcrl.stderr.exp rcrl.stdout.exp rcrl.vgtest \ readline1.stderr.exp readline1.stdout.exp \ readline1.vgtest \ require-text-symbol-1.vgtest \ - require-text-symbol-1.stderr.exp \ require-text-symbol-2.vgtest \ require-text-symbol-2.stderr.exp-libcso1 \ require-text-symbol-2.stderr.exp-libcso6 \ require-text-symbol-2.stderr.exp-freebsd \ require-text-symbol-3.vgtest require-text-symbol-3.stderr.exp \ - res_search.stderr.exp res_search.stdout.exp res_search.vgtest \ + res_search.stdout.exp res_search.vgtest \ resolv.stderr.exp resolv.stdout.exp resolv.vgtest \ rlimit_nofile.stderr.exp rlimit_nofile.vgtest \ rlimit64_nofile.stderr.exp rlimit64_nofile.vgtest \ @@ -243,25 +242,24 @@ EXTRA_DIST = \ shortpush.stderr.exp shortpush.vgtest \ shorts.stderr.exp shorts.vgtest \ sigstackgrowth.stdout.exp sigstackgrowth.stderr.exp sigstackgrowth.vgtest \ - sigsusp.stderr.exp sigsusp.vgtest \ + sigsusp.vgtest \ stackgrowth.stdout.exp stackgrowth.stderr.exp stackgrowth.vgtest \ syscall-restart1.vgtest syscall-restart1.stderr.exp \ syscall-restart2.vgtest syscall-restart2.stderr.exp \ - syslog.vgtest syslog.stderr.exp \ + syslog.vgtest \ system.stderr.exp system.vgtest \ thread-exits.stderr.exp thread-exits.stdout.exp thread-exits.vgtest \ threaded-fork.stderr.exp threaded-fork.stdout.exp threaded-fork.vgtest \ - threadederrno.stderr.exp threadederrno.stdout.exp \ - threadederrno.vgtest \ - timer_delete.vgtest timer_delete.stderr.exp \ + threadederrno.stdout.exp threadederrno.vgtest \ + timer_delete.vgtest \ timestamp.stderr.exp timestamp.vgtest \ tls.vgtest tls.stderr.exp tls.stdout.exp \ - track-fds-exec-children.vgtest track-fds-exec-children.stderr.exp \ + track-fds-exec-children.vgtest \ unit_debuglog.stderr.exp unit_debuglog.vgtest \ vgprintf.stderr.exp vgprintf.vgtest \ vgprintf_nvalgrind.stderr.exp vgprintf_nvalgrind.vgtest \ process_vm_readv_writev.stderr.exp process_vm_readv_writev.vgtest \ - sigprocmask.stderr.exp sigprocmask.vgtest \ + sigprocmask.vgtest \ socket_close.stderr.exp socket_close.vgtest \ socket_close_xml.stderr.exp-ppc64le \ socket_close_xml.stderr.exp socket_close_xml.vgtest \ @@ -270,7 +268,7 @@ EXTRA_DIST = \ file_dclose_xml.stderr.exp-nomain \ file_dclose.supp file_dclose_sup.stderr.exp file_dclose_sup.vgtest \ double_close_range.stderr.exp double_close_range.vgtest \ - log-track-fds.stderr.exp log-track-fds.vgtest \ + log-track-fds.vgtest \ xml-track-fds.stderr.exp xml-track-fds.vgtest \ fdbaduse.stderr.exp fdbaduse.vgtest \ use_after_close.stderr.exp use_after_close.vgtest \ diff --git a/none/tests/amd64-darwin/Makefile.am b/none/tests/amd64-darwin/Makefile.am index 260221ffb..6d3a861c8 100644 --- a/none/tests/amd64-darwin/Makefile.am +++ b/none/tests/amd64-darwin/Makefile.am @@ -6,7 +6,7 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = \ bug341419.vgtest bug341419.stderr.exp \ - cet_nops_gs.stderr.exp cet_nops_gs.stdout.exp cet_nops_gs.vgtest + cet_nops_gs.stdout.exp cet_nops_gs.vgtest check_PROGRAMS = \ bug341419 \ diff --git a/none/tests/amd64-darwin/cet_nops_gs.stderr.exp b/none/tests/amd64-darwin/cet_nops_gs.stderr.exp deleted file mode 120000 index 11324e9d6..000000000 --- a/none/tests/amd64-darwin/cet_nops_gs.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../amd64-linux/cet_nops_gs.stderr.exp \ No newline at end of file diff --git a/none/tests/amd64-linux/Makefile.am b/none/tests/amd64-linux/Makefile.am index c3e217daf..d95db5a70 100644 --- a/none/tests/amd64-linux/Makefile.am +++ b/none/tests/amd64-linux/Makefile.am @@ -6,8 +6,8 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = \ bug345887.stderr.exp bug345887.vgtest \ - cet_nops_fs.stderr.exp cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ - cet_nops_gs.stderr.exp cet_nops_gs.stdout.exp cet_nops_gs.vgtest \ + cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ + cet_nops_gs.stdout.exp cet_nops_gs.vgtest \ map_32bits.stderr.exp map_32bits.vgtest check_PROGRAMS = \ diff --git a/none/tests/amd64-linux/cet_nops_fs.stderr.exp b/none/tests/amd64-linux/cet_nops_fs.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64-linux/cet_nops_gs.stderr.exp b/none/tests/amd64-linux/cet_nops_gs.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64-solaris/Makefile.am b/none/tests/amd64-solaris/Makefile.am index 79b7704b8..85f258453 100644 --- a/none/tests/amd64-solaris/Makefile.am +++ b/none/tests/amd64-solaris/Makefile.am @@ -7,13 +7,13 @@ dist_noinst_SCRIPTS = \ filter_stderr EXTRA_DIST = \ - cet_nops_fs.stderr.exp cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ + cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ coredump_single_thread.post.exp coredump_single_thread.stderr.exp \ coredump_single_thread.vgtest \ coredump_single_thread_sse.post.exp coredump_single_thread_sse.stderr.exp \ coredump_single_thread_sse.post.exp-illumos \ coredump_single_thread_sse.vgtest \ - syscall_return_args.stderr.exp syscall_return_args.vgtest + syscall_return_args.vgtest check_PROGRAMS = \ cet_nops_fs \ diff --git a/none/tests/amd64-solaris/cet_nops_fs.stderr.exp b/none/tests/amd64-solaris/cet_nops_fs.stderr.exp deleted file mode 120000 index e39731afd..000000000 --- a/none/tests/amd64-solaris/cet_nops_fs.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../amd64-linux/cet_nops_fs.stderr.exp \ No newline at end of file diff --git a/none/tests/amd64-solaris/syscall_return_args.stderr.exp b/none/tests/amd64-solaris/syscall_return_args.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/Makefile.am b/none/tests/amd64/Makefile.am index 6c9d61c46..e2fd6e14a 100644 --- a/none/tests/amd64/Makefile.am +++ b/none/tests/amd64/Makefile.am @@ -24,83 +24,80 @@ endif # which failed the BUILD_SSE3_TESTS test in configure.in. EXTRA_DIST = \ - aes.vgtest aes.stdout.exp aes.stderr.exp \ + aes.vgtest aes.stdout.exp \ amd64locked.vgtest amd64locked.stdout.exp amd64locked.stderr.exp \ - avx-1.vgtest avx-1.stdout.exp avx-1.stderr.exp \ - avx_estimate_insn.vgtest avx_estimate_insn.stderr.exp \ + avx-1.vgtest avx-1.stdout.exp \ + avx_estimate_insn.vgtest \ avx_estimate_insn.stdout.exp avx_estimate_insn.stdout.exp-amd \ - avx-vmovq.vgtest avx-vmovq.stdout.exp avx-vmovq.stderr.exp \ - avx2-1.vgtest avx2-1.stdout.exp avx2-1.stderr.exp \ + avx-vmovq.vgtest avx-vmovq.stdout.exp \ + avx2-1.vgtest avx2-1.stdout.exp \ asorep.stderr.exp asorep.vgtest \ - bmi.stderr.exp bmi.stdout.exp bmi.vgtest \ + bmi.stdout.exp bmi.vgtest \ bt_flags.stderr.exp bt_flags.stdout.exp bt_flags.vgtest \ - fma.stderr.exp fma.stdout.exp fma.vgtest \ + fma.stdout.exp fma.vgtest \ bug127521-64.vgtest bug127521-64.stdout.exp bug127521-64.stderr.exp \ bug132813-amd64.vgtest bug132813-amd64.stdout.exp \ bug132813-amd64.stderr.exp \ bug137714-amd64.vgtest bug137714-amd64.stdout.exp \ - bug137714-amd64.stderr.exp \ bug132918.vgtest bug132918.stderr.exp bug132918.stdout.exp \ bug132918.stdout.exp-older-glibc \ bug156404-amd64.vgtest bug156404-amd64.stdout.exp \ bug156404-amd64.stderr.exp \ - bug485148.vgtest bug485148.stdout.exp bug485148.stderr.exp \ - bug487439.vgtest bug487439.stdout.exp bug487439.stderr.exp \ - cet_nops.vgtest cet_nops.stdout.exp cet_nops.stderr.exp \ + bug485148.vgtest bug485148.stdout.exp \ + bug487439.vgtest bug487439.stdout.exp \ + cet_nops.vgtest cet_nops.stdout.exp \ clc.vgtest clc.stdout.exp clc.stderr.exp \ - crc32.vgtest crc32.stdout.exp crc32.stderr.exp \ + crc32.vgtest crc32.stdout.exp \ cmpxchg.vgtest cmpxchg.stdout.exp cmpxchg.stderr.exp \ - f16c.vgtest f16c.stderr.exp f16c.stdout.exp \ + f16c.vgtest f16c.stdout.exp \ faultstatus.disabled faultstatus.stderr.exp \ fb_test_amd64.vgtest \ fb_test_amd64.stderr.exp fb_test_amd64.stdout.exp \ fb_test_amd64.h fb_test_amd64_muldiv.h fb_test_amd64_shift.h \ fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \ - fma4.vgtest fma4.stdout.exp fma4.stderr.exp \ + fma4.vgtest fma4.stdout.exp \ fxtract.vgtest fxtract.stderr.exp fxtract.stdout.exp \ fxtract.stdout.exp-older-glibc \ - getseg.stdout.exp getseg.stderr.exp getseg.vgtest \ - $(addsuffix .stderr.exp,$(INSN_TESTS)) \ + getseg.stdout.exp getseg.vgtest \ $(addsuffix .stdout.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ insn_pclmulqdq.vgtest insn_pclmulqdq.stdout.exp \ - insn_pclmulqdq.stderr.exp \ - insn_sse3.stdout.exp insn_sse3.stderr.exp insn_sse3.vgtest \ - insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \ + insn_sse3.stdout.exp insn_sse3.vgtest \ + insn_ssse3.stdout.exp insn_ssse3.vgtest \ jrcxz.stderr.exp jrcxz.stdout.exp jrcxz.vgtest \ looper.stderr.exp looper.stdout.exp looper.vgtest \ loopnel.stderr.exp loopnel.stdout.exp loopnel.vgtest \ - lzcnt64.stderr.exp lzcnt64.stdout.exp lzcnt64.vgtest \ - movbe.stderr.exp movbe.stdout.exp movbe.vgtest \ - mpx.stderr.exp mpx.vgtest \ + lzcnt64.stdout.exp lzcnt64.vgtest \ + movbe.stdout.exp movbe.vgtest \ + mpx.vgtest \ nan80and64.stderr.exp nan80and64.stdout.exp nan80and64.vgtest \ nibz_bennee_mmap.stderr.exp nibz_bennee_mmap.stdout.exp \ nibz_bennee_mmap.vgtest \ - pcmpstr64.stderr.exp pcmpstr64.stdout.exp \ + pcmpstr64.stdout.exp \ pcmpstr64.vgtest \ - pcmpstr64w.stderr.exp pcmpstr64w.stdout.exp \ + pcmpstr64w.stdout.exp \ pcmpstr64w.vgtest \ - pcmpxstrx64.stderr.exp pcmpxstrx64.stdout.exp \ + pcmpxstrx64.stdout.exp \ pcmpxstrx64.vgtest \ - pcmpxstrx64w.stderr.exp pcmpxstrx64w.stdout.exp \ + pcmpxstrx64w.stdout.exp \ pcmpxstrx64w.vgtest \ - rcl-amd64.vgtest rcl-amd64.stdout.exp rcl-amd64.stderr.exp \ - rdrand.vgtest rdrand.stdout.exp rdrand.stderr.exp \ - rdseed.vgtest rdseed.stdout.exp rdseed.stderr.exp \ + rcl-amd64.vgtest rcl-amd64.stdout.exp \ + rdrand.vgtest rdrand.stdout.exp \ + rdseed.vgtest rdseed.stdout.exp \ redundantRexW.vgtest redundantRexW.stdout.exp \ redundantRexW.stderr.exp \ smc1.stderr.exp smc1.stdout.exp smc1.vgtest \ sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \ shrld.stderr.exp shrld.stdout.exp shrld.vgtest \ ssse3_misaligned.stderr.exp ssse3_misaligned.vgtest \ - sse4-64.stderr.exp sse4-64.stdout.exp sse4-64.vgtest \ + sse4-64.stdout.exp sse4-64.vgtest \ sse4-64.stdout.exp-older-glibc \ - slahf-amd64.stderr.exp slahf-amd64.stdout.exp \ + slahf-amd64.stdout.exp \ slahf-amd64.vgtest \ tm1.vgtest tm1.stderr.exp tm1.stdout.exp \ x87trigOOR.vgtest x87trigOOR.stderr.exp x87trigOOR.stdout.exp \ xacq_xrel.stderr.exp xacq_xrel.stdout.exp xacq_xrel.vgtest \ - xadd.stderr.exp xadd.stdout.exp xadd.vgtest \ + xadd.stdout.exp xadd.vgtest \ sse4-64.stdout.exp.freebsd sse4-64.stdout.exp-freebsd-clang check_PROGRAMS = \ diff --git a/none/tests/amd64/aes.stderr.exp b/none/tests/amd64/aes.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/avx-1.stderr.exp b/none/tests/amd64/avx-1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/avx-vmovq.stderr.exp b/none/tests/amd64/avx-vmovq.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/avx2-1.stderr.exp b/none/tests/amd64/avx2-1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/avx_estimate_insn.stderr.exp b/none/tests/amd64/avx_estimate_insn.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/bmi.stderr.exp b/none/tests/amd64/bmi.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/bug137714-amd64.stderr.exp b/none/tests/amd64/bug137714-amd64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/bug485148.stderr.exp b/none/tests/amd64/bug485148.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/bug487439.stderr.exp b/none/tests/amd64/bug487439.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/cet_nops.stderr.exp b/none/tests/amd64/cet_nops.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/crc32.stderr.exp b/none/tests/amd64/crc32.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/f16c.stderr.exp b/none/tests/amd64/f16c.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/fma.stderr.exp b/none/tests/amd64/fma.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/fma4.stderr.exp b/none/tests/amd64/fma4.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/getseg.stderr.exp b/none/tests/amd64/getseg.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_basic.stderr.exp b/none/tests/amd64/insn_basic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_fpu.stderr.exp b/none/tests/amd64/insn_fpu.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_mmx.stderr.exp b/none/tests/amd64/insn_mmx.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_pclmulqdq.stderr.exp b/none/tests/amd64/insn_pclmulqdq.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_sse.stderr.exp b/none/tests/amd64/insn_sse.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_sse2.stderr.exp b/none/tests/amd64/insn_sse2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_sse3.stderr.exp b/none/tests/amd64/insn_sse3.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/insn_ssse3.stderr.exp b/none/tests/amd64/insn_ssse3.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/lzcnt64.stderr.exp b/none/tests/amd64/lzcnt64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/movbe.stderr.exp b/none/tests/amd64/movbe.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/mpx.stderr.exp b/none/tests/amd64/mpx.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/pcmpstr64.stderr.exp b/none/tests/amd64/pcmpstr64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/pcmpstr64w.stderr.exp b/none/tests/amd64/pcmpstr64w.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/pcmpxstrx64.stderr.exp b/none/tests/amd64/pcmpxstrx64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/pcmpxstrx64w.stderr.exp b/none/tests/amd64/pcmpxstrx64w.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/rcl-amd64.stderr.exp b/none/tests/amd64/rcl-amd64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/rdrand.stderr.exp b/none/tests/amd64/rdrand.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/rdseed.stderr.exp b/none/tests/amd64/rdseed.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/slahf-amd64.stderr.exp b/none/tests/amd64/slahf-amd64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/sse4-64.stderr.exp b/none/tests/amd64/sse4-64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/amd64/xadd.stderr.exp b/none/tests/amd64/xadd.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am index 79b957c57..5241bbd9d 100644 --- a/none/tests/arm/Makefile.am +++ b/none/tests/arm/Makefile.am @@ -4,24 +4,23 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ - intdiv.stdout.exp intdiv.stderr.exp intdiv.vgtest \ - ldrt.stdout.exp ldrt.stderr.exp ldrt.vgtest \ - ldrt_arm.stdout.exp ldrt_arm.stderr.exp ldrt_arm.vgtest \ - neon128.stdout.exp neon128.stderr.exp neon128.vgtest \ - neon64.stdout.exp neon64.stderr.exp neon64.vgtest \ - v6intARM.stdout.exp v6intARM.stderr.exp v6intARM.vgtest \ - v6intThumb.stdout.exp v6intThumb.stderr.exp v6intThumb.vgtest \ - v6media.stdout.exp v6media.stderr.exp v6media.vgtest \ - v8crypto_a.stdout.exp v8crypto_a.stderr.exp v8crypto_a.vgtest \ - v8crypto_t.stdout.exp v8crypto_t.stderr.exp v8crypto_t.vgtest \ - v8fpsimd_a.stdout.exp v8fpsimd_a.stderr.exp v8fpsimd_a.vgtest \ - v8fpsimd_t.stdout.exp v8fpsimd_t.stderr.exp v8fpsimd_t.vgtest \ - v8memory_a.stdout.exp v8memory_a.stderr.exp v8memory_a.vgtest \ - v8memory_t.stdout.exp v8memory_t.stderr.exp v8memory_t.vgtest \ - vcvt_fixed_float_VFP.stdout.exp vcvt_fixed_float_VFP.stderr.exp \ - vcvt_fixed_float_VFP.vgtest \ - vfp.stdout.exp vfp.stderr.exp vfp.vgtest \ - vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest + intdiv.stdout.exp intdiv.vgtest \ + ldrt.stdout.exp ldrt.vgtest \ + ldrt_arm.stdout.exp ldrt_arm.vgtest \ + neon128.stdout.exp neon128.vgtest \ + neon64.stdout.exp neon64.vgtest \ + v6intARM.stdout.exp v6intARM.vgtest \ + v6intThumb.stdout.exp v6intThumb.vgtest \ + v6media.stdout.exp v6media.vgtest \ + v8crypto_a.stdout.exp v8crypto_a.vgtest \ + v8crypto_t.stdout.exp v8crypto_t.vgtest \ + v8fpsimd_a.stdout.exp v8fpsimd_a.vgtest \ + v8fpsimd_t.stdout.exp v8fpsimd_t.vgtest \ + v8memory_a.stdout.exp v8memory_a.vgtest \ + v8memory_t.stdout.exp v8memory_t.vgtest \ + vcvt_fixed_float_VFP.stdout.exp vcvt_fixed_float_VFP.vgtest \ + vfp.stdout.exp vfp.vgtest \ + vfpv4_fma.stdout.exp vfpv4_fma.vgtest check_PROGRAMS = \ allexec \ diff --git a/none/tests/arm/intdiv.stderr.exp b/none/tests/arm/intdiv.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/ldrt.stderr.exp b/none/tests/arm/ldrt.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/ldrt_arm.stderr.exp b/none/tests/arm/ldrt_arm.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/neon128.stderr.exp b/none/tests/arm/neon128.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/neon64.stderr.exp b/none/tests/arm/neon64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/v6intARM.stderr.exp b/none/tests/arm/v6intARM.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/v6intThumb.stderr.exp b/none/tests/arm/v6intThumb.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/v6media.stderr.exp b/none/tests/arm/v6media.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/v8crypto_a.stderr.exp b/none/tests/arm/v8crypto_a.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/v8crypto_t.stderr.exp b/none/tests/arm/v8crypto_t.stderr.exp deleted file mode 120000 index ba179f50d..000000000 --- a/none/tests/arm/v8crypto_t.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -v8crypto_a.stderr.exp \ No newline at end of file diff --git a/none/tests/arm/v8fpsimd_a.stderr.exp b/none/tests/arm/v8fpsimd_a.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/v8fpsimd_t.stderr.exp b/none/tests/arm/v8fpsimd_t.stderr.exp deleted file mode 120000 index f2155d726..000000000 --- a/none/tests/arm/v8fpsimd_t.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -v8fpsimd_a.stderr.exp \ No newline at end of file diff --git a/none/tests/arm/v8memory_a.stderr.exp b/none/tests/arm/v8memory_a.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/v8memory_t.stderr.exp b/none/tests/arm/v8memory_t.stderr.exp deleted file mode 120000 index 34e4fadb6..000000000 --- a/none/tests/arm/v8memory_t.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -v8memory_a.stderr.exp \ No newline at end of file diff --git a/none/tests/arm/vcvt_fixed_float_VFP.stderr.exp b/none/tests/arm/vcvt_fixed_float_VFP.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/vfp.stderr.exp b/none/tests/arm/vfp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm/vfpv4_fma.stderr.exp b/none/tests/arm/vfpv4_fma.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/Makefile.am b/none/tests/arm64/Makefile.am index 4fa101d77..490fc0f41 100644 --- a/none/tests/arm64/Makefile.am +++ b/none/tests/arm64/Makefile.am @@ -4,28 +4,25 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr filter_nan EXTRA_DIST = \ - bug484426.stdout.exp bug484426.stderr.exp bug484426.vgtest \ - bug489338.stdout.exp bug489338.stderr.exp bug489338.vgtest \ - crc32.stdout.exp crc32.stderr.exp crc32.vgtest \ - cvtf_imm.stdout.exp cvtf_imm.stderr.exp cvtf_imm.vgtest \ - dc_cvax.vgtest dc_cvax.stderr.exp \ - fcvta_s_u.vgtest fcvta_s_u.stderr.exp \ - fp_and_simd.stdout.exp fp_and_simd.stderr.exp fp_and_simd.vgtest \ - frinta_frintn.stderr.exp frinta_frintn.vgtest \ - integer.stdout.exp integer.stderr.exp integer.vgtest \ - memory_test.stdout.exp memory_test.stderr.exp memory_test.vgtest \ + bug484426.stdout.exp bug484426.vgtest \ + bug489338.stdout.exp bug489338.vgtest \ + crc32.stdout.exp crc32.vgtest \ + cvtf_imm.stdout.exp cvtf_imm.vgtest \ + dc_cvax.vgtest \ + fcvta_s_u.vgtest \ + fp_and_simd.stdout.exp fp_and_simd.vgtest \ + frinta_frintn.vgtest \ + integer.stdout.exp integer.vgtest \ + memory_test.stdout.exp memory_test.vgtest \ memory_test.stdout.exp-clang \ - atomics_v81.stdout.exp atomics_v81.stderr.exp atomics_v81.vgtest \ - simd_v81.stdout.exp simd_v81.stderr.exp simd_v81.vgtest \ - simd_dotprod.stdout.exp simd_dotprod.stderr.exp simd_dotprod.vgtest \ - fmadd_sub.stdout.exp fmadd_sub.stderr.exp fmadd_sub.vgtest \ - fp_and_simd_v82.stdout.exp fp_and_simd_v82.stderr.exp \ - fp_and_simd_v82.vgtest \ - ldxp_stxp_basisimpl.stdout.exp ldxp_stxp_basisimpl.stderr.exp \ - ldxp_stxp_basisimpl.vgtest \ - ldxp_stxp_fallbackimpl.stdout.exp ldxp_stxp_fallbackimpl.stderr.exp \ - ldxp_stxp_fallbackimpl.vgtest sha512_v82.stdout.exp sha512_v82.stderr.exp \ - sha512_v82.vgtest + atomics_v81.stdout.exp atomics_v81.vgtest \ + simd_v81.stdout.exp simd_v81.vgtest \ + simd_dotprod.stdout.exp simd_dotprod.vgtest \ + fmadd_sub.stdout.exp fmadd_sub.vgtest \ + fp_and_simd_v82.stdout.exp fp_and_simd_v82.vgtest \ + ldxp_stxp_basisimpl.stdout.exp ldxp_stxp_basisimpl.vgtest \ + ldxp_stxp_fallbackimpl.stdout.exp ldxp_stxp_fallbackimpl.vgtest \ + sha512_v82.stdout.exp sha512_v82.vgtest check_PROGRAMS = \ allexec \ diff --git a/none/tests/arm64/atomics_v81.stderr.exp b/none/tests/arm64/atomics_v81.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/bug484426.stderr.exp b/none/tests/arm64/bug484426.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/bug489338.stderr.exp b/none/tests/arm64/bug489338.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/crc32.stderr.exp b/none/tests/arm64/crc32.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/cvtf_imm.stderr.exp b/none/tests/arm64/cvtf_imm.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/dc_cvax.stderr.exp b/none/tests/arm64/dc_cvax.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/fcvta_s_u.stderr.exp b/none/tests/arm64/fcvta_s_u.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/fmadd_sub.stderr.exp b/none/tests/arm64/fmadd_sub.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/fp_and_simd.stderr.exp b/none/tests/arm64/fp_and_simd.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/fp_and_simd_v82.stderr.exp b/none/tests/arm64/fp_and_simd_v82.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/frinta_frintn.stderr.exp b/none/tests/arm64/frinta_frintn.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/integer.stderr.exp b/none/tests/arm64/integer.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/ldxp_stxp_basisimpl.stderr.exp b/none/tests/arm64/ldxp_stxp_basisimpl.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/ldxp_stxp_fallbackimpl.stderr.exp b/none/tests/arm64/ldxp_stxp_fallbackimpl.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/memory_test.stderr.exp b/none/tests/arm64/memory_test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/sha512_v82.stderr.exp b/none/tests/arm64/sha512_v82.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/simd_dotprod.stderr.exp b/none/tests/arm64/simd_dotprod.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/arm64/simd_v81.stderr.exp b/none/tests/arm64/simd_v81.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/bug290061.stderr.exp b/none/tests/bug290061.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/bug491394.stderr.exp b/none/tests/bug491394.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/bug492678.stderr.exp b/none/tests/bug492678.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/cmd-with-special.stderr.exp b/none/tests/cmd-with-special.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/cmdline0.stderr.exp b/none/tests/cmdline0.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/cmdline1.stderr.exp b/none/tests/cmdline1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/cmdline2.stderr.exp b/none/tests/cmdline2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/darwin/Makefile.am b/none/tests/darwin/Makefile.am index 085f049a8..4bdb55695 100644 --- a/none/tests/darwin/Makefile.am +++ b/none/tests/darwin/Makefile.am @@ -5,11 +5,11 @@ dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ access_extended.stderr.exp access_extended.vgtest \ - apple-main-arg.stderr.exp apple-main-arg.vgtest \ - bug228343.stderr.exp bug228343.stdout.exp bug228343.vgtest \ - bug254164.stderr.exp bug254164.vgtest \ - bug390269.stderr.exp bug390269.vgtest \ - bug411369.stderr.exp bug411369.vgtest \ + apple-main-arg.vgtest \ + bug228343.stdout.exp bug228343.vgtest \ + bug254164.vgtest \ + bug390269.vgtest \ + bug411369.vgtest \ rlimit.stderr.exp rlimit.vgtest check_PROGRAMS = \ diff --git a/none/tests/darwin/apple-main-arg.stderr.exp b/none/tests/darwin/apple-main-arg.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/darwin/bug228343.stderr.exp b/none/tests/darwin/bug228343.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/darwin/bug254164.stderr.exp b/none/tests/darwin/bug254164.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/darwin/bug390269.stderr.exp b/none/tests/darwin/bug390269.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/darwin/bug411369.stderr.exp b/none/tests/darwin/bug411369.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/fdleak_cat.stderr.exp b/none/tests/fdleak_cat.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/fork.stderr.exp b/none/tests/fork.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index 235386527..c705fe231 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -8,54 +8,38 @@ EXTRA_DIST = \ auxv.vgtest \ auxv_script.vgtest \ bug452274.vgtest \ - bug452274.stderr.exp \ - bug498317.vgtest bug498317.stderr.exp \ + bug498317.vgtest \ bug498317.supp \ bug499212.vgtest \ - bug499212.stderr.exp \ bug499212.stdout.exp \ cp.vgtest \ - cp.stderr.exp \ osrel.vgtest \ - osrel.stderr.exp \ osrel.stdout.exp \ fexecve_hw1.vgtest \ fexecve_hw1.stdout.exp \ - fexecve_hw1.stderr.exp \ fexecve_hw2.vgtest \ fexecve_hw2.stdout.exp \ - fexecve_hw2.stderr.exp \ fexecve_script1.vgtest \ fexecve_script1.stderr.exp \ fexecve_script2.vgtest \ fexecve_script2.stdout.exp \ - fexecve_script2.stderr.exp \ fexecve_txt.vgtest \ fexecve_txt.stderr.exp \ proc_pid_file.vgtest \ - proc_pid_file.stderr.exp \ bash_test.vgtest \ bash_test.sh \ - bash_test.stderr.exp \ bash_test.stdout.exp \ csh_test.vgtest \ csh_test.csh \ - csh_test.stderr.exp \ csh_test.stdout.exp \ ksh_test.vgtest \ ksh_test.ksh \ - ksh_test.stderr.exp \ ksh_test.stdout.exp \ open_client.vgtest \ - open_client.stderr.exp \ readlinkat.vgtest \ - readlinkat.stderr.exp \ readlinkat2.vgtest \ - readlinkat2.stderr.exp \ sanity_level_thread.vgtest \ - sanity_level_thread.stderr.exp \ swapcontext.vgtest \ - swapcontext.stderr.exp \ swapcontext.stdout.exp \ umtx_op_timeout.vgtest \ umtx_op_timeout.stderr.exp \ @@ -64,7 +48,6 @@ EXTRA_DIST = \ umtx_shm_creat2.vgtest \ umtx_shm_creat2.stderr.exp \ usrstack.vgtest \ - usrstack.stderr.exp \ usrstack.stdout.exp check_PROGRAMS = \ diff --git a/none/tests/freebsd/bash_test.stderr.exp b/none/tests/freebsd/bash_test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/bug452274.stderr.exp b/none/tests/freebsd/bug452274.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/bug498317.stderr.exp b/none/tests/freebsd/bug498317.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/bug499212.stderr.exp b/none/tests/freebsd/bug499212.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/cp.stderr.exp b/none/tests/freebsd/cp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/csh_test.stderr.exp b/none/tests/freebsd/csh_test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/fexecve_hw1.stderr.exp b/none/tests/freebsd/fexecve_hw1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/fexecve_hw2.stderr.exp b/none/tests/freebsd/fexecve_hw2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/fexecve_script2.stderr.exp b/none/tests/freebsd/fexecve_script2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/ksh_test.stderr.exp b/none/tests/freebsd/ksh_test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/open_client.stderr.exp b/none/tests/freebsd/open_client.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/osrel.stderr.exp b/none/tests/freebsd/osrel.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/proc_pid_file.stderr.exp b/none/tests/freebsd/proc_pid_file.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/readlinkat.stderr.exp b/none/tests/freebsd/readlinkat.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/readlinkat2.stderr.exp b/none/tests/freebsd/readlinkat2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/sanity_level_thread.stderr.exp b/none/tests/freebsd/sanity_level_thread.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/swapcontext.stderr.exp b/none/tests/freebsd/swapcontext.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/freebsd/usrstack.stderr.exp b/none/tests/freebsd/usrstack.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/iropt-test/Makefile.am b/none/tests/iropt-test/Makefile.am index f4d1e9afa..443c114a8 100644 --- a/none/tests/iropt-test/Makefile.am +++ b/none/tests/iropt-test/Makefile.am @@ -1,10 +1,10 @@ include $(top_srcdir)/Makefile.all.am -EXTRA_DIST = iropt-test.vgtest iropt-test.stderr.exp \ - iropt-test-sec.vgtest iropt-test-sec.stderr.exp \ +EXTRA_DIST = iropt-test.vgtest \ + iropt-test-sec.vgtest \ irops.tab -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = #---------------------------------------------------------------------------- # Headers diff --git a/none/tests/iropt-test/filter_stderr b/none/tests/iropt-test/filter_stderr deleted file mode 100755 index 6d046ca6f..000000000 --- a/none/tests/iropt-test/filter_stderr +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -dir=`dirname $0` - -$dir/../../../tests/filter_stderr_basic - diff --git a/none/tests/iropt-test/iropt-test-sec.stderr.exp b/none/tests/iropt-test/iropt-test-sec.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/iropt-test/iropt-test-sec.vgtest b/none/tests/iropt-test/iropt-test-sec.vgtest index 82da4ab07..3aa2f5767 100644 --- a/none/tests/iropt-test/iropt-test-sec.vgtest +++ b/none/tests/iropt-test/iropt-test-sec.vgtest @@ -3,3 +3,5 @@ prereq: test -x iropt-test-sec #args: -v -v -r10 args: -r100 vgopts: -q --vex-guest-chase=no +stderr_filter: +stderrB_filter: diff --git a/none/tests/iropt-test/iropt-test.stderr.exp b/none/tests/iropt-test/iropt-test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/iropt-test/iropt-test.vgtest b/none/tests/iropt-test/iropt-test.vgtest index 9136b105c..1d1bca939 100644 --- a/none/tests/iropt-test/iropt-test.vgtest +++ b/none/tests/iropt-test/iropt-test.vgtest @@ -2,3 +2,5 @@ prog: iropt-test #args: -v -v -r10 args: -r100 vgopts: -q --vex-guest-chase=no +stderr_filter: +stderrB_filter: diff --git a/none/tests/libvex_test.stderr.exp b/none/tests/libvex_test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/libvexmultiarch_test.stderr.exp b/none/tests/libvexmultiarch_test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/Makefile.am b/none/tests/linux/Makefile.am index a1389fe0d..15400e264 100644 --- a/none/tests/linux/Makefile.am +++ b/none/tests/linux/Makefile.am @@ -7,18 +7,18 @@ EXTRA_DIST = \ blockfault.stderr.exp blockfault.vgtest \ brk-overflow1.stderr.exp brk-overflow1.vgtest \ brk-overflow2.stderr.exp brk-overflow2.vgtest \ - bug498317.stderr.exp bug498317.supp bug498317.vgtest \ + bug498317.supp bug498317.vgtest \ bug506910.stderr.exp bug506910.vgtest \ - clonev.stdout.exp clonev.stderr.exp clonev.vgtest \ - getdents_filter.stderr.exp getdents_filter.stdout.exp getdents_filter.vgtest \ + clonev.stdout.exp clonev.vgtest \ + getdents_filter.stdout.exp getdents_filter.vgtest \ membarrier.stderr.exp membarrier.vgtest \ mremap.stderr.exp mremap.stderr.exp-glibc27 mremap.vgtest \ mremap2.stderr.exp mremap2.stdout.exp mremap2.vgtest \ mremap3.stderr.exp mremap3.stdout.exp mremap3.vgtest \ - mremap4.stderr.exp mremap4.vgtest \ - mremap5.stderr.exp mremap5.vgtest \ - mremap6.stderr.exp mremap6.vgtest \ - open_client.stderr.exp open_client.vgtest \ + mremap4.vgtest \ + mremap5.vgtest \ + mremap6.vgtest \ + open_client.vgtest \ pthread-stack.stderr.exp pthread-stack.vgtest \ readlinkat_self.stderr.exp readlinkat_self.vgtest \ stack-overflow.stderr.exp stack-overflow.vgtest diff --git a/none/tests/linux/bug498317.stderr.exp b/none/tests/linux/bug498317.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/clonev.stderr.exp b/none/tests/linux/clonev.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/getdents_filter.stderr.exp b/none/tests/linux/getdents_filter.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/mremap4.stderr.exp b/none/tests/linux/mremap4.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/mremap5.stderr.exp b/none/tests/linux/mremap5.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/mremap6.stderr.exp b/none/tests/linux/mremap6.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/linux/open_client.stderr.exp b/none/tests/linux/open_client.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/log-track-fds.stderr.exp b/none/tests/log-track-fds.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/FPUarithmetic.stderr.exp b/none/tests/mips32/FPUarithmetic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/LoadStore.stderr.exp b/none/tests/mips32/LoadStore.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/LoadStore1.stderr.exp b/none/tests/mips32/LoadStore1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/MIPS32int.stderr.exp b/none/tests/mips32/MIPS32int.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/MIPS32r6int.stderr.exp b/none/tests/mips32/MIPS32r6int.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/Makefile.am b/none/tests/mips32/Makefile.am index 70099ff4b..48c918499 100644 --- a/none/tests/mips32/Makefile.am +++ b/none/tests/mips32/Makefile.am @@ -4,58 +4,53 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ - block_size.stdout.exp block_size.stderr.exp block_size.vgtest \ - branch_pc.stdout.exp branch_pc.stderr.exp branch_pc.vgtest \ - branches.stdout.exp branches.stderr.exp branches.vgtest \ + block_size.stdout.exp block_size.vgtest \ + branch_pc.stdout.exp branch_pc.vgtest \ + branches.stdout.exp branches.vgtest \ branches.stdout.exp-r6 \ - branches_r6.stdout.exp branches_r6.stderr.exp branches_r6.vgtest \ - bug320057-mips32.stdout.exp bug320057-mips32.stderr.exp \ - bug320057-mips32.vgtest \ + branches_r6.stdout.exp branches_r6.vgtest \ + bug320057-mips32.stdout.exp bug320057-mips32.vgtest \ change_fp_mode.stdout.exp change_fp_mode.stdout.exp-fpu32 \ - change_fp_mode.stderr.exp change_fp_mode.vgtest \ - change_fp_mode.stdout.exp-r6 \ + change_fp_mode.vgtest change_fp_mode.stdout.exp-r6 \ FPUarithmetic.stdout.exp FPUarithmetic.stdout.exp-mips32 \ - FPUarithmetic.stderr.exp FPUarithmetic.vgtest \ - fpu_branches.stdout.exp fpu_branches.stderr.exp fpu_branches.vgtest \ - LoadStore.stdout.exp LoadStore.stdout.exp-BE LoadStore.stderr.exp \ + FPUarithmetic.vgtest \ + fpu_branches.stdout.exp fpu_branches.vgtest \ + LoadStore.stdout.exp LoadStore.stdout.exp-BE \ LoadStore.vgtest LoadStore.stdout.exp-r6-LE LoadStore.stdout.exp-r6-BE \ - LoadStore1.stdout.exp LoadStore1.stdout.exp-LE LoadStore1.stderr.exp \ + LoadStore1.stdout.exp LoadStore1.stdout.exp-LE \ LoadStore1.vgtest LoadStore1.stdout.exp-r6-LE LoadStore1.stdout.exp-r6-BE\ - MemCpyTest.stdout.exp MemCpyTest.stderr.exp MemCpyTest.vgtest \ + MemCpyTest.stdout.exp MemCpyTest.vgtest \ MIPS32int.stdout.exp-mips32-BE MIPS32int.stdout.exp-mips32r2-BE \ MIPS32int.stdout.exp-mips32-LE MIPS32int.stdout.exp-mips32r2-LE \ - MIPS32int.stderr.exp MIPS32int.vgtest \ + MIPS32int.vgtest \ MIPS32int.stdout.exp-mips32r6-LE MIPS32int.stdout.exp-mips32r6-BE \ - MIPS32r6int.stdout.exp MIPS32r6int.stderr.exp MIPS32r6int.vgtest \ + MIPS32r6int.stdout.exp MIPS32r6int.vgtest \ mips32_dsp.stdout.exp-LE mips32_dsp.stdout.exp-BE \ - mips32_dsp.stderr.exp mips32_dsp.vgtest \ - mips32_dspr2.stdout.exp mips32_dspr2.stderr.exp \ - mips32_dspr2.vgtest \ + mips32_dsp.vgtest \ + mips32_dspr2.stdout.exp mips32_dspr2.vgtest \ MoveIns.stdout.exp MoveIns.stdout.exp-BE \ MoveIns.stdout.exp-mips32r2-BE MoveIns.stdout.exp-mips32r2-LE \ - MoveIns.stderr.exp MoveIns.vgtest \ + MoveIns.vgtest \ MoveIns.stdout.exp-mips32r6-BE MoveIns.stdout.exp-mips32r6-LE \ - pc_instructions_r6.stdout.exp pc_instructions_r6.stderr.exp \ - pc_instructions_r6.vgtest \ - msa_arithmetic.stderr.exp msa_arithmetic.stdout.exp msa_arithmetic.vgtest \ - msa_comparison.stderr.exp msa_comparison.stdout.exp msa_comparison.vgtest \ - msa_data_transfer.stderr.exp msa_data_transfer.stdout.exp \ + pc_instructions_r6.stdout.exp pc_instructions_r6.vgtest \ + msa_arithmetic.stdout.exp msa_arithmetic.vgtest \ + msa_comparison.stdout.exp msa_comparison.vgtest \ + msa_data_transfer.stdout.exp \ msa_data_transfer.stdout.exp-BE msa_data_transfer.vgtest \ - msa_fpu.stderr.exp msa_fpu.stdout.exp msa_fpu.vgtest \ - msa_logical_and_shift.stderr.exp msa_logical_and_shift.stdout.exp \ - msa_logical_and_shift.vgtest msa_shuffle.stderr.exp msa_shuffle.stdout.exp \ - msa_shuffle.vgtest \ + msa_fpu.stdout.exp msa_fpu.vgtest \ + msa_logical_and_shift.stdout.exp msa_logical_and_shift.vgtest \ + msa_shuffle.stdout.exp msa_shuffle.vgtest \ round_fpu64.stdout.exp round_fpu64.stdout.exp-fpu32 \ - round_fpu64.stderr.exp round_fpu64.vgtest \ - round.stdout.exp round.stderr.exp round.vgtest \ - fp_r6.stdout.exp fp_r6.stderr.exp fp_r6.vgtest \ + round_fpu64.vgtest \ + round.stdout.exp round.vgtest \ + fp_r6.stdout.exp fp_r6.vgtest \ SignalException.stderr.exp SignalException.vgtest \ - test_fcsr.stdout.exp test_fcsr.stderr.exp test_fcsr.vgtest \ - test_math.stdout.exp test_math.stderr.exp test_math.vgtest \ + test_fcsr.stdout.exp test_fcsr.vgtest \ + test_math.stdout.exp test_math.vgtest \ unaligned_load_store.stdout.exp-LE unaligned_load_store.stdout.exp-BE \ - unaligned_load_store.stderr.exp unaligned_load_store.vgtest \ + unaligned_load_store.vgtest \ vfp.stdout.exp-mips32-BE vfp.stdout.exp-mips32r2-BE \ - vfp.stdout.exp-mips32-LE vfp.stdout.exp-mips32r2-LE vfp.stderr.exp \ + vfp.stdout.exp-mips32-LE vfp.stdout.exp-mips32r2-LE \ vfp.stdout.exp-mips32r2-fpu_64-BE vfp.stdout.exp-mips32r2-fpu_64-LE \ vfp.vgtest diff --git a/none/tests/mips32/MemCpyTest.stderr.exp b/none/tests/mips32/MemCpyTest.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/MoveIns.stderr.exp b/none/tests/mips32/MoveIns.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/block_size.stderr.exp b/none/tests/mips32/block_size.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/branch_pc.stderr.exp b/none/tests/mips32/branch_pc.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/branches.stderr.exp b/none/tests/mips32/branches.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/branches_r6.stderr.exp b/none/tests/mips32/branches_r6.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/bug320057-mips32.stderr.exp b/none/tests/mips32/bug320057-mips32.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/change_fp_mode.stderr.exp b/none/tests/mips32/change_fp_mode.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/fp_r6.stderr.exp b/none/tests/mips32/fp_r6.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/fpu_branches.stderr.exp b/none/tests/mips32/fpu_branches.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/mips32_dsp.stderr.exp b/none/tests/mips32/mips32_dsp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/mips32_dspr2.stderr.exp b/none/tests/mips32/mips32_dspr2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/msa_arithmetic.stderr.exp b/none/tests/mips32/msa_arithmetic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/msa_comparison.stderr.exp b/none/tests/mips32/msa_comparison.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/msa_data_transfer.stderr.exp b/none/tests/mips32/msa_data_transfer.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/msa_fpu.stderr.exp b/none/tests/mips32/msa_fpu.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/msa_logical_and_shift.stderr.exp b/none/tests/mips32/msa_logical_and_shift.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/msa_shuffle.stderr.exp b/none/tests/mips32/msa_shuffle.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/pc_instructions_r6.stderr.exp b/none/tests/mips32/pc_instructions_r6.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/round.stderr.exp b/none/tests/mips32/round.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/round_fpu64.stderr.exp b/none/tests/mips32/round_fpu64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/test_fcsr.stderr.exp b/none/tests/mips32/test_fcsr.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/test_math.stderr.exp b/none/tests/mips32/test_math.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/unaligned_load_store.stderr.exp b/none/tests/mips32/unaligned_load_store.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips32/vfp.stderr.exp b/none/tests/mips32/vfp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/MIPS64r6int.stderr.exp b/none/tests/mips64/MIPS64r6int.stderr.exp deleted file mode 120000 index b563b90db..000000000 --- a/none/tests/mips64/MIPS64r6int.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/MIPS32r6int.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/Makefile.am b/none/tests/mips64/Makefile.am index f77d5882b..73b6d6f78 100644 --- a/none/tests/mips64/Makefile.am +++ b/none/tests/mips64/Makefile.am @@ -5,82 +5,76 @@ dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ arithmetic_instruction.stdout.exp-mips64 \ - arithmetic_instruction.stdout.exp-mips64r2 arithmetic_instruction.stderr.exp \ + arithmetic_instruction.stdout.exp-mips64r2 \ arithmetic_instruction.vgtest arithmetic_instruction.stdout.exp-mips64r6 \ branch_and_jump_instructions.stdout.exp \ - branch_and_jump_instructions.stderr.exp branch_and_jump_instructions.vgtest \ - branches.stdout.exp branches.stderr.exp branches.vgtest branches.stdout.exp-r6 \ - branches_r6.stderr.exp branches_r6.stdout.exp branches_r6.vgtest\ - branch_pc.stderr.exp branch_pc.stdout.exp branch_pc.vgtest \ - change_fp_mode.stderr.exp change_fp_mode.stdout.exp change_fp_mode.vgtest \ + branch_and_jump_instructions.vgtest \ + branches.stdout.exp branches.vgtest branches.stdout.exp-r6 \ + branches_r6.stdout.exp branches_r6.vgtest \ + branch_pc.stdout.exp branch_pc.vgtest \ + change_fp_mode.stdout.exp change_fp_mode.vgtest \ cvm_bbit.stdout.exp cvm_bbit.stdout.exp-non-octeon \ - cvm_bbit.stderr.exp cvm_bbit.vgtest \ + cvm_bbit.vgtest \ cvm_ins.stdout.exp cvm_ins.stdout.exp-non-octeon \ - cvm_ins.stderr.exp cvm_ins.vgtest \ + cvm_ins.vgtest \ cvm_lx_ins.stdout.exp-LE cvm_lx_ins.stdout.exp-BE \ cvm_lx_ins.stdout.exp-non-octeon \ - cvm_lx_ins.stderr.exp cvm_lx_ins.vgtest \ + cvm_lx_ins.vgtest \ cvm_atomic.stdout.exp-LE cvm_atomic.stdout.exp-BE \ cvm_atomic.stdout.exp-non-octeon \ - cvm_atomic.stderr.exp cvm_atomic.vgtest \ + cvm_atomic.vgtest \ cvm_atomic_thread.stdout.exp cvm_atomic_thread.stdout.exp-non-octeon \ - cvm_atomic_thread.stderr.exp cvm_atomic_thread.vgtest \ + cvm_atomic_thread.vgtest \ extract_insert_bit_field.stdout.exp-mips64 \ extract_insert_bit_field.stdout.exp-mips64r2 \ - extract_insert_bit_field.stderr.exp extract_insert_bit_field.vgtest \ - fpu_arithmetic.stdout.exp fpu_arithmetic.stderr.exp fpu_arithmetic.vgtest \ + extract_insert_bit_field.vgtest \ + fpu_arithmetic.stdout.exp fpu_arithmetic.vgtest \ fpu_arithmetic.stdout.exp-r6 \ - fpu_branches.stdout.exp fpu_branches.stderr.exp fpu_branches.vgtest \ - fpu_control_word.stdout.exp fpu_control_word.stderr.exp \ - fpu_control_word.vgtest \ + fpu_branches.stdout.exp fpu_branches.vgtest \ + fpu_control_word.stdout.exp fpu_control_word.vgtest \ fpu_load_store.stdout.exp-BE fpu_load_store.stdout.exp-LE \ - fpu_load_store.stderr.exp fpu_load_store.vgtest \ + fpu_load_store.vgtest \ fpu_load_store.stdout.exp-BE-r2 fpu_load_store.stdout.exp-LE-r2 \ fpu_load_store.stdout.exp-BE-r6 fpu_load_store.stdout.exp-LE-r6 \ - fp_r6.stderr.exp fp_r6.stdout.exp fp_r6.vgtest \ + fp_r6.stdout.exp fp_r6.vgtest \ load_indexed_instructions.stdout.exp-BE \ load_indexed_instructions.stdout.exp-LE \ load_indexed_instructions.stdout.exp-non-octeon \ - load_indexed_instructions.stderr.exp load_indexed_instructions.vgtest \ - load_store.stdout.exp-BE load_store.stdout.exp-LE load_store.stderr.exp \ + load_indexed_instructions.vgtest \ + load_store.stdout.exp-BE load_store.stdout.exp-LE \ load_store.vgtest load_store.stdout.exp-LE-r6 load_store.stdout.exp-BE-r6 \ load_store_multiple.stdout.exp-BE load_store_multiple.stdout.exp-LE \ - load_store_multiple.stderr.exp load_store_multiple.vgtest \ + load_store_multiple.vgtest \ load_store_multiple.stdout.exp-LE-r6 load_store_multiple.stdout.exp-BE-r6 \ - load_store_unaligned.stdout.exp load_store_unaligned.stderr.exp \ - logical_instructions.stdout.exp logical_instructions.stderr.exp \ - load_store_unaligned.vgtest \ - logical_instructions.vgtest \ + load_store_unaligned.stdout.exp load_store_unaligned.vgtest \ + logical_instructions.stdout.exp logical_instructions.vgtest \ move_instructions.stdout.exp-BE move_instructions.stdout.exp-LE \ - move_instructions.stderr.exp move_instructions.vgtest \ + move_instructions.vgtest \ move_instructions.stdout.exp-r6 \ - MIPS64r6int.stderr.exp MIPS64r6int.stdout.exp MIPS64r6int.vgtest \ - msa_data_transfer.stdout.exp msa_data_transfer.stderr.exp \ + MIPS64r6int.stdout.exp MIPS64r6int.vgtest \ + msa_data_transfer.stdout.exp \ msa_data_transfer.vgtest msa_data_transfer.stdout.exp-BE \ - msa_arithmetic.stderr.exp msa_arithmetic.stdout.exp msa_arithmetic.vgtest \ - msa_comparison.stderr.exp msa_comparison.stdout.exp msa_comparison.vgtest \ - msa_fpu.stderr.exp msa_fpu.stdout.exp msa_fpu.vgtest \ - msa_logical_and_shift.stderr.exp msa_logical_and_shift.stdout.exp \ - msa_logical_and_shift.vgtest msa_shuffle.stderr.exp msa_shuffle.stdout.exp \ - msa_shuffle.vgtest\ + msa_arithmetic.stdout.exp msa_arithmetic.vgtest \ + msa_comparison.stdout.exp msa_comparison.vgtest \ + msa_fpu.stdout.exp msa_fpu.vgtest \ + msa_logical_and_shift.stdout.exp msa_logical_and_shift.vgtest \ + msa_shuffle.stdout.exp msa_shuffle.vgtest\ rotate_swap.stdout.exp-mips64 rotate_swap.stdout.exp-mips64r2 \ - rotate_swap.stderr.exp rotate_swap.vgtest \ - round.stdout.exp round.stderr.exp round.vgtest \ - r6_instructions.stdout.exp-LE r6_instructions.stdout.exp-BE r6_instructions.stderr.exp \ + rotate_swap.vgtest \ + round.stdout.exp round.vgtest \ + r6_instructions.stdout.exp-LE r6_instructions.stdout.exp-BE \ r6_instructions.vgtest \ - pc_instructions_r6.stderr.exp pc_instructions_r6.stdout.exp pc_instructions_r6.vgtest \ + pc_instructions_r6.stdout.exp pc_instructions_r6.vgtest \ shift_instructions.stdout.exp-mips64 shift_instructions.stdout.exp-mips64r2 \ - shift_instructions.stderr.exp shift_instructions.vgtest \ - test_block_size.stdout.exp test_block_size.stderr.exp \ - test_block_size.vgtest \ - test_fcsr.stdout.exp test_fcsr.stderr.exp \ - test_fcsr.vgtest \ + shift_instructions.vgtest \ + test_block_size.stdout.exp test_block_size.vgtest \ + test_fcsr.stdout.exp test_fcsr.vgtest \ test_math.stdout.exp test_math.stdout.exp-older-gcc \ - test_math.stderr.exp test_math.vgtest \ + test_math.vgtest \ unaligned_load.stdout.exp-BE unaligned_load.stdout.exp-LE \ - unaligned_load.stderr.exp unaligned_load.vgtest \ + unaligned_load.vgtest \ unaligned_load_store.stdout.exp-LE unaligned_load_store.stdout.exp-BE \ - unaligned_load_store.stderr.exp unaligned_load_store.vgtest \ + unaligned_load_store.vgtest \ const.h macro_fpu.h macro_int.h macro_load_store.h rounding_mode.h check_PROGRAMS = \ diff --git a/none/tests/mips64/arithmetic_instruction.stderr.exp b/none/tests/mips64/arithmetic_instruction.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/branch_and_jump_instructions.stderr.exp b/none/tests/mips64/branch_and_jump_instructions.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/branch_pc.stderr.exp b/none/tests/mips64/branch_pc.stderr.exp deleted file mode 120000 index 40bb47425..000000000 --- a/none/tests/mips64/branch_pc.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/branch_pc.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/branches.stderr.exp b/none/tests/mips64/branches.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/branches_r6.stderr.exp b/none/tests/mips64/branches_r6.stderr.exp deleted file mode 120000 index b1d41b253..000000000 --- a/none/tests/mips64/branches_r6.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/branches_r6.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/change_fp_mode.stderr.exp b/none/tests/mips64/change_fp_mode.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/cvm_atomic.stderr.exp b/none/tests/mips64/cvm_atomic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/cvm_atomic_thread.stderr.exp b/none/tests/mips64/cvm_atomic_thread.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/cvm_bbit.stderr.exp b/none/tests/mips64/cvm_bbit.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/cvm_ins.stderr.exp b/none/tests/mips64/cvm_ins.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/cvm_lx_ins.stderr.exp b/none/tests/mips64/cvm_lx_ins.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/extract_insert_bit_field.stderr.exp b/none/tests/mips64/extract_insert_bit_field.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/fp_r6.stderr.exp b/none/tests/mips64/fp_r6.stderr.exp deleted file mode 120000 index 8304184d1..000000000 --- a/none/tests/mips64/fp_r6.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/fp_r6.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/fpu_arithmetic.stderr.exp b/none/tests/mips64/fpu_arithmetic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/fpu_branches.stderr.exp b/none/tests/mips64/fpu_branches.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/fpu_control_word.stderr.exp b/none/tests/mips64/fpu_control_word.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/fpu_load_store.stderr.exp b/none/tests/mips64/fpu_load_store.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/load_indexed_instructions.stderr.exp b/none/tests/mips64/load_indexed_instructions.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/load_store.stderr.exp b/none/tests/mips64/load_store.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/load_store_multiple.stderr.exp b/none/tests/mips64/load_store_multiple.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/load_store_unaligned.stderr.exp b/none/tests/mips64/load_store_unaligned.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/logical_instructions.stderr.exp b/none/tests/mips64/logical_instructions.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/move_instructions.stderr.exp b/none/tests/mips64/move_instructions.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/msa_arithmetic.stderr.exp b/none/tests/mips64/msa_arithmetic.stderr.exp deleted file mode 120000 index b938b1901..000000000 --- a/none/tests/mips64/msa_arithmetic.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/msa_arithmetic.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/msa_comparison.stderr.exp b/none/tests/mips64/msa_comparison.stderr.exp deleted file mode 120000 index a862fa02a..000000000 --- a/none/tests/mips64/msa_comparison.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/msa_comparison.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/msa_data_transfer.stderr.exp b/none/tests/mips64/msa_data_transfer.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/msa_fpu.stderr.exp b/none/tests/mips64/msa_fpu.stderr.exp deleted file mode 120000 index 9a2d87b6c..000000000 --- a/none/tests/mips64/msa_fpu.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/msa_fpu.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/msa_logical_and_shift.stderr.exp b/none/tests/mips64/msa_logical_and_shift.stderr.exp deleted file mode 120000 index b37e66375..000000000 --- a/none/tests/mips64/msa_logical_and_shift.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/msa_logical_and_shift.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/msa_shuffle.stderr.exp b/none/tests/mips64/msa_shuffle.stderr.exp deleted file mode 120000 index caabd4aa8..000000000 --- a/none/tests/mips64/msa_shuffle.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/msa_shuffle.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/pc_instructions_r6.stderr.exp b/none/tests/mips64/pc_instructions_r6.stderr.exp deleted file mode 120000 index fcf92800c..000000000 --- a/none/tests/mips64/pc_instructions_r6.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../mips32/pc_instructions_r6.stderr.exp \ No newline at end of file diff --git a/none/tests/mips64/r6_instructions.stderr.exp b/none/tests/mips64/r6_instructions.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/rotate_swap.stderr.exp b/none/tests/mips64/rotate_swap.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/round.stderr.exp b/none/tests/mips64/round.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/shift_instructions.stderr.exp b/none/tests/mips64/shift_instructions.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/test_block_size.stderr.exp b/none/tests/mips64/test_block_size.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/test_fcsr.stderr.exp b/none/tests/mips64/test_fcsr.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/test_math.stderr.exp b/none/tests/mips64/test_math.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/unaligned_load.stderr.exp b/none/tests/mips64/unaligned_load.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mips64/unaligned_load_store.stderr.exp b/none/tests/mips64/unaligned_load_store.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/mmap_o_direct.stderr.exp b/none/tests/mmap_o_direct.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/nanomips/Makefile.am b/none/tests/nanomips/Makefile.am index a0ef13988..989a3ac22 100644 --- a/none/tests/nanomips/Makefile.am +++ b/none/tests/nanomips/Makefile.am @@ -3,12 +3,12 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ - arithmetic.vgtest arithmetic.stderr.exp arithmetic.stdout.exp \ - bits.vgtest bits.stderr.exp bits.stdout.exp \ - branches.vgtest branches.stderr.exp branches.stdout.exp \ - load_store.vgtest load_store.stderr.exp load_store.stdout.exp \ - move.vgtest move.stderr.exp move.stdout.exp \ - pc_instructions.vgtest pc_instructions.stderr.exp pc_instructions.stdout.exp + arithmetic.vgtest arithmetic.stdout.exp \ + bits.vgtest bits.stdout.exp \ + branches.vgtest branches.stdout.exp \ + load_store.vgtest load_store.stdout.exp \ + move.vgtest move.stdout.exp \ + pc_instructions.vgtest pc_instructions.stdout.exp check_PROGRAMS = \ arithmetic \ diff --git a/none/tests/nanomips/arithmetic.stderr.exp b/none/tests/nanomips/arithmetic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/nanomips/bits.stderr.exp b/none/tests/nanomips/bits.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/nanomips/branches.stderr.exp b/none/tests/nanomips/branches.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/nanomips/load_store.stderr.exp b/none/tests/nanomips/load_store.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/nanomips/move.stderr.exp b/none/tests/nanomips/move.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/nanomips/pc_instructions.stderr.exp b/none/tests/nanomips/pc_instructions.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am index bdf77f03d..1cd6734ad 100644 --- a/none/tests/ppc32/Makefile.am +++ b/none/tests/ppc32/Makefile.am @@ -4,10 +4,8 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ - bug129390-ppc32.stdout.exp bug129390-ppc32.stderr.exp \ - bug129390-ppc32.vgtest \ - bug139050-ppc32.stdout.exp bug139050-ppc32.stderr.exp \ - bug139050-ppc32.vgtest \ + bug129390-ppc32.stdout.exp bug129390-ppc32.vgtest \ + bug139050-ppc32.stdout.exp bug139050-ppc32.vgtest \ ldstrev.stderr.exp ldstrev.stdout.exp ldstrev.vgtest \ jm-int-sh_algebraic.stderr.exp jm-int-sh_algebraic.stdout.exp \ jm-int-sh_algebraic.vgtest \ diff --git a/none/tests/ppc32/bug129390-ppc32.stderr.exp b/none/tests/ppc32/bug129390-ppc32.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppc32/bug139050-ppc32.stderr.exp b/none/tests/ppc32/bug139050-ppc32.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppc64/Makefile.am b/none/tests/ppc64/Makefile.am index 69267e774..465cca832 100644 --- a/none/tests/ppc64/Makefile.am +++ b/none/tests/ppc64/Makefile.am @@ -21,7 +21,7 @@ EXTRA_DIST = \ jm-vmx.vgtest \ jm-misc.stderr.exp jm-misc.stdout.exp jm-misc.vgtest \ lsw.stderr.exp lsw.stdout.exp lsw.vgtest \ - std_reg_imm.vgtest std_reg_imm.stderr.exp std_reg_imm.stdout.exp std_reg_imm.stdout.exp-LE \ + std_reg_imm.vgtest std_reg_imm.stdout.exp std_reg_imm.stdout.exp-LE \ round.stderr.exp round.stdout.exp round.vgtest \ twi_tdi.stderr.exp twi_tdi.stdout.exp twi_tdi.vgtest \ tw_td.stderr.exp tw_td.stdout.exp tw_td.vgtest \ diff --git a/none/tests/ppc64/std_reg_imm.stderr.exp b/none/tests/ppc64/std_reg_imm.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/ppoll_alarm.stderr.exp b/none/tests/ppoll_alarm.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/pselect_alarm.stderr.exp b/none/tests/pselect_alarm.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/pselect_sigmask_null.stderr.exp b/none/tests/pselect_sigmask_null.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/pth_self_kill_15_other.stderr.exp b/none/tests/pth_self_kill_15_other.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/pth_self_kill_9.stderr.exp b/none/tests/pth_self_kill_9.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/rc_option_with_spaces.stderr.exp b/none/tests/rc_option_with_spaces.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/require-text-symbol-1.stderr.exp b/none/tests/require-text-symbol-1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/res_search.stderr.exp b/none/tests/res_search.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/riscv64/Makefile.am b/none/tests/riscv64/Makefile.am index b2de2bd39..041d43fdd 100644 --- a/none/tests/riscv64/Makefile.am +++ b/none/tests/riscv64/Makefile.am @@ -6,13 +6,13 @@ dist_noinst_SCRIPTS = filter_stderr noinst_HEADERS = testinst.h EXTRA_DIST = \ - atomic.stdout.exp atomic.stderr.exp atomic.vgtest \ - compressed.stdout.exp compressed.stderr.exp compressed.vgtest \ - csr.stdout.exp csr.stderr.exp csr.vgtest \ - float32.stdout.exp float32.stderr.exp float32.vgtest \ - float64.stdout.exp float64.stderr.exp float64.vgtest \ - integer.stdout.exp integer.stderr.exp integer.vgtest \ - muldiv.stdout.exp muldiv.stderr.exp muldiv.vgtest + atomic.stdout.exp atomic.vgtest \ + compressed.stdout.exp compressed.vgtest \ + csr.stdout.exp csr.vgtest \ + float32.stdout.exp float32.vgtest \ + float64.stdout.exp float64.vgtest \ + integer.stdout.exp integer.vgtest \ + muldiv.stdout.exp muldiv.vgtest check_PROGRAMS = \ allexec \ diff --git a/none/tests/riscv64/atomic.stderr.exp b/none/tests/riscv64/atomic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/riscv64/compressed.stderr.exp b/none/tests/riscv64/compressed.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/riscv64/csr.stderr.exp b/none/tests/riscv64/csr.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/riscv64/float32.stderr.exp b/none/tests/riscv64/float32.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/riscv64/float64.stderr.exp b/none/tests/riscv64/float64.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/riscv64/integer.stderr.exp b/none/tests/riscv64/integer.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/riscv64/muldiv.stderr.exp b/none/tests/riscv64/muldiv.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/s390x/disasm-test/Makefile.am b/none/tests/s390x/disasm-test/Makefile.am index 150f38b32..831a08b6c 100644 --- a/none/tests/s390x/disasm-test/Makefile.am +++ b/none/tests/s390x/disasm-test/Makefile.am @@ -1,8 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -EXTRA_DIST = disasm-test.vgtest disasm-test.stderr.exp \ - disasm-test.post.exp -dist_noinst_SCRIPTS = filter_stderr +EXTRA_DIST = disasm-test.vgtest disasm-test.post.exp +dist_noinst_SCRIPTS = #---------------------------------------------------------------------------- # Headers diff --git a/none/tests/s390x/disasm-test/disasm-test.stderr.exp b/none/tests/s390x/disasm-test/disasm-test.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index 9def1926c..e45b61ceb 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -5,3 +5,6 @@ prereq: ./disasm-test --check-prereq prog: /bin/true post: ./disasm-test --all-except-exrl --summary +vgopts: -q +stderr_filter: +stderrB_filter: diff --git a/none/tests/s390x/disasm-test/filter_stderr b/none/tests/s390x/disasm-test/filter_stderr deleted file mode 100755 index 17cc8adf5..000000000 --- a/none/tests/s390x/disasm-test/filter_stderr +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Nothing to filter. -true diff --git a/none/tests/scripts/Makefile.am b/none/tests/scripts/Makefile.am index 293371860..43875731a 100644 --- a/none/tests/scripts/Makefile.am +++ b/none/tests/scripts/Makefile.am @@ -19,17 +19,16 @@ EXTRA_DIST = \ shell_badinterp shell_badinterp.vgtest shell_badinterp.stderr.exp \ shell_binaryfile shell_binaryfile.vgtest shell_binaryfile.stderr.exp \ shell_dir.vgtest shell_dir.stderr.exp \ - nointerp1 nointerp1.vgtest nointerp1.stderr.exp nointerp1.stdout.exp \ - nointerp2 nointerp2.vgtest nointerp2.stderr.exp nointerp2.stdout.exp \ - nointerp3 nointerp3.vgtest nointerp3.stderr.exp nointerp3.stdout.exp \ - nointerp4 nointerp4.vgtest nointerp4.stderr.exp \ - nointerp5 nointerp5.vgtest nointerp5.stderr.exp \ + nointerp1 nointerp1.vgtest nointerp1.stdout.exp \ + nointerp2 nointerp2.vgtest nointerp2.stdout.exp \ + nointerp3 nointerp3.vgtest nointerp3.stdout.exp \ + nointerp4 nointerp4.vgtest \ + nointerp5 nointerp5.vgtest \ shell_nonexec.vgtest shell_nonexec.stderr.exp \ shell_nosuchfile.vgtest shell_nosuchfile.stderr.exp \ - relative1 relative1.vgtest relative1.stderr.exp relative1.stdout.exp \ - relative2 relative2.vgtest relative2.stderr.exp relative2.stdout.exp \ - shell_valid1 shell_valid1.vgtest shell_valid1.stderr.exp \ - shell_valid4 shell_valid4.vgtest shell_valid4.stderr.exp \ - shell_valid4.stdout.exp \ + relative1 relative1.vgtest relative1.stdout.exp \ + relative2 relative2.vgtest relative2.stdout.exp \ + shell_valid1 shell_valid1.vgtest \ + shell_valid4 shell_valid4.vgtest shell_valid4.stdout.exp \ shell_zerolength shell_zerolength.vgtest shell_zerolength.stderr.exp \ shell_zerolength.stderr.exp-dash diff --git a/none/tests/scripts/nointerp1.stderr.exp b/none/tests/scripts/nointerp1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/nointerp2.stderr.exp b/none/tests/scripts/nointerp2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/nointerp3.stderr.exp b/none/tests/scripts/nointerp3.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/nointerp4.stderr.exp b/none/tests/scripts/nointerp4.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/nointerp5.stderr.exp b/none/tests/scripts/nointerp5.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/relative1.stderr.exp b/none/tests/scripts/relative1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/relative2.stderr.exp b/none/tests/scripts/relative2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/shell_valid1.stderr.exp b/none/tests/scripts/shell_valid1.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/scripts/shell_valid4.stderr.exp b/none/tests/scripts/shell_valid4.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/sigprocmask.stderr.exp b/none/tests/sigprocmask.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/sigsusp.stderr.exp b/none/tests/sigsusp.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/Makefile.am b/none/tests/solaris/Makefile.am index 80565493f..612de2b91 100644 --- a/none/tests/solaris/Makefile.am +++ b/none/tests/solaris/Makefile.am @@ -9,15 +9,15 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = \ block_all_signals.stderr.exp block_all_signals.stdout.exp block_all_signals.vgtest \ blockfault.stderr.exp blockfault.vgtest \ - context_link.stderr.exp context_link.stdout.exp context_link.vgtest \ - context_link2.stderr.exp context_link2.vgtest \ - context_null.stderr.exp context_null.vgtest \ - context_stack.stderr.exp context_stack.vgtest \ + context_link.stdout.exp context_link.vgtest \ + context_link2.vgtest \ + context_null.vgtest \ + context_stack.vgtest \ coredump_many_threads.post.exp coredump_many_threads.stderr.exp coredump_many_threads.vgtest \ - mmap_noreserve.stderr.exp mmap_noreserve.stdout.exp mmap_noreserve.vgtest \ - proc_aout.stderr.exp proc_aout.stdout.exp proc_aout.vgtest \ - proc_auxv.stderr.exp proc_auxv.vgtest \ - proc_auxv_multiple.stderr.exp proc_auxv_multiple.vgtest \ + mmap_noreserve.stdout.exp mmap_noreserve.vgtest \ + proc_aout.stdout.exp proc_aout.vgtest \ + proc_auxv.vgtest \ + proc_auxv_multiple.vgtest \ proc-cmdline-exe.stderr.exp-with-cmdline proc-cmdline-exe.stderr.exp-without-cmdline \ proc-cmdline-exe.vgtest \ proc_psinfo.stderr.exp proc_psinfo.stdout.exp proc_psinfo.vgtest \ @@ -27,10 +27,10 @@ EXTRA_DIST = \ reserve_sysstat_addr.map reserve_sysstat_addr.stderr.exp reserve_sysstat_addr.vgtest \ reserve_sysstat_zone_addr.map reserve_sysstat_zone_addr.stderr.exp reserve_sysstat_zone_addr.vgtest \ resolv.stdout.exp resolv.stderr.exp resolv.vgtest \ - sigresend.stderr.exp sigresend.stdout.exp sigresend.vgtest \ + sigresend.stdout.exp sigresend.vgtest \ stack_overflow.stderr.exp stack_overflow.vgtest \ - stack_prot.stderr.exp stack_prot.vgtest \ - threads_exitall.stderr.exp threads_exitall.vgtest + stack_prot.vgtest \ + threads_exitall.vgtest check_PROGRAMS = \ block_all_signals \ diff --git a/none/tests/solaris/context_link.stderr.exp b/none/tests/solaris/context_link.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/context_link2.stderr.exp b/none/tests/solaris/context_link2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/context_null.stderr.exp b/none/tests/solaris/context_null.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/context_stack.stderr.exp b/none/tests/solaris/context_stack.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/mmap_noreserve.stderr.exp b/none/tests/solaris/mmap_noreserve.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/proc_aout.stderr.exp b/none/tests/solaris/proc_aout.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/proc_auxv.stderr.exp b/none/tests/solaris/proc_auxv.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/proc_auxv_multiple.stderr.exp b/none/tests/solaris/proc_auxv_multiple.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/sigresend.stderr.exp b/none/tests/solaris/sigresend.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/stack_prot.stderr.exp b/none/tests/solaris/stack_prot.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/solaris/threads_exitall.stderr.exp b/none/tests/solaris/threads_exitall.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/syslog.stderr.exp b/none/tests/syslog.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/threadederrno.stderr.exp b/none/tests/threadederrno.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/timer_delete.stderr.exp b/none/tests/timer_delete.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/track-fds-exec-children.stderr.exp b/none/tests/track-fds-exec-children.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86-darwin/Makefile.am b/none/tests/x86-darwin/Makefile.am index e9c33e5d7..2fc24df3c 100644 --- a/none/tests/x86-darwin/Makefile.am +++ b/none/tests/x86-darwin/Makefile.am @@ -7,7 +7,7 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = \ bug341419.vgtest bug341419.stderr.exp \ bug350062.vgtest bug350062.stderr.exp \ - cet_nops_gs.stderr.exp cet_nops_gs.stdout.exp cet_nops_gs.vgtest + cet_nops_gs.stdout.exp cet_nops_gs.vgtest check_PROGRAMS = \ bug341419 \ diff --git a/none/tests/x86-darwin/cet_nops_gs.stderr.exp b/none/tests/x86-darwin/cet_nops_gs.stderr.exp deleted file mode 120000 index f3afb8fe9..000000000 --- a/none/tests/x86-darwin/cet_nops_gs.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../x86-linux/cet_nops_gs.stderr.exp \ No newline at end of file diff --git a/none/tests/x86-freebsd/Makefile.am b/none/tests/x86-freebsd/Makefile.am index e65dc0941..bf63d0dfc 100644 --- a/none/tests/x86-freebsd/Makefile.am +++ b/none/tests/x86-freebsd/Makefile.am @@ -3,8 +3,7 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr EXTRA_DIST = \ - bug445032.vgtest \ - bug445032.stderr.exp + bug445032.vgtest check_PROGRAMS = \ bug445032 diff --git a/none/tests/x86-freebsd/bug445032.stderr.exp b/none/tests/x86-freebsd/bug445032.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86-linux/Makefile.am b/none/tests/x86-linux/Makefile.am index 21953ff79..304c75dfe 100644 --- a/none/tests/x86-linux/Makefile.am +++ b/none/tests/x86-linux/Makefile.am @@ -6,8 +6,8 @@ dist_noinst_SCRIPTS = \ EXTRA_DIST = \ bug345887.stderr.exp bug345887.vgtest \ - cet_nops_fs.stderr.exp cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ - cet_nops_gs.stderr.exp cet_nops_gs.stdout.exp cet_nops_gs.vgtest \ + cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ + cet_nops_gs.stdout.exp cet_nops_gs.vgtest \ hang.stderr.exp hang.vgtest \ seg_override.stderr.exp seg_override.stdout.exp seg_override.vgtest \ sigcontext.stdout.exp sigcontext.stderr.exp sigcontext.vgtest diff --git a/none/tests/x86-linux/cet_nops_fs.stderr.exp b/none/tests/x86-linux/cet_nops_fs.stderr.exp deleted file mode 120000 index e39731afd..000000000 --- a/none/tests/x86-linux/cet_nops_fs.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../amd64-linux/cet_nops_fs.stderr.exp \ No newline at end of file diff --git a/none/tests/x86-linux/cet_nops_gs.stderr.exp b/none/tests/x86-linux/cet_nops_gs.stderr.exp deleted file mode 120000 index 11324e9d6..000000000 --- a/none/tests/x86-linux/cet_nops_gs.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../amd64-linux/cet_nops_gs.stderr.exp \ No newline at end of file diff --git a/none/tests/x86-solaris/Makefile.am b/none/tests/x86-solaris/Makefile.am index 03b68104b..eb5b024c7 100644 --- a/none/tests/x86-solaris/Makefile.am +++ b/none/tests/x86-solaris/Makefile.am @@ -7,13 +7,13 @@ dist_noinst_SCRIPTS = \ filter_stderr EXTRA_DIST = \ - cet_nops_fs.stderr.exp cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ + cet_nops_fs.stdout.exp cet_nops_fs.vgtest \ coredump_single_thread.post.exp coredump_single_thread.stderr.exp \ coredump_single_thread.vgtest \ coredump_single_thread_sse.post.exp coredump_single_thread_sse.stderr.exp \ coredump_single_thread_sse.vgtest \ coredump_single_thread_sse.post.exp-illumos \ - syscalls.stderr.exp syscalls.vgtest + syscalls.vgtest check_PROGRAMS = \ cet_nops_fs \ diff --git a/none/tests/x86-solaris/cet_nops_fs.stderr.exp b/none/tests/x86-solaris/cet_nops_fs.stderr.exp deleted file mode 120000 index 171df2186..000000000 --- a/none/tests/x86-solaris/cet_nops_fs.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../x86-linux/cet_nops_fs.stderr.exp \ No newline at end of file diff --git a/none/tests/x86-solaris/syscalls.stderr.exp b/none/tests/x86-solaris/syscalls.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/Makefile.am b/none/tests/x86/Makefile.am index d0f704816..a0d805d2b 100644 --- a/none/tests/x86/Makefile.am +++ b/none/tests/x86/Makefile.am @@ -29,22 +29,22 @@ endif ## FIXME: move lzcnt32 to SSE4 conditionalisation, when that happens. EXTRA_DIST = \ - aad_aam.stdout.exp aad_aam.stderr.exp aad_aam.vgtest \ + aad_aam.stdout.exp aad_aam.vgtest \ badseg.stderr.exp badseg.stdout.exp badseg.stdout.exp-solaris \ badseg.vgtest \ - bswapw.stderr.exp bswapw.stdout.exp bswapw.vgtest \ + bswapw.stdout.exp bswapw.vgtest \ bt_everything.stderr.exp bt_everything.stdout.exp bt_everything.vgtest \ bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \ bug125959-x86.stderr.exp bug125959-x86.stdout.exp bug125959-x86.vgtest \ bug126147-x86.stderr.exp bug126147-x86.stdout.exp bug126147-x86.vgtest \ bug132813-x86.stderr.exp bug132813-x86.stdout.exp bug132813-x86.vgtest \ bug135421-x86.stderr.exp bug135421-x86.stdout.exp bug135421-x86.vgtest \ - bug137714-x86.stderr.exp bug137714-x86.stdout.exp bug137714-x86.vgtest \ + bug137714-x86.stdout.exp bug137714-x86.vgtest \ bug152818-x86.stderr.exp bug152818-x86.stdout.exp bug152818-x86.vgtest \ - cet_nops.stderr.exp cet_nops.stdout.exp cet_nops.vgtest \ + cet_nops.stdout.exp cet_nops.vgtest \ cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \ cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \ - cse_fail.stderr.exp cse_fail.stdout.exp cse_fail.vgtest \ + cse_fail.stdout.exp cse_fail.vgtest \ faultstatus.disabled faultstatus.stderr.exp \ fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \ fpu_lazy_eflags.stderr.exp fpu_lazy_eflags.stdout.exp \ @@ -52,34 +52,31 @@ EXTRA_DIST = \ fxtract.stdout.exp fxtract.stderr.exp fxtract.vgtest \ fxtract.stdout.exp-older-glibc \ getseg.stdout.exp getseg.stderr.exp getseg.vgtest \ - gnu_binutils_nop.stderr.exp gnu_binutils_nop.vgtest \ + gnu_binutils_nop.vgtest \ incdec_alt.stdout.exp incdec_alt.stderr.exp incdec_alt.vgtest \ int.stderr.exp int.disabled \ - $(addsuffix .stderr.exp,$(INSN_TESTS)) \ $(addsuffix .stdout.exp,$(INSN_TESTS)) \ $(addsuffix .vgtest,$(INSN_TESTS)) \ - insn_fpu.stdout.exp insn_fpu.stderr.exp insn_fpu.vgtest \ - insn_sse.stdout.exp insn_sse.stderr.exp insn_sse.vgtest \ - insn_sse2.stdout.exp insn_sse2.stderr.exp insn_sse2.vgtest \ - insn_sse3.stdout.exp insn_sse3.stderr.exp insn_sse3.vgtest \ - insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \ - jcxz.stdout.exp jcxz.stderr.exp jcxz.vgtest \ + insn_fpu.stdout.exp insn_fpu.vgtest \ + insn_sse3.stdout.exp insn_sse3.vgtest \ + insn_ssse3.stdout.exp insn_ssse3.vgtest \ + jcxz.stdout.exp jcxz.vgtest \ lahf.stdout.exp lahf.stderr.exp lahf.vgtest \ looper.stderr.exp looper.stdout.exp looper.vgtest \ - lzcnt32.stderr.exp lzcnt32.stdout.exp lzcnt32.vgtest \ + lzcnt32.stdout.exp lzcnt32.vgtest \ movx.stderr.exp movx.stdout.exp movx.vgtest \ - movbe.stderr.exp movbe.stdout.exp movbe.vgtest \ + movbe.stdout.exp movbe.vgtest \ pushpopseg.stderr.exp pushpopseg.stdout.exp pushpopseg.vgtest \ sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \ shift_ndep.stderr.exp shift_ndep.stdout.exp shift_ndep.vgtest \ smc1.stderr.exp smc1.stdout.exp smc1.vgtest \ ssse3_misaligned.stderr.exp \ ssse3_misaligned.vgtest ssse3_misaligned.c \ - sse4-x86.stdout.exp sse4-x86.stderr.exp sse4-x86.vgtest \ + sse4-x86.stdout.exp sse4-x86.vgtest \ x86locked.vgtest x86locked.stdout.exp x86locked.stderr.exp \ x87trigOOR.vgtest x87trigOOR.stdout.exp x87trigOOR.stderr.exp \ yield.stderr.exp yield.stdout.exp yield.disabled \ - xadd.stdout.exp xadd.stderr.exp xadd.vgtest + xadd.stdout.exp xadd.vgtest check_PROGRAMS = \ aad_aam \ diff --git a/none/tests/x86/aad_aam.stderr.exp b/none/tests/x86/aad_aam.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/bswapw.stderr.exp b/none/tests/x86/bswapw.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/bug137714-x86.stderr.exp b/none/tests/x86/bug137714-x86.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/cet_nops.stderr.exp b/none/tests/x86/cet_nops.stderr.exp deleted file mode 120000 index 012b19971..000000000 --- a/none/tests/x86/cet_nops.stderr.exp +++ /dev/null @@ -1 +0,0 @@ -../amd64/cet_nops.stderr.exp \ No newline at end of file diff --git a/none/tests/x86/cse_fail.stderr.exp b/none/tests/x86/cse_fail.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/gnu_binutils_nop.stderr.exp b/none/tests/x86/gnu_binutils_nop.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_basic.stderr.exp b/none/tests/x86/insn_basic.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_cmov.stderr.exp b/none/tests/x86/insn_cmov.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_fpu.stderr.exp b/none/tests/x86/insn_fpu.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_mmx.stderr.exp b/none/tests/x86/insn_mmx.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_mmxext.stderr.exp b/none/tests/x86/insn_mmxext.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_sse.stderr.exp b/none/tests/x86/insn_sse.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_sse2.stderr.exp b/none/tests/x86/insn_sse2.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_sse3.stderr.exp b/none/tests/x86/insn_sse3.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/insn_ssse3.stderr.exp b/none/tests/x86/insn_ssse3.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/jcxz.stderr.exp b/none/tests/x86/jcxz.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/lzcnt32.stderr.exp b/none/tests/x86/lzcnt32.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/movbe.stderr.exp b/none/tests/x86/movbe.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/sse4-x86.stderr.exp b/none/tests/x86/sse4-x86.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/none/tests/x86/xadd.stderr.exp b/none/tests/x86/xadd.stderr.exp deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in index 9bc95fcbb..6ef0b7107 100644 --- a/tests/vg_regtest.in +++ b/tests/vg_regtest.in @@ -96,8 +96,8 @@ # # Expected stdout (filtered) is kept in .stdout.exp* (can be more # than one expected output). It can be missing if it would be empty. Expected -# stderr (filtered) is kept in .stderr.exp*. There must be at least -# one stderr.exp* file. Any .exp* file that ends in '~' or '#' is ignored; +# stderr (filtered) is kept in .stderr.exp*. It can be missing if it +# would be empty. Any .exp* file that ends in '~' or '#' is ignored; # this is because Emacs creates temporary files of these names. # # Expected output for progB is handled similarly, except that @@ -315,10 +315,11 @@ sub read_vgtest_file($) ($stdout_filter_args, $stderr_filter_args) = (undef, undef); ($stdoutB_filter_args, $stderrB_filter_args) = (undef, undef); - # Every test directory must have a "filter_stderr" - $stderr_filter = validate_program(".", $default_stderr_filter, 1, 1); - $stderrB_filter = validate_program(".", $default_stderr_filter, 1, 1); - + # stderr[B] filters are undefined initially. If they are still undefined + # after processing the .vgtest file, the default_stderr_filter will + # be used. + $stderr_filter = undef; + $stderrB_filter = undef; open(INPUTFILE, "< $f") || die "File $f not openable\n"; @@ -338,7 +339,11 @@ sub read_vgtest_file($) } elsif ($line =~ /^\s*stdout_filter:\s*(.*)$/) { $stdout_filter = validate_program(".", $1, 1, 1); } elsif ($line =~ /^\s*stderr_filter:\s*(.*)$/) { - $stderr_filter = validate_program(".", $1, 1, 1); + if (length $1 != 0) { + $stderr_filter = validate_program(".", $1, 1, 1); + } else { + $stderr_filter = $1; + } } elsif ($line =~ /^\s*stdout_filter_args:\s*(.*)$/) { $stdout_filter_args = $1; } elsif ($line =~ /^\s*stderr_filter_args:\s*(.*)$/) { @@ -352,7 +357,11 @@ sub read_vgtest_file($) } elsif ($line =~ /^\s*stdoutB_filter:\s*(.*)$/) { $stdoutB_filter = validate_program(".", $1, 1, 1); } elsif ($line =~ /^\s*stderrB_filter:\s*(.*)$/) { - $stderrB_filter = validate_program(".", $1, 1, 1); + if (length $1 != 0) { + $stderrB_filter = validate_program(".", $1, 1, 1); + } else { + $stderrB_filter = $1; + } } elsif ($line =~ /^\s*stdoutB_filter_args:\s*(.*)$/) { $stdoutB_filter_args = $1; } elsif ($line =~ /^\s*stderrB_filter_args:\s*(.*)$/) { @@ -376,6 +385,20 @@ sub read_vgtest_file($) if (!defined $prog) { $prog = ""; # allow no prog for testing error and --help cases } + + if (!defined $stderr_filter) { + # No filter was specified use the default one. + $stderr_filter = validate_program(".", $default_stderr_filter, 1, 1); + } elsif (length $stderr_filter == 0) { + # Encountered a line stderr_filter: + # with no filter name specified. This means filtering is not wanted. + $stderr_filter = undef; + } + if (!defined $stderrB_filter) { + $stderrB_filter = validate_program(".", $default_stderr_filter, 1, 1); + } elsif (length $stderrB_filter == 0) { + $stderrB_filter = undef; + } } #---------------------------------------------------------------------------- @@ -579,13 +602,15 @@ sub do_one_test($$) if (defined $diffrc) { $rc = $diffrc; } # Filter stderr - $stderr_filter_args = $name if (! defined $stderr_filter_args); - mysystem(*VGTESTLOG, - "$stderr_filter $stderr_filter_args < $name.stderr.out > $tmp"); - filtered_rename($tmp, "$name.stderr.out", *VGTESTLOG); - # Find all the .stderr.exp files. At least one must exist. + if (defined $stderr_filter) { + $stderr_filter_args = $name if (! defined $stderr_filter_args); + mysystem(*VGTESTLOG, + "$stderr_filter $stderr_filter_args < $name.stderr.out > $tmp"); + filtered_rename($tmp, "$name.stderr.out", *VGTESTLOG); + } + # Find all the .stderr.exp files. If none, use /dev/null. my @stderr_exps = <$name.stderr.exp*>; - (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n"; + @stderr_exps = ( "/dev/null" ) if (0 == scalar @stderr_exps); $diffrc = do_diffs($fullname, $name, "stderr", *VGTESTLOG, \@stderr_exps); if (defined $diffrc) { $rc = $diffrc; } @@ -627,13 +652,15 @@ sub do_one_test($$) if (defined $diffrc) { $rc = $diffrc; } # Filter stderr - $stderrB_filter_args = $name if (! defined $stderrB_filter_args); - mysystem(*VGTESTLOG, - "$stderrB_filter $stderrB_filter_args < $name.stderrB.out > $tmp"); - filtered_rename($tmp, "$name.stderrB.out", *VGTESTLOG); - # Find all the .stderrB.exp files. At least one must exist. + if (defined $stderrB_filter) { + $stderrB_filter_args = $name if (! defined $stderrB_filter_args); + mysystem(*VGTESTLOG, + "$stderrB_filter $stderrB_filter_args < $name.stderrB.out > $tmp"); + filtered_rename($tmp, "$name.stderrB.out", *VGTESTLOG); + } + # Find all the .stderrB.exp files. If none, use /dev/null. my @stderrB_exps = <$name.stderrB.exp*>; - (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n"; + @stderrB_exps = ( "/dev/null" ) if (0 == scalar @stderrB_exps); $diffrc = do_diffs($fullname, $name, "stderrB", *VGTESTLOG, \@stderrB_exps); if (defined $diffrc) { $rc = $diffrc; } } From 56e77f5012c3cb7650fb973516cb99898c2bf8fc Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 11 Jan 2026 21:52:10 +0000 Subject: [PATCH 236/502] Makefile.am: Remove perl prefix from vg_perf and vg_regtest Those scripts are executable. Cf. b5b7e0238af --- Makefile.am | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index abac4d203..3f38a6ba3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,11 +73,10 @@ default.supp: $(DEFAULT_SUPP_FILES) echo "# " $(DEFAULT_SUPP_FILES) >> default.supp cat $^ >> default.supp -## Preprend @PERL@ because tests/vg_regtest isn't executable -## Ensure make exits with error if PERL fails or post_regtest_checks fails. +## Ensure make exits with error if vg_regtest fails or post_regtest_checks fails. regtest: check $(top_srcdir)/gdbserver_tests/make_local_links $(GDB) - if @PERL@ tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS) ; then \ + if tests/vg_regtest gdbserver_tests $(TOOLS) $(EXP_TOOLS) ; then \ tests/post_regtest_checks $(abs_top_srcdir) gdbserver_tests $(TOOLS) $(EXP_TOOLS); \ else \ tests/post_regtest_checks $(abs_top_srcdir) gdbserver_tests $(TOOLS) $(EXP_TOOLS); \ @@ -86,16 +85,15 @@ regtest: check post-regtest-checks: tests/post_regtest_checks $(abs_top_srcdir) gdbserver_tests $(TOOLS) $(EXP_TOOLS) nonexp-regtest: check - @PERL@ tests/vg_regtest $(TOOLS) + tests/vg_regtest $(TOOLS) exp-regtest: check - @PERL@ tests/vg_regtest gdbserver_tests $(EXP_TOOLS) + tests/vg_regtest gdbserver_tests $(EXP_TOOLS) # Nb: gdbserver_tests are put in exp-regtest rather than nonexp-regtest # because they are tested with various valgrind tools, so might be using # an experimental tool. -## Preprend @PERL@ because tests/vg_perf isn't executable perf: check - @PERL@ perf/vg_perf perf + perf/vg_perf perf # Auxiliary test suites run under valgrind auxchecks: all From e36477ddf79b439cd48559bbbfd6e0553e1041f8 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 12 Jan 2026 14:12:09 +0000 Subject: [PATCH 237/502] Clarify a comment. --- none/tests/s390x/disasm-test/opcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/s390x/disasm-test/opcode.c b/none/tests/s390x/disasm-test/opcode.c index 3623e8ecb..12af90f6a 100644 --- a/none/tests/s390x/disasm-test/opcode.c +++ b/none/tests/s390x/disasm-test/opcode.c @@ -118,7 +118,7 @@ */ /* List of all supported opcodes in the order as defined in - Principles of Operations. */ + Principles of Operations -- Fourteenth Edition (May, 2022). */ static const char *opcodes[] = { // Chapter 7: General Instructions From f7a7804cdf4fa7c0388a4570b9fdeb0651cabb7f Mon Sep 17 00:00:00 2001 From: Petar Jovanovic Date: Tue, 13 Jan 2026 16:20:36 +0000 Subject: [PATCH 238/502] mips: Add missing syscalls for mips32 and mips64 Adding several syscall defines for mips32 and mips64. This fixes a build break for mips variants. --- include/vki/vki-scnums-mips32-linux.h | 5 +++++ include/vki/vki-scnums-mips64-linux.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/vki/vki-scnums-mips32-linux.h b/include/vki/vki-scnums-mips32-linux.h index 539db119b..d30cbf46c 100644 --- a/include/vki/vki-scnums-mips32-linux.h +++ b/include/vki/vki-scnums-mips32-linux.h @@ -462,7 +462,12 @@ #define __NR_fchmodat2 (__NR_Linux + 452) #define __NR_statmount (__NR_Linux + 457) #define __NR_listmount (__NR_Linux + 458) +#define __NR_lsm_get_self_attr (__NR_Linux + 459) +#define __NR_lsm_set_self_attr (__NR_Linux + 460) +#define __NR_lsm_list_modules (__NR_Linux + 461) #define __NR_mseal (__NR_Linux + 462) +#define __NR_file_getattr (__NR_Linux + 468) +#define __NR_file_setattr (__NR_Linux + 469) /* * Offset of the last Linux o32 flavoured syscall */ diff --git a/include/vki/vki-scnums-mips64-linux.h b/include/vki/vki-scnums-mips64-linux.h index a8fb5e2a8..0e2f34153 100644 --- a/include/vki/vki-scnums-mips64-linux.h +++ b/include/vki/vki-scnums-mips64-linux.h @@ -402,6 +402,8 @@ #define __NR_lsm_set_self_attr (__NR_Linux + 460) #define __NR_lsm_list_modules (__NR_Linux + 461) #define __NR_mseal (__NR_Linux + 462) +#define __NR_file_getattr (__NR_Linux + 468) +#define __NR_file_setattr (__NR_Linux + 469) #elif defined(VGABI_N32) @@ -800,6 +802,9 @@ #define __NR_lsm_get_self_attr (__NR_Linux + 459) #define __NR_lsm_set_self_attr (__NR_Linux + 460) #define __NR_lsm_list_modules (__NR_Linux + 461) +#define __NR_mseal (__NR_Linux + 462) +#define __NR_file_getattr (__NR_Linux + 468) +#define __NR_file_setattr (__NR_Linux + 469) #else #error unknown mips64 abi From 23f625e4b505145865f0a276dfc74a377bd4e929 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 14 Jan 2026 09:00:07 +0100 Subject: [PATCH 239/502] FreeBSD syswrap: utimensat timespec can be NULL --- coregrind/m_syswrap/syswrap-freebsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index e1c1dcc14..2870b4eb7 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -6281,7 +6281,8 @@ PRE(sys_utimensat) int, flag); ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "utimensat", tid, status); PRE_MEM_RASCIIZ("utimensat(path)", ARG2); - PRE_MEM_READ("utimensat(times)", ARG3, 2*sizeof(struct vki_timespec)); + if (ARG3) + PRE_MEM_READ("utimensat(times)", ARG3, 2*sizeof(struct vki_timespec)); } // SYS_fdatasync 550 From 2269652fbac5d827d33467bdc04e8c469a5d23df Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 14 Jan 2026 20:38:12 +0100 Subject: [PATCH 240/502] FreeBSD syscall: faccessat has 4 arguments, not 3 --- coregrind/m_syswrap/syswrap-freebsd.c | 11 ++++++----- memcheck/tests/freebsd/scalar.c | 4 ++-- memcheck/tests/freebsd/scalar.stderr.exp | 5 ++++- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 5 ++++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 2870b4eb7..a69fb4fb2 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -5111,9 +5111,9 @@ PRE(sys_shm_open) PRE_REG_READ3(int, "shm_open", const char *, path, int, flags, vki_mode_t, mode); if (ARG1 == VKI_SHM_ANON) { - PRINT("sys_shm_open(%#" FMT_REGWORD "x(SHM_ANON), %" FMT_REGWORD "u, %hu)", ARG1, ARG2, (vki_mode_t)ARG3); + PRINT("sys_shm_open(%#" FMT_REGWORD "x(SHM_ANON), %" FMT_REGWORD "d, %hu)", ARG1, SARG2, (vki_mode_t)ARG3); } else { - PRINT("sys_shm_open(%#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u, %hu)", ARG1, (HChar *)ARG1, ARG2, (vki_mode_t)ARG3); + PRINT("sys_shm_open(%#" FMT_REGWORD "x(%s), %" FMT_REGWORD "d, %hu)", ARG1, (HChar *)ARG1, SARG2, (vki_mode_t)ARG3); PRE_MEM_RASCIIZ( "shm_open(path)", ARG1 ); } *flags |= SfMayBlock; @@ -5176,9 +5176,10 @@ POST(sys_cpuset) // int faccessat(int fd, const char *path, int mode, int flag); PRE(sys_faccessat) { - PRINT("sys_faccessat ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u )", ARG1,ARG2,(char*)ARG2,ARG3); - PRE_REG_READ3(int, "faccessat", - int, fd, const char *, path, int, flag); + PRINT("sys_faccessat ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "d, %" FMT_REGWORD "d )", + ARG1, ARG2,(char*)ARG2, SARG3, SARG4); + PRE_REG_READ4(int, "faccessat", + int, fd, const char *, path, int, mode, int, flag); ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "faccessat", tid, status); PRE_MEM_RASCIIZ( "faccessat(path)", ARG2 ); } diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index b4d7a46d1..7f8504c7f 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -1826,8 +1826,8 @@ int main(void) SY(SYS_cpuset_setaffinity, x0+100, x0+100, x0+200, x0+500, x0+1); FAIL; /* SYS_faccessat 489 */ - GO(SYS_faccessat, "3s 1m"); - SY(SYS_faccessat, x0+1, x0, x0); FAIL; + GO(SYS_faccessat, "4s 1m"); + SY(SYS_faccessat, x0+1, x0, x0, x0); FAIL; /* SYS_fchmodat 490 */ GO(SYS_fchmodat, "4s 1m"); diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 449075f3e..61b4e9ff6 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -4129,7 +4129,7 @@ Syscall param cpuset_setaffinity points to unaddressable byte(s) Address 0x........ is not stack'd, malloc'd or (recently) free'd --------------------------------------------------------- -489: SYS_faccessat 3s 1m +489: SYS_faccessat 4s 1m --------------------------------------------------------- Syscall param faccessat(fd) contains uninitialised byte(s) ... @@ -4137,6 +4137,9 @@ Syscall param faccessat(fd) contains uninitialised byte(s) Syscall param faccessat(path) contains uninitialised byte(s) ... +Syscall param faccessat(mode) contains uninitialised byte(s) + ... + Syscall param faccessat(flag) contains uninitialised byte(s) ... diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index e7e2ce0a6..e45da9912 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -4168,7 +4168,7 @@ Syscall param cpuset_setaffinity points to unaddressable byte(s) Address 0x........ is not stack'd, malloc'd or (recently) free'd --------------------------------------------------------- -489: SYS_faccessat 3s 1m +489: SYS_faccessat 4s 1m --------------------------------------------------------- Syscall param faccessat(fd) contains uninitialised byte(s) ... @@ -4176,6 +4176,9 @@ Syscall param faccessat(fd) contains uninitialised byte(s) Syscall param faccessat(path) contains uninitialised byte(s) ... +Syscall param faccessat(mode) contains uninitialised byte(s) + ... + Syscall param faccessat(flag) contains uninitialised byte(s) ... From a98535d28525ad58104f5e759c689aec01d6e44e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 15 Jan 2026 07:30:20 +0100 Subject: [PATCH 241/502] FreeBSD regtest: update expected for access test For the previously incorrectly unchecked 4th argument that I added yesterday. --- memcheck/tests/freebsd/access.stderr.exp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/memcheck/tests/freebsd/access.stderr.exp b/memcheck/tests/freebsd/access.stderr.exp index 89166dcc3..6cf476268 100644 --- a/memcheck/tests/freebsd/access.stderr.exp +++ b/memcheck/tests/freebsd/access.stderr.exp @@ -32,6 +32,10 @@ Syscall param faccessat(fd) contains uninitialised byte(s) at 0x........: faccessat (in /...libc...) by 0x........: main (access.c:39) +Syscall param faccessat(mode) contains uninitialised byte(s) + at 0x........: faccessat (in /...libc...) + by 0x........: main (access.c:39) + Syscall param faccessat(flag) contains uninitialised byte(s) at 0x........: faccessat (in /...libc...) by 0x........: main (access.c:39) From 758b0f55e878fd7bd9dcd1ff3e74f10a7a00a771 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 15 Jan 2026 08:44:52 +0100 Subject: [PATCH 242/502] Bug 514613 - Unclosed leak_summary/still_reachable tag in xml output --- NEWS | 3 ++- memcheck/mc_leakcheck.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d5188f7c6..3f6667fed 100644 --- a/NEWS +++ b/NEWS @@ -67,7 +67,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 513522 m_libcassert.c: 'ordered comparison of pointer with integer zero' compiler warning 513475 Add SSE4.1 PMULLD instruction for x86 32 bit -514094 readlink("/proc/self/exe") overwrites buffer beyond its return value +514094 readlink("/proc/self/exe") overwrites buffer beyond its return value +514613 Unclosed leak_summary/still_reachable tag in xml output To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/memcheck/mc_leakcheck.c b/memcheck/mc_leakcheck.c index 586bff448..4df0b180d 100644 --- a/memcheck/mc_leakcheck.c +++ b/memcheck/mc_leakcheck.c @@ -1768,7 +1768,8 @@ static void print_results(ThreadId tid, LeakCheckParams* lcp) umsg_or_xml(VG_(clo_xml) ? " \n" " %'lu%s\n" - " %'lu%s\n" : + " %'lu%s\n" + " \n" : " still reachable: %'lu%s bytes in %'lu%s blocks\n", MC_(bytes_reachable), DBY (MC_(bytes_reachable), old_bytes_reachable), From fa21e88ac38994435ad592fec5595db36cba2356 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 09:19:10 +0000 Subject: [PATCH 243/502] s390: Remove s390_format_RR and friends. This patch removes the functions: s390_format_RR, s390_format_RR_RR and s390_format_RR_FF. First, because of the disassembly changes in 370531396ad there is no longer a need to specialise s390_format_RR because the register class of its operands is now irrelevant. Hence s390_format_RR_RR and s390_format_RR_FF can go. Secondly, s390_irgen_RR only calls the function pointer being passed in. So we can call that function directly and s390_irgen_RR can go as well. The same reasoning also applies to other opcode formats. Patches will follow soon. Having several installments gives a chance to actually proofread them. --- VEX/priv/guest_s390_toIR.c | 113 +++++++++++++++---------------------- 1 file changed, 46 insertions(+), 67 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 11c50dc00..e9a4ea713 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2885,27 +2885,6 @@ s390_format_RIS_RURDU(void (*irgen)(UChar r1, UChar m3, UChar i2, irgen(r1, m3, i2, op4addr); } -static void -s390_format_RR(void (*irgen)(UChar r1, UChar r2), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - -static void -s390_format_RR_RR(void (*irgen)(UChar r1, UChar r2), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - -static void -s390_format_RR_FF(void (*irgen)(UChar r1, UChar r2), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - static void s390_format_RRE(void (*irgen)(UChar r1, UChar r2), UChar r1, UChar r2) @@ -18216,51 +18195,51 @@ s390_decode_2byte_and_irgen(const UChar *bytes) switch ((ovl & 0xff00) >> 8) { case 0x04: /* SPM */ goto unimplemented; case 0x05: /* BALR */ goto unimplemented; - case 0x06: s390_format_RR_RR(s390_irgen_BCTR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x07: s390_format_RR(s390_irgen_BCR, RR_r1(ovl), RR_r2(ovl)); - goto ok; + case 0x06: s390_irgen_BCTR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x07: s390_irgen_BCR(RR_r1(ovl), RR_r2(ovl)); + goto ok; case 0x0a: s390_format_I(s390_irgen_SVC, I_i(ovl)); goto ok; case 0x0b: /* BSM */ goto unimplemented; case 0x0c: /* BASSM */ goto unimplemented; - case 0x0d: s390_format_RR_RR(s390_irgen_BASR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x0e: s390_format_RR_RR(s390_irgen_MVCL, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x0f: s390_format_RR_RR(s390_irgen_CLCL, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x10: s390_format_RR_RR(s390_irgen_LPR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x11: s390_format_RR_RR(s390_irgen_LNR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x12: s390_format_RR_RR(s390_irgen_LTR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x13: s390_format_RR_RR(s390_irgen_LCR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x14: s390_format_RR_RR(s390_irgen_NR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x15: s390_format_RR_RR(s390_irgen_CLR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x16: s390_format_RR_RR(s390_irgen_OR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x17: s390_format_RR_RR(s390_irgen_XR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x18: s390_format_RR_RR(s390_irgen_LR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x19: s390_format_RR_RR(s390_irgen_CR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x1a: s390_format_RR_RR(s390_irgen_AR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x1b: s390_format_RR_RR(s390_irgen_SR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x1c: s390_format_RR_RR(s390_irgen_MR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x1d: s390_format_RR_RR(s390_irgen_DR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x1e: s390_format_RR_RR(s390_irgen_ALR, RR_r1(ovl), RR_r2(ovl)); - goto ok; - case 0x1f: s390_format_RR_RR(s390_irgen_SLR, RR_r1(ovl), RR_r2(ovl)); - goto ok; + case 0x0d: s390_irgen_BASR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x0e: s390_irgen_MVCL(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x0f: s390_irgen_CLCL(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x10: s390_irgen_LPR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x11: s390_irgen_LNR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x12: s390_irgen_LTR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x13: s390_irgen_LCR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x14: s390_irgen_NR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x15: s390_irgen_CLR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x16: s390_irgen_OR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x17: s390_irgen_XR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x18: s390_irgen_LR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x19: s390_irgen_CR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x1a: s390_irgen_AR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x1b: s390_irgen_SR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x1c: s390_irgen_MR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x1d: s390_irgen_DR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x1e: s390_irgen_ALR(RR_r1(ovl), RR_r2(ovl)); + goto ok; + case 0x1f: s390_irgen_SLR(RR_r1(ovl), RR_r2(ovl)); + goto ok; case 0x20: /* LPDR */ goto unimplemented; case 0x21: /* LNDR */ goto unimplemented; case 0x22: /* LTDR */ goto unimplemented; @@ -18269,8 +18248,8 @@ s390_decode_2byte_and_irgen(const UChar *bytes) case 0x25: /* LDXR */ goto unimplemented; case 0x26: /* MXR */ goto unimplemented; case 0x27: /* MXDR */ goto unimplemented; - case 0x28: s390_format_RR_FF(s390_irgen_LDR, RR_r1(ovl), RR_r2(ovl)); - goto ok; + case 0x28: s390_irgen_LDR(RR_r1(ovl), RR_r2(ovl)); + goto ok; case 0x29: /* CDR */ goto unimplemented; case 0x2a: /* ADR */ goto unimplemented; case 0x2b: /* SDR */ goto unimplemented; @@ -18286,8 +18265,8 @@ s390_decode_2byte_and_irgen(const UChar *bytes) case 0x35: /* LEDR */ goto unimplemented; case 0x36: /* AXR */ goto unimplemented; case 0x37: /* SXR */ goto unimplemented; - case 0x38: s390_format_RR_FF(s390_irgen_LER, RR_r1(ovl), RR_r2(ovl)); - goto ok; + case 0x38: s390_irgen_LER(RR_r1(ovl), RR_r2(ovl)); + goto ok; case 0x39: /* CER */ goto unimplemented; case 0x3a: /* AER */ goto unimplemented; case 0x3b: /* SER */ goto unimplemented; From 07c803d13eea428dbddd8b2a404ae307f60fa020 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 10:08:59 +0000 Subject: [PATCH 244/502] s390: Remove s390_format_RRE and friends. This patch removes the functions: s390_format_RRE, s390_format_RRE_RR, s390_format_RRE_FF, s390_format_RRE_RF, s390_format_RRE_FR, s390_irgen_RRE_R0 and s390_irgen_RRE_F0. Cf. fa21e88ac38 for a rationale. --- VEX/priv/guest_s390_toIR.c | 580 +++++++++++++++++-------------------- 1 file changed, 270 insertions(+), 310 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index e9a4ea713..2ae09ef76 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2885,55 +2885,6 @@ s390_format_RIS_RURDU(void (*irgen)(UChar r1, UChar m3, UChar i2, irgen(r1, m3, i2, op4addr); } -static void -s390_format_RRE(void (*irgen)(UChar r1, UChar r2), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - -static void -s390_format_RRE_RR(void (*irgen)(UChar r1, UChar r2), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - -static void -s390_format_RRE_FF(void (*irgen)(UChar r1, UChar r2), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - -static void -s390_format_RRE_RF(void (*irgen)(UChar, UChar), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - -static void -s390_format_RRE_FR(void (*irgen)(UChar r1, UChar r2), - UChar r1, UChar r2) -{ - irgen(r1, r2); -} - -static void -s390_format_RRE_R0(void (*irgen)(UChar r1), - UChar r1) -{ - irgen(r1); -} - -static void -s390_format_RRE_F0(void (*irgen)(UChar r1), - UChar r1) -{ - irgen(r1); -} - static void s390_format_RRF_M0RERE(void (*irgen)(UChar m3, UChar r1, UChar r2), UChar m3, UChar r1, UChar r2) @@ -18383,7 +18334,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb219: /* SAC */ goto unimplemented; case 0xb21a: /* CFC */ goto unimplemented; case 0xb221: /* IPTE */ goto unimplemented; - case 0xb222: s390_format_RRE_R0(s390_irgen_IPM, RRE_r1(ovl)); goto ok; + case 0xb222: s390_irgen_IPM(RRE_r1(ovl)); + goto ok; case 0xb223: /* IVSK */ goto unimplemented; case 0xb224: /* IAC */ goto unimplemented; case 0xb225: /* SSAR */ goto unimplemented; @@ -18411,8 +18363,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb23b: /* RCHP */ goto unimplemented; case 0xb23c: /* SCHM */ goto unimplemented; case 0xb240: /* BAKR */ goto unimplemented; - case 0xb241: s390_format_RRE_RR(s390_irgen_CKSM, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb241: s390_irgen_CKSM(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb244: /* SQDR */ goto unimplemented; case 0xb245: /* SQER */ goto unimplemented; case 0xb246: /* STURA */ goto unimplemented; @@ -18422,25 +18374,25 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb24a: /* ESTA */ goto unimplemented; case 0xb24b: /* LURA */ goto unimplemented; case 0xb24c: /* TAR */ goto unimplemented; - case 0xb24d: s390_format_RRE(s390_irgen_CPYA, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb24e: s390_format_RRE(s390_irgen_SAR, RRE_r1(ovl), RRE_r2(ovl)); - goto ok; - case 0xb24f: s390_format_RRE(s390_irgen_EAR, RRE_r1(ovl), RRE_r2(ovl)); - goto ok; + case 0xb24d: s390_irgen_CPYA(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb24e: s390_irgen_SAR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb24f: s390_irgen_EAR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb250: /* CSP */ goto unimplemented; - case 0xb252: s390_format_RRE_RR(s390_irgen_MSR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb252: s390_irgen_MSR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb254: /* MVPG */ goto unimplemented; - case 0xb255: s390_format_RRE_RR(s390_irgen_MVST, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb255: s390_irgen_MVST(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb257: /* CUSE */ goto unimplemented; case 0xb258: /* BSG */ goto unimplemented; case 0xb25a: /* BSA */ goto unimplemented; - case 0xb25d: s390_format_RRE_RR(s390_irgen_CLST, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb25e: s390_format_RRE_RR(s390_irgen_SRST, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb25d: s390_irgen_CLST(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb25e: s390_irgen_SRST(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb263: /* CMPSC */ goto unimplemented; case 0xb274: /* SIGA */ goto unimplemented; case 0xb276: /* XSCH */ goto unimplemented; @@ -18462,7 +18414,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb29d: s390_format_S_RD(s390_irgen_LFPC, S_b2(ovl), S_d2(ovl)); goto ok; - case 0xb2a5: s390_format_RRE_RR(s390_irgen_TRE, RRE_r1(ovl), RRE_r2(ovl)); goto ok; + case 0xb2a5: s390_irgen_TRE(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb2a6: s390_format_RRF_M0RERE(s390_irgen_CU21, RRF3_r3(ovl), RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; @@ -18491,70 +18444,70 @@ s390_decode_4byte_and_irgen(const UChar *bytes) IE_i2(ovl)); goto ok; case 0xb2fc: /* TABORT */ goto unimplemented; case 0xb2ff: /* TRAP4 */ goto unimplemented; - case 0xb300: s390_format_RRE_FF(s390_irgen_LPEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb301: s390_format_RRE_FF(s390_irgen_LNEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb302: s390_format_RRE_FF(s390_irgen_LTEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb303: s390_format_RRE_FF(s390_irgen_LCEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb304: s390_format_RRE_FF(s390_irgen_LDEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb305: s390_format_RRE_FF(s390_irgen_LXDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb306: s390_format_RRE_FF(s390_irgen_LXEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb300: s390_irgen_LPEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb301: s390_irgen_LNEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb302: s390_irgen_LTEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb303: s390_irgen_LCEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb304: s390_irgen_LDEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb305: s390_irgen_LXDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb306: s390_irgen_LXEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb307: /* MXDBR */ goto unimplemented; - case 0xb308: s390_format_RRE_FF(s390_irgen_KEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb309: s390_format_RRE_FF(s390_irgen_CEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb30a: s390_format_RRE_FF(s390_irgen_AEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb30b: s390_format_RRE_FF(s390_irgen_SEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb308: s390_irgen_KEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb309: s390_irgen_CEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb30a: s390_irgen_AEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb30b: s390_irgen_SEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb30c: /* MDEBR */ goto unimplemented; - case 0xb30d: s390_format_RRE_FF(s390_irgen_DEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb30d: s390_irgen_DEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb30e: s390_format_RRF_F0FF(s390_irgen_MAEBR, RRF_r1(ovl), RRF_r3(ovl), RRF_r2(ovl)); goto ok; case 0xb30f: s390_format_RRF_F0FF(s390_irgen_MSEBR, RRF_r1(ovl), RRF_r3(ovl), RRF_r2(ovl)); goto ok; - case 0xb310: s390_format_RRE_FF(s390_irgen_LPDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb311: s390_format_RRE_FF(s390_irgen_LNDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb312: s390_format_RRE_FF(s390_irgen_LTDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb313: s390_format_RRE_FF(s390_irgen_LCDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb314: s390_format_RRE_FF(s390_irgen_SQEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb315: s390_format_RRE_FF(s390_irgen_SQDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb316: s390_format_RRE_FF(s390_irgen_SQXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb317: s390_format_RRE_FF(s390_irgen_MEEBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb318: s390_format_RRE_FF(s390_irgen_KDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb319: s390_format_RRE_FF(s390_irgen_CDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb31a: s390_format_RRE_FF(s390_irgen_ADBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb31b: s390_format_RRE_FF(s390_irgen_SDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb31c: s390_format_RRE_FF(s390_irgen_MDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb31d: s390_format_RRE_FF(s390_irgen_DDBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb310: s390_irgen_LPDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb311: s390_irgen_LNDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb312: s390_irgen_LTDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb313: s390_irgen_LCDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb314: s390_irgen_SQEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb315: s390_irgen_SQDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb316: s390_irgen_SQXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb317: s390_irgen_MEEBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb318: s390_irgen_KDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb319: s390_irgen_CDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb31a: s390_irgen_ADBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb31b: s390_irgen_SDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb31c: s390_irgen_MDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb31d: s390_irgen_DDBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb31e: s390_format_RRF_F0FF(s390_irgen_MADBR, RRF_r1(ovl), RRF_r3(ovl), RRF_r2(ovl)); goto ok; case 0xb31f: s390_format_RRF_F0FF(s390_irgen_MSDBR, RRF_r1(ovl), RRF_r3(ovl), RRF_r2(ovl)); goto ok; - case 0xb324: s390_format_RRE_FF(s390_irgen_LDER, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb324: s390_irgen_LDER(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb325: /* LXDR */ goto unimplemented; case 0xb326: /* LXER */ goto unimplemented; case 0xb32e: /* MAER */ goto unimplemented; @@ -18569,14 +18522,14 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb33d: /* MYHR */ goto unimplemented; case 0xb33e: /* MADR */ goto unimplemented; case 0xb33f: /* MSDR */ goto unimplemented; - case 0xb340: s390_format_RRE_FF(s390_irgen_LPXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb341: s390_format_RRE_FF(s390_irgen_LNXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb342: s390_format_RRE_FF(s390_irgen_LTXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb343: s390_format_RRE_FF(s390_irgen_LCXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb340: s390_irgen_LPXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb341: s390_irgen_LNXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb342: s390_irgen_LTXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb343: s390_irgen_LCXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb344: s390_format_RRF_UUFF(s390_irgen_LEDBRA, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; @@ -18589,18 +18542,18 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb347: s390_format_RRF_UUFF2(s390_irgen_FIXBRA, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; - case 0xb348: s390_format_RRE_FF(s390_irgen_KXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb349: s390_format_RRE_FF(s390_irgen_CXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb34a: s390_format_RRE_FF(s390_irgen_AXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb34b: s390_format_RRE_FF(s390_irgen_SXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb34c: s390_format_RRE_FF(s390_irgen_MXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb34d: s390_format_RRE_FF(s390_irgen_DXBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb348: s390_irgen_KXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb349: s390_irgen_CXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb34a: s390_irgen_AXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb34b: s390_irgen_SXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb34c: s390_irgen_MXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb34d: s390_irgen_DXBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb350: /* TBEDR */ goto unimplemented; case 0xb351: /* TBDR */ goto unimplemented; case 0xb353: /* DIEBR */ goto unimplemented; @@ -18617,28 +18570,33 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb361: /* LNXR */ goto unimplemented; case 0xb362: /* LTXR */ goto unimplemented; case 0xb363: /* LCXR */ goto unimplemented; - case 0xb365: s390_format_RRE_FF(s390_irgen_LXR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb365: s390_irgen_LXR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb366: /* LEXR */ goto unimplemented; case 0xb367: /* FIXR */ goto unimplemented; case 0xb369: /* CXR */ goto unimplemented; - case 0xb370: s390_format_RRE_FF(s390_irgen_LPDFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb371: s390_format_RRE_FF(s390_irgen_LNDFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb370: s390_irgen_LPDFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb371: s390_irgen_LNDFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb372: s390_format_RRF_F0FF2(s390_irgen_CPSDR, RRF3_r3(ovl), RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb373: s390_format_RRE_FF(s390_irgen_LCDFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb374: s390_format_RRE_F0(s390_irgen_LZER, RRE_r1(ovl)); goto ok; - case 0xb375: s390_format_RRE_F0(s390_irgen_LZDR, RRE_r1(ovl)); goto ok; - case 0xb376: s390_format_RRE_F0(s390_irgen_LZXR, RRE_r1(ovl)); goto ok; + case 0xb373: s390_irgen_LCDFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb374: s390_irgen_LZER(RRE_r1(ovl)); + goto ok; + case 0xb375: s390_irgen_LZDR(RRE_r1(ovl)); + goto ok; + case 0xb376: s390_irgen_LZXR(RRE_r1(ovl)); + goto ok; case 0xb377: /* FIER */ goto unimplemented; case 0xb37f: /* FIDR */ goto unimplemented; - case 0xb384: s390_format_RRE_R0(s390_irgen_SFPC, RRE_r1(ovl)); goto ok; + case 0xb384: s390_irgen_SFPC(RRE_r1(ovl)); + goto ok; case 0xb385: /* SFASR */ goto unimplemented; - case 0xb38c: s390_format_RRE_R0(s390_irgen_EFPC, RRE_r1(ovl)); goto ok; + case 0xb38c: s390_irgen_EFPC(RRE_r1(ovl)); + goto ok; case 0xb390: s390_format_RRF_UUFR(s390_irgen_CELFBR, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; @@ -18717,16 +18675,16 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb3b8: /* CFER */ goto unimplemented; case 0xb3b9: /* CFDR */ goto unimplemented; case 0xb3ba: /* CFXR */ goto unimplemented; - case 0xb3c1: s390_format_RRE_FR(s390_irgen_LDGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3c1: s390_irgen_LDGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3c4: /* CEGR */ goto unimplemented; case 0xb3c5: /* CDGR */ goto unimplemented; case 0xb3c6: /* CXGR */ goto unimplemented; case 0xb3c8: /* CGER */ goto unimplemented; case 0xb3c9: /* CGDR */ goto unimplemented; case 0xb3ca: /* CGXR */ goto unimplemented; - case 0xb3cd: s390_format_RRE_RF(s390_irgen_LGDR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3cd: s390_irgen_LGDR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3d0: s390_format_RRF_FUFF2(s390_irgen_MDTRA, RRF4_r3(ovl), RRF4_m4(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; @@ -18744,8 +18702,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb3d5: s390_format_RRF_UUFF(s390_irgen_LEDTR, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; - case 0xb3d6: s390_format_RRE_FF(s390_irgen_LTDTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3d6: s390_irgen_LTDTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3d7: /* FIDTR */ goto unimplemented; case 0xb3d8: s390_format_RRF_FUFF2(s390_irgen_MXTRA, RRF4_r3(ovl), RRF4_m4(ovl), RRF4_r1(ovl), @@ -18764,8 +18722,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb3dd: s390_format_RRF_UUFF(s390_irgen_LDXTR, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; - case 0xb3de: s390_format_RRE_FF(s390_irgen_LTXTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3de: s390_irgen_LTXTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3df: /* FIXTR */ goto unimplemented; case 0xb3e0: /* KDTR */ goto unimplemented; case 0xb3e1: s390_format_RRF_UURF(s390_irgen_CGDTRA, RRF2_m3(ovl), @@ -18773,31 +18731,31 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RRF2_r2(ovl)); goto ok; case 0xb3e2: /* CUDTR */ goto unimplemented; case 0xb3e3: /* CSDTR */ goto unimplemented; - case 0xb3e4: s390_format_RRE_FF(s390_irgen_CDTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb3e5: s390_format_RRE_RF(s390_irgen_EEDTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb3e7: s390_format_RRE_RF(s390_irgen_ESDTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3e4: s390_irgen_CDTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb3e5: s390_irgen_EEDTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb3e7: s390_irgen_ESDTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3e8: /* KXTR */ goto unimplemented; case 0xb3e9: s390_format_RRF_UURF(s390_irgen_CGXTRA, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; case 0xb3ea: /* CUXTR */ goto unimplemented; case 0xb3eb: /* CSXTR */ goto unimplemented; - case 0xb3ec: s390_format_RRE_FF(s390_irgen_CXTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb3ed: s390_format_RRE_RF(s390_irgen_EEXTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb3ef: s390_format_RRE_RF(s390_irgen_ESXTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3ec: s390_irgen_CXTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb3ed: s390_irgen_EEXTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb3ef: s390_irgen_ESXTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3f1: s390_format_RRF_UUFR(s390_irgen_CDGTRA, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; case 0xb3f2: /* CDUTR */ goto unimplemented; case 0xb3f3: /* CDSTR */ goto unimplemented; - case 0xb3f4: s390_format_RRE_FF(s390_irgen_CEDTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3f4: s390_irgen_CEDTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3f5: s390_format_RRF_FUFF(s390_irgen_QADTR, RRF4_r3(ovl), RRF4_m4(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; @@ -18811,8 +18769,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RRF2_r2(ovl)); goto ok; case 0xb3fa: /* CXUTR */ goto unimplemented; case 0xb3fb: /* CXSTR */ goto unimplemented; - case 0xb3fc: s390_format_RRE_FF(s390_irgen_CEXTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb3fc: s390_irgen_CEXTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb3fd: s390_format_RRF_FUFF(s390_irgen_QAXTR, RRF4_r3(ovl), RRF4_m4(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; @@ -18821,105 +18779,107 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb3ff: s390_format_RRF_FFRU(s390_irgen_RRXTR, RRF4_r3(ovl), RRF4_m4(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb900: s390_format_RRE_RR(s390_irgen_LPGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb901: s390_format_RRE_RR(s390_irgen_LNGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb902: s390_format_RRE_RR(s390_irgen_LTGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb903: s390_format_RRE_RR(s390_irgen_LCGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb904: s390_format_RRE_RR(s390_irgen_LGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb900: s390_irgen_LPGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb901: s390_irgen_LNGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb902: s390_irgen_LTGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb903: s390_irgen_LCGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb904: s390_irgen_LGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb905: /* LURAG */ goto unimplemented; - case 0xb906: s390_format_RRE_RR(s390_irgen_LGBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb907: s390_format_RRE_RR(s390_irgen_LGHR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb908: s390_format_RRE_RR(s390_irgen_AGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb909: s390_format_RRE_RR(s390_irgen_SGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb90a: s390_format_RRE_RR(s390_irgen_ALGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb90b: s390_format_RRE_RR(s390_irgen_SLGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb90c: s390_format_RRE_RR(s390_irgen_MSGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb90d: s390_format_RRE_RR(s390_irgen_DSGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb906: s390_irgen_LGBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb907: s390_irgen_LGHR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb908: s390_irgen_AGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb909: s390_irgen_SGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb90a: s390_irgen_ALGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb90b: s390_irgen_SLGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb90c: s390_irgen_MSGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb90d: s390_irgen_DSGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb90e: /* EREGG */ goto unimplemented; - case 0xb90f: s390_format_RRE_RR(s390_irgen_LRVGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb910: s390_format_RRE_RR(s390_irgen_LPGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb911: s390_format_RRE_RR(s390_irgen_LNGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb912: s390_format_RRE_RR(s390_irgen_LTGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb913: s390_format_RRE_RR(s390_irgen_LCGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb914: s390_format_RRE_RR(s390_irgen_LGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb916: s390_format_RRE_RR(s390_irgen_LLGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb917: s390_format_RRE_RR(s390_irgen_LLGTR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb918: s390_format_RRE_RR(s390_irgen_AGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb919: s390_format_RRE_RR(s390_irgen_SGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb91a: s390_format_RRE_RR(s390_irgen_ALGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb91b: s390_format_RRE_RR(s390_irgen_SLGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb91c: s390_format_RRE_RR(s390_irgen_MSGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb91d: s390_format_RRE_RR(s390_irgen_DSGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb91e: s390_format_RRE_RR(s390_irgen_KMAC, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb91f: s390_format_RRE_RR(s390_irgen_LRVR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb920: s390_format_RRE_RR(s390_irgen_CGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb921: s390_format_RRE_RR(s390_irgen_CLGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb90f: s390_irgen_LRVGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb910: s390_irgen_LPGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb911: s390_irgen_LNGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb912: s390_irgen_LTGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb913: s390_irgen_LCGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb914: s390_irgen_LGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb916: s390_irgen_LLGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb917: s390_irgen_LLGTR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb918: s390_irgen_AGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb919: s390_irgen_SGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb91a: s390_irgen_ALGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb91b: s390_irgen_SLGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb91c: s390_irgen_MSGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb91d: s390_irgen_DSGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb91e: s390_irgen_KMAC(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb91f: s390_irgen_LRVR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb920: s390_irgen_CGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb921: s390_irgen_CLGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb925: /* STURG */ goto unimplemented; - case 0xb926: s390_format_RRE_RR(s390_irgen_LBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb927: s390_format_RRE_RR(s390_irgen_LHR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb926: s390_irgen_LBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb927: s390_irgen_LHR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb928: /* PCKMO */ goto unimplemented; case 0xb929: s390_format_RRF_R0RR2(s390_irgen_KMA, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb92a: s390_format_RRE_RR(s390_irgen_KMF, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb92b: s390_format_RRE_RR(s390_irgen_KMO, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb92a: s390_irgen_KMF(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb92b: s390_irgen_KMO(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb92c: s390_format_E(s390_irgen_PCC); goto ok; + goto ok; case 0xb92d: s390_format_RRF_R0RR2(s390_irgen_KMCTR, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb92e: s390_format_RRE_RR(s390_irgen_KM, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb92f: s390_format_RRE_RR(s390_irgen_KMC, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb930: s390_format_RRE_RR(s390_irgen_CGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb931: s390_format_RRE_RR(s390_irgen_CLGFR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb92e: s390_irgen_KM(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb92f: s390_irgen_KMC(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb930: s390_irgen_CGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb931: s390_irgen_CLGFR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb938: /* SORTL */ goto unimplemented; case 0xb939: s390_format_RRF_R0RR2(s390_irgen_DFLTCC, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb93a: s390_format_RRE_RR(s390_irgen_KDSA, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb93a: s390_irgen_KDSA(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb93b: s390_format_E(s390_irgen_NNPA); goto ok; - case 0xb93c: s390_format_RRE_RR(s390_irgen_PRNO, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb93e: s390_format_RRE_RR(s390_irgen_KIMD, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb93f: s390_format_RRE_RR(s390_irgen_KLMD, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + goto ok; + case 0xb93c: s390_irgen_PRNO(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb93e: s390_irgen_KIMD(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb93f: s390_irgen_KLMD(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb941: s390_format_RRF_UURF(s390_irgen_CFDTR, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; @@ -18929,8 +18889,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb943: s390_format_RRF_UURF(s390_irgen_CLFDTR, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; - case 0xb946: s390_format_RRE_RR(s390_irgen_BCTGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb946: s390_irgen_BCTGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb949: s390_format_RRF_UURF(s390_irgen_CFXTR, RRF2_m3(ovl), RRF2_m4(ovl), RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; @@ -18987,26 +18947,26 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; case 0xb977: s390_format_RRF_R0RR2(s390_irgen_NXRK, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb980: s390_format_RRE_RR(s390_irgen_NGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb981: s390_format_RRE_RR(s390_irgen_OGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb982: s390_format_RRE_RR(s390_irgen_XGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb983: s390_format_RRE_RR(s390_irgen_FLOGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb984: s390_format_RRE_RR(s390_irgen_LLGCR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb985: s390_format_RRE_RR(s390_irgen_LLGHR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb986: s390_format_RRE_RR(s390_irgen_MLGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb987: s390_format_RRE_RR(s390_irgen_DLGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb988: s390_format_RRE_RR(s390_irgen_ALCGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb989: s390_format_RRE_RR(s390_irgen_SLBGR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb980: s390_irgen_NGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb981: s390_irgen_OGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb982: s390_irgen_XGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb983: s390_irgen_FLOGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb984: s390_irgen_LLGCR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb985: s390_irgen_LLGHR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb986: s390_irgen_MLGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb987: s390_irgen_DLGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb988: s390_irgen_ALCGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb989: s390_irgen_SLBGR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb98a: /* CSPG */ goto unimplemented; case 0xb98b: /* RDP */ goto unimplemented; case 0xb98d: /* EPSW */ goto unimplemented; @@ -19020,18 +18980,18 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; case 0xb993: s390_format_RRF_M0RERE(s390_irgen_TROO, RRF3_r3(ovl), RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb994: s390_format_RRE_RR(s390_irgen_LLCR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb995: s390_format_RRE_RR(s390_irgen_LLHR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb996: s390_format_RRE_RR(s390_irgen_MLR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb997: s390_format_RRE_RR(s390_irgen_DLR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb998: s390_format_RRE_RR(s390_irgen_ALCR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb999: s390_format_RRE_RR(s390_irgen_SLBR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb994: s390_irgen_LLCR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb995: s390_irgen_LLHR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb996: s390_irgen_MLR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb997: s390_irgen_DLR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb998: s390_irgen_ALCR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb999: s390_irgen_SLBR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb99a: /* EPAIR */ goto unimplemented; case 0xb99b: /* ESAIR */ goto unimplemented; case 0xb99d: /* ESEA */ goto unimplemented; @@ -19049,10 +19009,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb9b1: s390_format_RRF_M0RERE(s390_irgen_CU24, RRF3_r3(ovl), RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb9b2: s390_format_RRE_RR(s390_irgen_CU41, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb9b3: s390_format_RRE_RR(s390_irgen_CU42, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb9b2: s390_irgen_CU41(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb9b3: s390_irgen_CU42(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb9bd: /* TRTRE */ goto unimplemented; case 0xb9be: /* SRSTU */ goto unimplemented; case 0xb9bf: /* TRTE */ goto unimplemented; @@ -19071,10 +19031,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb9cb: s390_format_RRF_R0RR2(s390_irgen_SLHHHR, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb9cd: s390_format_RRE_RR(s390_irgen_CHHR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb9cf: s390_format_RRE_RR(s390_irgen_CLHHR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb9cd: s390_irgen_CHHR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb9cf: s390_irgen_CLHHR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb9d8: s390_format_RRF_R0RR2(s390_irgen_AHHLR, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; @@ -19087,10 +19047,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb9db: s390_format_RRF_R0RR2(s390_irgen_SLHHLR, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb9dd: s390_format_RRE_RR(s390_irgen_CHLR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; - case 0xb9df: s390_format_RRE_RR(s390_irgen_CLHLR, RRE_r1(ovl), - RRE_r2(ovl)); goto ok; + case 0xb9dd: s390_irgen_CHLR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; + case 0xb9df: s390_irgen_CLHLR(RRE_r1(ovl), RRE_r2(ovl)); + goto ok; case 0xb9e0: s390_format_RRF_U0RR(s390_irgen_LOCFHR, RRF3_r3(ovl), RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; case 0xb9e1: s390_format_RRFa_U0RR(s390_irgen_POPCNT, RRF3_r3(ovl), From e535be7c67ae28593b748ef66c281ce6bf289427 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 10:34:56 +0000 Subject: [PATCH 245/502] s390: Remove s390_format_RI and friends. This patch removes the functions: s390_format_RI, s390_format_RI_RU, s390_format_RI_RI and s390_format_RI_RP. Cf. fa21e88ac38 for a rationale. --- VEX/priv/guest_s390_toIR.c | 156 +++++++++++++++---------------------- 1 file changed, 64 insertions(+), 92 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 2ae09ef76..de8694380 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2731,34 +2731,6 @@ s390_format_MII_UPP(void (*irgen)(UChar m1, UShort i2, UInt i3), irgen(m1, i2, i3); } -static void -s390_format_RI(void (*irgen)(UChar r1, UShort i2), - UChar r1, UShort i2) -{ - irgen(r1, i2); -} - -static void -s390_format_RI_RU(void (*irgen)(UChar r1, UShort i2), - UChar r1, UShort i2) -{ - irgen(r1, i2); -} - -static void -s390_format_RI_RI(void (*irgen)(UChar r1, UShort i2), - UChar r1, UShort i2) -{ - irgen(r1, i2); -} - -static void -s390_format_RI_RP(void (*irgen)(UChar r1, UShort i2), - UChar r1, UShort i2) -{ - irgen(r1, i2); -} - static void s390_format_RIE_RRP(void (*irgen)(UChar r1, UChar r3, UShort i2), UChar r1, UChar r3, UShort i2) @@ -18243,70 +18215,70 @@ s390_decode_4byte_and_irgen(const UChar *bytes) ((UInt)bytes[2] << 8) | (UInt)bytes[3]; switch ((ovl & 0xff0f0000) >> 16) { - case 0xa500: s390_format_RI_RU(s390_irgen_IIHH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa501: s390_format_RI_RU(s390_irgen_IIHL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa502: s390_format_RI_RU(s390_irgen_IILH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa503: s390_format_RI_RU(s390_irgen_IILL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa504: s390_format_RI_RU(s390_irgen_NIHH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa505: s390_format_RI_RU(s390_irgen_NIHL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa506: s390_format_RI_RU(s390_irgen_NILH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa507: s390_format_RI_RU(s390_irgen_NILL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa508: s390_format_RI_RU(s390_irgen_OIHH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa509: s390_format_RI_RU(s390_irgen_OIHL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa50a: s390_format_RI_RU(s390_irgen_OILH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa50b: s390_format_RI_RU(s390_irgen_OILL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa50c: s390_format_RI_RU(s390_irgen_LLIHH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa50d: s390_format_RI_RU(s390_irgen_LLIHL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa50e: s390_format_RI_RU(s390_irgen_LLILH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa50f: s390_format_RI_RU(s390_irgen_LLILL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa700: s390_format_RI_RU(s390_irgen_TMLH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa701: s390_format_RI_RU(s390_irgen_TMLL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa702: s390_format_RI_RU(s390_irgen_TMHH, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa703: s390_format_RI_RU(s390_irgen_TMHL, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa704: s390_format_RI(s390_irgen_BRC, RI_r1(ovl), RI_i2(ovl)); - goto ok; - case 0xa705: s390_format_RI_RP(s390_irgen_BRAS, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa706: s390_format_RI_RP(s390_irgen_BRCT, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa707: s390_format_RI_RP(s390_irgen_BRCTG, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa708: s390_format_RI_RI(s390_irgen_LHI, RI_r1(ovl), RI_i2(ovl)); - goto ok; - case 0xa709: s390_format_RI_RI(s390_irgen_LGHI, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa70a: s390_format_RI_RI(s390_irgen_AHI, RI_r1(ovl), RI_i2(ovl)); - goto ok; - case 0xa70b: s390_format_RI_RI(s390_irgen_AGHI, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa70c: s390_format_RI_RI(s390_irgen_MHI, RI_r1(ovl), RI_i2(ovl)); - goto ok; - case 0xa70d: s390_format_RI_RI(s390_irgen_MGHI, RI_r1(ovl), - RI_i2(ovl)); goto ok; - case 0xa70e: s390_format_RI_RI(s390_irgen_CHI, RI_r1(ovl), RI_i2(ovl)); - goto ok; - case 0xa70f: s390_format_RI_RI(s390_irgen_CGHI, RI_r1(ovl), - RI_i2(ovl)); goto ok; + case 0xa500: s390_irgen_IIHH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa501: s390_irgen_IIHL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa502: s390_irgen_IILH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa503: s390_irgen_IILL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa504: s390_irgen_NIHH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa505: s390_irgen_NIHL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa506: s390_irgen_NILH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa507: s390_irgen_NILL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa508: s390_irgen_OIHH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa509: s390_irgen_OIHL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa50a: s390_irgen_OILH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa50b: s390_irgen_OILL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa50c: s390_irgen_LLIHH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa50d: s390_irgen_LLIHL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa50e: s390_irgen_LLILH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa50f: s390_irgen_LLILL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa700: s390_irgen_TMLH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa701: s390_irgen_TMLL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa702: s390_irgen_TMHH(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa703: s390_irgen_TMHL(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa704: s390_irgen_BRC(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa705: s390_irgen_BRAS(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa706: s390_irgen_BRCT(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa707: s390_irgen_BRCTG(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa708: s390_irgen_LHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa709: s390_irgen_LGHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa70a: s390_irgen_AHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa70b: s390_irgen_AGHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa70c: s390_irgen_MHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa70d: s390_irgen_MGHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa70e: s390_irgen_CHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; + case 0xa70f: s390_irgen_CGHI(RI_r1(ovl), RI_i2(ovl)); + goto ok; } switch ((ovl & 0xffff0000) >> 16) { From 518cf40831da25969e0ffba6c9a806f3cf5043bf Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 11:10:30 +0000 Subject: [PATCH 246/502] s390: Remove s390_format_RIL and friends. This patch removes the functions: s390_format_RIL, s390_format_RIL_RU, s390_format_RIL_RI, s390_format_RIL_RP and s390_format_RIL_UP. Cf. fa21e88ac38 for a rationale. --- VEX/priv/guest_s390_toIR.c | 256 ++++++++++++++++--------------------- 1 file changed, 110 insertions(+), 146 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index de8694380..d4ca50c24 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2795,42 +2795,6 @@ s390_format_RIE_RUPIX(void (*irgen)(UChar r1, UChar m3, UShort i2), irgen(r1, m3, i2); } -static void -s390_format_RIL(void (*irgen)(UChar r1, UInt i2), - UChar r1, UInt i2) -{ - irgen(r1, i2); -} - -static void -s390_format_RIL_RU(void (*irgen)(UChar r1, UInt i2), - UChar r1, UInt i2) -{ - irgen(r1, i2); -} - -static void -s390_format_RIL_RI(void (*irgen)(UChar r1, UInt i2), - UChar r1, UInt i2) -{ - irgen(r1, i2); -} - -static void -s390_format_RIL_RP(void (*irgen)(UChar r1, UInt i2), - UChar r1, UInt i2) -{ - irgen(r1, i2); -} - -static void -s390_format_RIL_UP(void (*irgen)(void), - UChar r1 __attribute__((unused)), - UInt i2 __attribute__((unused))) -{ - irgen(); -} - static void s390_format_RIS_RURDI(void (*irgen)(UChar r1, UChar m3, UChar i2, IRTemp op4addr), @@ -20920,104 +20884,104 @@ s390_decode_6byte_and_irgen(const UChar *bytes) } switch (((ovl >> 16) & 0xff0f00000000ULL) >> 32) { - case 0xc000ULL: s390_format_RIL_RP(s390_irgen_LARL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc001ULL: s390_format_RIL_RI(s390_irgen_LGFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc004ULL: s390_format_RIL(s390_irgen_BRCL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc005ULL: s390_format_RIL_RP(s390_irgen_BRASL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc006ULL: s390_format_RIL_RU(s390_irgen_XIHF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc007ULL: s390_format_RIL_RU(s390_irgen_XILF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc008ULL: s390_format_RIL_RU(s390_irgen_IIHF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc009ULL: s390_format_RIL_RU(s390_irgen_IILF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc00aULL: s390_format_RIL_RU(s390_irgen_NIHF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc00bULL: s390_format_RIL_RU(s390_irgen_NILF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc00cULL: s390_format_RIL_RU(s390_irgen_OIHF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc00dULL: s390_format_RIL_RU(s390_irgen_OILF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc00eULL: s390_format_RIL_RU(s390_irgen_LLIHF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc00fULL: s390_format_RIL_RU(s390_irgen_LLILF, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc200ULL: s390_format_RIL_RI(s390_irgen_MSGFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc201ULL: s390_format_RIL_RI(s390_irgen_MSFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc204ULL: s390_format_RIL_RU(s390_irgen_SLGFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc205ULL: s390_format_RIL_RU(s390_irgen_SLFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc208ULL: s390_format_RIL_RI(s390_irgen_AGFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc209ULL: s390_format_RIL_RI(s390_irgen_AFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc20aULL: s390_format_RIL_RU(s390_irgen_ALGFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc20bULL: s390_format_RIL_RU(s390_irgen_ALFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc20cULL: s390_format_RIL_RI(s390_irgen_CGFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc20dULL: s390_format_RIL_RI(s390_irgen_CFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc20eULL: s390_format_RIL_RU(s390_irgen_CLGFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc20fULL: s390_format_RIL_RU(s390_irgen_CLFI, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc402ULL: s390_format_RIL_RP(s390_irgen_LLHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc404ULL: s390_format_RIL_RP(s390_irgen_LGHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc405ULL: s390_format_RIL_RP(s390_irgen_LHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc406ULL: s390_format_RIL_RP(s390_irgen_LLGHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc407ULL: s390_format_RIL_RP(s390_irgen_STHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc408ULL: s390_format_RIL_RP(s390_irgen_LGRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc40bULL: s390_format_RIL_RP(s390_irgen_STGRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc40cULL: s390_format_RIL_RP(s390_irgen_LGFRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc40dULL: s390_format_RIL_RP(s390_irgen_LRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc40eULL: s390_format_RIL_RP(s390_irgen_LLGFRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc40fULL: s390_format_RIL_RP(s390_irgen_STRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc600ULL: s390_format_RIL_RP(s390_irgen_EXRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc602ULL: s390_format_RIL_UP(s390_irgen_PFDRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc604ULL: s390_format_RIL_RP(s390_irgen_CGHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc605ULL: s390_format_RIL_RP(s390_irgen_CHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc606ULL: s390_format_RIL_RP(s390_irgen_CLGHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc607ULL: s390_format_RIL_RP(s390_irgen_CLHRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc608ULL: s390_format_RIL_RP(s390_irgen_CGRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc60aULL: s390_format_RIL_RP(s390_irgen_CLGRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc60cULL: s390_format_RIL_RP(s390_irgen_CGFRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc60dULL: s390_format_RIL_RP(s390_irgen_CRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc60eULL: s390_format_RIL_RP(s390_irgen_CLGFRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xc60fULL: s390_format_RIL_RP(s390_irgen_CLRL, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; + case 0xc000ULL: s390_irgen_LARL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc001ULL: s390_irgen_LGFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc004ULL: s390_irgen_BRCL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc005ULL: s390_irgen_BRASL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc006ULL: s390_irgen_XIHF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc007ULL: s390_irgen_XILF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc008ULL: s390_irgen_IIHF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc009ULL: s390_irgen_IILF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc00aULL: s390_irgen_NIHF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc00bULL: s390_irgen_NILF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc00cULL: s390_irgen_OIHF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc00dULL: s390_irgen_OILF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc00eULL: s390_irgen_LLIHF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc00fULL: s390_irgen_LLILF(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc200ULL: s390_irgen_MSGFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc201ULL: s390_irgen_MSFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc204ULL: s390_irgen_SLGFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc205ULL: s390_irgen_SLFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc208ULL: s390_irgen_AGFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc209ULL: s390_irgen_AFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc20aULL: s390_irgen_ALGFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc20bULL: s390_irgen_ALFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc20cULL: s390_irgen_CGFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc20dULL: s390_irgen_CFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc20eULL: s390_irgen_CLGFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc20fULL: s390_irgen_CLFI(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc402ULL: s390_irgen_LLHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc404ULL: s390_irgen_LGHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc405ULL: s390_irgen_LHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc406ULL: s390_irgen_LLGHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc407ULL: s390_irgen_STHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc408ULL: s390_irgen_LGRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc40bULL: s390_irgen_STGRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc40cULL: s390_irgen_LGFRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc40dULL: s390_irgen_LRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc40eULL: s390_irgen_LLGFRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc40fULL: s390_irgen_STRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc600ULL: s390_irgen_EXRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc602ULL: s390_irgen_PFDRL(); + goto ok; + case 0xc604ULL: s390_irgen_CGHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc605ULL: s390_irgen_CHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc606ULL: s390_irgen_CLGHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc607ULL: s390_irgen_CLHRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc608ULL: s390_irgen_CGRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc60aULL: s390_irgen_CLGRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc60cULL: s390_irgen_CGFRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc60dULL: s390_irgen_CRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc60eULL: s390_irgen_CLGFRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xc60fULL: s390_irgen_CLRL(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; case 0xc800ULL: /* MVCOS */ goto unimplemented; case 0xc801ULL: /* ECTG */ goto unimplemented; case 0xc802ULL: /* CSST */ goto unimplemented; @@ -21026,18 +20990,18 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xc806ULL: /* CAL */ goto unimplemented; case 0xc807ULL: /* CALG */ goto unimplemented; case 0xc80fULL: /* CALGF */ goto unimplemented; - case 0xcc06ULL: s390_format_RIL_RP(s390_irgen_BRCTH, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xcc08ULL: s390_format_RIL_RI(s390_irgen_AIH, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xcc0aULL: s390_format_RIL_RI(s390_irgen_ALSIH, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xcc0bULL: s390_format_RIL_RI(s390_irgen_ALSIHN, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xcc0dULL: s390_format_RIL_RI(s390_irgen_CIH, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; - case 0xcc0fULL: s390_format_RIL_RU(s390_irgen_CLIH, RIL_r1(ovl), - RIL_i2(ovl)); goto ok; + case 0xcc06ULL: s390_irgen_BRCTH(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xcc08ULL: s390_irgen_AIH(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xcc0aULL: s390_irgen_ALSIH(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xcc0bULL: s390_irgen_ALSIHN(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xcc0dULL: s390_irgen_CIH(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; + case 0xcc0fULL: s390_irgen_CLIH(RIL_r1(ovl), RIL_i2(ovl)); + goto ok; } switch (((ovl >> 16) & 0xff0000000000ULL) >> 40) { From 36d7042e3068caa2e8a6094684b61909e210cb2b Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 11:27:06 +0000 Subject: [PATCH 247/502] s390: Consolidate s390_format_RIS_RURDU and s390_format_RIS_RURDI Use s390_format_RIS instead. Cf. fa21e88ac38 for a rationale. --- VEX/priv/guest_s390_toIR.c | 51 ++++++++++++++------------------------ 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index d4ca50c24..98ab7e602 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2796,22 +2796,9 @@ s390_format_RIE_RUPIX(void (*irgen)(UChar r1, UChar m3, UShort i2), } static void -s390_format_RIS_RURDI(void (*irgen)(UChar r1, UChar m3, UChar i2, - IRTemp op4addr), - UChar r1, UChar m3, UChar b4, UShort d4, UChar i2) -{ - IRTemp op4addr = newTemp(Ity_I64); - - assign(op4addr, binop(Iop_Add64, mkU64(d4), b4 != 0 ? get_gpr_dw0(b4) : - mkU64(0))); - - irgen(r1, m3, i2, op4addr); -} - -static void -s390_format_RIS_RURDU(void (*irgen)(UChar r1, UChar m3, UChar i2, - IRTemp op4addr), - UChar r1, UChar m3, UChar b4, UShort d4, UChar i2) +s390_format_RIS(void (*irgen)(UChar r1, UChar m3, UChar i2, + IRTemp op4addr), + UChar r1, UChar m3, UChar b4, UShort d4, UChar i2) { IRTemp op4addr = newTemp(Ity_I64); @@ -20710,22 +20697,22 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RRS_r2(ovl), RRS_b4(ovl), RRS_d4(ovl), RRS_m3(ovl)); goto ok; - case 0xec00000000fcULL: s390_format_RIS_RURDI(s390_irgen_CGIB, - RIS_r1(ovl), RIS_m3(ovl), - RIS_b4(ovl), RIS_d4(ovl), - RIS_i2(ovl)); goto ok; - case 0xec00000000fdULL: s390_format_RIS_RURDU(s390_irgen_CLGIB, - RIS_r1(ovl), RIS_m3(ovl), - RIS_b4(ovl), RIS_d4(ovl), - RIS_i2(ovl)); goto ok; - case 0xec00000000feULL: s390_format_RIS_RURDI(s390_irgen_CIB, RIS_r1(ovl), - RIS_m3(ovl), RIS_b4(ovl), - RIS_d4(ovl), - RIS_i2(ovl)); goto ok; - case 0xec00000000ffULL: s390_format_RIS_RURDU(s390_irgen_CLIB, - RIS_r1(ovl), RIS_m3(ovl), - RIS_b4(ovl), RIS_d4(ovl), - RIS_i2(ovl)); goto ok; + case 0xec00000000fcULL: s390_format_RIS(s390_irgen_CGIB, + RIS_r1(ovl), RIS_m3(ovl), + RIS_b4(ovl), RIS_d4(ovl), + RIS_i2(ovl)); goto ok; + case 0xec00000000fdULL: s390_format_RIS(s390_irgen_CLGIB, + RIS_r1(ovl), RIS_m3(ovl), + RIS_b4(ovl), RIS_d4(ovl), + RIS_i2(ovl)); goto ok; + case 0xec00000000feULL: s390_format_RIS(s390_irgen_CIB, RIS_r1(ovl), + RIS_m3(ovl), RIS_b4(ovl), + RIS_d4(ovl), + RIS_i2(ovl)); goto ok; + case 0xec00000000ffULL: s390_format_RIS(s390_irgen_CLIB, + RIS_r1(ovl), RIS_m3(ovl), + RIS_b4(ovl), RIS_d4(ovl), + RIS_i2(ovl)); goto ok; case 0xed0000000004ULL: s390_format_RXE_FRRD(s390_irgen_LDEB, RXE_r1(ovl), RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl)); goto ok; From ff10366c4d6d811f567a8fc99132a70557365754 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 13:09:41 +0000 Subject: [PATCH 248/502] s390: Tweak s390_irgen_BC and s390_format_RX Remove unused parameters from s390_irgen_BC. Adjust s390_format_RX accordingly. --- VEX/priv/guest_s390_toIR.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 98ab7e602..91beb6fea 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -3063,8 +3063,7 @@ s390_format_RSY_RDRM(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RX(void (*irgen)(UChar r1, UChar x2, UChar b2, UShort d2, - IRTemp op2addr), +s390_format_RX(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort d2) { IRTemp op2addr = newTemp(Ity_I64); @@ -3073,7 +3072,7 @@ s390_format_RX(void (*irgen)(UChar r1, UChar x2, UChar b2, UShort d2, b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : mkU64(0))); - irgen(r1, x2, b2, d2, op2addr); + irgen(r1, op2addr); } static void @@ -4866,7 +4865,7 @@ s390_irgen_BCR(UChar m1, UChar r2) } static void -s390_irgen_BC(UChar m1, UChar x2, UChar b2, UShort d2, IRTemp op2addr) +s390_irgen_BC(UChar m1, IRTemp op2addr) { IRTemp cond = newTemp(Ity_I32); From d92b440edcf338cdc54ab591c6177d16f64369ef Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 13:17:42 +0000 Subject: [PATCH 249/502] s390: Remove functions s390_format_RX_RRRD and s390_format_RX_FRRD Use s390_format_RX instead Cf. fa21e88ac38 for a rationale. --- VEX/priv/guest_s390_toIR.c | 158 ++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 92 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 91beb6fea..76d983c1c 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -3075,32 +3075,6 @@ s390_format_RX(void (*irgen)(UChar r1, IRTemp op2addr), irgen(r1, op2addr); } -static void -s390_format_RX_RRRD(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort d2) -{ - IRTemp op2addr = newTemp(Ity_I64); - - assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), - b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : - mkU64(0))); - - irgen(r1, op2addr); -} - -static void -s390_format_RX_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort d2) -{ - IRTemp op2addr = newTemp(Ity_I64); - - assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), - b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : - mkU64(0))); - - irgen(r1, op2addr); -} - static void s390_format_RXE_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), UChar r1, UChar x2, UChar b2, UShort d2) @@ -19047,70 +19021,70 @@ s390_decode_4byte_and_irgen(const UChar *bytes) } switch ((ovl & 0xff000000) >> 24) { - case 0x40: s390_format_RX_RRRD(s390_irgen_STH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x41: s390_format_RX_RRRD(s390_irgen_LA, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x42: s390_format_RX_RRRD(s390_irgen_STC, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x43: s390_format_RX_RRRD(s390_irgen_IC, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x44: s390_format_RX_RRRD(s390_irgen_EX, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x40: s390_format_RX(s390_irgen_STH, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x41: s390_format_RX(s390_irgen_LA, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x42: s390_format_RX(s390_irgen_STC, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x43: s390_format_RX(s390_irgen_IC, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x44: s390_format_RX(s390_irgen_EX, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; case 0x45: /* BAL */ goto unimplemented; - case 0x46: s390_format_RX_RRRD(s390_irgen_BCT, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x46: s390_format_RX(s390_irgen_BCT, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; case 0x47: s390_format_RX(s390_irgen_BC, RX_r1(ovl), RX_x2(ovl), RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x48: s390_format_RX_RRRD(s390_irgen_LH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x49: s390_format_RX_RRRD(s390_irgen_CH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4a: s390_format_RX_RRRD(s390_irgen_AH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4b: s390_format_RX_RRRD(s390_irgen_SH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4c: s390_format_RX_RRRD(s390_irgen_MH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4d: s390_format_RX_RRRD(s390_irgen_BAS, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4e: s390_format_RX_RRRD(s390_irgen_CVD, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4f: s390_format_RX_RRRD(s390_irgen_CVB, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x50: s390_format_RX_RRRD(s390_irgen_ST, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x51: s390_format_RX_RRRD(s390_irgen_LAE, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x54: s390_format_RX_RRRD(s390_irgen_N, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x55: s390_format_RX_RRRD(s390_irgen_CL, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x56: s390_format_RX_RRRD(s390_irgen_O, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x57: s390_format_RX_RRRD(s390_irgen_X, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x58: s390_format_RX_RRRD(s390_irgen_L, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x59: s390_format_RX_RRRD(s390_irgen_C, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5a: s390_format_RX_RRRD(s390_irgen_A, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5b: s390_format_RX_RRRD(s390_irgen_S, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5c: s390_format_RX_RRRD(s390_irgen_M, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5d: s390_format_RX_RRRD(s390_irgen_D, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5e: s390_format_RX_RRRD(s390_irgen_AL, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5f: s390_format_RX_RRRD(s390_irgen_SL, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x60: s390_format_RX_FRRD(s390_irgen_STD, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x48: s390_format_RX(s390_irgen_LH, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x49: s390_format_RX(s390_irgen_CH, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x4a: s390_format_RX(s390_irgen_AH, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x4b: s390_format_RX(s390_irgen_SH, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x4c: s390_format_RX(s390_irgen_MH, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x4d: s390_format_RX(s390_irgen_BAS, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x4e: s390_format_RX(s390_irgen_CVD, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x4f: s390_format_RX(s390_irgen_CVB, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x50: s390_format_RX(s390_irgen_ST, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x51: s390_format_RX(s390_irgen_LAE, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x54: s390_format_RX(s390_irgen_N, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x55: s390_format_RX(s390_irgen_CL, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x56: s390_format_RX(s390_irgen_O, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x57: s390_format_RX(s390_irgen_X, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x58: s390_format_RX(s390_irgen_L, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x59: s390_format_RX(s390_irgen_C, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x5a: s390_format_RX(s390_irgen_A, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x5b: s390_format_RX(s390_irgen_S, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x5c: s390_format_RX(s390_irgen_M, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x5d: s390_format_RX(s390_irgen_D, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x5e: s390_format_RX(s390_irgen_AL, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x5f: s390_format_RX(s390_irgen_SL, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x60: s390_format_RX(s390_irgen_STD, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; case 0x67: /* MXD */ goto unimplemented; - case 0x68: s390_format_RX_FRRD(s390_irgen_LD, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x68: s390_format_RX(s390_irgen_LD, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; case 0x69: /* CD */ goto unimplemented; case 0x6a: /* AD */ goto unimplemented; case 0x6b: /* SD */ goto unimplemented; @@ -19118,12 +19092,12 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0x6d: /* DD */ goto unimplemented; case 0x6e: /* AW */ goto unimplemented; case 0x6f: /* SW */ goto unimplemented; - case 0x70: s390_format_RX_FRRD(s390_irgen_STE, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x71: s390_format_RX_RRRD(s390_irgen_MS, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x78: s390_format_RX_FRRD(s390_irgen_LE, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x70: s390_format_RX(s390_irgen_STE, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x71: s390_format_RX(s390_irgen_MS, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x78: s390_format_RX(s390_irgen_LE, RX_r1(ovl), RX_x2(ovl), + RX_b2(ovl), RX_d2(ovl)); goto ok; case 0x79: /* CE */ goto unimplemented; case 0x7a: /* AE */ goto unimplemented; case 0x7b: /* SE */ goto unimplemented; From ad6a896e3b0f374064d74edd0e5d45d0584d7c79 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 15 Jan 2026 18:58:31 +0100 Subject: [PATCH 250/502] Backport LTP patches to make listmount04 compile against newer kernels This adds three upstream patches to make the listmount04 testcase build again: commit 36c51649dcc175f28fd500c01ba8cdd596f15aa4 Author: Masahiro Yamada Date: Wed Dec 3 17:12:26 2025 +0900 listmount04: require kernel version 6.11 commit 2d066ead3d6ef504c82551b12306e751d23ddb45 Author: Wei Gao Date: Sun Dec 14 02:15:20 2025 +0000 listmount04.c: Update struct mnt_id_req support for kernel >= 6.18 commit 262221320c6ddd094ee8059c327748dde1644936 Author: Po-Hsu Lin via ltp Date: Fri Jan 9 00:21:52 2026 +0800 listmount04.c: update struct mnt_id_req support to kernel >= 6.17.9 https://bugs.kde.org/show_bug.cgi?id=514659 --- NEWS | 1 + auxprogs/Makefile.am | 5 +- auxprogs/ltp-patches/listmount04-1.patch | 60 +++++++ auxprogs/ltp-patches/listmount04-2.patch | 195 +++++++++++++++++++++++ auxprogs/ltp-patches/listmount04-3.patch | 88 ++++++++++ 5 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 auxprogs/ltp-patches/listmount04-1.patch create mode 100644 auxprogs/ltp-patches/listmount04-2.patch create mode 100644 auxprogs/ltp-patches/listmount04-3.patch diff --git a/NEWS b/NEWS index 3f6667fed..10b3c7b42 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 513475 Add SSE4.1 PMULLD instruction for x86 32 bit 514094 readlink("/proc/self/exe") overwrites buffer beyond its return value 514613 Unclosed leak_summary/still_reachable tag in xml output +514659 ltp 20250930 vs linux 6.18.3 doesn't build To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am index b68cbac05..9b422b8a6 100644 --- a/auxprogs/Makefile.am +++ b/auxprogs/Makefile.am @@ -21,7 +21,10 @@ LTP_FILTERS = \ filters/select03 \ filters/munmap01 -LTP_PATCHES = +LTP_PATCHES = \ + ltp-patches/listmount04-1.patch \ + ltp-patches/listmount04-2.patch \ + ltp-patches/listmount04-3.patch EXTRA_DIST = \ docs/valgrind-listener-manpage.xml \ diff --git a/auxprogs/ltp-patches/listmount04-1.patch b/auxprogs/ltp-patches/listmount04-1.patch new file mode 100644 index 000000000..9f9ff4dfa --- /dev/null +++ b/auxprogs/ltp-patches/listmount04-1.patch @@ -0,0 +1,60 @@ +From 36c51649dcc175f28fd500c01ba8cdd596f15aa4 Mon Sep 17 00:00:00 2001 +From: Masahiro Yamada +Date: Wed, 3 Dec 2025 17:12:26 +0900 +Subject: [PATCH] listmount04: require kernel version 6.11 + +On Linux kernel 6.8, the listmount04 test fails as follows: + + Running tests....... + tst_buffers.c:57: TINFO: Test is using guarded buffers + tst_test.c:2025: TINFO: LTP version: 20250930 + tst_test.c:2028: TINFO: Tested kernel: 6.8.0 #71 SMP PREEMPT_DYNAMIC Wed Dec 3 16:00:27 JST 2025 x86_64 + tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz' + tst_kconfig.c:676: TINFO: CONFIG_TRACE_IRQFLAGS kernel option detected which might slow the execution + tst_test.c:1846: TINFO: Overall timeout per run is 0h 02m 00s + listmount04.c:128: TPASS: request points to unaccessible memory : EFAULT (14) + listmount04.c:128: TPASS: mnt_ids points to unaccessible memory : EFAULT (14) + listmount04.c:128: TPASS: invalid flags : EINVAL (22) + listmount04.c:128: TPASS: insufficient mnt_id_req.size : EINVAL (22) + listmount04.c:128: TPASS: invalid mnt_id_req.spare : EINVAL (22) + listmount04.c:128: TFAIL: invalid mnt_id_req.param invalid retval 20: SUCCESS (0) + listmount04.c:128: TFAIL: invalid mnt_id_req.mnt_id expected EINVAL: ENOENT (2) + listmount04.c:128: TPASS: non-existant mnt_id : ENOENT (2) + + Summary: + passed 6 + failed 2 + broken 0 + skipped 0 + warnings 0 + INFO: ltp-pan reported some tests FAIL + LTP Version: 20250930 + INFO: Test end time: Wed Dec 3 07:01:33 UTC 2025 + +This test passes only after kernel commit 4bed843b1000 ("fs: reject +invalid last mount id early"), i.e. kernel version 6.11. + +Link: https://lore.kernel.org/ltp/20251203081226.1148236-1-masahiro.yamada@canonical.com/ +Fixes: 141958ad3e ("Add listmount04 test") +Reviewed-by: Petr Vorel +Signed-off-by: Masahiro Yamada +--- + testcases/kernel/syscalls/listmount/listmount04.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c +index a52bad064c0e..a6921a24975d 100644 +--- a/testcases/kernel/syscalls/listmount/listmount04.c ++++ b/testcases/kernel/syscalls/listmount/listmount04.c +@@ -133,7 +133,7 @@ static void run(unsigned int n) + static struct tst_test test = { + .test = run, + .tcnt = ARRAY_SIZE(tcases), +- .min_kver = "6.8", ++ .min_kver = "6.11", + .bufs = (struct tst_buffers []) { + { &request, .size = MNT_ID_REQ_SIZE_VER0 }, + {}, +-- +2.52.0 + diff --git a/auxprogs/ltp-patches/listmount04-2.patch b/auxprogs/ltp-patches/listmount04-2.patch new file mode 100644 index 000000000..d1aab03d9 --- /dev/null +++ b/auxprogs/ltp-patches/listmount04-2.patch @@ -0,0 +1,195 @@ +From 2d066ead3d6ef504c82551b12306e751d23ddb45 Mon Sep 17 00:00:00 2001 +From: Wei Gao +Date: Sun, 14 Dec 2025 02:15:20 +0000 +Subject: [PATCH] listmount04.c: Update struct mnt_id_req support for kernel >= + 6.18 + +Kernel change from v6.18-rc7 +78f0e33cd6c93 ("fs/namespace: correctly handle errors returned by grab_requested_mnt_ns") +causes the test failure with following error message: +listmount04.c:128: TFAIL: invalid mnt_id_req.spare expected EINVAL: EBADF (9) + +The fix require following changes: + +* struct mnt_id_req got new member mnt_ns_fd in v6.18-rc7. That is +fixed in a fallback defintion in lapi/. If the fallback is used is now +done via typedef (that requires also update in statmount.h). + +* New kernels (>= 6.18) have also different errno. This is fixed by +runtime check. + +Link: https://lore.kernel.org/ltp/20251214021541.3256-1-wegao@suse.com/ +Reviewed-by: Petr Vorel +Reviewed-by: Li Wang +Reviewed-by: Cyril Hrubis +Signed-off-by: Wei Gao +[ pvorel: Shorten TCONF, rewrite commit message ] +Signed-off-by: Petr Vorel +--- + configure.ac | 2 +- + include/lapi/mount.h | 10 +++-- + .../kernel/syscalls/listmount/listmount.h | 2 +- + .../kernel/syscalls/listmount/listmount04.c | 37 +++++++++++++++++-- + .../kernel/syscalls/statmount/statmount.h | 2 +- + 5 files changed, 44 insertions(+), 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0480f46ca227..a0ebbb34d835 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -262,7 +262,7 @@ AC_CHECK_TYPES([struct cachestat_range],,,[#include ]) + AC_CHECK_TYPES([struct cachestat],,,[#include ]) + + # Defined in , but include/lapi/mount.h includes */ +-AC_CHECK_TYPES([struct mnt_id_req],,,[#include ]) ++AC_CHECK_MEMBERS([struct mnt_id_req.mnt_ns_fd],,,[#include ]) + AC_CHECK_TYPES([struct statmount],,,[#include ]) + AC_CHECK_MEMBERS([struct statmount.mnt_ns_id],,,[#include + #include ]) +diff --git a/include/lapi/mount.h b/include/lapi/mount.h +index 0f7bb5e4327f..3b296fc9c275 100644 +--- a/include/lapi/mount.h ++++ b/include/lapi/mount.h +@@ -45,14 +45,18 @@ + # define MS_NOSYMFOLLOW 256 + #endif + +-#ifndef HAVE_STRUCT_MNT_ID_REQ +-struct mnt_id_req { ++struct mnt_id_req_fallback { + uint32_t size; +- uint32_t spare; ++ uint32_t mnt_ns_fd; + uint64_t mnt_id; + uint64_t param; + uint64_t mnt_ns_id; + }; ++ ++#ifndef HAVE_STRUCT_MNT_ID_REQ_MNT_NS_FD ++typedef struct mnt_id_req_fallback mnt_id_req; ++#else ++typedef struct mnt_id_req mnt_id_req; + #endif + + #ifndef HAVE_STRUCT_STATMOUNT +diff --git a/testcases/kernel/syscalls/listmount/listmount.h b/testcases/kernel/syscalls/listmount/listmount.h +index aad927f7143d..e7ef375d7f38 100644 +--- a/testcases/kernel/syscalls/listmount/listmount.h ++++ b/testcases/kernel/syscalls/listmount/listmount.h +@@ -15,7 +15,7 @@ + static inline ssize_t listmount(uint64_t mnt_id, uint64_t last_mnt_id, + uint64_t list[], size_t num, unsigned int flags) + { +- struct mnt_id_req req = { ++ mnt_id_req req = { + .size = MNT_ID_REQ_SIZE_VER0, + .mnt_id = mnt_id, + .param = last_mnt_id, +diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c +index a6921a24975d..2b8b49101ccb 100644 +--- a/testcases/kernel/syscalls/listmount/listmount04.c ++++ b/testcases/kernel/syscalls/listmount/listmount04.c +@@ -14,14 +14,18 @@ + + #define _GNU_SOURCE + ++#include "config.h" + #include "tst_test.h" + #include "lapi/mount.h" + #include "lapi/syscalls.h" + + #define MNT_SIZE 32 ++#define BEFORE_6_18 1 ++#define AFTER_6_18 2 + +-static struct mnt_id_req *request; ++static mnt_id_req *request; + static uint64_t mnt_ids[MNT_SIZE]; ++static int kver; + + static struct tcase { + int req_usage; +@@ -34,6 +38,7 @@ static struct tcase { + uint64_t flags; + int exp_errno; + char *msg; ++ int kver; + } tcases[] = { + { + .req_usage = 0, +@@ -79,6 +84,18 @@ static struct tcase { + .nr_mnt_ids = MNT_SIZE, + .exp_errno = EINVAL, + .msg = "invalid mnt_id_req.spare", ++ .kver = BEFORE_6_18, ++ }, ++ { ++ .req_usage = 1, ++ .size = MNT_ID_REQ_SIZE_VER0, ++ .spare = -1, ++ .mnt_id = LSMT_ROOT, ++ .mnt_ids = mnt_ids, ++ .nr_mnt_ids = MNT_SIZE, ++ .exp_errno = EBADF, ++ .msg = "invalid mnt_id_req.mnt_ns_fd", ++ .kver = AFTER_6_18, + }, + { + .req_usage = 1, +@@ -113,7 +130,12 @@ static struct tcase { + static void run(unsigned int n) + { + struct tcase *tc = &tcases[n]; +- struct mnt_id_req *req = NULL; ++ mnt_id_req *req = NULL; ++ ++ if (tc->kver && tc->kver != kver) { ++ tst_res(TCONF, "Test not suitable for current kernel version"); ++ return; ++ } + + memset(mnt_ids, 0, sizeof(mnt_ids)); + +@@ -122,7 +144,7 @@ static void run(unsigned int n) + req->mnt_id = tc->mnt_id; + req->param = tc->param; + req->size = tc->size; +- req->spare = tc->spare; ++ req->mnt_ns_fd = tc->spare; + } + + TST_EXP_FAIL(tst_syscall(__NR_listmount, req, tc->mnt_ids, +@@ -130,8 +152,17 @@ static void run(unsigned int n) + "%s", tc->msg); + } + ++static void setup(void) ++{ ++ if (tst_kvercmp(6, 18, 0) >= 0) ++ kver = AFTER_6_18; ++ else ++ kver = BEFORE_6_18; ++} ++ + static struct tst_test test = { + .test = run, ++ .setup = setup, + .tcnt = ARRAY_SIZE(tcases), + .min_kver = "6.11", + .bufs = (struct tst_buffers []) { +diff --git a/testcases/kernel/syscalls/statmount/statmount.h b/testcases/kernel/syscalls/statmount/statmount.h +index d21d7f8da101..4217a82d8f31 100644 +--- a/testcases/kernel/syscalls/statmount/statmount.h ++++ b/testcases/kernel/syscalls/statmount/statmount.h +@@ -16,7 +16,7 @@ + static inline int statmount(uint64_t mnt_id, uint64_t mask, struct statmount *buf, + size_t bufsize, unsigned int flags) + { +- struct mnt_id_req req = { ++ mnt_id_req req = { + .size = MNT_ID_REQ_SIZE_VER0, + .mnt_id = mnt_id, + .param = mask, +-- +2.52.0 + diff --git a/auxprogs/ltp-patches/listmount04-3.patch b/auxprogs/ltp-patches/listmount04-3.patch new file mode 100644 index 000000000..2f188a9a9 --- /dev/null +++ b/auxprogs/ltp-patches/listmount04-3.patch @@ -0,0 +1,88 @@ +From 262221320c6ddd094ee8059c327748dde1644936 Mon Sep 17 00:00:00 2001 +From: Po-Hsu Lin via ltp +Date: Fri, 9 Jan 2026 00:21:52 +0800 +Subject: [PATCH] listmount04.c: update struct mnt_id_req support to kernel >= + 6.17.9 + +The kernel change 78f0e33cd6c93 ("fs/namespace: correctly handle errors +returned by grab_requested_mnt_ns") from 6.18 has been ported to upstream +6.17.9 [1][2]. + +Therefore change the expectation from >= 6.18 to >= 6.17 accodingly. + +[1] https://lwn.net/Articles/1047684/ +[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.17.9&id=8ff97ade + +v2: add comments for this change into the code. +v3: correct the RST syntax and move comment as suggested by Petr Vorel. +v4: correct the patch title. + +Signed-off-by: Po-Hsu Lin +Reviewed-by: Petr Vorel +Acked-by: Andrea Cervesato +--- + .../kernel/syscalls/listmount/listmount04.c | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c +index 2b8b49101ccb..919f4c85421c 100644 +--- a/testcases/kernel/syscalls/listmount/listmount04.c ++++ b/testcases/kernel/syscalls/listmount/listmount04.c +@@ -7,6 +7,7 @@ + * Verify that listmount() raises the correct errors according with + * invalid data: + * ++ * - EBADF: invalid mnt_ns_fd + * - EFAULT: req or mnt_id are unaccessible memories + * - EINVAL: invalid flags or mnt_id request + * - ENOENT: non-existent mount point +@@ -20,8 +21,12 @@ + #include "lapi/syscalls.h" + + #define MNT_SIZE 32 +-#define BEFORE_6_18 1 +-#define AFTER_6_18 2 ++/* ++ * For commit 78f0e33cd6c9 ("fs/namespace: correctly handle errors returned ++ * by grab_requested_mnt_ns") from v6.18-rc7 backported to v6.17.9. ++ */ ++#define BEFORE_6_17_9 1 ++#define AFTER_6_17_9 2 + + static mnt_id_req *request; + static uint64_t mnt_ids[MNT_SIZE]; +@@ -84,7 +89,7 @@ static struct tcase { + .nr_mnt_ids = MNT_SIZE, + .exp_errno = EINVAL, + .msg = "invalid mnt_id_req.spare", +- .kver = BEFORE_6_18, ++ .kver = BEFORE_6_17_9, + }, + { + .req_usage = 1, +@@ -95,7 +100,7 @@ static struct tcase { + .nr_mnt_ids = MNT_SIZE, + .exp_errno = EBADF, + .msg = "invalid mnt_id_req.mnt_ns_fd", +- .kver = AFTER_6_18, ++ .kver = AFTER_6_17_9, + }, + { + .req_usage = 1, +@@ -154,10 +159,10 @@ static void run(unsigned int n) + + static void setup(void) + { +- if (tst_kvercmp(6, 18, 0) >= 0) +- kver = AFTER_6_18; ++ if (tst_kvercmp(6, 17, 9) >= 0) ++ kver = AFTER_6_17_9; + else +- kver = BEFORE_6_18; ++ kver = BEFORE_6_17_9; + } + + static struct tst_test test = { +-- +2.52.0 + From 7271e747b6753c1f1d96342353d817ddea72d3d8 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 20:16:08 +0000 Subject: [PATCH 251/502] Update s390-check-opcodes.pl Remove the --check-formats option. The specialisation of opcode names in /opcode/s390_opc.txt is no longer interesting as we do not need to distinguish whether a register number in an opcode denotes a GPR od FPR or whatever. Instead it is better to use those opcode format names as shown in the Principles of Ops wherever possible. Simplifies proofreading. --- auxprogs/s390-check-opcodes.pl | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/auxprogs/s390-check-opcodes.pl b/auxprogs/s390-check-opcodes.pl index 4e0d2c6ac..0feec276e 100755 --- a/auxprogs/s390-check-opcodes.pl +++ b/auxprogs/s390-check-opcodes.pl @@ -2,7 +2,6 @@ use strict; use warnings; -use Getopt::Long; #------------------------------------------------------------------ # This script assists in updating s390-opcodes.csv @@ -16,17 +15,15 @@ my $csv_file; my $opc_file; my $toir_file; -my $check_formats = 0; -my $usage = "usage: s390-check-opcodes [--check-formats] s390-opcodes.csv " +my $usage = "usage: s390-check-opcodes s390-opcodes.csv " . "s390-opc.txt guest_s390_toIR.c\n"; -GetOptions("check-formats" => \$check_formats) || die $usage; - my $num_arg = $#ARGV + 1; if ($num_arg == 0) { my $cwd = `pwd`; my ($basedir) = $cwd =~ m|(.*)/valgrind/|; + die $usage if (! defined $basedir); $csv_file = "$basedir/valgrind/docs/internals/s390-opcodes.csv"; $opc_file = "$basedir/binutils-gdb/opcodes/s390-opc.txt"; $toir_file = "$basedir/valgrind/VEX/priv/guest_s390_toIR.c"; @@ -39,12 +36,10 @@ } my %opc_desc = (); -my %opc_format = (); my %csv_desc = (); my %csv_implemented = (); my %toir_implemented = (); my %toir_decoded = (); -my %toir_format = (); my %known_arch = map {($_ => 1)} qw(g5 z900 z990 z9-109 z9-ec z10 z196 zEC12 z13 arch12 arch13 arch14 arch15); @@ -261,9 +256,6 @@ $opc_desc{$mnemonic} = $description; } - if (! exists $opc_format{$mnemonic}) { - $opc_format{$mnemonic} = $format; - } if ($description =~ /,/) { print "warning: description of $mnemonic contains comma\n"; } @@ -325,9 +317,6 @@ my $mnemonic = lc $1; $toir_implemented{$mnemonic} = 1; } - if ($line =~ /^..*s390_format_([A-Z_]+)[ ]*\([ ]*s390_irgen_([A-Z]+)/) { - $toir_format{lc $2} = $1; - } } close(TOIR); @@ -385,22 +374,5 @@ } } -#---------------------------------------------------- -# 5) Cross-check opcode formats -#---------------------------------------------------- -if ($check_formats) { - foreach my $opc (keys %toir_format) { - if (! exists $opc_format{$opc}) { - print "*** format $toir_format{$opc} does not exist in s390-opc.txt\n"; - } else { - if ($opc_format{$opc} ne $toir_format{$opc}) { - print "*** format for opcode $opc differs:\n"; - print " binutils: $opc_format{$opc}\n"; - print " toIR: $toir_format{$opc}\n"; - } - } - } -} - print "there are " . int(keys %toir_implemented) . " implemented opcodes\n"; exit 0 From 6343116db299575b4fd9e0d51a849ed036d3eab4 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 22:05:00 +0000 Subject: [PATCH 252/502] Remove s390_format_RIE_RRUUU Also change field access macros from RIE_RRUUU_r1 -> RIEf_r1 and so on. --- VEX/priv/guest_s390_toIR.c | 87 +++++++++++++++----------------------- 1 file changed, 33 insertions(+), 54 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 76d983c1c..1a92ffbb3 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -144,11 +144,11 @@ typedef enum { #define RIE_r1(insn) (((insn) >> 52) & 0xf) #define RIE_r3(insn) (((insn) >> 48) & 0xf) #define RIE_i2(insn) (((insn) >> 32) & 0xffff) -#define RIE_RRUUU_r1(insn) (((insn) >> 52) & 0xf) -#define RIE_RRUUU_r2(insn) (((insn) >> 48) & 0xf) -#define RIE_RRUUU_i3(insn) (((insn) >> 40) & 0xff) -#define RIE_RRUUU_i4(insn) (((insn) >> 32) & 0xff) -#define RIE_RRUUU_i5(insn) (((insn) >> 24) & 0xff) +#define RIEf_r1(insn) (((insn) >> 52) & 0xf) +#define RIEf_r2(insn) (((insn) >> 48) & 0xf) +#define RIEf_i3(insn) (((insn) >> 40) & 0xff) +#define RIEf_i4(insn) (((insn) >> 32) & 0xff) +#define RIEf_i5(insn) (((insn) >> 24) & 0xff) #define RIE_R0xU_r1(insn) (((insn) >> 52) & 0xf) #define RIE_R0xU_i2(insn) (((insn) >> 32) & 0xffff) #define RIE_R0xU_m3(insn) (((insn) >> 28) & 0xf) @@ -20537,55 +20537,34 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RIEv3_r1(ovl), RIEv3_m3(ovl), RIEv3_i4(ovl)); goto ok; - case 0xec0000000051ULL: s390_format_RIE_RRUUU(s390_irgen_RISBLG, - RIE_RRUUU_r1(ovl), - RIE_RRUUU_r2(ovl), - RIE_RRUUU_i3(ovl), - RIE_RRUUU_i4(ovl), - RIE_RRUUU_i5(ovl)); - goto ok; - case 0xec0000000054ULL: s390_format_RIE_RRUUU(s390_irgen_RNSBG, - RIE_RRUUU_r1(ovl), - RIE_RRUUU_r2(ovl), - RIE_RRUUU_i3(ovl), - RIE_RRUUU_i4(ovl), - RIE_RRUUU_i5(ovl)); - goto ok; - case 0xec0000000055ULL: s390_format_RIE_RRUUU(s390_irgen_RISBG, - RIE_RRUUU_r1(ovl), - RIE_RRUUU_r2(ovl), - RIE_RRUUU_i3(ovl), - RIE_RRUUU_i4(ovl), - RIE_RRUUU_i5(ovl)); - goto ok; - case 0xec0000000056ULL: s390_format_RIE_RRUUU(s390_irgen_ROSBG, - RIE_RRUUU_r1(ovl), - RIE_RRUUU_r2(ovl), - RIE_RRUUU_i3(ovl), - RIE_RRUUU_i4(ovl), - RIE_RRUUU_i5(ovl)); - goto ok; - case 0xec0000000057ULL: s390_format_RIE_RRUUU(s390_irgen_RXSBG, - RIE_RRUUU_r1(ovl), - RIE_RRUUU_r2(ovl), - RIE_RRUUU_i3(ovl), - RIE_RRUUU_i4(ovl), - RIE_RRUUU_i5(ovl)); - goto ok; - case 0xec0000000059ULL: s390_format_RIE_RRUUU(s390_irgen_RISBGN, - RIE_RRUUU_r1(ovl), - RIE_RRUUU_r2(ovl), - RIE_RRUUU_i3(ovl), - RIE_RRUUU_i4(ovl), - RIE_RRUUU_i5(ovl)); - goto ok; - case 0xec000000005dULL: s390_format_RIE_RRUUU(s390_irgen_RISBHG, - RIE_RRUUU_r1(ovl), - RIE_RRUUU_r2(ovl), - RIE_RRUUU_i3(ovl), - RIE_RRUUU_i4(ovl), - RIE_RRUUU_i5(ovl)); - goto ok; + case 0xec0000000051ULL: s390_irgen_RISBLG(RIEf_r1(ovl), RIEf_r2(ovl), + RIEf_i3(ovl), RIEf_i4(ovl), + RIEf_i5(ovl)); + goto ok; + case 0xec0000000054ULL: s390_irgen_RNSBG(RIEf_r1(ovl), RIEf_r2(ovl), + RIEf_i3(ovl), RIEf_i4(ovl), + RIEf_i5(ovl)); + goto ok; + case 0xec0000000055ULL: s390_irgen_RISBG(RIEf_r1(ovl), RIEf_r2(ovl), + RIEf_i3(ovl), RIEf_i4(ovl), + RIEf_i5(ovl)); + goto ok; + case 0xec0000000056ULL: s390_irgen_ROSBG(RIEf_r1(ovl), RIEf_r2(ovl), + RIEf_i3(ovl), RIEf_i4(ovl), + RIEf_i5(ovl)); + goto ok; + case 0xec0000000057ULL: s390_irgen_RXSBG(RIEf_r1(ovl), RIEf_r2(ovl), + RIEf_i3(ovl), RIEf_i4(ovl), + RIEf_i5(ovl)); + goto ok; + case 0xec0000000059ULL: s390_irgen_RISBGN(RIEf_r1(ovl), RIEf_r2(ovl), + RIEf_i3(ovl), RIEf_i4(ovl), + RIEf_i5(ovl)); + goto ok; + case 0xec000000005dULL: s390_irgen_RISBHG(RIEf_r1(ovl), RIEf_r2(ovl), + RIEf_i3(ovl), RIEf_i4(ovl), + RIEf_i5(ovl)); + goto ok; case 0xec0000000064ULL: s390_format_RIE_RRPU(s390_irgen_CGRJ, RIE_RRPU_r1(ovl), RIE_RRPU_r2(ovl), From 497756bcd2ff7579b77572a37367b9c4e395b31a Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 22:25:51 +0000 Subject: [PATCH 253/502] Remove s390_format_RIE_R0UU and s390_format_RIE_R0IU Change field access macros from RIE_R0xU_r1 -> RIEa_r1 and so on. Also this time really remove s390_format_RIE_RRUUU. --- VEX/priv/guest_s390_toIR.c | 56 ++++++++++---------------------------- 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 1a92ffbb3..94ff27075 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -149,9 +149,9 @@ typedef enum { #define RIEf_i3(insn) (((insn) >> 40) & 0xff) #define RIEf_i4(insn) (((insn) >> 32) & 0xff) #define RIEf_i5(insn) (((insn) >> 24) & 0xff) -#define RIE_R0xU_r1(insn) (((insn) >> 52) & 0xf) -#define RIE_R0xU_i2(insn) (((insn) >> 32) & 0xffff) -#define RIE_R0xU_m3(insn) (((insn) >> 28) & 0xf) +#define RIEa_r1(insn) (((insn) >> 52) & 0xf) +#define RIEa_i2(insn) (((insn) >> 32) & 0xffff) +#define RIEa_m3(insn) (((insn) >> 28) & 0xf) #define RIE_RRPU_r1(insn) (((insn) >> 52) & 0xf) #define RIE_RRPU_r2(insn) (((insn) >> 48) & 0xf) #define RIE_RRPU_i4(insn) (((insn) >> 32) & 0xffff) @@ -2745,28 +2745,6 @@ s390_format_RIE_RRI0(void (*irgen)(UChar r1, UChar r3, UShort i2), irgen(r1, r3, i2); } -static void -s390_format_RIE_RRUUU(void (*irgen)(UChar r1, UChar r2, UChar i3, - UChar i4, UChar i5), - UChar r1, UChar r2, UChar i3, UChar i4, UChar i5) -{ - irgen(r1, r2, i3, i4, i5); -} - -static void -s390_format_R0UU(void (*irgen)(UChar r1, UShort i2, UChar m3), - UChar r1, UShort i2, UChar m3) -{ - irgen(r1, i2, m3); -} - -static void -s390_format_R0IU(void (*irgen)(UChar r1, UShort i2, UChar m3), - UChar r1, UShort i2, UChar m3) -{ - irgen(r1, i2, m3); -} - static void s390_format_RIE_RRPU(void (*irgen)(UChar r1, UChar r2, UShort i4, UChar m3), UChar r1, UChar r2, UShort i4, UChar m3) @@ -20575,22 +20553,18 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RIE_RRPU_r2(ovl), RIE_RRPU_i4(ovl), RIE_RRPU_m3(ovl)); goto ok; - case 0xec0000000070ULL: s390_format_R0IU(s390_irgen_CGIT, - RIE_R0xU_r1(ovl), - RIE_R0xU_i2(ovl), - RIE_R0xU_m3(ovl)); goto ok; - case 0xec0000000071ULL: s390_format_R0UU(s390_irgen_CLGIT, - RIE_R0xU_r1(ovl), - RIE_R0xU_i2(ovl), - RIE_R0xU_m3(ovl)); goto ok; - case 0xec0000000072ULL: s390_format_R0IU(s390_irgen_CIT, - RIE_R0xU_r1(ovl), - RIE_R0xU_i2(ovl), - RIE_R0xU_m3(ovl)); goto ok; - case 0xec0000000073ULL: s390_format_R0UU(s390_irgen_CLFIT, - RIE_R0xU_r1(ovl), - RIE_R0xU_i2(ovl), - RIE_R0xU_m3(ovl)); goto ok; + case 0xec0000000070ULL: s390_irgen_CGIT(RIEa_r1(ovl), RIEa_i2(ovl), + RIEa_m3(ovl)); + goto ok; + case 0xec0000000071ULL: s390_irgen_CLGIT(RIEa_r1(ovl), RIEa_i2(ovl), + RIEa_m3(ovl)); + goto ok; + case 0xec0000000072ULL: s390_irgen_CIT(RIEa_r1(ovl), RIEa_i2(ovl), + RIEa_m3(ovl)); + goto ok; + case 0xec0000000073ULL: s390_irgen_CLFIT(RIEa_r1(ovl), RIEa_i2(ovl), + RIEa_m3(ovl)); + goto ok; case 0xec0000000076ULL: s390_format_RIE_RRPU(s390_irgen_CRJ, RIE_RRPU_r1(ovl), RIE_RRPU_r2(ovl), From b2bc1b4cf1d140c720738d10cfc63ad9e2fd3ca7 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 22:34:26 +0000 Subject: [PATCH 254/502] Remove s390_format_RIE_RRPU Change field access macros from RIE_RRPU_r1 -> RIEb_r1 and so on. --- VEX/priv/guest_s390_toIR.c | 47 +++++++++++++------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 94ff27075..3c3761259 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -152,10 +152,10 @@ typedef enum { #define RIEa_r1(insn) (((insn) >> 52) & 0xf) #define RIEa_i2(insn) (((insn) >> 32) & 0xffff) #define RIEa_m3(insn) (((insn) >> 28) & 0xf) -#define RIE_RRPU_r1(insn) (((insn) >> 52) & 0xf) -#define RIE_RRPU_r2(insn) (((insn) >> 48) & 0xf) -#define RIE_RRPU_i4(insn) (((insn) >> 32) & 0xffff) -#define RIE_RRPU_m3(insn) (((insn) >> 28) & 0xf) +#define RIEb_r1(insn) (((insn) >> 52) & 0xf) +#define RIEb_r2(insn) (((insn) >> 48) & 0xf) +#define RIEb_i4(insn) (((insn) >> 32) & 0xffff) +#define RIEb_m3(insn) (((insn) >> 28) & 0xf) #define RIEv3_r1(insn) (((insn) >> 52) & 0xf) #define RIEv3_m3(insn) (((insn) >> 48) & 0xf) #define RIEv3_i4(insn) (((insn) >> 32) & 0xffff) @@ -2745,13 +2745,6 @@ s390_format_RIE_RRI0(void (*irgen)(UChar r1, UChar r3, UShort i2), irgen(r1, r3, i2); } -static void -s390_format_RIE_RRPU(void (*irgen)(UChar r1, UChar r2, UShort i4, UChar m3), - UChar r1, UChar r2, UShort i4, UChar m3) -{ - irgen(r1, r2, i4, m3); -} - static void s390_format_RIE_RUPU(void (*irgen)(UChar r1, UChar m3, UShort i4, UChar i2), UChar r1, UChar m3, UShort i4, UChar i2) @@ -20543,16 +20536,12 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RIEf_i3(ovl), RIEf_i4(ovl), RIEf_i5(ovl)); goto ok; - case 0xec0000000064ULL: s390_format_RIE_RRPU(s390_irgen_CGRJ, - RIE_RRPU_r1(ovl), - RIE_RRPU_r2(ovl), - RIE_RRPU_i4(ovl), - RIE_RRPU_m3(ovl)); goto ok; - case 0xec0000000065ULL: s390_format_RIE_RRPU(s390_irgen_CLGRJ, - RIE_RRPU_r1(ovl), - RIE_RRPU_r2(ovl), - RIE_RRPU_i4(ovl), - RIE_RRPU_m3(ovl)); goto ok; + case 0xec0000000064ULL: s390_irgen_CGRJ(RIEb_r1(ovl), RIEb_r2(ovl), + RIEb_i4(ovl), RIEb_m3(ovl)); + goto ok; + case 0xec0000000065ULL: s390_irgen_CLGRJ(RIEb_r1(ovl), RIEb_r2(ovl), + RIEb_i4(ovl), RIEb_m3(ovl)); + goto ok; case 0xec0000000070ULL: s390_irgen_CGIT(RIEa_r1(ovl), RIEa_i2(ovl), RIEa_m3(ovl)); goto ok; @@ -20565,16 +20554,12 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xec0000000073ULL: s390_irgen_CLFIT(RIEa_r1(ovl), RIEa_i2(ovl), RIEa_m3(ovl)); goto ok; - case 0xec0000000076ULL: s390_format_RIE_RRPU(s390_irgen_CRJ, - RIE_RRPU_r1(ovl), - RIE_RRPU_r2(ovl), - RIE_RRPU_i4(ovl), - RIE_RRPU_m3(ovl)); goto ok; - case 0xec0000000077ULL: s390_format_RIE_RRPU(s390_irgen_CLRJ, - RIE_RRPU_r1(ovl), - RIE_RRPU_r2(ovl), - RIE_RRPU_i4(ovl), - RIE_RRPU_m3(ovl)); goto ok; + case 0xec0000000076ULL: s390_irgen_CRJ(RIEb_r1(ovl), RIEb_r2(ovl), + RIEb_i4(ovl), RIEb_m3(ovl)); + goto ok; + case 0xec0000000077ULL: s390_irgen_CLRJ(RIEb_r1(ovl), RIEb_r2(ovl), + RIEb_i4(ovl), RIEb_m3(ovl)); + goto ok; case 0xec000000007cULL: s390_format_RIE_RUPI(s390_irgen_CGIJ, RIEv3_r1(ovl), RIEv3_m3(ovl), From 8fb22915d6cab8c307508b91d56c885c4e6bdd9a Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 15 Jan 2026 23:07:54 +0000 Subject: [PATCH 255/502] Remove s390_format_RIE_RRI0 and s390_format_RRP Change field access macros from RIE_r1 -> RIEd_r1 and so on. Add field access macros RIEe_r1, RIEe_r3 and RIEe_i2. --- VEX/priv/guest_s390_toIR.c | 59 ++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 3c3761259..cf0eb2175 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -141,9 +141,12 @@ typedef enum { #define SMI_b3(insn) (((insn) >> 44) & 0xf) #define SMI_d3(insn) (((insn) >> 32) & 0xfff) #define SMI_i2(insn) (((insn) >> 16) & 0xffff) -#define RIE_r1(insn) (((insn) >> 52) & 0xf) -#define RIE_r3(insn) (((insn) >> 48) & 0xf) -#define RIE_i2(insn) (((insn) >> 32) & 0xffff) +#define RIEd_r1(insn) (((insn) >> 52) & 0xf) +#define RIEd_r3(insn) (((insn) >> 48) & 0xf) +#define RIEd_i2(insn) (((insn) >> 32) & 0xffff) +#define RIEe_r1(insn) (((insn) >> 52) & 0xf) +#define RIEe_r3(insn) (((insn) >> 48) & 0xf) +#define RIEe_i2(insn) (((insn) >> 32) & 0xffff) #define RIEf_r1(insn) (((insn) >> 52) & 0xf) #define RIEf_r2(insn) (((insn) >> 48) & 0xf) #define RIEf_i3(insn) (((insn) >> 40) & 0xff) @@ -2731,20 +2734,6 @@ s390_format_MII_UPP(void (*irgen)(UChar m1, UShort i2, UInt i3), irgen(m1, i2, i3); } -static void -s390_format_RIE_RRP(void (*irgen)(UChar r1, UChar r3, UShort i2), - UChar r1, UChar r3, UShort i2) -{ - irgen(r1, r3, i2); -} - -static void -s390_format_RIE_RRI0(void (*irgen)(UChar r1, UChar r3, UShort i2), - UChar r1, UChar r3, UShort i2) -{ - irgen(r1, r3, i2); -} - static void s390_format_RIE_RUPU(void (*irgen)(UChar r1, UChar m3, UShort i4, UChar i2), UChar r1, UChar m3, UShort i4, UChar i2) @@ -20494,12 +20483,12 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RIEv3_r1(ovl), RIEv3_m3(ovl), RIEv3_i4(ovl)); goto ok; - case 0xec0000000044ULL: s390_format_RIE_RRP(s390_irgen_BRXHG, RIE_r1(ovl), - RIE_r3(ovl), RIE_i2(ovl)); - goto ok; - case 0xec0000000045ULL: s390_format_RIE_RRP(s390_irgen_BRXLG, RIE_r1(ovl), - RIE_r3(ovl), RIE_i2(ovl)); - goto ok; + case 0xec0000000044ULL: s390_irgen_BRXHG(RIEe_r1(ovl), RIEe_r3(ovl), + RIEe_i2(ovl)); + goto ok; + case 0xec0000000045ULL: s390_irgen_BRXLG(RIEe_r1(ovl), RIEe_r3(ovl), + RIEe_i2(ovl)); + goto ok; case 0xec0000000046ULL: s390_format_RIE_RUPIX(s390_irgen_LOCGHI, RIEv3_r1(ovl), RIEv3_m3(ovl), @@ -20580,18 +20569,18 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RIEv3_m3(ovl), RIEv3_i4(ovl), RIEv3_i2(ovl)); goto ok; - case 0xec00000000d8ULL: s390_format_RIE_RRI0(s390_irgen_AHIK, RIE_r1(ovl), - RIE_r3(ovl), RIE_i2(ovl)); - goto ok; - case 0xec00000000d9ULL: s390_format_RIE_RRI0(s390_irgen_AGHIK, - RIE_r1(ovl), RIE_r3(ovl), - RIE_i2(ovl)); goto ok; - case 0xec00000000daULL: s390_format_RIE_RRI0(s390_irgen_ALHSIK, - RIE_r1(ovl), RIE_r3(ovl), - RIE_i2(ovl)); goto ok; - case 0xec00000000dbULL: s390_format_RIE_RRI0(s390_irgen_ALGHSIK, - RIE_r1(ovl), RIE_r3(ovl), - RIE_i2(ovl)); goto ok; + case 0xec00000000d8ULL: s390_irgen_AHIK(RIEd_r1(ovl), RIEd_r3(ovl), + RIEd_i2(ovl)); + goto ok; + case 0xec00000000d9ULL: s390_irgen_AGHIK(RIEd_r1(ovl), RIEd_r3(ovl), + RIEd_i2(ovl)); + goto ok; + case 0xec00000000daULL: s390_irgen_ALHSIK(RIEd_r1(ovl), RIEd_r3(ovl), + RIEd_i2(ovl)); + goto ok; + case 0xec00000000dbULL: s390_irgen_ALGHSIK(RIEd_r1(ovl), RIEd_r3(ovl), + RIEd_i2(ovl)); + goto ok; case 0xec00000000e4ULL: s390_format_RRS(s390_irgen_CGRB, RRS_r1(ovl), RRS_r2(ovl), RRS_b4(ovl), RRS_d4(ovl), RRS_m3(ovl)); From 3982ac87d37e6bb8ce6f0013e1d1254a8cbabe5b Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 16 Jan 2026 00:09:27 +0000 Subject: [PATCH 256/502] Remove s390_format_RIE_RUPU, s390_format_RUPI and s390_format_RUPIX Change field access macros from RIEv3_r1 -> RIEc_r1 and so on. Add field access macros RIEg_r1, RIEg_m3 and RIEg_i2. --- VEX/priv/guest_s390_toIR.c | 85 +++++++++++++------------------------- 1 file changed, 28 insertions(+), 57 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index cf0eb2175..07c04c0e6 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -159,10 +159,13 @@ typedef enum { #define RIEb_r2(insn) (((insn) >> 48) & 0xf) #define RIEb_i4(insn) (((insn) >> 32) & 0xffff) #define RIEb_m3(insn) (((insn) >> 28) & 0xf) -#define RIEv3_r1(insn) (((insn) >> 52) & 0xf) -#define RIEv3_m3(insn) (((insn) >> 48) & 0xf) -#define RIEv3_i4(insn) (((insn) >> 32) & 0xffff) -#define RIEv3_i2(insn) (((insn) >> 24) & 0xff) +#define RIEc_r1(insn) (((insn) >> 52) & 0xf) +#define RIEc_m3(insn) (((insn) >> 48) & 0xf) +#define RIEc_i4(insn) (((insn) >> 32) & 0xffff) +#define RIEc_i2(insn) (((insn) >> 24) & 0xff) +#define RIEg_r1(insn) (((insn) >> 52) & 0xf) +#define RIEg_m3(insn) (((insn) >> 48) & 0xf) +#define RIEg_i2(insn) (((insn) >> 32) & 0xffff) #define RIL_r1(insn) (((insn) >> 52) & 0xf) #define RIL_i2(insn) (((insn) >> 16) & 0xffffffff) #define RIS_r1(insn) (((insn) >> 52) & 0xf) @@ -2734,27 +2737,6 @@ s390_format_MII_UPP(void (*irgen)(UChar m1, UShort i2, UInt i3), irgen(m1, i2, i3); } -static void -s390_format_RIE_RUPU(void (*irgen)(UChar r1, UChar m3, UShort i4, UChar i2), - UChar r1, UChar m3, UShort i4, UChar i2) -{ - irgen(r1, m3, i4, i2); -} - -static void -s390_format_RIE_RUPI(void (*irgen)(UChar r1, UChar m3, UShort i4, UChar i2), - UChar r1, UChar m3, UShort i4, UChar i2) -{ - irgen(r1, m3, i4, i2); -} - -static void -s390_format_RIE_RUPIX(void (*irgen)(UChar r1, UChar m3, UShort i2), - UChar r1, UChar m3, UShort i2) -{ - irgen(r1, m3, i2); -} - static void s390_format_RIS(void (*irgen)(UChar r1, UChar m3, UChar i2, IRTemp op4addr), @@ -20479,24 +20461,21 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RSY_r3(ovl), RSY_b2(ovl), RSY_dl2(ovl), RSY_dh2(ovl)); goto ok; - case 0xec0000000042ULL: s390_format_RIE_RUPIX(s390_irgen_LOCHI, - RIEv3_r1(ovl), - RIEv3_m3(ovl), - RIEv3_i4(ovl)); goto ok; + case 0xec0000000042ULL: s390_irgen_LOCHI(RIEg_r1(ovl), RIEg_m3(ovl), + RIEg_i2(ovl)); + goto ok; case 0xec0000000044ULL: s390_irgen_BRXHG(RIEe_r1(ovl), RIEe_r3(ovl), RIEe_i2(ovl)); goto ok; case 0xec0000000045ULL: s390_irgen_BRXLG(RIEe_r1(ovl), RIEe_r3(ovl), RIEe_i2(ovl)); goto ok; - case 0xec0000000046ULL: s390_format_RIE_RUPIX(s390_irgen_LOCGHI, - RIEv3_r1(ovl), - RIEv3_m3(ovl), - RIEv3_i4(ovl)); goto ok; - case 0xec000000004eULL: s390_format_RIE_RUPIX(s390_irgen_LOCHHI, - RIEv3_r1(ovl), - RIEv3_m3(ovl), - RIEv3_i4(ovl)); goto ok; + case 0xec0000000046ULL: s390_irgen_LOCGHI(RIEg_r1(ovl), RIEg_m3(ovl), + RIEg_i2(ovl)); + goto ok; + case 0xec000000004eULL: s390_irgen_LOCHHI(RIEg_r1(ovl), RIEg_m3(ovl), + RIEg_i2(ovl)); + goto ok; case 0xec0000000051ULL: s390_irgen_RISBLG(RIEf_r1(ovl), RIEf_r2(ovl), RIEf_i3(ovl), RIEf_i4(ovl), RIEf_i5(ovl)); @@ -20549,26 +20528,18 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xec0000000077ULL: s390_irgen_CLRJ(RIEb_r1(ovl), RIEb_r2(ovl), RIEb_i4(ovl), RIEb_m3(ovl)); goto ok; - case 0xec000000007cULL: s390_format_RIE_RUPI(s390_irgen_CGIJ, - RIEv3_r1(ovl), - RIEv3_m3(ovl), - RIEv3_i4(ovl), - RIEv3_i2(ovl)); goto ok; - case 0xec000000007dULL: s390_format_RIE_RUPU(s390_irgen_CLGIJ, - RIEv3_r1(ovl), - RIEv3_m3(ovl), - RIEv3_i4(ovl), - RIEv3_i2(ovl)); goto ok; - case 0xec000000007eULL: s390_format_RIE_RUPI(s390_irgen_CIJ, - RIEv3_r1(ovl), - RIEv3_m3(ovl), - RIEv3_i4(ovl), - RIEv3_i2(ovl)); goto ok; - case 0xec000000007fULL: s390_format_RIE_RUPU(s390_irgen_CLIJ, - RIEv3_r1(ovl), - RIEv3_m3(ovl), - RIEv3_i4(ovl), - RIEv3_i2(ovl)); goto ok; + case 0xec000000007cULL: s390_irgen_CGIJ(RIEc_r1(ovl), RIEc_m3(ovl), + RIEc_i4(ovl), RIEc_i2(ovl)); + goto ok; + case 0xec000000007dULL: s390_irgen_CLGIJ(RIEc_r1(ovl), RIEc_m3(ovl), + RIEc_i4(ovl), RIEc_i2(ovl)); + goto ok; + case 0xec000000007eULL: s390_irgen_CIJ(RIEc_r1(ovl), RIEc_m3(ovl), + RIEc_i4(ovl), RIEc_i2(ovl)); + goto ok; + case 0xec000000007fULL: s390_irgen_CLIJ(RIEc_r1(ovl), RIEc_m3(ovl), + RIEc_i4(ovl), RIEc_i2(ovl)); + goto ok; case 0xec00000000d8ULL: s390_irgen_AHIK(RIEd_r1(ovl), RIEd_r3(ovl), RIEd_i2(ovl)); goto ok; From 43812383efc12afcf3016307107863ffb750114c Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 16 Jan 2026 08:42:55 +0000 Subject: [PATCH 257/502] s390: Consolidate s390_format_RXY_... functions Use s390_format_RXY instead. --- VEX/priv/guest_s390_toIR.c | 888 ++++++++++++++++++------------------- 1 file changed, 431 insertions(+), 457 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 07c04c0e6..a20d2bd2a 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -3057,8 +3057,8 @@ s390_format_RXF_FRRDF(void (*irgen)(UChar, IRTemp, UChar), } static void -s390_format_RXY_RRRD(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) +s390_format_RXY(void (*irgen)(UChar r1, IRTemp op2addr), + UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) { IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -3071,32 +3071,6 @@ s390_format_RXY_RRRD(void (*irgen)(UChar r1, IRTemp op2addr), irgen(r1, op2addr); } -static void -s390_format_RXY_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) -{ - IRTemp op2addr = newTemp(Ity_I64); - IRTemp d2 = newTemp(Ity_I64); - - assign(d2, mkU64(((ULong)(Long)(Char)dh2 << 12) | ((ULong)dl2))); - assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkexpr(d2), - b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : - mkU64(0))); - - irgen(r1, op2addr); -} - -static void -s390_format_RXY_URRD(void (*irgen)(void), - UChar r1 __attribute__((unused)), - UChar x2 __attribute__((unused)), - UChar b2 __attribute__((unused)), - UShort dl2 __attribute__((unused)), - UChar dh2 __attribute__((unused))) -{ - irgen(); -} - static void s390_format_S_RD(void (*irgen)(IRTemp op2addr), UChar b2, UShort d2) @@ -19135,243 +19109,243 @@ s390_decode_6byte_and_irgen(const UChar *bytes) ((ULong)bytes[4] << 24) | ((ULong)bytes[5] << 16); switch ((ovl >> 16) & 0xff00000000ffULL) { - case 0xe30000000002ULL: s390_format_RXY_RRRD(s390_irgen_LTG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe30000000002ULL: s390_format_RXY(s390_irgen_LTG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe30000000003ULL: /* LRAG */ goto unimplemented; - case 0xe30000000004ULL: s390_format_RXY_RRRD(s390_irgen_LG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000006ULL: s390_format_RXY_RRRD(s390_irgen_CVBY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000008ULL: s390_format_RXY_RRRD(s390_irgen_AG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000009ULL: s390_format_RXY_RRRD(s390_irgen_SG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000000aULL: s390_format_RXY_RRRD(s390_irgen_ALG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000000bULL: s390_format_RXY_RRRD(s390_irgen_SLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000000cULL: s390_format_RXY_RRRD(s390_irgen_MSG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000000dULL: s390_format_RXY_RRRD(s390_irgen_DSG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe30000000004ULL: s390_format_RXY(s390_irgen_LG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000006ULL: s390_format_RXY(s390_irgen_CVBY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000008ULL: s390_format_RXY(s390_irgen_AG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000009ULL: s390_format_RXY(s390_irgen_SG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000000aULL: s390_format_RXY(s390_irgen_ALG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000000bULL: s390_format_RXY(s390_irgen_SLG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000000cULL: s390_format_RXY(s390_irgen_MSG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000000dULL: s390_format_RXY(s390_irgen_DSG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe3000000000eULL: /* CVBG */ goto unimplemented; - case 0xe3000000000fULL: s390_format_RXY_RRRD(s390_irgen_LRVG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000012ULL: s390_format_RXY_RRRD(s390_irgen_LT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe3000000000fULL: s390_format_RXY(s390_irgen_LRVG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000012ULL: s390_format_RXY(s390_irgen_LT, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe30000000013ULL: /* LRAY */ goto unimplemented; - case 0xe30000000014ULL: s390_format_RXY_RRRD(s390_irgen_LGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000015ULL: s390_format_RXY_RRRD(s390_irgen_LGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000016ULL: s390_format_RXY_RRRD(s390_irgen_LLGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000017ULL: s390_format_RXY_RRRD(s390_irgen_LLGT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000018ULL: s390_format_RXY_RRRD(s390_irgen_AGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000019ULL: s390_format_RXY_RRRD(s390_irgen_SGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000001aULL: s390_format_RXY_RRRD(s390_irgen_ALGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000001bULL: s390_format_RXY_RRRD(s390_irgen_SLGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000001cULL: s390_format_RXY_RRRD(s390_irgen_MSGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000001dULL: s390_format_RXY_RRRD(s390_irgen_DSGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000001eULL: s390_format_RXY_RRRD(s390_irgen_LRV, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000001fULL: s390_format_RXY_RRRD(s390_irgen_LRVH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000020ULL: s390_format_RXY_RRRD(s390_irgen_CG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000021ULL: s390_format_RXY_RRRD(s390_irgen_CLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000024ULL: s390_format_RXY_RRRD(s390_irgen_STG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe30000000014ULL: s390_format_RXY(s390_irgen_LGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000015ULL: s390_format_RXY(s390_irgen_LGH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), + RXY_dh2(ovl)); + goto ok; + case 0xe30000000016ULL: s390_format_RXY(s390_irgen_LLGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000017ULL: s390_format_RXY(s390_irgen_LLGT, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000018ULL: s390_format_RXY(s390_irgen_AGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000019ULL: s390_format_RXY(s390_irgen_SGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), + RXY_dh2(ovl)); + goto ok; + case 0xe3000000001aULL: s390_format_RXY(s390_irgen_ALGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000001bULL: s390_format_RXY(s390_irgen_SLGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000001cULL: s390_format_RXY(s390_irgen_MSGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000001dULL: s390_format_RXY(s390_irgen_DSGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000001eULL: s390_format_RXY(s390_irgen_LRV, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000001fULL: s390_format_RXY(s390_irgen_LRVH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000020ULL: s390_format_RXY(s390_irgen_CG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000021ULL: s390_format_RXY(s390_irgen_CLG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000024ULL: s390_format_RXY(s390_irgen_STG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe30000000025ULL: /* NTSTG */ goto unimplemented; - case 0xe30000000026ULL: s390_format_RXY_RRRD(s390_irgen_CVDY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000002aULL: s390_format_RXY_RRRD(s390_irgen_LZRG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe30000000026ULL: s390_format_RXY(s390_irgen_CVDY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000002aULL: s390_format_RXY(s390_irgen_LZRG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe3000000002eULL: /* CVDG */ goto unimplemented; - case 0xe3000000002fULL: s390_format_RXY_RRRD(s390_irgen_STRVG, - RXY_r1(ovl), RXY_x2(ovl), - RXY_b2(ovl), RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000030ULL: s390_format_RXY_RRRD(s390_irgen_CGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000031ULL: s390_format_RXY_RRRD(s390_irgen_CLGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000032ULL: s390_format_RXY_RRRD(s390_irgen_LTGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000034ULL: s390_format_RXY_RRRD(s390_irgen_CGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000036ULL: s390_format_RXY_URRD(s390_irgen_PFD, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000038ULL: s390_format_RXY_RRRD(s390_irgen_AGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000039ULL: s390_format_RXY_RRRD(s390_irgen_SGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000003aULL: s390_format_RXY_RRRD(s390_irgen_LLZRGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000003bULL: s390_format_RXY_RRRD(s390_irgen_LZRF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000003cULL: s390_format_RXY_RRRD(s390_irgen_MGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000003eULL: s390_format_RXY_RRRD(s390_irgen_STRV, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000003fULL: s390_format_RXY_RRRD(s390_irgen_STRVH, - RXY_r1(ovl), RXY_x2(ovl), - RXY_b2(ovl), RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000046ULL: s390_format_RXY_RRRD(s390_irgen_BCTG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000047ULL: s390_format_RXY_RRRD(s390_irgen_BIC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe3000000002fULL: s390_format_RXY(s390_irgen_STRVG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000030ULL: s390_format_RXY(s390_irgen_CGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000031ULL: s390_format_RXY(s390_irgen_CLGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000032ULL: s390_format_RXY(s390_irgen_LTGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000034ULL: s390_format_RXY(s390_irgen_CGH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000036ULL: s390_irgen_PFD(); + goto ok; + case 0xe30000000038ULL: s390_format_RXY(s390_irgen_AGH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000039ULL: s390_format_RXY(s390_irgen_SGH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000003aULL: s390_format_RXY(s390_irgen_LLZRGF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000003bULL: s390_format_RXY(s390_irgen_LZRF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000003cULL: s390_format_RXY(s390_irgen_MGH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000003eULL: s390_format_RXY(s390_irgen_STRV, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000003fULL: s390_format_RXY(s390_irgen_STRVH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000046ULL: s390_format_RXY(s390_irgen_BCTG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000047ULL: s390_format_RXY(s390_irgen_BIC, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe30000000048ULL: /* LLGFSG */ goto unimplemented; case 0xe30000000049ULL: /* STGSC */ goto unimplemented; case 0xe3000000004cULL: /* LGG */ goto unimplemented; case 0xe3000000004dULL: /* LGSC */ goto unimplemented; - case 0xe30000000050ULL: s390_format_RXY_RRRD(s390_irgen_STY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000051ULL: s390_format_RXY_RRRD(s390_irgen_MSY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000053ULL: s390_format_RXY_RRRD(s390_irgen_MSC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000054ULL: s390_format_RXY_RRRD(s390_irgen_NY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000055ULL: s390_format_RXY_RRRD(s390_irgen_CLY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000056ULL: s390_format_RXY_RRRD(s390_irgen_OY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000057ULL: s390_format_RXY_RRRD(s390_irgen_XY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000058ULL: s390_format_RXY_RRRD(s390_irgen_LY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000059ULL: s390_format_RXY_RRRD(s390_irgen_CY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000005aULL: s390_format_RXY_RRRD(s390_irgen_AY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000005bULL: s390_format_RXY_RRRD(s390_irgen_SY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000005cULL: s390_format_RXY_RRRD(s390_irgen_MFY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000005eULL: s390_format_RXY_RRRD(s390_irgen_ALY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000005fULL: s390_format_RXY_RRRD(s390_irgen_SLY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe30000000050ULL: s390_format_RXY(s390_irgen_STY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000051ULL: s390_format_RXY(s390_irgen_MSY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000053ULL: s390_format_RXY(s390_irgen_MSC, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000054ULL: s390_format_RXY(s390_irgen_NY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000055ULL: s390_format_RXY(s390_irgen_CLY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000056ULL: s390_format_RXY(s390_irgen_OY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000057ULL: s390_format_RXY(s390_irgen_XY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000058ULL: s390_format_RXY(s390_irgen_LY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000059ULL: s390_format_RXY(s390_irgen_CY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000005aULL: s390_format_RXY(s390_irgen_AY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000005bULL: s390_format_RXY(s390_irgen_SY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000005cULL: s390_format_RXY(s390_irgen_MFY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000005eULL: s390_format_RXY(s390_irgen_ALY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000005fULL: s390_format_RXY(s390_irgen_SLY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe30000000060ULL: /* LXAB */ goto unimplemented; case 0xe30000000061ULL: /* LLXAB */ goto unimplemented; case 0xe30000000062ULL: /* LXAH */ goto unimplemented; @@ -19382,191 +19356,191 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe30000000067ULL: /* LLXAG */ goto unimplemented; case 0xe30000000068ULL: /* LXAQ */ goto unimplemented; case 0xe30000000069ULL: /* LLXAQ */ goto unimplemented; - case 0xe30000000070ULL: s390_format_RXY_RRRD(s390_irgen_STHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000071ULL: s390_format_RXY_RRRD(s390_irgen_LAY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000072ULL: s390_format_RXY_RRRD(s390_irgen_STCY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000073ULL: s390_format_RXY_RRRD(s390_irgen_ICY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000075ULL: s390_format_RXY_RRRD(s390_irgen_LAEY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000076ULL: s390_format_RXY_RRRD(s390_irgen_LB, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000077ULL: s390_format_RXY_RRRD(s390_irgen_LGB, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000078ULL: s390_format_RXY_RRRD(s390_irgen_LHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000079ULL: s390_format_RXY_RRRD(s390_irgen_CHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000007aULL: s390_format_RXY_RRRD(s390_irgen_AHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000007bULL: s390_format_RXY_RRRD(s390_irgen_SHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000007cULL: s390_format_RXY_RRRD(s390_irgen_MHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000080ULL: s390_format_RXY_RRRD(s390_irgen_NG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000081ULL: s390_format_RXY_RRRD(s390_irgen_OG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000082ULL: s390_format_RXY_RRRD(s390_irgen_XG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000083ULL: s390_format_RXY_RRRD(s390_irgen_MSGC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000084ULL: s390_format_RXY_RRRD(s390_irgen_MG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000085ULL: s390_format_RXY_RRRD(s390_irgen_LGAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - - case 0xe30000000086ULL: s390_format_RXY_RRRD(s390_irgen_MLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000087ULL: s390_format_RXY_RRRD(s390_irgen_DLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000088ULL: s390_format_RXY_RRRD(s390_irgen_ALCG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000089ULL: s390_format_RXY_RRRD(s390_irgen_SLBG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000008eULL: s390_format_RXY_RRRD(s390_irgen_STPQ, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000008fULL: s390_format_RXY_RRRD(s390_irgen_LPQ, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000090ULL: s390_format_RXY_RRRD(s390_irgen_LLGC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000091ULL: s390_format_RXY_RRRD(s390_irgen_LLGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000094ULL: s390_format_RXY_RRRD(s390_irgen_LLC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000095ULL: s390_format_RXY_RRRD(s390_irgen_LLH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000096ULL: s390_format_RXY_RRRD(s390_irgen_ML, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000097ULL: s390_format_RXY_RRRD(s390_irgen_DL, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000098ULL: s390_format_RXY_RRRD(s390_irgen_ALC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe30000000099ULL: s390_format_RXY_RRRD(s390_irgen_SLB, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000009cULL: s390_format_RXY_RRRD(s390_irgen_LLGTAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000009dULL: s390_format_RXY_RRRD(s390_irgen_LLGFAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe3000000009fULL: s390_format_RXY_RRRD(s390_irgen_LAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000c0ULL: s390_format_RXY_RRRD(s390_irgen_LBH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000c2ULL: s390_format_RXY_RRRD(s390_irgen_LLCH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000c3ULL: s390_format_RXY_RRRD(s390_irgen_STCH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000c4ULL: s390_format_RXY_RRRD(s390_irgen_LHH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000c6ULL: s390_format_RXY_RRRD(s390_irgen_LLHH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000c7ULL: s390_format_RXY_RRRD(s390_irgen_STHH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000c8ULL: s390_format_RXY_RRRD(s390_irgen_LFHAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000caULL: s390_format_RXY_RRRD(s390_irgen_LFH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000cbULL: s390_format_RXY_RRRD(s390_irgen_STFH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000cdULL: s390_format_RXY_RRRD(s390_irgen_CHF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xe300000000cfULL: s390_format_RXY_RRRD(s390_irgen_CLHF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xe30000000070ULL: s390_format_RXY(s390_irgen_STHY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000071ULL: s390_format_RXY(s390_irgen_LAY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000072ULL: s390_format_RXY(s390_irgen_STCY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000073ULL: s390_format_RXY(s390_irgen_ICY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000075ULL: s390_format_RXY(s390_irgen_LAEY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000076ULL: s390_format_RXY(s390_irgen_LB, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000077ULL: s390_format_RXY(s390_irgen_LGB, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000078ULL: s390_format_RXY(s390_irgen_LHY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000079ULL: s390_format_RXY(s390_irgen_CHY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000007aULL: s390_format_RXY(s390_irgen_AHY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000007bULL: s390_format_RXY(s390_irgen_SHY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000007cULL: s390_format_RXY(s390_irgen_MHY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000080ULL: s390_format_RXY(s390_irgen_NG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000081ULL: s390_format_RXY(s390_irgen_OG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000082ULL: s390_format_RXY(s390_irgen_XG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000083ULL: s390_format_RXY(s390_irgen_MSGC, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000084ULL: s390_format_RXY(s390_irgen_MG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000085ULL: s390_format_RXY(s390_irgen_LGAT, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + + case 0xe30000000086ULL: s390_format_RXY(s390_irgen_MLG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000087ULL: s390_format_RXY(s390_irgen_DLG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000088ULL: s390_format_RXY(s390_irgen_ALCG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000089ULL: s390_format_RXY(s390_irgen_SLBG, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000008eULL: s390_format_RXY(s390_irgen_STPQ, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000008fULL: s390_format_RXY(s390_irgen_LPQ, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000090ULL: s390_format_RXY(s390_irgen_LLGC, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000091ULL: s390_format_RXY(s390_irgen_LLGH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000094ULL: s390_format_RXY(s390_irgen_LLC, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000095ULL: s390_format_RXY(s390_irgen_LLH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000096ULL: s390_format_RXY(s390_irgen_ML, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000097ULL: s390_format_RXY(s390_irgen_DL, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000098ULL: s390_format_RXY(s390_irgen_ALC, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe30000000099ULL: s390_format_RXY(s390_irgen_SLB, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000009cULL: s390_format_RXY(s390_irgen_LLGTAT, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000009dULL: s390_format_RXY(s390_irgen_LLGFAT, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe3000000009fULL: s390_format_RXY(s390_irgen_LAT, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000c0ULL: s390_format_RXY(s390_irgen_LBH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000c2ULL: s390_format_RXY(s390_irgen_LLCH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000c3ULL: s390_format_RXY(s390_irgen_STCH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000c4ULL: s390_format_RXY(s390_irgen_LHH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000c6ULL: s390_format_RXY(s390_irgen_LLHH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000c7ULL: s390_format_RXY(s390_irgen_STHH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000c8ULL: s390_format_RXY(s390_irgen_LFHAT, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000caULL: s390_format_RXY(s390_irgen_LFH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000cbULL: s390_format_RXY(s390_irgen_STFH, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000cdULL: s390_format_RXY(s390_irgen_CHF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xe300000000cfULL: s390_format_RXY(s390_irgen_CLHF, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xe60000000001ULL: s390_format_VRX_VRRDM(s390_irgen_VLEBRH, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), VRX_d2(ovl), VRX_m3(ovl), @@ -20715,22 +20689,22 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xed0000000059ULL: s390_format_RXE_FRRD(s390_irgen_TDGXT, RXE_r1(ovl), RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl)); goto ok; - case 0xed0000000064ULL: s390_format_RXY_FRRD(s390_irgen_LEY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xed0000000065ULL: s390_format_RXY_FRRD(s390_irgen_LDY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xed0000000066ULL: s390_format_RXY_FRRD(s390_irgen_STEY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; - case 0xed0000000067ULL: s390_format_RXY_FRRD(s390_irgen_STDY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); goto ok; + case 0xed0000000064ULL: s390_format_RXY(s390_irgen_LEY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xed0000000065ULL: s390_format_RXY(s390_irgen_LDY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xed0000000066ULL: s390_format_RXY(s390_irgen_STEY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; + case 0xed0000000067ULL: s390_format_RXY(s390_irgen_STDY, RXY_r1(ovl), + RXY_x2(ovl), RXY_b2(ovl), + RXY_dl2(ovl), RXY_dh2(ovl)); + goto ok; case 0xed00000000a8ULL: /* CZDT */ goto unimplemented; case 0xed00000000a9ULL: /* CZXT */ goto unimplemented; case 0xed00000000aaULL: /* CDZT */ goto unimplemented; From edd47cc583df962be308ce178c5c76ac67a65078 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 17 Jan 2026 16:59:19 +0100 Subject: [PATCH 258/502] VG_(fcntl) error message and comments And the fcntl command to the VG_(fcntl) error message. Clean up a few comments. --- coregrind/m_aspacemgr/aspacemgr-linux.c | 4 ++-- coregrind/m_debuginfo/debuginfo.c | 7 +++++++ coregrind/m_initimg/initimg-freebsd.c | 2 +- coregrind/m_libcfile.c | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c index 3bc5cb044..ae9846e54 100644 --- a/coregrind/m_aspacemgr/aspacemgr-linux.c +++ b/coregrind/m_aspacemgr/aspacemgr-linux.c @@ -4443,8 +4443,8 @@ static char* maybe_merge_procmap_stack(char* p, struct vki_kinfo_vmentry *kve, * The other use is at startup in order to get the mapping for the * tool itself. In this case we have a fairly big problem. There is * a difference in the mapping used when the kernel loads an exe - * and when the link loader ldrt (or Valgrind which does the same - * job for the guest exe. In the case of ldrt, all ELF PT_LOAD + * and when the link loader rtld (or Valgrind which does the same + * job for the guest exe). In the case of rtld, all ELF PT_LOAD * sections get mmap'd. The kernel, however, does _not_ mmap * the RW PT_LOAD. * diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 6ed649bc2..f503fc8ee 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1190,6 +1190,13 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) return 0; /* If the file doesn't have a name, we're hosed. Give up. */ + /* + * Maybe not. Since bug 280965 we may have the fd, and if we + * do have the fd we use that rather than the filename to + * get ELF info. The filename is used in several places but I think + * that it is not obligatory and when we have just the fd we could + * get by. + */ filename = VG_(am_get_filename)( seg ); if (!filename) return 0; diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index 40f74168c..c871f47bb 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -850,7 +850,7 @@ static Addr setup_client_stack(const void* init_sp, } if (VG_(resolved_exename) == NULL) { - VG_(resolved_exename) = VG_(strdup)("initimg-freebsd.sre.1", resolved_name); + VG_(resolved_exename) = VG_(strdup)("initimg-freebsd.scs.1", resolved_name); } return client_SP; diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index c4e7dddc1..aecc5404b 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -808,7 +808,7 @@ Int VG_(fcntl) ( Int fd, Int cmd, Addr arg ) # error "Unknown OS" # endif if (sr_isError(res)) { - VG_(debugLog)(1, "VG_(fcntl)", "fcntl error %lu %s\n", sr_Err(res), VG_(strerror)(sr_Err(res))); + VG_(debugLog)(1, "VG_(fcntl)", "fcntl cmd %d error %lu %s\n", cmd, sr_Err(res), VG_(strerror)(sr_Err(res))); return -1; } return (Int)sr_Res(res); From 3b085dc830c6a3e13f11975e9a6b19c2cda68c4f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 17 Jan 2026 17:44:47 +0100 Subject: [PATCH 259/502] Heap profiling: fix a few cc tags --- coregrind/m_initimg/initimg-linux.c | 2 +- coregrind/m_pathscan.c | 4 ++-- coregrind/m_syswrap/syswrap-darwin.c | 4 ++-- coregrind/m_ume/elf.c | 1 - coregrind/m_ume/macho.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index 547707555..a33710c39 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -961,7 +961,7 @@ Addr setup_client_stack( void* init_sp, } HChar resolved_name[VKI_PATH_MAX]; VG_(realpath)(exe_name, resolved_name); - VG_(resolved_exename) = VG_(strdup)("initimg-linux.sre.1", resolved_name); + VG_(resolved_exename) = VG_(strdup)("initimg-linux.scs.1", resolved_name); } /* client_SP is pointing at client's argc/argv */ diff --git a/coregrind/m_pathscan.c b/coregrind/m_pathscan.c index 841c674e3..a1193c387 100644 --- a/coregrind/m_pathscan.c +++ b/coregrind/m_pathscan.c @@ -102,12 +102,12 @@ static Bool match_executable(const HChar *entry) // matching executable later in the path. if (VG_(access)(buf, True/*r*/, False/*w*/, True/*x*/) == 0) { VG_(free)(executable_name_out); - executable_name_out = VG_(strdup)("match_executable", buf); + executable_name_out = VG_(strdup)("match_executable.1", buf); return True; // Stop looking } else if (VG_(access)(buf, True/*r*/, False/*w*/, False/*x*/) == 0 && executable_name_out == NULL) { - executable_name_out = VG_(strdup)("match_executable", buf); + executable_name_out = VG_(strdup)("match_executable.2", buf); return False; // Keep looking } else { return False; // Keep looking diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index 2784105af..2687b3b4c 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -410,7 +410,7 @@ static void log_decaying ( const HChar* format, ... ) // Now see if it already exists in the table of strings that we have. if (!decaying_string_table) { decaying_string_table - = VG_(newFM)( VG_(malloc), "syswrap-darwin.pd.1", + = VG_(newFM)( VG_(malloc), "syswrap-darwin.ld.1", VG_(free), decaying_string_table_cmp ); } @@ -421,7 +421,7 @@ static void log_decaying ( const HChar* format, ... ) // We haven't seen this string before, so strdup it and add // it to the table. vg_assert(key == NULL && val == 0); - key = VG_(strdup)("syswrap-darwin.pd.2", buf); + key = VG_(strdup)("syswrap-darwin.ld.2", buf); VG_(addToFM)(decaying_string_table, (UWord)key, (UWord)0); } diff --git a/coregrind/m_ume/elf.c b/coregrind/m_ume/elf.c index 20e0185cb..3213874b8 100644 --- a/coregrind/m_ume/elf.c +++ b/coregrind/m_ume/elf.c @@ -658,7 +658,6 @@ Int VG_(load_ELF)(Int fd, const HChar* name, /*MOD*/ExeInfo* info) if (sr_isError(sres)) #endif sres = VG_(open)(buf, VKI_O_RDONLY, 0); - //sres = VG_(open)("/usr/home/paulf/build/src/obj/usr/home/paulf/build/src/amd64.amd64/libexec/rtld-elf/ld-elf.so.1.full", VKI_O_RDONLY, 0); if (sr_isError(sres)) { VG_(printf)("valgrind: m_ume.c: can't open interpreter\n"); VG_(exit)(1); diff --git a/coregrind/m_ume/macho.c b/coregrind/m_ume/macho.c index a8fdfd708..22f2d7a0d 100644 --- a/coregrind/m_ume/macho.c +++ b/coregrind/m_ume/macho.c @@ -864,7 +864,7 @@ Int VG_(load_macho)(Int fd, const HChar *name, ExeInfo *info) return VKI_ENOEXEC; } - info->executable_path = VG_(strdup)("ume.macho.executable_path", name); + info->executable_path = VG_(strdup)("ume.macho.load_macho", name); SysRes res = VG_(dup)(fd); if (!sr_isError(res)) From a615e4daebe2b7289beb66019493285cfc58c2bc Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 17 Jan 2026 17:22:59 +0100 Subject: [PATCH 260/502] Add support for fnop instruction on x86 and amd64 This implements FNOP in guest_amd64_toIR.c and guest_x86_toIR.c by simply skipping the instruction. Which is OK for now since one of the x87 FP Limitations is no FP exceptions, except for handling stack over/underflow. Add fnop to none/tests/{amd64,x86}/insn_fpu.{def,stdout.exp}. Also update old 3_1_BUGSTATUS.txt to correct bug number. https://bugs.kde.org/show_bug.cgi?id=126256 --- NEWS | 1 + VEX/priv/guest_amd64_toIR.c | 4 ++++ VEX/priv/guest_x86_toIR.c | 4 ++++ docs/internals/3_1_BUGSTATUS.txt | 2 +- none/tests/amd64/insn_fpu.def | 1 + none/tests/amd64/insn_fpu.stdout.exp | 1 + none/tests/x86/insn_fpu.def | 1 + none/tests/x86/insn_fpu.stdout.exp | 1 + 8 files changed, 14 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 10b3c7b42..06ef1c82c 100644 --- a/NEWS +++ b/NEWS @@ -43,6 +43,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. +126256 (fnop) vex x86->IR: unhandled instruction bytes: 0xD9 0xD0 0x31 0xC0 228343 none/tests/darwin/bug228343 fails on OS X 258140 Valgrind on OS X always reports some memory "still reachable" 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c index 34ebcbdf9..0319578f2 100644 --- a/VEX/priv/guest_amd64_toIR.c +++ b/VEX/priv/guest_amd64_toIR.c @@ -5967,6 +5967,10 @@ ULong dis_FPU ( /*OUT*/Bool* decode_ok, put_ST_UNCHECKED(r_src, mkexpr(t1)); break; + case 0xD0: /* FNOP */ + DIP("fnop\n"); + break; + case 0xE0: /* FCHS */ DIP("fchs\n"); put_ST_UNCHECKED(0, unop(Iop_NegF64, get_ST(0))); diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c index bd4ccd54b..710905ad1 100644 --- a/VEX/priv/guest_x86_toIR.c +++ b/VEX/priv/guest_x86_toIR.c @@ -4204,6 +4204,10 @@ UInt dis_FPU ( Bool* decode_ok, UChar sorb, Int delta ) put_ST_UNCHECKED(r_src, mkexpr(t1)); break; + case 0xD0: /* FNOP */ + DIP("fnop\n"); + break; + case 0xE0: /* FCHS */ DIP("fchs\n"); put_ST_UNCHECKED(0, unop(Iop_NegF64, get_ST(0))); diff --git a/docs/internals/3_1_BUGSTATUS.txt b/docs/internals/3_1_BUGSTATUS.txt index 6add0ccac..4134c3cb9 100644 --- a/docs/internals/3_1_BUGSTATUS.txt +++ b/docs/internals/3_1_BUGSTATUS.txt @@ -54,7 +54,7 @@ v5877 fixed 126217 increase # threads v5880 fixed n-i-bz vectorise copy_address_range_state n-i-bz mpicc -fpic bug (Goedeken Richard, inbox) vx1611 fixed 126243 vex x86->IR: popw mem - low 125265 vex x86->IR: 0xD9 0xD0 (fnop) + low 126256 vex x86->IR: 0xD9 0xD0 (fnop) low 126257 vex x86->IR: 0xF2 0x0F 0xF0 0x40 (lddqu) (sse3) low 126258 vex x86->IR: 0xDF 0x4D (fisttp) (sse3) 126384 rdpmc diff --git a/none/tests/amd64/insn_fpu.def b/none/tests/amd64/insn_fpu.def index 525fd1b1b..219247478 100644 --- a/none/tests/amd64/insn_fpu.def +++ b/none/tests/amd64/insn_fpu.def @@ -1,3 +1,4 @@ +fnop fabs st0.ps[1234.5678] : => st0.ps[1234.5678] fabs st0.ps[-1234.5678] : => st0.ps[1234.5678] fabs st0.pd[12345678.87654321] : => st0.pd[12345678.87654321] diff --git a/none/tests/amd64/insn_fpu.stdout.exp b/none/tests/amd64/insn_fpu.stdout.exp index 67128c13b..f5f4a161f 100644 --- a/none/tests/amd64/insn_fpu.stdout.exp +++ b/none/tests/amd64/insn_fpu.stdout.exp @@ -1,3 +1,4 @@ +fnop_1 ... ok fabs_1 ... ok fabs_2 ... ok fabs_3 ... ok diff --git a/none/tests/x86/insn_fpu.def b/none/tests/x86/insn_fpu.def index 590f5844c..f5a8d61c4 100644 --- a/none/tests/x86/insn_fpu.def +++ b/none/tests/x86/insn_fpu.def @@ -1,3 +1,4 @@ +fnop fabs st0.ps[1234.5678] : => st0.ps[1234.5678] fabs st0.ps[-1234.5678] : => st0.ps[1234.5678] fabs st0.pd[12345678.87654321] : => st0.pd[12345678.87654321] diff --git a/none/tests/x86/insn_fpu.stdout.exp b/none/tests/x86/insn_fpu.stdout.exp index 67128c13b..f5f4a161f 100644 --- a/none/tests/x86/insn_fpu.stdout.exp +++ b/none/tests/x86/insn_fpu.stdout.exp @@ -1,3 +1,4 @@ +fnop_1 ... ok fabs_1 ... ok fabs_2 ... ok fabs_3 ... ok From ed41469979c674ef8229cd7cf818fc3c27ead23c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 17 Jan 2026 21:43:36 +0100 Subject: [PATCH 261/502] Bug 514762 - Many "Bad file descriptor" messages when using --track-fds=yes and -d on systems without /proc Just a one-line deletion in the end. --- NEWS | 2 ++ coregrind/m_libcfile.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 06ef1c82c..1c93e1345 100644 --- a/NEWS +++ b/NEWS @@ -71,6 +71,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 514094 readlink("/proc/self/exe") overwrites buffer beyond its return value 514613 Unclosed leak_summary/still_reachable tag in xml output 514659 ltp 20250930 vs linux 6.18.3 doesn't build +514762 Many "Bad file descriptor" messages when using --track-fds=yes and + -d on systems without /proc To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index aecc5404b..49abe4c17 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -808,7 +808,6 @@ Int VG_(fcntl) ( Int fd, Int cmd, Addr arg ) # error "Unknown OS" # endif if (sr_isError(res)) { - VG_(debugLog)(1, "VG_(fcntl)", "fcntl cmd %d error %lu %s\n", cmd, sr_Err(res), VG_(strerror)(sr_Err(res))); return -1; } return (Int)sr_Res(res); From 99cb8b2ed35334663efca325a3ea128e8eb55e6f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 17 Jan 2026 23:06:11 +0000 Subject: [PATCH 262/502] s390: Rename and remove various s390_format_... functions Rename s390_format_S_RD --> s390_format_S Rename s390_format_SI_URD --> s390_format_SI Rename s390_format_SS_L0RDRD --> s390_format_SSa Rename s390_format_SMI_U0RDP --> s390_format_SMI Rename s390_format_SSE_RDRD --> s390_format_SSE Remove s390_format_E Remove s390_format_I Remove s390_format_EI Remove s390_format_MII_UPP Remove s390_format_RSI_RRP Remove s390_format_S_RD_raw --- VEX/priv/guest_s390_toIR.c | 225 ++++++++++++++++--------------------- 1 file changed, 97 insertions(+), 128 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index a20d2bd2a..959066d00 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -202,11 +202,11 @@ typedef enum { #define SIY_b1(insn) (((insn) >> 44) & 0xf) #define SIY_dl1(insn) (((insn) >> 32) & 0xfff) #define SIY_dh1(insn) (((insn) >> 24) & 0xff) -#define SS_l(insn) (((insn) >> 48) & 0xff) -#define SS_b1(insn) (((insn) >> 44) & 0xf) -#define SS_d1(insn) (((insn) >> 32) & 0xfff) -#define SS_b2(insn) (((insn) >> 28) & 0xf) -#define SS_d2(insn) (((insn) >> 16) & 0xfff) +#define SSa_l(insn) (((insn) >> 48) & 0xff) +#define SSa_b1(insn) (((insn) >> 44) & 0xf) +#define SSa_d1(insn) (((insn) >> 32) & 0xfff) +#define SSa_b2(insn) (((insn) >> 28) & 0xf) +#define SSa_d2(insn) (((insn) >> 16) & 0xfff) #define SIL_b1(insn) (((insn) >> 44) & 0xf) #define SIL_d1(insn) (((insn) >> 32) & 0xfff) #define SIL_i2(insn) (((insn) >> 16) & 0xffff) @@ -2710,33 +2710,6 @@ convert_vex_dfpcc_to_s390(IRTemp vex_cc) /*------------------------------------------------------------*/ /*--- Build IR for formats ---*/ /*------------------------------------------------------------*/ -static void -s390_format_I(void (*irgen)(UChar i), - UChar i) -{ - irgen(i); -} - -static void -s390_format_IE(void (*irgen)(UChar i1, UChar i2), - UChar i1, UChar i2) -{ - irgen(i1, i2); -} - -static void -s390_format_E(void (*irgen)(void)) -{ - irgen(); -} - -static void -s390_format_MII_UPP(void (*irgen)(UChar m1, UShort i2, UInt i3), - UChar m1, UShort i2, UInt i3) -{ - irgen(m1, i2, i3); -} - static void s390_format_RIS(void (*irgen)(UChar r1, UChar m3, UChar i2, IRTemp op4addr), @@ -2923,13 +2896,6 @@ s390_format_RS_AARD(void (*irgen)(UChar, UChar, IRTemp), irgen(r1, r3, op2addr); } -static void -s390_format_RSI_RRP(void (*irgen)(UChar r1, UChar r3, UShort i2), - UChar r1, UChar r3, UShort i2) -{ - irgen(r1, r3, i2); -} - static void s390_format_RSY_RRRD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) @@ -3072,8 +3038,8 @@ s390_format_RXY(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_S_RD(void (*irgen)(IRTemp op2addr), - UChar b2, UShort d2) +s390_format_S(void (*irgen)(IRTemp op2addr), + UChar b2, UShort d2) { IRTemp op2addr = newTemp(Ity_I64); @@ -3084,15 +3050,8 @@ s390_format_S_RD(void (*irgen)(IRTemp op2addr), } static void -s390_format_S_RD_raw(void (*irgen)(UChar b2, UShort d2), - UChar b2, UShort d2) -{ - irgen(b2, d2); -} - -static void -s390_format_SI_URD(void (*irgen)(UChar i2, IRTemp op1addr), - UChar i2, UChar b1, UShort d1) +s390_format_SI(void (*irgen)(UChar i2, IRTemp op1addr), + UChar i2, UChar b1, UShort d1) { IRTemp op1addr = newTemp(Ity_I64); @@ -3131,8 +3090,8 @@ s390_format_SIY_IRD(void (*irgen)(UChar i2, IRTemp op1addr), } static void -s390_format_SMI_U0RDP(void (*irgen)(UChar m1, UShort i2, IRTemp op3addr), - UChar m1, UShort i2, UChar b3, UShort d3) +s390_format_SMI(void (*irgen)(UChar m1, UShort i2, IRTemp op3addr), + UChar m1, UShort i2, UChar b3, UShort d3) { IRTemp op3addr = newTemp(Ity_I64); @@ -3143,8 +3102,8 @@ s390_format_SMI_U0RDP(void (*irgen)(UChar m1, UShort i2, IRTemp op3addr), } static void -s390_format_SS_L0RDRD(void (*irgen)(UChar, IRTemp, IRTemp), - UChar l, UChar b1, UShort d1, UChar b2, UShort d2) +s390_format_SSa(void (*irgen)(UChar, IRTemp, IRTemp), + UChar l, UChar b1, UShort d1, UChar b2, UShort d2) { IRTemp op1addr = newTemp(Ity_I64); IRTemp op2addr = newTemp(Ity_I64); @@ -3158,8 +3117,8 @@ s390_format_SS_L0RDRD(void (*irgen)(UChar, IRTemp, IRTemp), } static void -s390_format_SSE_RDRD(void (*irgen)(IRTemp, IRTemp), - UChar b1, UShort d1, UChar b2, UShort d2) +s390_format_SSE(void (*irgen)(IRTemp, IRTemp), + UChar b1, UShort d1, UChar b2, UShort d2) { IRTemp op1addr = newTemp(Ity_I64); IRTemp op2addr = newTemp(Ity_I64); @@ -11349,12 +11308,12 @@ s390_irgen_EX_SS(UChar r, IRTemp addr2, IRTemp torun, restart_if(mkexpr(cond)); ovl = last_execute_target; - assign(start1, binop(Iop_Add64, mkU64(SS_d1(ovl)), - SS_b1(ovl) != 0 ? get_gpr_dw0(SS_b1(ovl)) : mkU64(0))); - assign(start2, binop(Iop_Add64, mkU64(SS_d2(ovl)), - SS_b2(ovl) != 0 ? get_gpr_dw0(SS_b2(ovl)) : mkU64(0))); + assign(start1, binop(Iop_Add64, mkU64(SSa_d1(ovl)), + SSa_b1(ovl) != 0 ? get_gpr_dw0(SSa_b1(ovl)) : mkU64(0))); + assign(start2, binop(Iop_Add64, mkU64(SSa_d2(ovl)), + SSa_b2(ovl) != 0 ? get_gpr_dw0(SSa_b2(ovl)) : mkU64(0))); assign(len, unop(lensize == 64 ? Iop_8Uto64 : Iop_8Uto32, binop(Iop_Or8, - r != 0 ? get_gpr_b7(r): mkU8(0), mkU8(SS_l(ovl))))); + r != 0 ? get_gpr_b7(r): mkU8(0), mkU8(SSa_l(ovl))))); irgen(len, start1, start2); last_execute_target = Invalid_execute_target; @@ -17947,7 +17906,8 @@ s390_decode_2byte_and_irgen(const UChar *bytes) case 0x0102: /* UPT */ goto unimplemented; case 0x0104: /* PTFF */ goto unimplemented; case 0x0107: /* SCKPF */ goto unimplemented; - case 0x010a: s390_format_E(s390_irgen_PFPO); goto ok; + case 0x010a: s390_irgen_PFPO(); + goto ok; case 0x010b: /* TAM */ goto unimplemented; case 0x010c: /* SAM24 */ goto unimplemented; case 0x010d: /* SAM31 */ goto unimplemented; @@ -17962,7 +17922,8 @@ s390_decode_2byte_and_irgen(const UChar *bytes) goto ok; case 0x07: s390_irgen_BCR(RR_r1(ovl), RR_r2(ovl)); goto ok; - case 0x0a: s390_format_I(s390_irgen_SVC, I_i(ovl)); goto ok; + case 0x0a: s390_irgen_SVC(I_i(ovl)); + goto ok; case 0x0b: /* BSM */ goto unimplemented; case 0x0c: /* BASSM */ goto unimplemented; case 0x0d: s390_irgen_BASR(RR_r1(ovl), RR_r2(ovl)); @@ -18129,7 +18090,7 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb201: /* STBEAR */ goto unimplemented; case 0xb202: /* STIDP */ goto unimplemented; case 0xb204: /* SCK */ goto unimplemented; - case 0xb205: s390_format_S_RD(s390_irgen_STCK, S_b2(ovl), S_d2(ovl)); + case 0xb205: s390_format_S(s390_irgen_STCK, S_b2(ovl), S_d2(ovl)); goto ok; case 0xb206: /* SCKC */ goto unimplemented; case 0xb207: /* STCKC */ goto unimplemented; @@ -18209,9 +18170,11 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb274: /* SIGA */ goto unimplemented; case 0xb276: /* XSCH */ goto unimplemented; case 0xb277: /* RP */ goto unimplemented; - case 0xb278: s390_format_S_RD(s390_irgen_STCKE, S_b2(ovl), S_d2(ovl));goto ok; + case 0xb278: s390_format_S(s390_irgen_STCKE, S_b2(ovl), S_d2(ovl)); + goto ok; case 0xb279: /* SACF */ goto unimplemented; - case 0xb27c: s390_format_S_RD(s390_irgen_STCKF, S_b2(ovl), S_d2(ovl));goto ok; + case 0xb27c: s390_format_S(s390_irgen_STCKF, S_b2(ovl), S_d2(ovl)); + goto ok; case 0xb27d: /* STSI */ goto unimplemented; case 0xb280: /* LPP */ goto unimplemented; case 0xb284: /* LCCTL */ goto unimplemented; @@ -18220,12 +18183,12 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb287: /* LSCTL */ goto unimplemented; case 0xb28e: /* QCTRI */ goto unimplemented; case 0xb28f: /* QPACI */ goto unimplemented; - case 0xb299: s390_format_S_RD(s390_irgen_SRNM, S_b2(ovl), S_d2(ovl)); - goto ok; - case 0xb29c: s390_format_S_RD(s390_irgen_STFPC, S_b2(ovl), S_d2(ovl)); - goto ok; - case 0xb29d: s390_format_S_RD(s390_irgen_LFPC, S_b2(ovl), S_d2(ovl)); - goto ok; + case 0xb299: s390_format_S(s390_irgen_SRNM, S_b2(ovl), S_d2(ovl)); + goto ok; + case 0xb29c: s390_format_S(s390_irgen_STFPC, S_b2(ovl), S_d2(ovl)); + goto ok; + case 0xb29d: s390_format_S(s390_irgen_LFPC, S_b2(ovl), S_d2(ovl)); + goto ok; case 0xb2a5: s390_irgen_TRE(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb2a6: s390_format_RRF_M0RERE(s390_irgen_CU21, RRF3_r3(ovl), @@ -18234,14 +18197,14 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb2a7: s390_format_RRF_M0RERE(s390_irgen_CU12, RRF3_r3(ovl), RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb2b0: s390_format_S_RD_raw(s390_irgen_STFLE, S_b2(ovl), S_d2(ovl)); - goto ok; + case 0xb2b0: s390_irgen_STFLE(S_b2(ovl), S_d2(ovl)); + goto ok; case 0xb2b1: /* STFL */ goto unimplemented; case 0xb2b2: /* LPSWE */ goto unimplemented; - case 0xb2b8: s390_format_S_RD_raw(s390_irgen_SRNMB, S_b2(ovl), S_d2(ovl)); - goto ok; - case 0xb2b9: s390_format_S_RD(s390_irgen_SRNMT, S_b2(ovl), S_d2(ovl)); - goto ok; + case 0xb2b8: s390_irgen_SRNMB(S_b2(ovl), S_d2(ovl)); + goto ok; + case 0xb2b9: s390_format_S(s390_irgen_SRNMT, S_b2(ovl), S_d2(ovl)); + goto ok; case 0xb2bd: /* LFAS */ goto unimplemented; case 0xb2e0: /* SCCTR */ goto unimplemented; case 0xb2e1: /* SPCTR */ goto unimplemented; @@ -18252,8 +18215,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb2ec: /* ETND */ goto unimplemented; case 0xb2ed: /* ECPGA */ goto unimplemented; case 0xb2f8: /* TEND */ goto unimplemented; - case 0xb2fa: s390_format_IE(s390_irgen_NIAI, IE_i1(ovl), - IE_i2(ovl)); goto ok; + case 0xb2fa: s390_irgen_NIAI(IE_i1(ovl), IE_i2(ovl)); + goto ok; case 0xb2fc: /* TABORT */ goto unimplemented; case 0xb2ff: /* TRAP4 */ goto unimplemented; case 0xb300: s390_irgen_LPEBR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18667,7 +18630,7 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb92b: s390_irgen_KMO(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb92c: s390_format_E(s390_irgen_PCC); goto ok; + case 0xb92c: s390_irgen_PCC(); goto ok; case 0xb92d: s390_format_RRF_R0RR2(s390_irgen_KMCTR, RRF4_r3(ovl), RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; @@ -18684,7 +18647,7 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; case 0xb93a: s390_irgen_KDSA(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb93b: s390_format_E(s390_irgen_NNPA); goto ok; + case 0xb93b: s390_irgen_NNPA(); goto ok; case 0xb93c: s390_irgen_PRNO(RRE_r1(ovl), RRE_r2(ovl)); goto ok; @@ -19022,10 +18985,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0x7e: /* AU */ goto unimplemented; case 0x7f: /* SU */ goto unimplemented; case 0x83: /* DIAG */ goto unimplemented; - case 0x84: s390_format_RSI_RRP(s390_irgen_BRXH, RSI_r1(ovl), - RSI_r3(ovl), RSI_i2(ovl)); goto ok; - case 0x85: s390_format_RSI_RRP(s390_irgen_BRXLE, RSI_r1(ovl), - RSI_r3(ovl), RSI_i2(ovl)); goto ok; + case 0x84: s390_irgen_BRXH(RSI_r1(ovl), RSI_r3(ovl), RSI_i2(ovl)); + goto ok; + case 0x85: s390_irgen_BRXLE(RSI_r1(ovl), RSI_r3(ovl), RSI_i2(ovl)); + goto ok; case 0x86: s390_format_RS_RRRD(s390_irgen_BXH, RS_r1(ovl), RS_r3(ovl), RS_b2(ovl), RS_d2(ovl)); goto ok; case 0x87: s390_format_RS_RRRD(s390_irgen_BXLE, RS_r1(ovl), RS_r3(ovl), @@ -19048,18 +19011,24 @@ s390_decode_4byte_and_irgen(const UChar *bytes) RS_d2(ovl)); goto ok; case 0x90: s390_format_RS_RRRD(s390_irgen_STM, RS_r1(ovl), RS_r3(ovl), RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0x91: s390_format_SI_URD(s390_irgen_TM, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); goto ok; - case 0x92: s390_format_SI_URD(s390_irgen_MVI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); goto ok; - case 0x94: s390_format_SI_URD(s390_irgen_NI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); goto ok; - case 0x95: s390_format_SI_URD(s390_irgen_CLI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); goto ok; - case 0x96: s390_format_SI_URD(s390_irgen_OI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); goto ok; - case 0x97: s390_format_SI_URD(s390_irgen_XI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); goto ok; + case 0x91: s390_format_SI(s390_irgen_TM, SI_i2(ovl), SI_b1(ovl), + SI_d1(ovl)); + goto ok; + case 0x92: s390_format_SI(s390_irgen_MVI, SI_i2(ovl), SI_b1(ovl), + SI_d1(ovl)); + goto ok; + case 0x94: s390_format_SI(s390_irgen_NI, SI_i2(ovl), SI_b1(ovl), + SI_d1(ovl)); + goto ok; + case 0x95: s390_format_SI(s390_irgen_CLI, SI_i2(ovl), SI_b1(ovl), + SI_d1(ovl)); + goto ok; + case 0x96: s390_format_SI(s390_irgen_OI, SI_i2(ovl), SI_b1(ovl), + SI_d1(ovl)); + goto ok; + case 0x97: s390_format_SI(s390_irgen_XI, SI_i2(ovl), SI_b1(ovl), + SI_d1(ovl)); + goto ok; case 0x98: s390_format_RS_RRRD(s390_irgen_LM, RS_r1(ovl), RS_r3(ovl), RS_b2(ovl), RS_d2(ovl)); goto ok; case 0x99: /* TRACE */ goto unimplemented; @@ -20837,47 +20806,47 @@ s390_decode_6byte_and_irgen(const UChar *bytes) } switch (((ovl >> 16) & 0xff0000000000ULL) >> 40) { - case 0xc5ULL: s390_format_MII_UPP(s390_irgen_BPRP, MII_m1(ovl), MII_i2(ovl), - MII_i3(ovl)); goto ok; - case 0xc7ULL: s390_format_SMI_U0RDP(s390_irgen_BPP, SMI_m1(ovl), SMI_i2(ovl), - SMI_b3(ovl), SMI_d3(ovl)); goto ok; + case 0xc5ULL: s390_irgen_BPRP(MII_m1(ovl), MII_i2(ovl), MII_i3(ovl)); + goto ok; + case 0xc7ULL: s390_format_SMI(s390_irgen_BPP, SMI_m1(ovl), SMI_i2(ovl), + SMI_b3(ovl), SMI_d3(ovl)); + goto ok; case 0xd0ULL: /* TRTR */ goto unimplemented; case 0xd1ULL: /* MVN */ goto unimplemented; - case 0xd2ULL: s390_format_SS_L0RDRD(s390_irgen_MVC, SS_l(ovl), - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); goto ok; + case 0xd2ULL: s390_format_SSa(s390_irgen_MVC, SSa_l(ovl), SSa_b1(ovl), + SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + goto ok; case 0xd3ULL: /* MVZ */ goto unimplemented; - case 0xd4ULL: s390_format_SS_L0RDRD(s390_irgen_NC, SS_l(ovl), - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); goto ok; - case 0xd5ULL: s390_format_SS_L0RDRD(s390_irgen_CLC, SS_l(ovl), - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); goto ok; - case 0xd6ULL: s390_format_SS_L0RDRD(s390_irgen_OC, SS_l(ovl), - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); goto ok; + case 0xd4ULL: s390_format_SSa(s390_irgen_NC, SSa_l(ovl), SSa_b1(ovl), + SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + goto ok; + case 0xd5ULL: s390_format_SSa(s390_irgen_CLC, SSa_l(ovl), SSa_b1(ovl), + SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + goto ok; + case 0xd6ULL: s390_format_SSa(s390_irgen_OC, SSa_l(ovl), SSa_b1(ovl), + SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + goto ok; case 0xd7ULL: - if (SS_b1(ovl) == SS_b2(ovl) && SS_d1(ovl) == SS_d2(ovl)) - s390_irgen_XC_sameloc(SS_l(ovl), SS_b1(ovl), SS_d1(ovl)); + if (SSa_b1(ovl) == SSa_b2(ovl) && SSa_d1(ovl) == SSa_d2(ovl)) + s390_irgen_XC_sameloc(SSa_l(ovl), SSa_b1(ovl), SSa_d1(ovl)); else - s390_format_SS_L0RDRD(s390_irgen_XC, SS_l(ovl), - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); + s390_format_SSa(s390_irgen_XC, SSa_l(ovl), SSa_b1(ovl), SSa_d1(ovl), + SSa_b2(ovl), SSa_d2(ovl)); goto ok; case 0xd9ULL: /* MVCK */ goto unimplemented; case 0xdaULL: /* MVCP */ goto unimplemented; case 0xdbULL: /* MVCS */ goto unimplemented; - case 0xdcULL: s390_format_SS_L0RDRD(s390_irgen_TR, SS_l(ovl), - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); goto ok; + case 0xdcULL: s390_format_SSa(s390_irgen_TR, SSa_l(ovl), SSa_b1(ovl), + SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + goto ok; case 0xddULL: /* TRT */ goto unimplemented; case 0xdeULL: /* ED */ goto unimplemented; case 0xdfULL: /* EDMK */ goto unimplemented; case 0xe1ULL: /* PKU */ goto unimplemented; case 0xe2ULL: /* UNPKU */ goto unimplemented; - case 0xe8ULL: s390_format_SS_L0RDRD(s390_irgen_MVCIN, SS_l(ovl), - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); goto ok; + case 0xe8ULL: s390_format_SSa(s390_irgen_MVCIN, SSa_l(ovl), SSa_b1(ovl), + SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + goto ok; case 0xe9ULL: /* PKA */ goto unimplemented; case 0xeaULL: /* UNPKA */ goto unimplemented; case 0xeeULL: /* PLO */ goto unimplemented; @@ -20898,9 +20867,9 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe500ULL: /* LASP */ goto unimplemented; case 0xe501ULL: /* TPROT */ goto unimplemented; case 0xe502ULL: /* STRAG */ goto unimplemented; - case 0xe50aULL: s390_format_SSE_RDRD(s390_irgen_MVCRL, - SS_b1(ovl), SS_d1(ovl), - SS_b2(ovl), SS_d2(ovl)); goto ok; + case 0xe50aULL: s390_format_SSE(s390_irgen_MVCRL, SSa_b1(ovl), SSa_d1(ovl), + SSa_b2(ovl), SSa_d2(ovl)); + goto ok; case 0xe50eULL: /* MVCSK */ goto unimplemented; case 0xe50fULL: /* MVCDK */ goto unimplemented; case 0xe544ULL: s390_format_SIL_RDI(s390_irgen_MVHHI, SIL_b1(ovl), From c301cb53b15a45447bcf9d9e6229285c4f7f2786 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sat, 17 Jan 2026 23:37:37 +0000 Subject: [PATCH 263/502] s390: Consolidate s390_format_SIL_... and s390_format_SIY... functions Instead use s390_format_SIL and s390_format_SIY, respectively. --- VEX/priv/guest_s390_toIR.c | 158 +++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 87 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 959066d00..59d490d9e 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -3062,22 +3062,8 @@ s390_format_SI(void (*irgen)(UChar i2, IRTemp op1addr), } static void -s390_format_SIY_URD(void (*irgen)(UChar i2, IRTemp op1addr), - UChar i2, UChar b1, UShort dl1, UChar dh1) -{ - IRTemp op1addr = newTemp(Ity_I64); - IRTemp d1 = newTemp(Ity_I64); - - assign(d1, mkU64(((ULong)(Long)(Char)dh1 << 12) | ((ULong)dl1))); - assign(op1addr, binop(Iop_Add64, mkexpr(d1), b1 != 0 ? get_gpr_dw0(b1) : - mkU64(0))); - - irgen(i2, op1addr); -} - -static void -s390_format_SIY_IRD(void (*irgen)(UChar i2, IRTemp op1addr), - UChar i2, UChar b1, UShort dl1, UChar dh1) +s390_format_SIY(void (*irgen)(UChar i2, IRTemp op1addr), + UChar i2, UChar b1, UShort dl1, UChar dh1) { IRTemp op1addr = newTemp(Ity_I64); IRTemp d1 = newTemp(Ity_I64); @@ -3132,20 +3118,8 @@ s390_format_SSE(void (*irgen)(IRTemp, IRTemp), } static void -s390_format_SIL_RDI(void (*irgen)(UShort i2, IRTemp op1addr), - UChar b1, UShort d1, UShort i2) -{ - IRTemp op1addr = newTemp(Ity_I64); - - assign(op1addr, binop(Iop_Add64, mkU64(d1), b1 != 0 ? get_gpr_dw0(b1) : - mkU64(0))); - - irgen(i2, op1addr); -} - -static void -s390_format_SIL_RDU(void (*irgen)(UShort i2, IRTemp op1addr), - UChar b1, UShort d1, UShort i2) +s390_format_SIL(void (*irgen)(UShort i2, IRTemp op1addr), + UChar b1, UShort d1, UShort i2) { IRTemp op1addr = newTemp(Ity_I64); @@ -20262,37 +20236,47 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RSY_r3(ovl), RSY_b2(ovl), RSY_dl2(ovl), RSY_dh2(ovl)); goto ok; - case 0xeb0000000051ULL: s390_format_SIY_URD(s390_irgen_TMY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb0000000052ULL: s390_format_SIY_URD(s390_irgen_MVIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb0000000054ULL: s390_format_SIY_URD(s390_irgen_NIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb0000000055ULL: s390_format_SIY_URD(s390_irgen_CLIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb0000000056ULL: s390_format_SIY_URD(s390_irgen_OIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb0000000057ULL: s390_format_SIY_URD(s390_irgen_XIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb000000006aULL: s390_format_SIY_IRD(s390_irgen_ASI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb000000006eULL: s390_format_SIY_IRD(s390_irgen_ALSI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; + case 0xeb0000000051ULL: s390_format_SIY(s390_irgen_TMY, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb0000000052ULL: s390_format_SIY(s390_irgen_MVIY, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb0000000054ULL: s390_format_SIY(s390_irgen_NIY, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb0000000055ULL: s390_format_SIY(s390_irgen_CLIY, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb0000000056ULL: s390_format_SIY(s390_irgen_OIY, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb0000000057ULL: s390_format_SIY(s390_irgen_XIY, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb000000006aULL: s390_format_SIY(s390_irgen_ASI, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb000000006eULL: s390_format_SIY(s390_irgen_ALSI, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; case 0xeb0000000071ULL: /* LPSWEY */ goto unimplemented; - case 0xeb000000007aULL: s390_format_SIY_IRD(s390_irgen_AGSI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; - case 0xeb000000007eULL: s390_format_SIY_IRD(s390_irgen_ALGSI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); goto ok; + case 0xeb000000007aULL: s390_format_SIY(s390_irgen_AGSI, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; + case 0xeb000000007eULL: s390_format_SIY(s390_irgen_ALGSI, SIY_i2(ovl), + SIY_b1(ovl), SIY_dl1(ovl), + SIY_dh1(ovl)); + goto ok; case 0xeb0000000080ULL: s390_format_RSY_RURD(s390_irgen_ICMH, RSY_r1(ovl), RSY_r3(ovl), RSY_b2(ovl), RSY_dl2(ovl), @@ -20872,33 +20856,33 @@ s390_decode_6byte_and_irgen(const UChar *bytes) goto ok; case 0xe50eULL: /* MVCSK */ goto unimplemented; case 0xe50fULL: /* MVCDK */ goto unimplemented; - case 0xe544ULL: s390_format_SIL_RDI(s390_irgen_MVHHI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe548ULL: s390_format_SIL_RDI(s390_irgen_MVGHI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe54cULL: s390_format_SIL_RDI(s390_irgen_MVHI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe554ULL: s390_format_SIL_RDI(s390_irgen_CHHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe555ULL: s390_format_SIL_RDU(s390_irgen_CLHHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe558ULL: s390_format_SIL_RDI(s390_irgen_CGHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe559ULL: s390_format_SIL_RDU(s390_irgen_CLGHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe55cULL: s390_format_SIL_RDI(s390_irgen_CHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; - case 0xe55dULL: s390_format_SIL_RDU(s390_irgen_CLFHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); - goto ok; + case 0xe544ULL: s390_format_SIL(s390_irgen_MVHHI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe548ULL: s390_format_SIL(s390_irgen_MVGHI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe54cULL: s390_format_SIL(s390_irgen_MVHI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe554ULL: s390_format_SIL(s390_irgen_CHHSI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe555ULL: s390_format_SIL(s390_irgen_CLHHSI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe558ULL: s390_format_SIL(s390_irgen_CGHSI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe559ULL: s390_format_SIL(s390_irgen_CLGHSI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe55cULL: s390_format_SIL(s390_irgen_CHSI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; + case 0xe55dULL: s390_format_SIL(s390_irgen_CLFHSI, SIL_b1(ovl), + SIL_d1(ovl), SIL_i2(ovl)); + goto ok; case 0xe560ULL: /* TBEGIN */ goto unimplemented; case 0xe561ULL: /* TBEGINC */ goto unimplemented; } From eb95c934ceb36562acf605fb02def86cf99d27b9 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 18 Jan 2026 21:46:59 +0000 Subject: [PATCH 264/502] s390: Remove / rename s390_format_RS_... functions Remove functions s390_format_RS_RURD, s390_format_RS_RRRD and s390_format_RS_AARD. Use s390_format_RS instead. Actually, Principles of Ops has RS-a and RS-b formats. But those differ only in how they name a particular opcode field and not how the opcode's 4 bytes are divided up into fields. I did not bother with that. Rename s390_format_RS_R0RD --> s390_format_RS0 --- VEX/priv/guest_s390_toIR.c | 139 ++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 72 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 59d490d9e..b5fff635b 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2849,8 +2849,8 @@ s390_format_RRS(void (*irgen)(UChar r1, UChar r2, UChar m3, IRTemp op4addr), } static void -s390_format_RS_R0RD(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar b2, UShort d2) +s390_format_RS0(void (*irgen)(UChar r1, IRTemp op2addr), + UChar r1, UChar b2, UShort d2) { IRTemp op2addr = newTemp(Ity_I64); @@ -2861,32 +2861,8 @@ s390_format_RS_R0RD(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RS_RRRD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), - UChar r1, UChar r3, UChar b2, UShort d2) -{ - IRTemp op2addr = newTemp(Ity_I64); - - assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : - mkU64(0))); - - irgen(r1, r3, op2addr); -} - -static void -s390_format_RS_RURD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), - UChar r1, UChar r3, UChar b2, UShort d2) -{ - IRTemp op2addr = newTemp(Ity_I64); - - assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : - mkU64(0))); - - irgen(r1, r3, op2addr); -} - -static void -s390_format_RS_AARD(void (*irgen)(UChar, UChar, IRTemp), - UChar r1, UChar r3, UChar b2, UShort d2) +s390_format_RS(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), + UChar r1, UChar r3, UChar b2, UShort d2) { IRTemp op2addr = newTemp(Ity_I64); @@ -18963,28 +18939,39 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0x85: s390_irgen_BRXLE(RSI_r1(ovl), RSI_r3(ovl), RSI_i2(ovl)); goto ok; - case 0x86: s390_format_RS_RRRD(s390_irgen_BXH, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0x87: s390_format_RS_RRRD(s390_irgen_BXLE, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0x88: s390_format_RS_R0RD(s390_irgen_SRL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x89: s390_format_RS_R0RD(s390_irgen_SLL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x8a: s390_format_RS_R0RD(s390_irgen_SRA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x8b: s390_format_RS_R0RD(s390_irgen_SLA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x8c: s390_format_RS_R0RD(s390_irgen_SRDL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x8d: s390_format_RS_R0RD(s390_irgen_SLDL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x8e: s390_format_RS_R0RD(s390_irgen_SRDA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x8f: s390_format_RS_R0RD(s390_irgen_SLDA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); goto ok; - case 0x90: s390_format_RS_RRRD(s390_irgen_STM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; + case 0x86: s390_format_RS(s390_irgen_BXH, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0x87: s390_format_RS(s390_irgen_BXLE, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0x88: s390_format_RS0(s390_irgen_SRL, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x89: s390_format_RS0(s390_irgen_SLL, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x8a: s390_format_RS0(s390_irgen_SRA, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x8b: s390_format_RS0(s390_irgen_SLA, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x8c: s390_format_RS0(s390_irgen_SRDL, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x8d: s390_format_RS0(s390_irgen_SLDL, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x8e: s390_format_RS0(s390_irgen_SRDA, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x8f: s390_format_RS0(s390_irgen_SLDA, RS_r1(ovl), RS_b2(ovl), + RS_d2(ovl)); + goto ok; + case 0x90: s390_format_RS(s390_irgen_STM, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; case 0x91: s390_format_SI(s390_irgen_TM, SI_i2(ovl), SI_b1(ovl), SI_d1(ovl)); goto ok; @@ -19003,19 +18990,22 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0x97: s390_format_SI(s390_irgen_XI, SI_i2(ovl), SI_b1(ovl), SI_d1(ovl)); goto ok; - case 0x98: s390_format_RS_RRRD(s390_irgen_LM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; + case 0x98: s390_format_RS(s390_irgen_LM, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; case 0x99: /* TRACE */ goto unimplemented; - case 0x9a: s390_format_RS_AARD(s390_irgen_LAM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0x9b: s390_format_RS_AARD(s390_irgen_STAM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0xa8: s390_format_RS_RRRD(s390_irgen_MVCLE, RS_r1(ovl), - RS_r3(ovl), RS_b2(ovl), RS_d2(ovl)); - goto ok; - case 0xa9: s390_format_RS_RRRD(s390_irgen_CLCLE, RS_r1(ovl), - RS_r3(ovl), RS_b2(ovl), RS_d2(ovl)); - goto ok; + case 0x9a: s390_format_RS(s390_irgen_LAM, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0x9b: s390_format_RS(s390_irgen_STAM, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0xa8: s390_format_RS(s390_irgen_MVCLE, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0xa9: s390_format_RS(s390_irgen_CLCLE, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; case 0xac: /* STNSM */ goto unimplemented; case 0xad: /* STOSM */ goto unimplemented; case 0xae: /* SIGP */ goto unimplemented; @@ -19023,16 +19013,21 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb1: /* LRA */ goto unimplemented; case 0xb6: /* STCTL */ goto unimplemented; case 0xb7: /* LCTL */ goto unimplemented; - case 0xba: s390_format_RS_RRRD(s390_irgen_CS, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0xbb: s390_format_RS_RRRD(s390_irgen_CDS, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0xbd: s390_format_RS_RURD(s390_irgen_CLM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0xbe: s390_format_RS_RURD(s390_irgen_STCM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; - case 0xbf: s390_format_RS_RURD(s390_irgen_ICM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); goto ok; + case 0xba: s390_format_RS(s390_irgen_CS, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0xbb: s390_format_RS(s390_irgen_CDS, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0xbd: s390_format_RS(s390_irgen_CLM, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0xbe: s390_format_RS(s390_irgen_STCM, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; + case 0xbf: s390_format_RS(s390_irgen_ICM, RS_r1(ovl), RS_r3(ovl), + RS_b2(ovl), RS_d2(ovl)); + goto ok; } return S390_DECODE_UNKNOWN_INSN; From fb7850f26954188dcc0ed0e7e0fd99ce7a6cf823 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Sun, 18 Jan 2026 22:14:22 +0000 Subject: [PATCH 265/502] s390: Rename s390_format_RXE_... functions Rename s390_format_RXE_FRRD --> s390_format_RXE0 Rename s390_format_RXE_RRRDR --> s390_format_RXE --- VEX/priv/guest_s390_toIR.c | 205 +++++++++++++++++++++---------------- 1 file changed, 116 insertions(+), 89 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index b5fff635b..a38177942 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2960,8 +2960,8 @@ s390_format_RX(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RXE_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort d2) +s390_format_RXE0(void (*irgen)(UChar r1, IRTemp op2addr), + UChar r1, UChar x2, UChar b2, UShort d2) { IRTemp op2addr = newTemp(Ity_I64); @@ -2973,8 +2973,8 @@ s390_format_RXE_FRRD(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RXE_RRRDR(void (*irgen)(UChar r1, IRTemp op2addr, UChar m3), - UChar r1, UChar x2, UChar b2, UShort d2, UChar m3) +s390_format_RXE(void (*irgen)(UChar r1, IRTemp op2addr, UChar m3), + UChar r1, UChar x2, UChar b2, UShort d2, UChar m3) { IRTemp op2addr = newTemp(Ity_I64); @@ -19672,9 +19672,10 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe70000000022ULL: s390_format_VRS_VRRDM(s390_irgen_VLVG, VRS_v1(ovl), VRS_b2(ovl), VRS_d2(ovl), VRS_v3(ovl), VRS_m4(ovl), VRS_rxb(ovl)); goto ok; - case 0xe70000000027ULL: s390_format_RXE_RRRDR(s390_irgen_LCBB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl), RXE_m3(ovl)); goto ok; + case 0xe70000000027ULL: s390_format_RXE(s390_irgen_LCBB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl), RXE_m3(ovl)); + goto ok; case 0xe70000000030ULL: s390_format_VRS_VRDVM(s390_irgen_VESL, VRS_v1(ovl), VRS_b2(ovl), VRS_d2(ovl), VRS_v3(ovl), VRS_m4(ovl), @@ -20506,32 +20507,40 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RIS_r1(ovl), RIS_m3(ovl), RIS_b4(ovl), RIS_d4(ovl), RIS_i2(ovl)); goto ok; - case 0xed0000000004ULL: s390_format_RXE_FRRD(s390_irgen_LDEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000005ULL: s390_format_RXE_FRRD(s390_irgen_LXDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000006ULL: s390_format_RXE_FRRD(s390_irgen_LXEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; + case 0xed0000000004ULL: s390_format_RXE0(s390_irgen_LDEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000005ULL: s390_format_RXE0(s390_irgen_LXDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000006ULL: s390_format_RXE0(s390_irgen_LXEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; case 0xed0000000007ULL: /* MXDB */ goto unimplemented; - case 0xed0000000008ULL: s390_format_RXE_FRRD(s390_irgen_KEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000009ULL: s390_format_RXE_FRRD(s390_irgen_CEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed000000000aULL: s390_format_RXE_FRRD(s390_irgen_AEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed000000000bULL: s390_format_RXE_FRRD(s390_irgen_SEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; + case 0xed0000000008ULL: s390_format_RXE0(s390_irgen_KEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000009ULL: s390_format_RXE0(s390_irgen_CEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed000000000aULL: s390_format_RXE0(s390_irgen_AEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed000000000bULL: s390_format_RXE0(s390_irgen_SEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; case 0xed000000000cULL: /* MDEB */ goto unimplemented; - case 0xed000000000dULL: s390_format_RXE_FRRD(s390_irgen_DEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; + case 0xed000000000dULL: s390_format_RXE0(s390_irgen_DEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; case 0xed000000000eULL: s390_format_RXF_FRRDF(s390_irgen_MAEB, RXF_r3(ovl), RXF_x2(ovl), RXF_b2(ovl), RXF_d2(ovl), @@ -20540,42 +20549,54 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RXF_r3(ovl), RXF_x2(ovl), RXF_b2(ovl), RXF_d2(ovl), RXF_r1(ovl)); goto ok; - case 0xed0000000010ULL: s390_format_RXE_FRRD(s390_irgen_TCEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000011ULL: s390_format_RXE_FRRD(s390_irgen_TCDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000012ULL: s390_format_RXE_FRRD(s390_irgen_TCXB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000014ULL: s390_format_RXE_FRRD(s390_irgen_SQEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000015ULL: s390_format_RXE_FRRD(s390_irgen_SQDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000017ULL: s390_format_RXE_FRRD(s390_irgen_MEEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000018ULL: s390_format_RXE_FRRD(s390_irgen_KDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000019ULL: s390_format_RXE_FRRD(s390_irgen_CDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed000000001aULL: s390_format_RXE_FRRD(s390_irgen_ADB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed000000001bULL: s390_format_RXE_FRRD(s390_irgen_SDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed000000001cULL: s390_format_RXE_FRRD(s390_irgen_MDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed000000001dULL: s390_format_RXE_FRRD(s390_irgen_DDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; + case 0xed0000000010ULL: s390_format_RXE0(s390_irgen_TCEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000011ULL: s390_format_RXE0(s390_irgen_TCDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000012ULL: s390_format_RXE0(s390_irgen_TCXB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000014ULL: s390_format_RXE0(s390_irgen_SQEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000015ULL: s390_format_RXE0(s390_irgen_SQDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000017ULL: s390_format_RXE0(s390_irgen_MEEB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000018ULL: s390_format_RXE0(s390_irgen_KDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000019ULL: s390_format_RXE0(s390_irgen_CDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed000000001aULL: s390_format_RXE0(s390_irgen_ADB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed000000001bULL: s390_format_RXE0(s390_irgen_SDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed000000001cULL: s390_format_RXE0(s390_irgen_MDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed000000001dULL: s390_format_RXE0(s390_irgen_DDB, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; case 0xed000000001eULL: s390_format_RXF_FRRDF(s390_irgen_MADB, RXF_r3(ovl), RXF_x2(ovl), RXF_b2(ovl), RXF_d2(ovl), @@ -20584,10 +20605,10 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RXF_r3(ovl), RXF_x2(ovl), RXF_b2(ovl), RXF_d2(ovl), RXF_r1(ovl)); goto ok; - case 0xed0000000024ULL: s390_format_RXE_FRRD(s390_irgen_LDE, - RXE_r1(ovl), RXE_x2(ovl), - RXE_b2(ovl), - RXE_d2(ovl)); goto ok; + case 0xed0000000024ULL: s390_format_RXE0(s390_irgen_LDE, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; case 0xed0000000025ULL: /* LXD */ goto unimplemented; case 0xed0000000026ULL: /* LXE */ goto unimplemented; case 0xed000000002eULL: /* MAE */ goto unimplemented; @@ -20619,24 +20640,30 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RXF_r3(ovl), RXF_x2(ovl), RXF_b2(ovl), RXF_d2(ovl), RXF_r1(ovl)); goto ok; - case 0xed0000000050ULL: s390_format_RXE_FRRD(s390_irgen_TDCET, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000051ULL: s390_format_RXE_FRRD(s390_irgen_TDGET, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000054ULL: s390_format_RXE_FRRD(s390_irgen_TDCDT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000055ULL: s390_format_RXE_FRRD(s390_irgen_TDGDT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000058ULL: s390_format_RXE_FRRD(s390_irgen_TDCXT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; - case 0xed0000000059ULL: s390_format_RXE_FRRD(s390_irgen_TDGXT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); goto ok; + case 0xed0000000050ULL: s390_format_RXE0(s390_irgen_TDCET, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000051ULL: s390_format_RXE0(s390_irgen_TDGET, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000054ULL: s390_format_RXE0(s390_irgen_TDCDT, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000055ULL: s390_format_RXE0(s390_irgen_TDGDT, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000058ULL: s390_format_RXE0(s390_irgen_TDCXT, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; + case 0xed0000000059ULL: s390_format_RXE0(s390_irgen_TDGXT, RXE_r1(ovl), + RXE_x2(ovl), RXE_b2(ovl), + RXE_d2(ovl)); + goto ok; case 0xed0000000064ULL: s390_format_RXY(s390_irgen_LEY, RXY_r1(ovl), RXY_x2(ovl), RXY_b2(ovl), RXY_dl2(ovl), RXY_dh2(ovl)); From 38609f9b87eb6908a4a04ed5882db337edaec765 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 20 Jan 2026 07:44:31 +0100 Subject: [PATCH 266/502] Bug 514206 - Assertion '!sr_isError(sr)' failed - mmap fd points to an open descriptor to a PCI device Also reindent set_CEnt() a bit --- NEWS | 2 ++ coregrind/m_debuginfo/debuginfo.c | 5 +++- coregrind/m_debuginfo/image.c | 38 +++++++++++++++---------------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index 1c93e1345..5f7eb03bf 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. compiler warning 513475 Add SSE4.1 PMULLD instruction for x86 32 bit 514094 readlink("/proc/self/exe") overwrites buffer beyond its return value +514206 Assertion '!sr_isError(sr)' failed - mmap fd points to an open + descriptor to a PCI device 514613 Unclosed leak_summary/still_reachable tag in xml output 514659 ltp 20250930 vs linux 6.18.3 doesn't build 514762 Many "Bad file descriptor" messages when using --track-fds=yes and diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index f503fc8ee..8c63cfc39 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1206,8 +1206,11 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) * --20208-- WARNING: Serious error when reading debug info * --20208-- When reading debug info from /proc/xen/privcmd: * --20208-- can't read file to inspect ELF header + * + * Also PCI devices, see bug 514206 */ - if (VG_(strncmp)(filename, "/proc/xen/", 10) == 0) + if (VG_(strncmp)(filename, "/proc/xen/", 10) == 0 || + VG_(strncmp)(filename, "/sys/devices/pci", 16) == 0) return 0; if (debug) diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c index 7b5847820..bbcffd511 100644 --- a/coregrind/m_debuginfo/image.c +++ b/coregrind/m_debuginfo/image.c @@ -588,30 +588,30 @@ static void set_CEnt ( const DiImage* img, UInt entNo, DiOffT off ) if (img->source.is_local) { // Simple: just read it if (img->source.fd == -1) { - VG_(memcpy)(&ce->data[0], ((const char *)img->source.session_id) + off, len); + VG_(memcpy)(&ce->data[0], ((const char *)img->source.session_id) + off, len); } else { - // PJF not quite so simple - see - // https://bugs.kde.org/show_bug.cgi?id=480405 - // if img->source.fd was opened with O_DIRECT the memory needs - // to be aligned and also the length - // that's a lot of hassle just to take a quick peek to see if - // is an ELF binary so just twiddle the flag before and after - // peeking. - // This doesn't seem to be a problem on FreeBSD. I haven't tested - // on macOS or Solaris, hence the conditional compilation + // PJF not quite so simple - see + // https://bugs.kde.org/show_bug.cgi?id=480405 + // if img->source.fd was opened with O_DIRECT the memory needs + // to be aligned and also the length + // that's a lot of hassle just to take a quick peek to see if + // is an ELF binary so just twiddle the flag before and after + // peeking. + // This doesn't seem to be a problem on FreeBSD. I haven't tested + // on macOS or Solaris, hence the conditional compilation #if defined(VKI_O_DIRECT) - Int flags = VG_(fcntl)(img->source.fd, VKI_F_GETFL, 0); - if (flags & VKI_O_DIRECT) { - VG_(fcntl)(img->source.fd, VKI_F_SETFL, flags & ~VKI_O_DIRECT); - } + Int flags = VG_(fcntl)(img->source.fd, VKI_F_GETFL, 0); + if (flags & VKI_O_DIRECT) { + VG_(fcntl)(img->source.fd, VKI_F_SETFL, flags & ~VKI_O_DIRECT); + } #endif - SysRes sr = VG_(pread)(img->source.fd, &ce->data[0], (Int)len, off); + SysRes sr = VG_(pread)(img->source.fd, &ce->data[0], (Int)len, off); #if defined(VKI_O_DIRECT) - if (flags & VKI_O_DIRECT) { - VG_(fcntl)(img->source.fd, VKI_F_SETFL, flags); - } + if (flags & VKI_O_DIRECT) { + VG_(fcntl)(img->source.fd, VKI_F_SETFL, flags); + } #endif - vg_assert(!sr_isError(sr)); + vg_assert(!sr_isError(sr)); } } else { // Not so simple: poke the server From 845145359800ae1f55519caf5c90f7c509f51d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Wed, 14 Jan 2026 09:23:55 -0500 Subject: [PATCH 267/502] Add SSE4.1 BLENDPD instruction for x86 32 bit Support blendpd (Blend Packed Double Precision Floating-Point Values (XMM)) instruction in guest_x86_toIR.c. To be able to use amd64 math_BLENDPD_128 function for x86 implementation, add a new VEX/priv/guest_generic_sse.h header and move math_BLENDPD_128 there. mkV128() was moveda from line 1671 in guest_amd64_toIR.c to line 295, grouping it with other mkU* constant-creation helpers (mkU8, mkU16, mkU32, mkU64). This allows guest_generic_sse.h to be included much earlier (line 300 vs. line 1676), making the code organization more natural. The header includes an explaination why it must be included mid-file (after IR helpers like newTemp, assign, binop, etc. are defined) and why those helpers cannot be moved to a shared header (they depend on file-local global state, particularly the 'irsb' variable). Add test function to sse4-common.h and update none/tests/x86/sse4-x86.c to test the instruction. BZ: https://bugs.kde.org/show_bug.cgi?id=514596 --- Makefile.vex.am | 1 + NEWS | 1 + VEX/priv/guest_amd64_toIR.c | 36 +++--------- VEX/priv/guest_generic_sse.h | 90 ++++++++++++++++++++++++++++++ VEX/priv/guest_x86_toIR.c | 53 ++++++++++++++++++ none/tests/amd64/sse4-64.c | 14 ----- none/tests/sse4-common.h | 14 +++++ none/tests/x86/sse4-x86.c | 1 + none/tests/x86/sse4-x86.stdout.exp | 80 ++++++++++++++++++++++++++ 9 files changed, 247 insertions(+), 43 deletions(-) create mode 100644 VEX/priv/guest_generic_sse.h diff --git a/Makefile.vex.am b/Makefile.vex.am index f7371df78..fc496d22e 100644 --- a/Makefile.vex.am +++ b/Makefile.vex.am @@ -41,6 +41,7 @@ noinst_HEADERS = \ priv/ir_opt.h \ priv/guest_generic_bb_to_IR.h \ priv/guest_generic_x87.h \ + priv/guest_generic_sse.h \ priv/guest_x86_defs.h \ priv/guest_amd64_defs.h \ priv/guest_ppc_defs.h \ diff --git a/NEWS b/NEWS index 5f7eb03bf..9091f0a39 100644 --- a/NEWS +++ b/NEWS @@ -71,6 +71,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 514094 readlink("/proc/self/exe") overwrites buffer beyond its return value 514206 Assertion '!sr_isError(sr)' failed - mmap fd points to an open descriptor to a PCI device +514596 Add SSE4.1 BLENDPD instruction for x86 32 bit 514613 Unclosed leak_summary/still_reachable tag in xml output 514659 ltp 20250930 vs linux 6.18.3 doesn't build 514762 Many "Bad file descriptor" messages when using --track-fds=yes and diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c index 0319578f2..5faf9c07c 100644 --- a/VEX/priv/guest_amd64_toIR.c +++ b/VEX/priv/guest_amd64_toIR.c @@ -292,6 +292,13 @@ static IRExpr* mkU ( IRType ty, ULong i ) } } +static IRExpr* mkV128 ( UShort mask ) +{ + return IRExpr_Const(IRConst_V128(mask)); +} + +#include "guest_generic_sse.h" + static void storeLE ( IRExpr* addr, IRExpr* data ) { stmt( IRStmt_Store(Iend_LE, addr, data) ); @@ -1668,11 +1675,6 @@ static void putYMMRegLane32 ( UInt ymmreg, Int laneno, IRExpr* e ) stmt( IRStmt_Put( ymmGuestRegLane32offset(ymmreg,laneno), e ) ); } -static IRExpr* mkV128 ( UShort mask ) -{ - return IRExpr_Const(IRConst_V128(mask)); -} - /* Write the low half of a YMM reg and zero out the upper half. */ static void putYMMRegLoAndZU ( UInt ymmreg, IRExpr* e ) { @@ -11233,30 +11235,6 @@ static IRTemp math_SHUFPD_256 ( IRTemp sV, IRTemp dV, UInt imm8 ) } -static IRTemp math_BLENDPD_128 ( IRTemp sV, IRTemp dV, UInt imm8 ) -{ - UShort imm8_mask_16; - IRTemp imm8_mask = newTemp(Ity_V128); - - switch( imm8 & 3 ) { - case 0: imm8_mask_16 = 0x0000; break; - case 1: imm8_mask_16 = 0x00FF; break; - case 2: imm8_mask_16 = 0xFF00; break; - case 3: imm8_mask_16 = 0xFFFF; break; - default: vassert(0); break; - } - assign( imm8_mask, mkV128( imm8_mask_16 ) ); - - IRTemp res = newTemp(Ity_V128); - assign ( res, binop( Iop_OrV128, - binop( Iop_AndV128, mkexpr(sV), - mkexpr(imm8_mask) ), - binop( Iop_AndV128, mkexpr(dV), - unop( Iop_NotV128, mkexpr(imm8_mask) ) ) ) ); - return res; -} - - static IRTemp math_BLENDPD_256 ( IRTemp sV, IRTemp dV, UInt imm8 ) { IRTemp sVhi = IRTemp_INVALID, sVlo = IRTemp_INVALID; diff --git a/VEX/priv/guest_generic_sse.h b/VEX/priv/guest_generic_sse.h new file mode 100644 index 000000000..28f6079ff --- /dev/null +++ b/VEX/priv/guest_generic_sse.h @@ -0,0 +1,90 @@ +/*---------------------------------------------------------------*/ +/*--- begin guest_generic_sse.h ---*/ +/*---------------------------------------------------------------*/ + +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (C) 2025-2026 Alexandra Hájková + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . + + The GNU General Public License is contained in the file COPYING. +*/ + +/* This file contains functions for SSE/SSE2/SSE3/SSE4-specific + operations. Both the amd64 and x86 front ends (guests) call + these functions. By putting them here, code duplication is + avoided. Some of these functions are tricky and hard to verify, + so there is much to be said for only having one copy thereof. + + IMPORTANT: This header must be included AFTER the following + helper functions/macros are defined in the including file: + - newTemp(IRType) - allocate a new IRTemp + - assign(IRTemp, IRExpr*) - create assignment statement + - mkV128(UShort) - create V128 constant expression + - binop(IROp, IRExpr*, IRExpr*) - create binary operation + - unop(IROp, IRExpr*) - create unary operation + - mkexpr(IRTemp) - create IRTemp expression + - vassert(Bool) - assertion macro + + These helper functions are defined locally in each guest_*_toIR.c + file because they rely on file-local global state, particularly + the 'irsb' variable (the IR super block being built). Moving them + to a shared header would require either passing 'irsb' as a + parameter to each call (breaking thousands of call sites) or + making 'irsb' a shared extern (architecturally problematic). + + Therefore, this header is included after those helpers are defined, + typically around line 300 in guest_*_toIR.c files. +*/ + +#ifndef __VEX_GUEST_GENERIC_SSE_H +#define __VEX_GUEST_GENERIC_SSE_H + +#include "libvex_basictypes.h" +#include "libvex_ir.h" +#include "libvex.h" + + +/* BLENDPD 128-bit */ +static inline IRTemp math_BLENDPD_128 ( IRTemp sV, IRTemp dV, UInt imm8 ) +{ + UShort imm8_mask_16; + IRTemp imm8_mask = newTemp(Ity_V128); + + switch( imm8 & 3 ) { + case 0: imm8_mask_16 = 0x0000; break; + case 1: imm8_mask_16 = 0x00FF; break; + case 2: imm8_mask_16 = 0xFF00; break; + case 3: imm8_mask_16 = 0xFFFF; break; + default: vassert(0); break; + } + assign( imm8_mask, mkV128( imm8_mask_16 ) ); + + IRTemp res = newTemp(Ity_V128); + assign ( res, binop( Iop_OrV128, + binop( Iop_AndV128, mkexpr(sV), + mkexpr(imm8_mask) ), + binop( Iop_AndV128, mkexpr(dV), + unop( Iop_NotV128, mkexpr(imm8_mask) ) ) ) ); + return res; +} + +#endif /* ndef __VEX_GUEST_GENERIC_SSE_H */ + +/*---------------------------------------------------------------*/ +/*--- end guest_generic_sse.h ---*/ +/*---------------------------------------------------------------*/ diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c index 710905ad1..5312fab87 100644 --- a/VEX/priv/guest_x86_toIR.c +++ b/VEX/priv/guest_x86_toIR.c @@ -695,6 +695,8 @@ static IRExpr* mkV128 ( UShort mask ) return IRExpr_Const(IRConst_V128(mask)); } +#include "guest_generic_sse.h" + static IRExpr* loadLE ( IRType ty, IRExpr* addr ) { return IRExpr_Load(Iend_LE, ty, addr); @@ -12999,6 +13001,57 @@ DisResult disInstr_X86_WRK ( goto decode_success; } + /* 66 0F 3A 0D /r ib = BLENDPD xmm1, xmm2/m128, imm8 + Blend Packed Double Precision Floating-Point Values (XMM) + - 66 = mandatory prefix (this is what makes sz == 2) + - 0F 3A 0D = three opcode bytes + - /r = ModR/M byte follows (specifies registers or memory addressing) + - ib = immediate byte follows (1 byte immediate value) + insn[] array layout: + + insn[0] = 0x0F (first opcode byte) + insn[1] = 0x3A (second opcode byte) + insn[2] = 0x0D (third opcode byte) + insn[3] = ModR/M (specifies source/dest registers or memory mode) + + Register-to-register form: + insn[3] = ModR/M byte (tells us which registers) + insn[4] = immediate byte + alen var tells us how many bytes the addressing mode consumed after the ModR/M byte +*/ + if (sz == 2 && insn[0] == 0x0F && insn[1] == 0x3A && insn[2] == 0x0D) { + Int imm8; + IRTemp dst_vec = newTemp(Ity_V128); + IRTemp src_vec = newTemp(Ity_V128); + + modrm = insn[3]; + //no REX prefix on 32bit + assign( dst_vec, getXMMReg( gregOfRM(modrm) ) ); + + if ( epartIsReg( modrm ) ) { + imm8 = insn[4]; + assign( src_vec, getXMMReg( eregOfRM(modrm) ) ); + //skip 0F 3A 0D opcode bytes: +3 + delta += 1+1 + 3; + DIP( "blendpd $%d, %s,%s\n", imm8, + nameXMMReg( eregOfRM(modrm) ), + nameXMMReg( gregOfRM(modrm) ) ); + } else { + //delta+3 skips the 0F 3A 0D bytes + addr = disAMode( &alen, sorb, delta + 3, dis_buf); + assign( src_vec, loadLE( Ity_V128, mkexpr(addr) ) ); + imm8 = insn[3+alen]; + //skip 0F 3A 0D opcode bytes: +3 + delta += alen+1 + 3; + DIP( "blendpd $%d, %s,%s\n", + imm8, dis_buf, nameXMMReg( gregOfRM(modrm) ) ); + } + + putXMMReg( gregOfRM(modrm), + mkexpr( math_BLENDPD_128( src_vec, dst_vec, imm8) ) ); + goto decode_success; + } + /* 66 0F 38 38 /r - PMINSB xmm1, xmm2/m128 66 0F 38 3C /r - PMAXSB xmm1, xmm2/m128 Minimum/Maximum of Packed Signed Byte Integers (XMM) diff --git a/none/tests/amd64/sse4-64.c b/none/tests/amd64/sse4-64.c index a4614016e..9ba5162fd 100644 --- a/none/tests/amd64/sse4-64.c +++ b/none/tests/amd64/sse4-64.c @@ -152,20 +152,6 @@ void set_sse_roundingmode ( UInt m ) -void test_BLENDPD ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_imm_mandr_r("blendpd", 0, src, dst); - DO_imm_mandr_r("blendpd", 1, src, dst); - DO_imm_mandr_r("blendpd", 2, src, dst); - DO_imm_mandr_r("blendpd", 3, src, dst); - } -} - void test_BLENDPS ( void ) { V128 src, dst; diff --git a/none/tests/sse4-common.h b/none/tests/sse4-common.h index 5576c1f73..62c112548 100644 --- a/none/tests/sse4-common.h +++ b/none/tests/sse4-common.h @@ -351,4 +351,18 @@ static inline void test_PMULLD ( void ) } } +static inline void test_BLENDPD ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_imm_mandr_r("blendpd", 0, src, dst); + DO_imm_mandr_r("blendpd", 1, src, dst); + DO_imm_mandr_r("blendpd", 2, src, dst); + DO_imm_mandr_r("blendpd", 3, src, dst); + } +} + #endif /* __SSE4_COMMON_H */ diff --git a/none/tests/x86/sse4-x86.c b/none/tests/x86/sse4-x86.c index f65e6467d..c834758ec 100644 --- a/none/tests/x86/sse4-x86.c +++ b/none/tests/x86/sse4-x86.c @@ -113,6 +113,7 @@ int main(void) test_PMINUD(); test_PMINUW(); test_PMULLD(); + test_BLENDPD(); return 0; } diff --git a/none/tests/x86/sse4-x86.stdout.exp b/none/tests/x86/sse4-x86.stdout.exp index de3810a0e..db6addce9 100644 --- a/none/tests/x86/sse4-x86.stdout.exp +++ b/none/tests/x86/sse4-x86.stdout.exp @@ -186,3 +186,83 @@ r pmulld a77700084a491a0ef099b6dd61462ec3 e70a9c61f55fce335d68e1a25652a804 3 m pmulld a77700084a491a0ef099b6dd61462ec3 e70a9c61f55fce335d68e1a25652a804 306be308b0b974caedc5f4da103eb30c r pmulld 1dd493f59184345437d5e366d0e20c30 c50f1401e45b82d3086a7a39a1e6217d edbeb7f57c65c93cb53a3db645122370 m pmulld 1dd493f59184345437d5e366d0e20c30 c50f1401e45b82d3086a7a39a1e6217d edbeb7f57c65c93cb53a3db645122370 +r blendpd $0 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 b79cd058188318692112ca1cf9f1dd31 +m blendpd $0 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 b79cd058188318692112ca1cf9f1dd31 +r blendpd $1 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 b79cd058188318693d1148867eb08f81 +m blendpd $1 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 b79cd058188318693d1148867eb08f81 +r blendpd $2 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 3a542e238fe5d1792112ca1cf9f1dd31 +m blendpd $2 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 3a542e238fe5d1792112ca1cf9f1dd31 +r blendpd $3 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 3a542e238fe5d1793d1148867eb08f81 +m blendpd $3 3a542e238fe5d1793d1148867eb08f81 b79cd058188318692112ca1cf9f1dd31 3a542e238fe5d1793d1148867eb08f81 +r blendpd $0 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 19ffced22c62cba0822c4c377b82984c +m blendpd $0 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 19ffced22c62cba0822c4c377b82984c +r blendpd $1 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 19ffced22c62cba0de18612787bc73e3 +m blendpd $1 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 19ffced22c62cba0de18612787bc73e3 +r blendpd $2 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 5842cbfee0f72e2a822c4c377b82984c +m blendpd $2 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 5842cbfee0f72e2a822c4c377b82984c +r blendpd $3 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 5842cbfee0f72e2ade18612787bc73e3 +m blendpd $3 5842cbfee0f72e2ade18612787bc73e3 19ffced22c62cba0822c4c377b82984c 5842cbfee0f72e2ade18612787bc73e3 +r blendpd $0 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 478209dbbd84d92508847c7642a20df9 +m blendpd $0 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 478209dbbd84d92508847c7642a20df9 +r blendpd $1 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 478209dbbd84d925f7b8ab3708137382 +m blendpd $1 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 478209dbbd84d925f7b8ab3708137382 +r blendpd $2 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 d4ec68f21f46871208847c7642a20df9 +m blendpd $2 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 d4ec68f21f46871208847c7642a20df9 +r blendpd $3 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 d4ec68f21f468712f7b8ab3708137382 +m blendpd $3 d4ec68f21f468712f7b8ab3708137382 478209dbbd84d92508847c7642a20df9 d4ec68f21f468712f7b8ab3708137382 +r blendpd $0 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 9c727edf66767ca38fe6d7c56a5ff965 +m blendpd $0 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 9c727edf66767ca38fe6d7c56a5ff965 +r blendpd $1 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 9c727edf66767ca362bba1a11cc04c89 +m blendpd $1 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 9c727edf66767ca362bba1a11cc04c89 +r blendpd $2 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 0b9c016be95f18de8fe6d7c56a5ff965 +m blendpd $2 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 0b9c016be95f18de8fe6d7c56a5ff965 +r blendpd $3 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 0b9c016be95f18de62bba1a11cc04c89 +m blendpd $3 0b9c016be95f18de62bba1a11cc04c89 9c727edf66767ca38fe6d7c56a5ff965 0b9c016be95f18de62bba1a11cc04c89 +r blendpd $0 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 761b274ac4c4f0c7f31ed81010c417bc +m blendpd $0 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 761b274ac4c4f0c7f31ed81010c417bc +r blendpd $1 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 761b274ac4c4f0c7fceebf50e0d0ba24 +m blendpd $1 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 761b274ac4c4f0c7fceebf50e0d0ba24 +r blendpd $2 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 579f90d5d9cd1c3af31ed81010c417bc +m blendpd $2 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 579f90d5d9cd1c3af31ed81010c417bc +r blendpd $3 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 579f90d5d9cd1c3afceebf50e0d0ba24 +m blendpd $3 579f90d5d9cd1c3afceebf50e0d0ba24 761b274ac4c4f0c7f31ed81010c417bc 579f90d5d9cd1c3afceebf50e0d0ba24 +r blendpd $0 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 30c9028972f8733d11f7fa4450de2529 +m blendpd $0 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 30c9028972f8733d11f7fa4450de2529 +r blendpd $1 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 30c9028972f8733da11d81326f4e7880 +m blendpd $1 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 30c9028972f8733da11d81326f4e7880 +r blendpd $2 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 1541139c8b1cd0d111f7fa4450de2529 +m blendpd $2 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 1541139c8b1cd0d111f7fa4450de2529 +r blendpd $3 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 1541139c8b1cd0d1a11d81326f4e7880 +m blendpd $3 1541139c8b1cd0d1a11d81326f4e7880 30c9028972f8733d11f7fa4450de2529 1541139c8b1cd0d1a11d81326f4e7880 +r blendpd $0 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 25c80a060da03fb0c33ebc4b44b8ddd8 +m blendpd $0 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 25c80a060da03fb0c33ebc4b44b8ddd8 +r blendpd $1 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 25c80a060da03fb02d146432e64644c9 +m blendpd $1 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 25c80a060da03fb02d146432e64644c9 +r blendpd $2 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 a1cd852d9cd97050c33ebc4b44b8ddd8 +m blendpd $2 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 a1cd852d9cd97050c33ebc4b44b8ddd8 +r blendpd $3 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 a1cd852d9cd970502d146432e64644c9 +m blendpd $3 a1cd852d9cd970502d146432e64644c9 25c80a060da03fb0c33ebc4b44b8ddd8 a1cd852d9cd970502d146432e64644c9 +r blendpd $0 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 b3633c2f304791cde6c097130b5efcf6 +m blendpd $0 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 b3633c2f304791cde6c097130b5efcf6 +r blendpd $1 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 b3633c2f304791cd7c9fe23c60c5d82b +m blendpd $1 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 b3633c2f304791cd7c9fe23c60c5d82b +r blendpd $2 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 5791e2f2a78f3762e6c097130b5efcf6 +m blendpd $2 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 5791e2f2a78f3762e6c097130b5efcf6 +r blendpd $3 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 5791e2f2a78f37627c9fe23c60c5d82b +m blendpd $3 5791e2f2a78f37627c9fe23c60c5d82b b3633c2f304791cde6c097130b5efcf6 5791e2f2a78f37627c9fe23c60c5d82b +r blendpd $0 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 35e7926e777aa43f56470887bfdd3daf +m blendpd $0 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 35e7926e777aa43f56470887bfdd3daf +r blendpd $1 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 35e7926e777aa43f6a8a793cf9d5f0d1 +m blendpd $1 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 35e7926e777aa43f6a8a793cf9d5f0d1 +r blendpd $2 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 94d7265949ca62b456470887bfdd3daf +m blendpd $2 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 94d7265949ca62b456470887bfdd3daf +r blendpd $3 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 94d7265949ca62b46a8a793cf9d5f0d1 +m blendpd $3 94d7265949ca62b46a8a793cf9d5f0d1 35e7926e777aa43f56470887bfdd3daf 94d7265949ca62b46a8a793cf9d5f0d1 +r blendpd $0 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f 06a10a317fc4b5b3ef9f8c927c405d2f +m blendpd $0 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f 06a10a317fc4b5b3ef9f8c927c405d2f +r blendpd $1 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f 06a10a317fc4b5b3d3a0a41fce854ae7 +m blendpd $1 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f 06a10a317fc4b5b3d3a0a41fce854ae7 +r blendpd $2 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f b2ed4ecc1e172df2ef9f8c927c405d2f +m blendpd $2 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f b2ed4ecc1e172df2ef9f8c927c405d2f +r blendpd $3 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f b2ed4ecc1e172df2d3a0a41fce854ae7 +m blendpd $3 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f b2ed4ecc1e172df2d3a0a41fce854ae7 From 9b94d6d798e10d7fc9960d894bef5d84d94a2105 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 21 Jan 2026 20:42:15 +0000 Subject: [PATCH 268/502] s390: Remove unused functions s390_format_RRF_.... Remove s390_format_RRFa_U0RR Remove s390_format_RRF_FFRU Remove s390_format_RRF_FUFF Remove s390_format_RRF_FUFF2 Remove s390_format_RRF_F0FF Remove s390_format_RRF_F0FF2 Remove s390_format_RRF_F0FR Remove s390_format_RRF_M0RERE Remove s390_format_RRF_RURR Remove s390_format_RRF_R0RR2 Remove s390_format_RRF_UUFF Remove s390_format_RRF_UUFF2 Remove s390_format_RRF_UUFR Remove s390_format_RRF_UURF Remove s390_format_RRF_U0RR Remove s390_format_RRF_0UFF Add field access macros for formats RRFa, RRFb, RRFc, RRFd and RRFe as per Principles of Ops. Add field access macros RRD_r1, RRD_r2, RRD_m3. Remove field access macros RRF_..., RRF2_..., RRF3_..., RRF4_... and RRF5_... --- VEX/priv/guest_s390_toIR.c | 818 +++++++++++++++---------------------- 1 file changed, 338 insertions(+), 480 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index a38177942..197b512f1 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -102,25 +102,29 @@ typedef enum { #define RR_r2(insn) ((insn) & 0xf) #define RI_r1(insn) (((insn) >> 20) & 0xf) #define RI_i2(insn) ((insn) & 0xffff) +#define RRD_r1(insn) (((insn) >> 12) & 0xf) +#define RRD_r3(insn) (((insn) >> 4) & 0xf) +#define RRD_r2(insn) ((insn) & 0xf) #define RRE_r1(insn) (((insn) >> 4) & 0xf) #define RRE_r2(insn) ((insn) & 0xf) -#define RRF_r1(insn) (((insn) >> 12) & 0xf) -#define RRF_r3(insn) (((insn) >> 4) & 0xf) -#define RRF_r2(insn) ((insn) & 0xf) -#define RRF2_m3(insn) (((insn) >> 12) & 0xf) -#define RRF2_m4(insn) (((insn) >> 8) & 0xf) -#define RRF2_r1(insn) (((insn) >> 4) & 0xf) -#define RRF2_r2(insn) ((insn) & 0xf) -#define RRF3_r3(insn) (((insn) >> 12) & 0xf) -#define RRF3_r1(insn) (((insn) >> 4) & 0xf) -#define RRF3_r2(insn) ((insn) & 0xf) -#define RRF4_r3(insn) (((insn) >> 12) & 0xf) -#define RRF4_m4(insn) (((insn) >> 8) & 0xf) -#define RRF4_r1(insn) (((insn) >> 4) & 0xf) -#define RRF4_r2(insn) ((insn) & 0xf) -#define RRF5_m4(insn) (((insn) >> 8) & 0xf) -#define RRF5_r1(insn) (((insn) >> 4) & 0xf) -#define RRF5_r2(insn) ((insn) & 0xf) +#define RRFa_r3(insn) (((insn) >> 12) & 0xf) +#define RRFa_m4(insn) (((insn) >> 8) & 0xf) +#define RRFa_r1(insn) (((insn) >> 4) & 0xf) +#define RRFa_r2(insn) ((insn) & 0xf) +#define RRFb_r3(insn) (((insn) >> 12) & 0xf) +#define RRFb_m4(insn) (((insn) >> 8) & 0xf) +#define RRFb_r1(insn) (((insn) >> 4) & 0xf) +#define RRFb_r2(insn) ((insn) & 0xf) +#define RRFc_m3(insn) (((insn) >> 12) & 0xf) +#define RRFc_r1(insn) (((insn) >> 4) & 0xf) +#define RRFc_r2(insn) ((insn) & 0xf) +#define RRFd_m4(insn) (((insn) >> 8) & 0xf) +#define RRFd_r1(insn) (((insn) >> 4) & 0xf) +#define RRFd_r2(insn) ((insn) & 0xf) +#define RRFe_m3(insn) (((insn) >> 12) & 0xf) +#define RRFe_m4(insn) (((insn) >> 8) & 0xf) +#define RRFe_r1(insn) (((insn) >> 4) & 0xf) +#define RRFe_r2(insn) ((insn) & 0xf) #define RS_r1(insn) (((insn) >> 20) & 0xf) #define RS_r3(insn) (((insn) >> 16) & 0xf) #define RS_b2(insn) (((insn) >> 12) & 0xf) @@ -2723,119 +2727,6 @@ s390_format_RIS(void (*irgen)(UChar r1, UChar m3, UChar i2, irgen(r1, m3, i2, op4addr); } -static void -s390_format_RRF_M0RERE(void (*irgen)(UChar m3, UChar r1, UChar r2), - UChar m3, UChar r1, UChar r2) -{ - irgen(m3, r1, r2); -} - -static void -s390_format_RRF_F0FF(void (*irgen)(UChar, UChar, UChar), - UChar r1, UChar r3, UChar r2) -{ - irgen(r1, r3, r2); -} - -static void -s390_format_RRF_F0FR(void (*irgen)(UChar, UChar, UChar), - UChar r3, UChar r1, UChar r2) -{ - irgen(r3, r1, r2); -} - -static void -s390_format_RRF_UUFF(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), - UChar m3, UChar m4, UChar r1, UChar r2) -{ - irgen(m3, m4, r1, r2); -} - -static void -s390_format_RRF_UUFF2(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), - UChar m3, UChar m4, UChar r1, UChar r2) -{ - irgen(m3, m4, r1, r2); -} - -static void -s390_format_RRF_0UFF(void (*irgen)(UChar m4, UChar r1, UChar r2), - UChar m4, UChar r1, UChar r2) -{ - irgen(m4, r1, r2); -} - -static void -s390_format_RRF_UUFR(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), - UChar m3, UChar m4, UChar r1, UChar r2) -{ - irgen(m3, m4, r1, r2); -} - -static void -s390_format_RRF_UURF(void (*irgen)(UChar m3, UChar m4, UChar r1, UChar r2), - UChar m3, UChar m4, UChar r1, UChar r2) -{ - irgen(m3, m4, r1, r2); -} - - -static void -s390_format_RRF_U0RR(void (*irgen)(UChar m3, UChar r1, UChar r2), - UChar m3, UChar r1, UChar r2) -{ - irgen(m3, r1, r2); -} - -static void -s390_format_RRFa_U0RR(void (*irgen)(UChar m3, UChar r1, UChar r2), - UChar m3, UChar r1, UChar r2) -{ - irgen(m3, r1, r2); -} - -static void -s390_format_RRF_F0FF2(void (*irgen)(UChar, UChar, UChar), - UChar r3, UChar r1, UChar r2) -{ - irgen(r3, r1, r2); -} - -static void -s390_format_RRF_FFRU(void (*irgen)(UChar, UChar, UChar, UChar), - UChar r3, UChar m4, UChar r1, UChar r2) -{ - irgen(r3, m4, r1, r2); -} - -static void -s390_format_RRF_FUFF(void (*irgen)(UChar, UChar, UChar, UChar), - UChar r3, UChar m4, UChar r1, UChar r2) -{ - irgen(r3, m4, r1, r2); -} - -static void -s390_format_RRF_FUFF2(void (*irgen)(UChar, UChar, UChar, UChar), - UChar r3, UChar m4, UChar r1, UChar r2) -{ - irgen(r3, m4, r1, r2); -} - -static void -s390_format_RRF_RURR(void (*irgen)(UChar, UChar, UChar, UChar), - UChar r3, UChar m4, UChar r1, UChar r2) -{ - irgen(r3, m4, r1, r2); -} - -static void -s390_format_RRF_R0RR2(void (*irgen)(UChar r3, UChar r1, UChar r2), - UChar r3, UChar r1, UChar r2) -{ - irgen(r3, r1, r2); -} - static void s390_format_RRS(void (*irgen)(UChar r1, UChar r2, UChar m3, IRTemp op4addr), UChar r1, UChar r2, UChar b4, UShort d4, UChar m3) @@ -18141,12 +18032,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb2a5: s390_irgen_TRE(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb2a6: s390_format_RRF_M0RERE(s390_irgen_CU21, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); - goto ok; - case 0xb2a7: s390_format_RRF_M0RERE(s390_irgen_CU12, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); - goto ok; + case 0xb2a6: s390_irgen_CU21(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb2a7: s390_irgen_CU12(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; case 0xb2b0: s390_irgen_STFLE(S_b2(ovl), S_d2(ovl)); goto ok; case 0xb2b1: /* STFL */ goto unimplemented; @@ -18160,8 +18049,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb2e1: /* SPCTR */ goto unimplemented; case 0xb2e4: /* ECCTR */ goto unimplemented; case 0xb2e5: /* EPCTR */ goto unimplemented; - case 0xb2e8: s390_format_RRFa_U0RR(s390_irgen_PPA, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; + case 0xb2e8: s390_irgen_PPA(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; case 0xb2ec: /* ETND */ goto unimplemented; case 0xb2ed: /* ECPGA */ goto unimplemented; case 0xb2f8: /* TEND */ goto unimplemented; @@ -18195,10 +18084,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb30c: /* MDEBR */ goto unimplemented; case 0xb30d: s390_irgen_DEBR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb30e: s390_format_RRF_F0FF(s390_irgen_MAEBR, RRF_r1(ovl), - RRF_r3(ovl), RRF_r2(ovl)); goto ok; - case 0xb30f: s390_format_RRF_F0FF(s390_irgen_MSEBR, RRF_r1(ovl), - RRF_r3(ovl), RRF_r2(ovl)); goto ok; + case 0xb30e: s390_irgen_MAEBR(RRD_r1(ovl), RRD_r3(ovl), RRD_r2(ovl)); + goto ok; + case 0xb30f: s390_irgen_MSEBR(RRD_r1(ovl), RRD_r3(ovl), RRD_r2(ovl)); + goto ok; case 0xb310: s390_irgen_LPDBR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb311: s390_irgen_LNDBR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18227,10 +18116,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb31d: s390_irgen_DDBR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb31e: s390_format_RRF_F0FF(s390_irgen_MADBR, RRF_r1(ovl), - RRF_r3(ovl), RRF_r2(ovl)); goto ok; - case 0xb31f: s390_format_RRF_F0FF(s390_irgen_MSDBR, RRF_r1(ovl), - RRF_r3(ovl), RRF_r2(ovl)); goto ok; + case 0xb31e: s390_irgen_MADBR(RRD_r1(ovl), RRD_r3(ovl), RRD_r2(ovl)); + goto ok; + case 0xb31f: s390_irgen_MSDBR(RRD_r1(ovl), RRD_r3(ovl), RRD_r2(ovl)); + goto ok; case 0xb324: s390_irgen_LDER(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb325: /* LXDR */ goto unimplemented; @@ -18255,18 +18144,18 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb343: s390_irgen_LCXBR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb344: s390_format_RRF_UUFF(s390_irgen_LEDBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb345: s390_format_RRF_UUFF(s390_irgen_LDXBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb346: s390_format_RRF_UUFF(s390_irgen_LEXBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb347: s390_format_RRF_UUFF2(s390_irgen_FIXBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb344: s390_irgen_LEDBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb345: s390_irgen_LDXBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb346: s390_irgen_LEXBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb347: s390_irgen_FIXBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb348: s390_irgen_KXBR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb349: s390_irgen_CXBR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18282,15 +18171,15 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb350: /* TBEDR */ goto unimplemented; case 0xb351: /* TBDR */ goto unimplemented; case 0xb353: /* DIEBR */ goto unimplemented; - case 0xb357: s390_format_RRF_UUFF2(s390_irgen_FIEBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb357: s390_irgen_FIEBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb358: /* THDER */ goto unimplemented; case 0xb359: /* THDR */ goto unimplemented; case 0xb35b: /* DIDBR */ goto unimplemented; - case 0xb35f: s390_format_RRF_UUFF2(s390_irgen_FIDBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb35f: s390_irgen_FIDBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb360: /* LPXR */ goto unimplemented; case 0xb361: /* LNXR */ goto unimplemented; case 0xb362: /* LTXR */ goto unimplemented; @@ -18304,9 +18193,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb371: s390_irgen_LNDFR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb372: s390_format_RRF_F0FF2(s390_irgen_CPSDR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); - goto ok; + case 0xb372: s390_irgen_CPSDR(RRFb_r3(ovl), RRFb_r1(ovl), RRFb_r2(ovl)); + goto ok; case 0xb373: s390_irgen_LCDFR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb374: s390_irgen_LZER(RRE_r1(ovl)); @@ -18322,78 +18210,78 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb385: /* SFASR */ goto unimplemented; case 0xb38c: s390_irgen_EFPC(RRE_r1(ovl)); goto ok; - case 0xb390: s390_format_RRF_UUFR(s390_irgen_CELFBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb391: s390_format_RRF_UUFR(s390_irgen_CDLFBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb392: s390_format_RRF_UUFR(s390_irgen_CXLFBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb394: s390_format_RRF_UUFR(s390_irgen_CEFBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb395: s390_format_RRF_UUFR(s390_irgen_CDFBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb396: s390_format_RRF_UUFR(s390_irgen_CXFBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb398: s390_format_RRF_UURF(s390_irgen_CFEBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb399: s390_format_RRF_UURF(s390_irgen_CFDBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb39a: s390_format_RRF_UURF(s390_irgen_CFXBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb39c: s390_format_RRF_UURF(s390_irgen_CLFEBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb39d: s390_format_RRF_UURF(s390_irgen_CLFDBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb39e: s390_format_RRF_UURF(s390_irgen_CLFXBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a0: s390_format_RRF_UUFR(s390_irgen_CELGBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a1: s390_format_RRF_UUFR(s390_irgen_CDLGBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a2: s390_format_RRF_UUFR(s390_irgen_CXLGBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a4: s390_format_RRF_UUFR(s390_irgen_CEGBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a5: s390_format_RRF_UUFR(s390_irgen_CDGBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a6: s390_format_RRF_UUFR(s390_irgen_CXGBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a8: s390_format_RRF_UURF(s390_irgen_CGEBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3a9: s390_format_RRF_UURF(s390_irgen_CGDBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3aa: s390_format_RRF_UURF(s390_irgen_CGXBRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3ac: s390_format_RRF_UURF(s390_irgen_CLGEBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3ad: s390_format_RRF_UURF(s390_irgen_CLGDBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb3ae: s390_format_RRF_UURF(s390_irgen_CLGXBR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb390: s390_irgen_CELFBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb391: s390_irgen_CDLFBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb392: s390_irgen_CXLFBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb394: s390_irgen_CEFBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb395: s390_irgen_CDFBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb396: s390_irgen_CXFBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb398: s390_irgen_CFEBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb399: s390_irgen_CFDBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb39a: s390_irgen_CFXBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb39c: s390_irgen_CLFEBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb39d: s390_irgen_CLFDBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb39e: s390_irgen_CLFXBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a0: s390_irgen_CELGBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a1: s390_irgen_CDLGBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a2: s390_irgen_CXLGBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a4: s390_irgen_CEGBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a5: s390_irgen_CDGBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a6: s390_irgen_CXGBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a8: s390_irgen_CGEBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3a9: s390_irgen_CGDBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3aa: s390_irgen_CGXBRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3ac: s390_irgen_CLGEBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3ad: s390_irgen_CLGDBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb3ae: s390_irgen_CLGXBR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb3b4: /* CEFR */ goto unimplemented; case 0xb3b5: /* CDFR */ goto unimplemented; case 0xb3b6: /* CXFR */ goto unimplemented; @@ -18410,50 +18298,50 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb3ca: /* CGXR */ goto unimplemented; case 0xb3cd: s390_irgen_LGDR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb3d0: s390_format_RRF_FUFF2(s390_irgen_MDTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3d1: s390_format_RRF_FUFF2(s390_irgen_DDTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3d2: s390_format_RRF_FUFF2(s390_irgen_ADTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3d3: s390_format_RRF_FUFF2(s390_irgen_SDTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3d4: s390_format_RRF_0UFF(s390_irgen_LDETR, RRF5_m4(ovl), - RRF5_r1(ovl), RRF5_r2(ovl)); goto ok; - case 0xb3d5: s390_format_RRF_UUFF(s390_irgen_LEDTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb3d0: s390_irgen_MDTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3d1: s390_irgen_DDTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3d2: s390_irgen_ADTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3d3: s390_irgen_SDTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3d4: s390_irgen_LDETR(RRFd_m4(ovl), RRFd_r1(ovl), RRFd_r2(ovl)); + goto ok; + case 0xb3d5: s390_irgen_LEDTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb3d6: s390_irgen_LTDTR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb3d7: /* FIDTR */ goto unimplemented; - case 0xb3d8: s390_format_RRF_FUFF2(s390_irgen_MXTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3d9: s390_format_RRF_FUFF2(s390_irgen_DXTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3da: s390_format_RRF_FUFF2(s390_irgen_AXTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3db: s390_format_RRF_FUFF2(s390_irgen_SXTRA, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3dc: s390_format_RRF_0UFF(s390_irgen_LXDTR, RRF5_m4(ovl), - RRF5_r1(ovl), RRF5_r2(ovl)); goto ok; - case 0xb3dd: s390_format_RRF_UUFF(s390_irgen_LDXTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb3d8: s390_irgen_MXTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3d9: s390_irgen_DXTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3da: s390_irgen_AXTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3db: s390_irgen_SXTRA(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb3dc: s390_irgen_LXDTR(RRFd_m4(ovl), RRFd_r1(ovl), RRFd_r2(ovl)); + goto ok; + case 0xb3dd: s390_irgen_LDXTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb3de: s390_irgen_LTXTR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb3df: /* FIXTR */ goto unimplemented; case 0xb3e0: /* KDTR */ goto unimplemented; - case 0xb3e1: s390_format_RRF_UURF(s390_irgen_CGDTRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb3e1: s390_irgen_CGDTRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb3e2: /* CUDTR */ goto unimplemented; case 0xb3e3: /* CSDTR */ goto unimplemented; case 0xb3e4: s390_irgen_CDTR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18463,9 +18351,9 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb3e7: s390_irgen_ESDTR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb3e8: /* KXTR */ goto unimplemented; - case 0xb3e9: s390_format_RRF_UURF(s390_irgen_CGXTRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb3e9: s390_irgen_CGXTRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb3ea: /* CUXTR */ goto unimplemented; case 0xb3eb: /* CSXTR */ goto unimplemented; case 0xb3ec: s390_irgen_CXTR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18474,36 +18362,36 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb3ef: s390_irgen_ESXTR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb3f1: s390_format_RRF_UUFR(s390_irgen_CDGTRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb3f1: s390_irgen_CDGTRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb3f2: /* CDUTR */ goto unimplemented; case 0xb3f3: /* CDSTR */ goto unimplemented; case 0xb3f4: s390_irgen_CEDTR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb3f5: s390_format_RRF_FUFF(s390_irgen_QADTR, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3f6: s390_format_RRF_F0FR(s390_irgen_IEDTR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb3f7: s390_format_RRF_FFRU(s390_irgen_RRDTR, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3f9: s390_format_RRF_UUFR(s390_irgen_CXGTRA, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb3f5: s390_irgen_QADTR(RRFb_r3(ovl), RRFb_m4(ovl), RRFb_r1(ovl), + RRFb_r2(ovl)); + goto ok; + case 0xb3f6: s390_irgen_IEDTR(RRFb_r3(ovl), RRFb_r1(ovl), RRFb_r2(ovl)); + goto ok; + case 0xb3f7: s390_irgen_RRDTR(RRFb_r3(ovl), RRFb_m4(ovl), RRFb_r1(ovl), + RRFb_r2(ovl)); + goto ok; + case 0xb3f9: s390_irgen_CXGTRA(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb3fa: /* CXUTR */ goto unimplemented; case 0xb3fb: /* CXSTR */ goto unimplemented; case 0xb3fc: s390_irgen_CEXTR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb3fd: s390_format_RRF_FUFF(s390_irgen_QAXTR, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb3fe: s390_format_RRF_F0FR(s390_irgen_IEXTR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb3ff: s390_format_RRF_FFRU(s390_irgen_RRXTR, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; + case 0xb3fd: s390_irgen_QAXTR(RRFb_r3(ovl), RRFb_m4(ovl), RRFb_r1(ovl), + RRFb_r2(ovl)); + goto ok; + case 0xb3fe: s390_irgen_IEXTR(RRFb_r3(ovl), RRFb_r1(ovl), RRFb_r2(ovl)); + goto ok; + case 0xb3ff: s390_irgen_RRXTR(RRFb_r3(ovl), RRFb_m4(ovl), RRFb_r1(ovl), + RRFb_r2(ovl)); + goto ok; case 0xb900: s390_irgen_LPGR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb901: s390_irgen_LNGR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18574,16 +18462,16 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb927: s390_irgen_LHR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb928: /* PCKMO */ goto unimplemented; - case 0xb929: s390_format_RRF_R0RR2(s390_irgen_KMA, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; + case 0xb929: s390_irgen_KMA(RRFb_r3(ovl), RRFb_r1(ovl), RRFb_r2(ovl)); + goto ok; case 0xb92a: s390_irgen_KMF(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb92b: s390_irgen_KMO(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb92c: s390_irgen_PCC(); goto ok; - case 0xb92d: s390_format_RRF_R0RR2(s390_irgen_KMCTR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; + case 0xb92d: s390_irgen_KMCTR(RRFb_r3(ovl), RRFb_r1(ovl), RRFb_r2(ovl)); + goto ok; case 0xb92e: s390_irgen_KM(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb92f: s390_irgen_KMC(RRE_r1(ovl), RRE_r2(ovl)); @@ -18593,8 +18481,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb931: s390_irgen_CLGFR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb938: /* SORTL */ goto unimplemented; - case 0xb939: s390_format_RRF_R0RR2(s390_irgen_DFLTCC, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; + case 0xb939: s390_irgen_DFLTCC(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; case 0xb93a: s390_irgen_KDSA(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb93b: s390_irgen_NNPA(); @@ -18605,73 +18493,72 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0xb93f: s390_irgen_KLMD(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb941: s390_format_RRF_UURF(s390_irgen_CFDTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb942: s390_format_RRF_UURF(s390_irgen_CLGDTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb943: s390_format_RRF_UURF(s390_irgen_CLFDTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; + case 0xb941: s390_irgen_CFDTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb942: s390_irgen_CLGDTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb943: s390_irgen_CLFDTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; case 0xb946: s390_irgen_BCTGR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb949: s390_format_RRF_UURF(s390_irgen_CFXTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb94a: s390_format_RRF_UURF(s390_irgen_CLGXTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb94b: s390_format_RRF_UURF(s390_irgen_CLFXTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb951: s390_format_RRF_UUFR(s390_irgen_CDFTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb952: s390_format_RRF_UUFR(s390_irgen_CDLGTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb953: s390_format_RRF_UUFR(s390_irgen_CDLFTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb959: s390_format_RRF_UUFR(s390_irgen_CXFTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb95a: s390_format_RRF_UUFR(s390_irgen_CXLGTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb95b: s390_format_RRF_UUFR(s390_irgen_CXLFTR, RRF2_m3(ovl), - RRF2_m4(ovl), RRF2_r1(ovl), - RRF2_r2(ovl)); goto ok; - case 0xb960: s390_format_RRF_U0RR(s390_irgen_CGRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl) - ); goto ok; - case 0xb961: s390_format_RRF_U0RR(s390_irgen_CLGRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; - case 0xb964: s390_format_RRF_R0RR2(s390_irgen_NNGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb965: s390_format_RRF_R0RR2(s390_irgen_OCGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb966: s390_format_RRF_R0RR2(s390_irgen_NOGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb967: s390_format_RRF_R0RR2(s390_irgen_NXGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; + case 0xb949: s390_irgen_CFXTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb94a: s390_irgen_CLGXTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb94b: s390_irgen_CLFXTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb951: s390_irgen_CDFTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb952: s390_irgen_CDLGTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb953: s390_irgen_CDLFTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb959: s390_irgen_CXFTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb95a: s390_irgen_CXLGTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb95b: s390_irgen_CXLFTR(RRFe_m3(ovl), RRFe_m4(ovl), RRFe_r1(ovl), + RRFe_r2(ovl)); + goto ok; + case 0xb960: s390_irgen_CGRT(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb961: s390_irgen_CLGRT(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb964: s390_irgen_NNGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb965: s390_irgen_OCGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb966: s390_irgen_NOGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb967: s390_irgen_NXGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; case 0xb968: /* CLZG */ goto unimplemented; case 0xb969: /* CTZG */ goto unimplemented; case 0xb96c: /* BEXTG */ goto unimplemented; case 0xb96d: /* BDEPG */ goto unimplemented; - case 0xb972: s390_format_RRF_U0RR(s390_irgen_CRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; - case 0xb973: s390_format_RRF_U0RR(s390_irgen_CLRT, RRF2_m3(ovl), - RRF2_r1(ovl), RRF2_r2(ovl)); goto ok; - case 0xb974: s390_format_RRF_R0RR2(s390_irgen_NNRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb975: s390_format_RRF_R0RR2(s390_irgen_OCRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb976: s390_format_RRF_R0RR2(s390_irgen_NORK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; - case 0xb977: s390_format_RRF_R0RR2(s390_irgen_NXRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); goto ok; + case 0xb972: s390_irgen_CRT(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb973: s390_irgen_CLRT(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb974: s390_irgen_NNRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb975: s390_irgen_OCRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb976: s390_irgen_NORK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb977: s390_irgen_NXRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; case 0xb980: s390_irgen_NGR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb981: s390_irgen_OGR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18697,14 +18584,14 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb98d: /* EPSW */ goto unimplemented; case 0xb98e: /* IDTE */ goto unimplemented; case 0xb98f: /* CRDTE */ goto unimplemented; - case 0xb990: s390_format_RRF_M0RERE(s390_irgen_TRTT, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb991: s390_format_RRF_M0RERE(s390_irgen_TRTO, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb992: s390_format_RRF_M0RERE(s390_irgen_TROT, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb993: s390_format_RRF_M0RERE(s390_irgen_TROO, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; + case 0xb990: s390_irgen_TRTT(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb991: s390_irgen_TRTO(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb992: s390_irgen_TROT(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb993: s390_irgen_TROO(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; case 0xb994: s390_irgen_LLCR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb995: s390_irgen_LLHR(RRE_r1(ovl), RRE_r2(ovl)); @@ -18728,12 +18615,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb9ac: /* IRBM */ goto unimplemented; case 0xb9ae: /* RRBM */ goto unimplemented; case 0xb9af: /* PFMF */ goto unimplemented; - case 0xb9b0: s390_format_RRF_M0RERE(s390_irgen_CU14, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); - goto ok; - case 0xb9b1: s390_format_RRF_M0RERE(s390_irgen_CU24, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); - goto ok; + case 0xb9b0: s390_irgen_CU14(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb9b1: s390_irgen_CU24(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; case 0xb9b2: s390_irgen_CU41(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb9b3: s390_irgen_CU42(RRE_r1(ovl), RRE_r2(ovl)); @@ -18741,112 +18626,85 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb9bd: /* TRTRE */ goto unimplemented; case 0xb9be: /* SRSTU */ goto unimplemented; case 0xb9bf: /* TRTE */ goto unimplemented; - case 0xb9c0: s390_format_RRF_RURR(s390_irgen_SELFHR, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb9c8: s390_format_RRF_R0RR2(s390_irgen_AHHHR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9c9: s390_format_RRF_R0RR2(s390_irgen_SHHHR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9ca: s390_format_RRF_R0RR2(s390_irgen_ALHHHR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9cb: s390_format_RRF_R0RR2(s390_irgen_SLHHHR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; + case 0xb9c0: s390_irgen_SELFHR(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb9c8: s390_irgen_AHHHR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9c9: s390_irgen_SHHHR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9ca: s390_irgen_ALHHHR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9cb: s390_irgen_SLHHHR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; case 0xb9cd: s390_irgen_CHHR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb9cf: s390_irgen_CLHHR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb9d8: s390_format_RRF_R0RR2(s390_irgen_AHHLR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9d9: s390_format_RRF_R0RR2(s390_irgen_SHHLR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9da: s390_format_RRF_R0RR2(s390_irgen_ALHHLR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9db: s390_format_RRF_R0RR2(s390_irgen_SLHHLR, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; + case 0xb9d8: s390_irgen_AHHLR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9d9: s390_irgen_SHHLR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9da: s390_irgen_ALHHLR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9db: s390_irgen_SLHHLR(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; case 0xb9dd: s390_irgen_CHLR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; case 0xb9df: s390_irgen_CLHLR(RRE_r1(ovl), RRE_r2(ovl)); goto ok; - case 0xb9e0: s390_format_RRF_U0RR(s390_irgen_LOCFHR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb9e1: s390_format_RRFa_U0RR(s390_irgen_POPCNT, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb9e2: s390_format_RRF_U0RR(s390_irgen_LOCGR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb9e3: s390_format_RRF_RURR(s390_irgen_SELGR, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb9e4: s390_format_RRF_R0RR2(s390_irgen_NGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9e5: s390_format_RRF_R0RR2(s390_irgen_NCGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9e6: s390_format_RRF_R0RR2(s390_irgen_OGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9e7: s390_format_RRF_R0RR2(s390_irgen_XGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9e8: s390_format_RRF_R0RR2(s390_irgen_AGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9e9: s390_format_RRF_R0RR2(s390_irgen_SGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9ea: s390_format_RRF_R0RR2(s390_irgen_ALGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9eb: s390_format_RRF_R0RR2(s390_irgen_SLGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9ec: s390_format_RRF_R0RR2(s390_irgen_MGRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9ed: s390_format_RRF_R0RR2(s390_irgen_MSGRKC, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9f0: s390_format_RRF_RURR(s390_irgen_SELR, RRF4_r3(ovl), - RRF4_m4(ovl), RRF4_r1(ovl), - RRF4_r2(ovl)); goto ok; - case 0xb9f2: s390_format_RRF_U0RR(s390_irgen_LOCR, RRF3_r3(ovl), - RRF3_r1(ovl), RRF3_r2(ovl)); goto ok; - case 0xb9f4: s390_format_RRF_R0RR2(s390_irgen_NRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9f5: s390_format_RRF_R0RR2(s390_irgen_NCRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9f6: s390_format_RRF_R0RR2(s390_irgen_ORK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9f7: s390_format_RRF_R0RR2(s390_irgen_XRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9f8: s390_format_RRF_R0RR2(s390_irgen_ARK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9f9: s390_format_RRF_R0RR2(s390_irgen_SRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9fa: s390_format_RRF_R0RR2(s390_irgen_ALRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9fb: s390_format_RRF_R0RR2(s390_irgen_SLRK, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; - case 0xb9fd: s390_format_RRF_R0RR2(s390_irgen_MSRKC, RRF4_r3(ovl), - RRF4_r1(ovl), RRF4_r2(ovl)); - goto ok; + case 0xb9e0: s390_irgen_LOCFHR(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb9e1: s390_irgen_POPCNT(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb9e2: s390_irgen_LOCGR(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb9e3: s390_irgen_SELGR(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb9e4: s390_irgen_NGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9e5: s390_irgen_NCGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9e6: s390_irgen_OGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9e7: s390_irgen_XGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9e8: s390_irgen_AGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9e9: s390_irgen_SGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9ea: s390_irgen_ALGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9eb: s390_irgen_SLGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9ec: s390_irgen_MGRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9ed: s390_irgen_MSGRKC(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9f0: s390_irgen_SELR(RRFa_r3(ovl), RRFa_m4(ovl), RRFa_r1(ovl), + RRFa_r2(ovl)); + goto ok; + case 0xb9f2: s390_irgen_LOCR(RRFc_m3(ovl), RRFc_r1(ovl), RRFc_r2(ovl)); + goto ok; + case 0xb9f4: s390_irgen_NRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9f5: s390_irgen_NCRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9f6: s390_irgen_ORK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9f7: s390_irgen_XRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9f8: s390_irgen_ARK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9f9: s390_irgen_SRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9fa: s390_irgen_ALRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9fb: s390_irgen_SLRK(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; + case 0xb9fd: s390_irgen_MSRKC(RRFa_r3(ovl), RRFa_r1(ovl), RRFa_r2(ovl)); + goto ok; } switch ((ovl & 0xff000000) >> 24) { From 17ddd199e9655689719ff4cb7ac6c346d8663f64 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 21 Jan 2026 20:51:10 +0000 Subject: [PATCH 269/502] s390: Rename s390_format_RXF_FRRDF --> s390_format_RXF --- VEX/priv/guest_s390_toIR.c | 68 +++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 197b512f1..da5f3eb15 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2877,8 +2877,8 @@ s390_format_RXE(void (*irgen)(UChar r1, IRTemp op2addr, UChar m3), } static void -s390_format_RXF_FRRDF(void (*irgen)(UChar, IRTemp, UChar), - UChar r3, UChar x2, UChar b2, UShort d2, UChar r1) +s390_format_RXF(void (*irgen)(UChar, IRTemp, UChar), + UChar r3, UChar x2, UChar b2, UShort d2, UChar r1) { IRTemp op2addr = newTemp(Ity_I64); @@ -20399,14 +20399,14 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl)); goto ok; - case 0xed000000000eULL: s390_format_RXF_FRRDF(s390_irgen_MAEB, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; - case 0xed000000000fULL: s390_format_RXF_FRRDF(s390_irgen_MSEB, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; + case 0xed000000000eULL: s390_format_RXF(s390_irgen_MAEB, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; + case 0xed000000000fULL: s390_format_RXF(s390_irgen_MSEB, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; case 0xed0000000010ULL: s390_format_RXE0(s390_irgen_TCEB, RXE_r1(ovl), RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl)); @@ -20455,14 +20455,14 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl)); goto ok; - case 0xed000000001eULL: s390_format_RXF_FRRDF(s390_irgen_MADB, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; - case 0xed000000001fULL: s390_format_RXF_FRRDF(s390_irgen_MSDB, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; + case 0xed000000001eULL: s390_format_RXF(s390_irgen_MADB, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; + case 0xed000000001fULL: s390_format_RXF(s390_irgen_MSDB, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; case 0xed0000000024ULL: s390_format_RXE0(s390_irgen_LDE, RXE_r1(ovl), RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl)); @@ -20482,22 +20482,22 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xed000000003dULL: /* MYH */ goto unimplemented; case 0xed000000003eULL: /* MAD */ goto unimplemented; case 0xed000000003fULL: /* MSD */ goto unimplemented; - case 0xed0000000040ULL: s390_format_RXF_FRRDF(s390_irgen_SLDT, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; - case 0xed0000000041ULL: s390_format_RXF_FRRDF(s390_irgen_SRDT, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; - case 0xed0000000048ULL: s390_format_RXF_FRRDF(s390_irgen_SLXT, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; - case 0xed0000000049ULL: s390_format_RXF_FRRDF(s390_irgen_SRXT, - RXF_r3(ovl), RXF_x2(ovl), - RXF_b2(ovl), RXF_d2(ovl), - RXF_r1(ovl)); goto ok; + case 0xed0000000040ULL: s390_format_RXF(s390_irgen_SLDT, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; + case 0xed0000000041ULL: s390_format_RXF(s390_irgen_SRDT, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; + case 0xed0000000048ULL: s390_format_RXF(s390_irgen_SLXT, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; + case 0xed0000000049ULL: s390_format_RXF(s390_irgen_SRXT, RXF_r3(ovl), + RXF_x2(ovl), RXF_b2(ovl), + RXF_d2(ovl), RXF_r1(ovl)); + goto ok; case 0xed0000000050ULL: s390_format_RXE0(s390_irgen_TDCET, RXE_r1(ovl), RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl)); From 08f1bd250e4bfe28b95800d111896c923ea3539c Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 21 Jan 2026 23:00:06 +0000 Subject: [PATCH 270/502] s390: Remove various s390_format_RXY_... functions. Rename s390_format_RSY_RRRD -> s390_format_RSY Remove s390_format_RSY_R0RD -> s390_format_RSYb Rename s390_format_RSY_RDRM -> s390_format_RSYcond Remove s390_format_RSY_AARD use s390_format_RSY instead Remove s390_format_RSY_RURD use s390_format_RSYb instead --- VEX/priv/guest_s390_toIR.c | 469 +++++++++++++++++-------------------- 1 file changed, 221 insertions(+), 248 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index da5f3eb15..6c423dae4 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -184,6 +184,7 @@ typedef enum { #define RRS_m3(insn) (((insn) >> 28) & 0xf) #define RSY_r1(insn) (((insn) >> 52) & 0xf) #define RSY_r3(insn) (((insn) >> 48) & 0xf) +#define RSY_m3(insn) (((insn) >> 48) & 0xf) #define RSY_b2(insn) (((insn) >> 44) & 0xf) #define RSY_dl2(insn) (((insn) >> 32) & 0xfff) #define RSY_dh2(insn) (((insn) >> 24) & 0xff) @@ -2764,8 +2765,8 @@ s390_format_RS(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), } static void -s390_format_RSY_RRRD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), - UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) +s390_format_RSY(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), + UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) { IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -2778,22 +2779,8 @@ s390_format_RSY_RRRD(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), } static void -s390_format_RSY_AARD(void (*irgen)(UChar, UChar, IRTemp), - UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) -{ - IRTemp op2addr = newTemp(Ity_I64); - IRTemp d2 = newTemp(Ity_I64); - - assign(d2, mkU64(((ULong)(Long)(Char)dh2 << 12) | ((ULong)dl2))); - assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : - mkU64(0))); - - irgen(r1, r3, op2addr); -} - -static void -s390_format_RSY_RURD(void (*irgen)(UChar r1, UChar m3, IRTemp op2addr), - UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) +s390_format_RSYb(void (*irgen)(UChar r1, UChar m3, IRTemp op2addr), + UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) { IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -2806,22 +2793,8 @@ s390_format_RSY_RURD(void (*irgen)(UChar r1, UChar m3, IRTemp op2addr), } static void -s390_format_RSY_R0RD(void (*irgen)(UChar r1, UChar m3, IRTemp op2addr), - UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) -{ - IRTemp op2addr = newTemp(Ity_I64); - IRTemp d2 = newTemp(Ity_I64); - - assign(d2, mkU64(((ULong)(Long)(Char)dh2 << 12) | ((ULong)dl2))); - assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : - mkU64(0))); - - irgen(r1, m3, op2addr); -} - -static void -s390_format_RSY_RDRM(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) +s390_format_RSYcond(void (*irgen)(UChar r1, IRTemp op2addr), + UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) { IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -5900,7 +5873,7 @@ s390_irgen_CLM(UChar r1, UChar r3, IRTemp op2addr) } static void -s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) +s390_irgen_CLMY(UChar r1, UChar m3, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); @@ -5915,7 +5888,7 @@ s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) UChar n; n = 0; - if ((r3 & 8) != 0) { + if ((m3 & 8) != 0) { assign(b0, unop(Iop_8Uto32, get_gpr_b4(r1))); assign(c0, unop(Iop_8Uto32, load(Ity_I8, mkexpr(op2addr)))); n = n + 1; @@ -5923,7 +5896,7 @@ s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) assign(b0, mkU32(0)); assign(c0, mkU32(0)); } - if ((r3 & 4) != 0) { + if ((m3 & 4) != 0) { assign(b1, unop(Iop_8Uto32, get_gpr_b5(r1))); assign(c1, unop(Iop_8Uto32, load(Ity_I8, binop(Iop_Add64, mkexpr(op2addr), mkU64(n))))); @@ -5932,7 +5905,7 @@ s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) assign(b1, mkU32(0)); assign(c1, mkU32(0)); } - if ((r3 & 2) != 0) { + if ((m3 & 2) != 0) { assign(b2, unop(Iop_8Uto32, get_gpr_b6(r1))); assign(c2, unop(Iop_8Uto32, load(Ity_I8, binop(Iop_Add64, mkexpr(op2addr), mkU64(n))))); @@ -5941,7 +5914,7 @@ s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) assign(b2, mkU32(0)); assign(c2, mkU32(0)); } - if ((r3 & 1) != 0) { + if ((m3 & 1) != 0) { assign(b3, unop(Iop_8Uto32, get_gpr_b7(r1))); assign(c3, unop(Iop_8Uto32, load(Ity_I8, binop(Iop_Add64, mkexpr(op2addr), mkU64(n))))); @@ -5960,7 +5933,7 @@ s390_irgen_CLMY(UChar r1, UChar r3, IRTemp op2addr) } static void -s390_irgen_CLMH(UChar r1, UChar r3, IRTemp op2addr) +s390_irgen_CLMH(UChar r1, UChar m3, IRTemp op2addr) { IRTemp op1 = newTemp(Ity_I32); IRTemp op2 = newTemp(Ity_I32); @@ -5975,7 +5948,7 @@ s390_irgen_CLMH(UChar r1, UChar r3, IRTemp op2addr) UChar n; n = 0; - if ((r3 & 8) != 0) { + if ((m3 & 8) != 0) { assign(b0, unop(Iop_8Uto32, get_gpr_b0(r1))); assign(c0, unop(Iop_8Uto32, load(Ity_I8, mkexpr(op2addr)))); n = n + 1; @@ -5983,7 +5956,7 @@ s390_irgen_CLMH(UChar r1, UChar r3, IRTemp op2addr) assign(b0, mkU32(0)); assign(c0, mkU32(0)); } - if ((r3 & 4) != 0) { + if ((m3 & 4) != 0) { assign(b1, unop(Iop_8Uto32, get_gpr_b1(r1))); assign(c1, unop(Iop_8Uto32, load(Ity_I8, binop(Iop_Add64, mkexpr(op2addr), mkU64(n))))); @@ -5992,7 +5965,7 @@ s390_irgen_CLMH(UChar r1, UChar r3, IRTemp op2addr) assign(b1, mkU32(0)); assign(c1, mkU32(0)); } - if ((r3 & 2) != 0) { + if ((m3 & 2) != 0) { assign(b2, unop(Iop_8Uto32, get_gpr_b2(r1))); assign(c2, unop(Iop_8Uto32, load(Ity_I8, binop(Iop_Add64, mkexpr(op2addr), mkU64(n))))); @@ -6001,7 +5974,7 @@ s390_irgen_CLMH(UChar r1, UChar r3, IRTemp op2addr) assign(b2, mkU32(0)); assign(c2, mkU32(0)); } - if ((r3 & 1) != 0) { + if ((m3 & 1) != 0) { assign(b3, unop(Iop_8Uto32, get_gpr_b3(r1))); assign(c3, unop(Iop_8Uto32, load(Ity_I8, binop(Iop_Add64, mkexpr(op2addr), mkU64(n))))); @@ -6280,14 +6253,14 @@ s390_irgen_ICM(UChar r1, UChar r3, IRTemp op2addr) } static void -s390_irgen_ICMY(UChar r1, UChar r3, IRTemp op2addr) +s390_irgen_ICMY(UChar r1, UChar m3, IRTemp op2addr) { UChar n; IRTemp result = newTemp(Ity_I32); UInt mask; n = 0; - mask = (UInt)r3; + mask = (UInt)m3; if ((mask & 8) != 0) { put_gpr_b4(r1, load(Ity_I8, mkexpr(op2addr))); n = n + 1; @@ -6313,14 +6286,14 @@ s390_irgen_ICMY(UChar r1, UChar r3, IRTemp op2addr) } static void -s390_irgen_ICMH(UChar r1, UChar r3, IRTemp op2addr) +s390_irgen_ICMH(UChar r1, UChar m3, IRTemp op2addr) { UChar n; IRTemp result = newTemp(Ity_I32); UInt mask; n = 0; - mask = (UInt)r3; + mask = (UInt)m3; if ((mask & 8) != 0) { put_gpr_b0(r1, load(Ity_I8, mkexpr(op2addr))); n = n + 1; @@ -8641,12 +8614,12 @@ s390_irgen_STCM(UChar r1, UChar r3, IRTemp op2addr) } static void -s390_irgen_STCMY(UChar r1, UChar r3, IRTemp op2addr) +s390_irgen_STCMY(UChar r1, UChar m3, IRTemp op2addr) { UChar mask; UChar n; - mask = (UChar)r3; + mask = (UChar)m3; n = 0; if ((mask & 8) != 0) { store(mkexpr(op2addr), get_gpr_b4(r1)); @@ -8666,12 +8639,12 @@ s390_irgen_STCMY(UChar r1, UChar r3, IRTemp op2addr) } static void -s390_irgen_STCMH(UChar r1, UChar r3, IRTemp op2addr) +s390_irgen_STCMH(UChar r1, UChar m3, IRTemp op2addr) { UChar mask; UChar n; - mask = (UChar)r3; + mask = (UChar)m3; n = 0; if ((mask & 8) != 0) { store(mkexpr(op2addr), get_gpr_b0(r1)); @@ -19998,98 +19971,98 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe700000000ffULL: s390_format_VRR_VVVM(s390_irgen_VMX, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xeb0000000004ULL: s390_format_RSY_RRRD(s390_irgen_LMG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000000aULL: s390_format_RSY_RRRD(s390_irgen_SRAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000000bULL: s390_format_RSY_RRRD(s390_irgen_SLAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000000cULL: s390_format_RSY_RRRD(s390_irgen_SRLG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000000dULL: s390_format_RSY_RRRD(s390_irgen_SLLG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb0000000004ULL: s390_format_RSY(s390_irgen_LMG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000000aULL: s390_format_RSY(s390_irgen_SRAG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000000bULL: s390_format_RSY(s390_irgen_SLAG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000000cULL: s390_format_RSY(s390_irgen_SRLG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000000dULL: s390_format_RSY(s390_irgen_SLLG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xeb000000000fULL: /* TRACG */ goto unimplemented; - case 0xeb0000000014ULL: s390_format_RSY_RRRD(s390_irgen_CSY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb0000000014ULL: s390_format_RSY(s390_irgen_CSY, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xeb0000000016ULL: /* PFCR */ goto unimplemented; - case 0xeb000000001cULL: s390_format_RSY_RRRD(s390_irgen_RLLG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000001dULL: s390_format_RSY_RRRD(s390_irgen_RLL, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000020ULL: s390_format_RSY_RURD(s390_irgen_CLMH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000021ULL: s390_format_RSY_RURD(s390_irgen_CLMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000023ULL: s390_format_RSY_R0RD(s390_irgen_CLT, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000024ULL: s390_format_RSY_RRRD(s390_irgen_STMG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb000000001cULL: s390_format_RSY(s390_irgen_RLLG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000001dULL: s390_format_RSY(s390_irgen_RLL, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000020ULL: s390_format_RSYb(s390_irgen_CLMH, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000021ULL: s390_format_RSYb(s390_irgen_CLMY, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000023ULL: s390_format_RSYb(s390_irgen_CLT, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000024ULL: s390_format_RSY(s390_irgen_STMG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xeb0000000025ULL: /* STCTG */ goto unimplemented; - case 0xeb0000000026ULL: s390_format_RSY_RRRD(s390_irgen_STMH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000002bULL: s390_format_RSY_R0RD(s390_irgen_CLGT, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000002cULL: s390_format_RSY_RURD(s390_irgen_STCMH, - RSY_r1(ovl), RSY_r3(ovl), - RSY_b2(ovl), RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000002dULL: s390_format_RSY_RURD(s390_irgen_STCMY, - RSY_r1(ovl), RSY_r3(ovl), - RSY_b2(ovl), RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb0000000026ULL: s390_format_RSY(s390_irgen_STMH, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000002bULL: s390_format_RSYb(s390_irgen_CLGT, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000002cULL: s390_format_RSYb(s390_irgen_STCMH, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000002dULL: s390_format_RSYb(s390_irgen_STCMY, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xeb000000002fULL: /* LCTLG */ goto unimplemented; - case 0xeb0000000030ULL: s390_format_RSY_RRRD(s390_irgen_CSG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000031ULL: s390_format_RSY_RRRD(s390_irgen_CDSY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000003eULL: s390_format_RSY_RRRD(s390_irgen_CDSG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000044ULL: s390_format_RSY_RRRD(s390_irgen_BXHG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000045ULL: s390_format_RSY_RRRD(s390_irgen_BXLEG, - RSY_r1(ovl), RSY_r3(ovl), - RSY_b2(ovl), RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000004cULL: s390_format_RSY_RRRD(s390_irgen_ECAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb0000000030ULL: s390_format_RSY(s390_irgen_CSG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000031ULL: s390_format_RSY(s390_irgen_CDSY, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000003eULL: s390_format_RSY(s390_irgen_CDSG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000044ULL: s390_format_RSY(s390_irgen_BXHG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000045ULL: s390_format_RSY(s390_irgen_BXLEG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000004cULL: s390_format_RSY(s390_irgen_ECAG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xeb0000000051ULL: s390_format_SIY(s390_irgen_TMY, SIY_i2(ovl), SIY_b1(ovl), SIY_dl1(ovl), SIY_dh1(ovl)); @@ -20131,117 +20104,117 @@ s390_decode_6byte_and_irgen(const UChar *bytes) SIY_b1(ovl), SIY_dl1(ovl), SIY_dh1(ovl)); goto ok; - case 0xeb0000000080ULL: s390_format_RSY_RURD(s390_irgen_ICMH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000081ULL: s390_format_RSY_RURD(s390_irgen_ICMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb0000000080ULL: s390_format_RSYb(s390_irgen_ICMH, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000081ULL: s390_format_RSYb(s390_irgen_ICMY, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xeb000000008eULL: /* MVCLU */ goto unimplemented; case 0xeb000000008fULL: /* CLCLU */ goto unimplemented; - case 0xeb0000000090ULL: s390_format_RSY_RRRD(s390_irgen_STMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000096ULL: s390_format_RSY_RRRD(s390_irgen_LMH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb0000000098ULL: s390_format_RSY_RRRD(s390_irgen_LMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000009aULL: s390_format_RSY_AARD(s390_irgen_LAMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb000000009bULL: s390_format_RSY_AARD(s390_irgen_STAMY, - RSY_r1(ovl), RSY_r3(ovl), - RSY_b2(ovl), RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb0000000090ULL: s390_format_RSY(s390_irgen_STMY, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000096ULL: s390_format_RSY(s390_irgen_LMH, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb0000000098ULL: s390_format_RSY(s390_irgen_LMY, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000009aULL: s390_format_RSY(s390_irgen_LAMY, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb000000009bULL: s390_format_RSY(s390_irgen_STAMY, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xeb00000000c0ULL: /* TP */ goto unimplemented; - case 0xeb00000000dcULL: s390_format_RSY_RRRD(s390_irgen_SRAK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000ddULL: s390_format_RSY_RRRD(s390_irgen_SLAK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000deULL: s390_format_RSY_RRRD(s390_irgen_SRLK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000dfULL: s390_format_RSY_RRRD(s390_irgen_SLLK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e0ULL: s390_format_RSY_RDRM(s390_irgen_LOCFH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e1ULL: s390_format_RSY_RDRM(s390_irgen_STOCFH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e2ULL: s390_format_RSY_RDRM(s390_irgen_LOCG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e3ULL: s390_format_RSY_RDRM(s390_irgen_STOCG, - RSY_r1(ovl), RSY_r3(ovl), - RSY_b2(ovl), RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e4ULL: s390_format_RSY_RRRD(s390_irgen_LANG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e6ULL: s390_format_RSY_RRRD(s390_irgen_LAOG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e7ULL: s390_format_RSY_RRRD(s390_irgen_LAXG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000e8ULL: s390_format_RSY_RRRD(s390_irgen_LAAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000eaULL: s390_format_RSY_RRRD(s390_irgen_LAALG, - RSY_r1(ovl), RSY_r3(ovl), - RSY_b2(ovl), RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000f2ULL: s390_format_RSY_RDRM(s390_irgen_LOC, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000f3ULL: s390_format_RSY_RDRM(s390_irgen_STOC, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000f4ULL: s390_format_RSY_RRRD(s390_irgen_LAN, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000f6ULL: s390_format_RSY_RRRD(s390_irgen_LAO, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000f7ULL: s390_format_RSY_RRRD(s390_irgen_LAX, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000f8ULL: s390_format_RSY_RRRD(s390_irgen_LAA, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; - case 0xeb00000000faULL: s390_format_RSY_RRRD(s390_irgen_LAAL, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), - RSY_dh2(ovl)); goto ok; + case 0xeb00000000dcULL: s390_format_RSY(s390_irgen_SRAK, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000ddULL: s390_format_RSY(s390_irgen_SLAK, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000deULL: s390_format_RSY(s390_irgen_SRLK, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000dfULL: s390_format_RSY(s390_irgen_SLLK, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e0ULL: s390_format_RSYcond(s390_irgen_LOCFH, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e1ULL: s390_format_RSYcond(s390_irgen_STOCFH, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e2ULL: s390_format_RSYcond(s390_irgen_LOCG, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e3ULL: s390_format_RSYcond(s390_irgen_STOCG, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e4ULL: s390_format_RSY(s390_irgen_LANG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e6ULL: s390_format_RSY(s390_irgen_LAOG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e7ULL: s390_format_RSY(s390_irgen_LAXG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000e8ULL: s390_format_RSY(s390_irgen_LAAG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000eaULL: s390_format_RSY(s390_irgen_LAALG, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000f2ULL: s390_format_RSYcond(s390_irgen_LOC, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000f3ULL: s390_format_RSYcond(s390_irgen_STOC, RSY_r1(ovl), + RSY_m3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000f4ULL: s390_format_RSY(s390_irgen_LAN, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000f6ULL: s390_format_RSY(s390_irgen_LAO, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000f7ULL: s390_format_RSY(s390_irgen_LAX, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000f8ULL: s390_format_RSY(s390_irgen_LAA, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; + case 0xeb00000000faULL: s390_format_RSY(s390_irgen_LAAL, RSY_r1(ovl), + RSY_r3(ovl), RSY_b2(ovl), + RSY_dl2(ovl), RSY_dh2(ovl)); + goto ok; case 0xec0000000042ULL: s390_irgen_LOCHI(RIEg_r1(ovl), RIEg_m3(ovl), RIEg_i2(ovl)); goto ok; From 35ab06862c840984656ccf390add0a211106496f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 22 Jan 2026 17:05:42 +0000 Subject: [PATCH 271/502] s390: Merge s390_format_VRX_VRRDM and s390_format_VRX_VRRD Add unused m3 parameter to s390_irgen_VL / _VST. That way we no longer need to distinguish between s390_format_VRX_VRRDM and s390_format_VRX_VRRD. Rename remaining function to s390_format_VRX and use it throughout. --- VEX/priv/guest_s390_toIR.c | 261 +++++++++++++++++++------------------ 1 file changed, 131 insertions(+), 130 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 6c423dae4..5459cc461 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -2970,29 +2970,8 @@ s390_format_SIL(void (*irgen)(UShort i2, IRTemp op1addr), } static void -s390_format_VRX_VRRD(void (*irgen)(UChar v1, IRTemp op2addr), - UChar v1, UChar x2, UChar b2, UShort d2, UChar m3, UChar rxb) -{ - IRTemp op2addr = newTemp(Ity_I64); - - if (! s390_host_has_vx) { - emulation_failure(EmFail_S390X_vx); - return; - } - - assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), - b2 != 0 ? get_gpr_dw0(b2) : mkU64(0)), x2 != 0 ? get_gpr_dw0(x2) : - mkU64(0))); - - v1 = s390_vr_getVRindex(v1, 1, rxb); - irgen(v1, op2addr); -} - - -static void -s390_format_VRX_VRRDM(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), - UChar v1, UChar x2, UChar b2, UShort d2, UChar m3, - UChar rxb) +s390_format_VRX(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), + UChar v1, UChar x2, UChar b2, UShort d2, UChar m3, UChar rxb) { IRTemp op2addr = newTemp(Ity_I64); @@ -14095,7 +14074,8 @@ s390_irgen_ECAG(UChar r1, UChar r3 __attribute__((unused)), IRTemp op2addr) } static void -s390_irgen_VL(UChar v1, IRTemp op2addr) +s390_irgen_VL(UChar v1, IRTemp op2addr, + UChar m3 __attribute__((unused))) /* alignment hint */ { put_vr_qw(v1, load(Ity_V128, mkexpr(op2addr))); } @@ -14107,7 +14087,8 @@ s390_irgen_VLR(UChar v1, UChar v2) } static void -s390_irgen_VST(UChar v1, IRTemp op2addr) +s390_irgen_VST(UChar v1, IRTemp op2addr, + UChar m3 __attribute__((unused))) /* alignment hint */ { store(mkexpr(op2addr), get_vr_qw(v1)); } @@ -19310,59 +19291,66 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RXY_x2(ovl), RXY_b2(ovl), RXY_dl2(ovl), RXY_dh2(ovl)); goto ok; - case 0xe60000000001ULL: s390_format_VRX_VRRDM(s390_irgen_VLEBRH, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe60000000002ULL: s390_format_VRX_VRRDM(s390_irgen_VLEBRG, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe60000000003ULL: s390_format_VRX_VRRDM(s390_irgen_VLEBRF, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe60000000004ULL: s390_format_VRX_VRRDM(s390_irgen_VLLEBRZ, - VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe60000000005ULL: s390_format_VRX_VRRDM(s390_irgen_VLBRREP, - VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe60000000006ULL: s390_format_VRX_VRRDM(s390_irgen_VLBR, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe60000000007ULL: s390_format_VRX_VRRDM(s390_irgen_VLER, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe60000000009ULL: s390_format_VRX_VRRDM(s390_irgen_VSTEBRH, - VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe6000000000aULL: s390_format_VRX_VRRDM(s390_irgen_VSTEBRG, - VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe6000000000bULL: s390_format_VRX_VRRDM(s390_irgen_VSTEBRF, - VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe6000000000eULL: s390_format_VRX_VRRDM(s390_irgen_VSTBR, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe6000000000fULL: s390_format_VRX_VRRDM(s390_irgen_VSTER, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; + case 0xe60000000001ULL: s390_format_VRX(s390_irgen_VLEBRH, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe60000000002ULL: s390_format_VRX(s390_irgen_VLEBRG, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe60000000003ULL: s390_format_VRX(s390_irgen_VLEBRF, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe60000000004ULL: s390_format_VRX(s390_irgen_VLLEBRZ, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe60000000005ULL: s390_format_VRX(s390_irgen_VLBRREP, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe60000000006ULL: s390_format_VRX(s390_irgen_VLBR, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe60000000007ULL: s390_format_VRX(s390_irgen_VLER, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe60000000009ULL: s390_format_VRX(s390_irgen_VSTEBRH, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe6000000000aULL: s390_format_VRX(s390_irgen_VSTEBRG, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe6000000000bULL: s390_format_VRX(s390_irgen_VSTEBRF, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe6000000000eULL: s390_format_VRX(s390_irgen_VSTBR, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe6000000000fULL: s390_format_VRX(s390_irgen_VSTER, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; case 0xe60000000034ULL: /* VPKZ */ goto unimplemented; case 0xe60000000035ULL: s390_format_VSI_URDV(s390_irgen_VLRL, VSI_v1(ovl), VSI_b2(ovl), VSI_d2(ovl), @@ -19429,58 +19417,71 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe6000000007dULL: /* VCSPH */ goto unimplemented; case 0xe6000000007eULL: /* VSDP */ goto unimplemented; case 0xe6000000007fULL: /* VTZ */ goto unimplemented; - case 0xe70000000000ULL: s390_format_VRX_VRRDM(s390_irgen_VLEB, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000001ULL: s390_format_VRX_VRRDM(s390_irgen_VLEH, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000002ULL: s390_format_VRX_VRRDM(s390_irgen_VLEG, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000003ULL: s390_format_VRX_VRRDM(s390_irgen_VLEF, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000004ULL: s390_format_VRX_VRRDM(s390_irgen_VLLEZ, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000005ULL: s390_format_VRX_VRRDM(s390_irgen_VLREP, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000006ULL: s390_format_VRX_VRRD(s390_irgen_VL, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000007ULL: s390_format_VRX_VRRDM(s390_irgen_VLBB, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000008ULL: s390_format_VRX_VRRDM(s390_irgen_VSTEB, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe70000000009ULL: s390_format_VRX_VRRDM(s390_irgen_VSTEH, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe7000000000aULL: s390_format_VRX_VRRDM(s390_irgen_VSTEG, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe7000000000bULL: s390_format_VRX_VRRDM(s390_irgen_VSTEF, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; - case 0xe7000000000eULL: s390_format_VRX_VRRD(s390_irgen_VST, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); goto ok; + case 0xe70000000000ULL: s390_format_VRX(s390_irgen_VLEB, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000001ULL: s390_format_VRX(s390_irgen_VLEH, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000002ULL: s390_format_VRX(s390_irgen_VLEG, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000003ULL: s390_format_VRX(s390_irgen_VLEF, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000004ULL: s390_format_VRX(s390_irgen_VLLEZ, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000005ULL: s390_format_VRX(s390_irgen_VLREP, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000006ULL: s390_format_VRX(s390_irgen_VL, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000007ULL: s390_format_VRX(s390_irgen_VLBB, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000008ULL: s390_format_VRX(s390_irgen_VSTEB, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe70000000009ULL: s390_format_VRX(s390_irgen_VSTEH, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe7000000000aULL: s390_format_VRX(s390_irgen_VSTEG, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe7000000000bULL: s390_format_VRX(s390_irgen_VSTEF, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; + case 0xe7000000000eULL: s390_format_VRX(s390_irgen_VST, VRX_v1(ovl), + VRX_x2(ovl), VRX_b2(ovl), + VRX_d2(ovl), VRX_m3(ovl), + VRX_rxb(ovl)); + goto ok; case 0xe70000000012ULL: s390_format_VRV_VVRDMT(s390_irgen_VGEG, VRV_v1(ovl), VRV_x2(ovl), VRV_b2(ovl), VRV_d2(ovl), VRV_m3(ovl), From 0d30fbd0f94641ec0fb83481b86709a8564b949f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 22 Jan 2026 17:27:30 +0000 Subject: [PATCH 272/502] s390: Rename s390_format_VSI_URDV to s390_format_VSI Also make the order of function parameters consistent with other s390_format_... functions. --- VEX/priv/guest_s390_toIR.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 5459cc461..c88c1ff26 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -3505,8 +3505,8 @@ s390_format_VRRa_VVVMMM2(void (*irgen)(UChar v1, UChar v2, UChar v3, } static void -s390_format_VSI_URDV(void (*irgen)(UChar v1, IRTemp op2addr, UChar i3), - UChar v1, UChar b2, UShort d2, UChar i3, UChar rxb) +s390_format_VSI(void (*irgen)(UChar v1, IRTemp op2addr, UChar i3), + UChar i3, UChar b2, UShort d2, UChar v1, UChar rxb) { IRTemp op2addr = newTemp(Ity_I64); @@ -19352,19 +19352,19 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRX_rxb(ovl)); goto ok; case 0xe60000000034ULL: /* VPKZ */ goto unimplemented; - case 0xe60000000035ULL: s390_format_VSI_URDV(s390_irgen_VLRL, VSI_v1(ovl), - VSI_b2(ovl), VSI_d2(ovl), - VSI_i3(ovl), - VSI_rxb(ovl)); goto ok; + case 0xe60000000035ULL: s390_format_VSI(s390_irgen_VLRL, VSI_i3(ovl), + VSI_b2(ovl), VSI_d2(ovl), + VSI_v1(ovl), VSI_rxb(ovl)); + goto ok; case 0xe60000000037ULL: s390_format_VRS_RRDV(s390_irgen_VLRLR, VRSd_v1(ovl), VRSd_r3(ovl), VRS_b2(ovl), VRS_d2(ovl), VRS_rxb(ovl)); goto ok; case 0xe6000000003cULL: /* VUPKZ */ goto unimplemented; - case 0xe6000000003dULL: s390_format_VSI_URDV(s390_irgen_VSTRL, VSI_v1(ovl), - VSI_b2(ovl), VSI_d2(ovl), - VSI_i3(ovl), - VSI_rxb(ovl)); goto ok; + case 0xe6000000003dULL: s390_format_VSI(s390_irgen_VSTRL, VSI_i3(ovl), + VSI_b2(ovl), VSI_d2(ovl), + VSI_v1(ovl), VSI_rxb(ovl)); + goto ok; case 0xe6000000003fULL: s390_format_VRS_RRDV(s390_irgen_VSTRLR, VRSd_v1(ovl), VRSd_r3(ovl), VRS_b2(ovl), VRS_d2(ovl), From 59f754f87b4829b28f6a90e55ecf4f445d2f9d64 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 22 Jan 2026 18:40:35 +0000 Subject: [PATCH 273/502] s390: Rename s390_format_VRV_VVRDMT and s390_format_VRS_RRDVM Rename s390_format_VRV_VVRDMT --> s390_format_VRV Rename s390_format_VRS_RRDVM --> s390_format_VRSc --- VEX/priv/guest_s390_toIR.c | 55 +++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index c88c1ff26..14132ce39 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -3185,9 +3185,8 @@ s390_format_VRI_VVIMM(void (*irgen)(UChar v1, UChar v2, UShort i3, } static void -s390_format_VRS_RRDVM(void (*irgen)(UChar r1, IRTemp op2addr, UChar v3, - UChar m4), UChar r1, UChar b2, UShort d2, UChar v3, - UChar m4, UChar rxb) +s390_format_VRSc(void (*irgen)(UChar r1, IRTemp op2addr, UChar v3, UChar m4), + UChar r1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) { IRTemp op2addr = newTemp(Ity_I64); @@ -3303,9 +3302,9 @@ s390_format_VRS_VRRD(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3), static void -s390_format_VRV_VVRDMT(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), - UChar v1, UChar v2, UChar b2, UShort d2, UChar m3, UChar rxb, - IRType type) +s390_format_VRV(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), + UChar v1, UChar v2, UChar b2, UShort d2, UChar m3, UChar rxb, + IRType type) { IRTemp op2addr = newTemp(Ity_I64); @@ -19482,25 +19481,31 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRX_d2(ovl), VRX_m3(ovl), VRX_rxb(ovl)); goto ok; - case 0xe70000000012ULL: s390_format_VRV_VVRDMT(s390_irgen_VGEG, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I64); goto ok; - case 0xe70000000013ULL: s390_format_VRV_VVRDMT(s390_irgen_VGEF, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I32); goto ok; - case 0xe7000000001aULL: s390_format_VRV_VVRDMT(s390_irgen_VSCEG, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I64); goto ok; - case 0xe7000000001bULL: s390_format_VRV_VVRDMT(s390_irgen_VSCEF, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I32); goto ok; - case 0xe70000000021ULL: s390_format_VRS_RRDVM(s390_irgen_VLGV, VRSc_r1(ovl), - VRSc_b2(ovl), VRSc_d2(ovl), VRSc_v3(ovl), - VRSc_m4(ovl), VRSc_rxb(ovl)); goto ok; + case 0xe70000000012ULL: s390_format_VRV(s390_irgen_VGEG, VRV_v1(ovl), + VRV_x2(ovl), VRV_b2(ovl), + VRV_d2(ovl), VRV_m3(ovl), + VRV_rxb(ovl), Ity_I64); + goto ok; + case 0xe70000000013ULL: s390_format_VRV(s390_irgen_VGEF, VRV_v1(ovl), + VRV_x2(ovl), VRV_b2(ovl), + VRV_d2(ovl), VRV_m3(ovl), + VRV_rxb(ovl), Ity_I32); + goto ok; + case 0xe7000000001aULL: s390_format_VRV(s390_irgen_VSCEG, VRV_v1(ovl), + VRV_x2(ovl), VRV_b2(ovl), + VRV_d2(ovl), VRV_m3(ovl), + VRV_rxb(ovl), Ity_I64); + goto ok; + case 0xe7000000001bULL: s390_format_VRV(s390_irgen_VSCEF, VRV_v1(ovl), + VRV_x2(ovl), VRV_b2(ovl), + VRV_d2(ovl), VRV_m3(ovl), + VRV_rxb(ovl), Ity_I32); + goto ok; + case 0xe70000000021ULL: s390_format_VRSc(s390_irgen_VLGV, VRSc_r1(ovl), + VRSc_b2(ovl), VRSc_d2(ovl), + VRSc_v3(ovl), VRSc_m4(ovl), + VRSc_rxb(ovl)); + goto ok; case 0xe70000000022ULL: s390_format_VRS_VRRDM(s390_irgen_VLVG, VRS_v1(ovl), VRS_b2(ovl), VRS_d2(ovl), VRS_v3(ovl), VRS_m4(ovl), VRS_rxb(ovl)); goto ok; From 1a32f3bd30c4a192cb2db66324b7c53506f1705e Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 22 Jan 2026 20:03:37 +0000 Subject: [PATCH 274/502] s390: Merge s390_format_VRS_VRDV and s390_format_VRS_VRDVM Add unused m4 parameter to s390_irgen_VLM / _VSTM. That way we no longer need to distinguish between s390_format_VRS_VRDV and s390_format_VRS_VRDVM. Rename remaining function to s390_format_VRSa and use it throughout. Add field access macros VRSa_v1 and so on. --- VEX/priv/guest_s390_toIR.c | 89 ++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 14132ce39..01d8b9bfa 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -285,6 +285,12 @@ typedef enum { #define VRS_d2(insn) (((insn) >> 32) & 0xfff) #define VRS_m4(insn) (((insn) >> 28) & 0xf) #define VRS_rxb(insn) (((insn) >> 24) & 0xf) +#define VRSa_v1(insn) (((insn) >> 52) & 0xf) +#define VRSa_v3(insn) (((insn) >> 48) & 0xf) +#define VRSa_b2(insn) (((insn) >> 44) & 0xf) +#define VRSa_d2(insn) (((insn) >> 32) & 0xfff) +#define VRSa_m4(insn) (((insn) >> 28) & 0xf) +#define VRSa_rxb(insn) (((insn) >> 24) & 0xf) #define VRSc_r1(insn) (((insn) >> 52) & 0xf) #define VRSc_v3(insn) (((insn) >> 48) & 0xf) #define VRSc_b2(insn) (((insn) >> 44) & 0xf) @@ -3222,9 +3228,8 @@ s390_format_VRS_RRDV(void (*irgen)(UChar v1, UChar r3, IRTemp op2addr), static void -s390_format_VRS_VRDVM(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3, - UChar m4), UChar v1, UChar b2, UShort d2, UChar v3, - UChar m4, UChar rxb) +s390_format_VRSa(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3, UChar m4), + UChar v1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) { IRTemp op2addr = newTemp(Ity_I64); @@ -3242,26 +3247,6 @@ s390_format_VRS_VRDVM(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3, } -static void -s390_format_VRS_VRDV(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3), - UChar v1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) -{ - IRTemp op2addr = newTemp(Ity_I64); - - if (! s390_host_has_vx) { - emulation_failure(EmFail_S390X_vx); - return; - } - - assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : - mkU64(0))); - - v1 = s390_vr_getVRindex(v1, 1, rxb); - v3 = s390_vr_getVRindex(v3, 2, rxb); - irgen(v1, op2addr, v3); -} - - static void s390_format_VRS_VRRDM(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3, UChar m4), @@ -14302,7 +14287,8 @@ s390_irgen_VGEG(UChar v1, IRTemp op2addr, UChar m3) } static void -s390_irgen_VLM(UChar v1, IRTemp op2addr, UChar v3) +s390_irgen_VLM(UChar v1, IRTemp op2addr, UChar v3, + UChar m4 __attribute__((unused))) /* alignment hint */ { s390_insn_assert(v3 >= v1); s390_insn_assert(v3 - v1 <= 16); @@ -14471,7 +14457,8 @@ s390_irgen_VSTEG(UChar v1, IRTemp op2addr, UChar m3) } static void -s390_irgen_VSTM(UChar v1, IRTemp op2addr, UChar v3) +s390_irgen_VSTM(UChar v1, IRTemp op2addr, UChar v3, + UChar m4 __attribute__((unused))) /* alignment hint */ { s390_insn_assert(v3 >= v1); s390_insn_assert(v3 - v1 <= 16); @@ -19513,31 +19500,39 @@ s390_decode_6byte_and_irgen(const UChar *bytes) RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl), RXE_m3(ovl)); goto ok; - case 0xe70000000030ULL: s390_format_VRS_VRDVM(s390_irgen_VESL, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), - VRS_v3(ovl), VRS_m4(ovl), - VRS_rxb(ovl)); goto ok; - case 0xe70000000033ULL: s390_format_VRS_VRDVM(s390_irgen_VERLL, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), - VRS_v3(ovl), VRS_m4(ovl), - VRS_rxb(ovl)); goto ok; - case 0xe70000000036ULL: s390_format_VRS_VRDV(s390_irgen_VLM, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), VRS_v3(ovl), - VRS_m4(ovl), VRS_rxb(ovl)); goto ok; + case 0xe70000000030ULL: s390_format_VRSa(s390_irgen_VESL, VRSa_v1(ovl), + VRSa_b2(ovl), VRSa_d2(ovl), + VRSa_v3(ovl), VRSa_m4(ovl), + VRSa_rxb(ovl)); + goto ok; + case 0xe70000000033ULL: s390_format_VRSa(s390_irgen_VERLL, VRSa_v1(ovl), + VRSa_b2(ovl), VRSa_d2(ovl), + VRSa_v3(ovl), VRSa_m4(ovl), + VRSa_rxb(ovl)); + goto ok; + case 0xe70000000036ULL: s390_format_VRSa(s390_irgen_VLM, VRSa_v1(ovl), + VRSa_b2(ovl), VRSa_d2(ovl), + VRSa_v3(ovl), VRSa_m4(ovl), + VRSa_rxb(ovl)); + goto ok; case 0xe70000000037ULL: s390_format_VRS_VRRD(s390_irgen_VLL, VRS_v1(ovl), VRS_b2(ovl), VRS_d2(ovl), VRS_r3(ovl), VRS_rxb(ovl)); goto ok; - case 0xe70000000038ULL: s390_format_VRS_VRDVM(s390_irgen_VESRL, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), - VRS_v3(ovl), VRS_m4(ovl), - VRS_rxb(ovl)); goto ok; - case 0xe7000000003aULL: s390_format_VRS_VRDVM(s390_irgen_VESRA, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), - VRS_v3(ovl), VRS_m4(ovl), - VRS_rxb(ovl)); goto ok; - case 0xe7000000003eULL: s390_format_VRS_VRDV(s390_irgen_VSTM, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), VRS_v3(ovl), - VRS_m4(ovl), VRS_rxb(ovl)); goto ok; + case 0xe70000000038ULL: s390_format_VRSa(s390_irgen_VESRL, VRSa_v1(ovl), + VRSa_b2(ovl), VRSa_d2(ovl), + VRSa_v3(ovl), VRSa_m4(ovl), + VRSa_rxb(ovl)); + goto ok; + case 0xe7000000003aULL: s390_format_VRSa(s390_irgen_VESRA, VRSa_v1(ovl), + VRSa_b2(ovl), VRSa_d2(ovl), + VRSa_v3(ovl), VRSa_m4(ovl), + VRSa_rxb(ovl)); + goto ok; + case 0xe7000000003eULL: s390_format_VRSa(s390_irgen_VSTM, VRSa_v1(ovl), + VRSa_b2(ovl), VRSa_d2(ovl), + VRSa_v3(ovl), VRSa_m4(ovl), + VRSa_rxb(ovl)); + goto ok; case 0xe7000000003fULL: s390_format_VRS_VRRD(s390_irgen_VSTL, VRS_v1(ovl), VRS_b2(ovl), VRS_d2(ovl), VRS_r3(ovl), VRS_rxb(ovl)); goto ok; From baf6f5f5c6d29de1e7aca59a0553c20d6791f149 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 22 Jan 2026 20:18:55 +0000 Subject: [PATCH 275/502] s390: Rename s390_format_VRS_RRDV --> s390_format_VRSd Add missing VRSd_... field access macros. --- VEX/priv/guest_s390_toIR.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 01d8b9bfa..01de997cb 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -297,8 +297,11 @@ typedef enum { #define VRSc_d2(insn) (((insn) >> 32) & 0xfff) #define VRSc_m4(insn) (((insn) >> 28) & 0xf) #define VRSc_rxb(insn) (((insn) >> 24) & 0xf) -#define VRSd_v1(insn) (((insn) >> 28) & 0xf) #define VRSd_r3(insn) (((insn) >> 48) & 0xf) +#define VRSd_b2(insn) (((insn) >> 44) & 0xf) +#define VRSd_d2(insn) (((insn) >> 32) & 0xfff) +#define VRSd_v1(insn) (((insn) >> 28) & 0xf) +#define VRSd_rxb(insn) (((insn) >> 24) & 0xf) #define VSI_i3(insn) (((insn) >> 48) & 0xff) #define VSI_b2(insn) (((insn) >> 44) & 0xf) #define VSI_d2(insn) (((insn) >> 32) & 0xfff) @@ -3209,8 +3212,8 @@ s390_format_VRSc(void (*irgen)(UChar r1, IRTemp op2addr, UChar v3, UChar m4), } static void -s390_format_VRS_RRDV(void (*irgen)(UChar v1, UChar r3, IRTemp op2addr), - UChar v1, UChar r3, UChar b2, UShort d2, UChar rxb) +s390_format_VRSd(void (*irgen)(UChar v1, UChar r3, IRTemp op2addr), + UChar v1, UChar r3, UChar b2, UShort d2, UChar rxb) { IRTemp op2addr = newTemp(Ity_I64); @@ -19342,19 +19345,19 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VSI_b2(ovl), VSI_d2(ovl), VSI_v1(ovl), VSI_rxb(ovl)); goto ok; - case 0xe60000000037ULL: s390_format_VRS_RRDV(s390_irgen_VLRLR, VRSd_v1(ovl), - VRSd_r3(ovl), VRS_b2(ovl), - VRS_d2(ovl), - VRS_rxb(ovl)); goto ok; + case 0xe60000000037ULL: s390_format_VRSd(s390_irgen_VLRLR, VRSd_v1(ovl), + VRSd_r3(ovl), VRSd_b2(ovl), + VRSd_d2(ovl), VRSd_rxb(ovl)); + goto ok; case 0xe6000000003cULL: /* VUPKZ */ goto unimplemented; case 0xe6000000003dULL: s390_format_VSI(s390_irgen_VSTRL, VSI_i3(ovl), VSI_b2(ovl), VSI_d2(ovl), VSI_v1(ovl), VSI_rxb(ovl)); goto ok; - case 0xe6000000003fULL: s390_format_VRS_RRDV(s390_irgen_VSTRLR, VRSd_v1(ovl), - VRSd_r3(ovl), VRS_b2(ovl), - VRS_d2(ovl), - VRS_rxb(ovl)); goto ok; + case 0xe6000000003fULL: s390_format_VRSd(s390_irgen_VSTRLR, VRSd_v1(ovl), + VRSd_r3(ovl), VRSd_b2(ovl), + VRSd_d2(ovl), VRSd_rxb(ovl)); + goto ok; case 0xe60000000049ULL: /* VLIP */ goto unimplemented; case 0xe6000000004aULL: /* VCVDQ */ goto unimplemented; case 0xe6000000004eULL: /* VCVBQ */ goto unimplemented; From 1bf9f7bf7eac9efb0af2eba06bae70ad9bdebf2a Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 22 Jan 2026 20:39:48 +0000 Subject: [PATCH 276/502] s390: Rename s390_format_VRS_VRRD[M] s390_format_VRS_VRRD --> s390_format_VRSb s390_format_VRS_VRRDM --> s390_format_VRSbm Add missing VRSb_... field access macros. --- VEX/priv/guest_s390_toIR.c | 44 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 01de997cb..334c54988 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -278,19 +278,18 @@ typedef enum { #define VRIe_m5(insn) (((insn) >> 32) & 0xf) #define VRIe_m4(insn) (((insn) >> 28) & 0xf) #define VRIe_rxb(insn) (((insn) >> 24) & 0xf) -#define VRS_v1(insn) (((insn) >> 52) & 0xf) -#define VRS_v3(insn) (((insn) >> 48) & 0xf) -#define VRS_r3(insn) (((insn) >> 48) & 0xf) -#define VRS_b2(insn) (((insn) >> 44) & 0xf) -#define VRS_d2(insn) (((insn) >> 32) & 0xfff) -#define VRS_m4(insn) (((insn) >> 28) & 0xf) -#define VRS_rxb(insn) (((insn) >> 24) & 0xf) #define VRSa_v1(insn) (((insn) >> 52) & 0xf) #define VRSa_v3(insn) (((insn) >> 48) & 0xf) #define VRSa_b2(insn) (((insn) >> 44) & 0xf) #define VRSa_d2(insn) (((insn) >> 32) & 0xfff) #define VRSa_m4(insn) (((insn) >> 28) & 0xf) #define VRSa_rxb(insn) (((insn) >> 24) & 0xf) +#define VRSb_v1(insn) (((insn) >> 52) & 0xf) +#define VRSb_r3(insn) (((insn) >> 48) & 0xf) +#define VRSb_b2(insn) (((insn) >> 44) & 0xf) +#define VRSb_d2(insn) (((insn) >> 32) & 0xfff) +#define VRSb_m4(insn) (((insn) >> 28) & 0xf) +#define VRSb_rxb(insn) (((insn) >> 24) & 0xf) #define VRSc_r1(insn) (((insn) >> 52) & 0xf) #define VRSc_v3(insn) (((insn) >> 48) & 0xf) #define VRSc_b2(insn) (((insn) >> 44) & 0xf) @@ -3251,9 +3250,8 @@ s390_format_VRSa(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3, UChar m4), static void -s390_format_VRS_VRRDM(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3, - UChar m4), - UChar v1, UChar b2, UShort d2, UChar r3, UChar m4, UChar rxb) +s390_format_VRSbm(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3, UChar m4), + UChar v1, UChar b2, UShort d2, UChar r3, UChar m4, UChar rxb) { IRTemp op2addr = newTemp(Ity_I64); @@ -3271,8 +3269,8 @@ s390_format_VRS_VRRDM(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3, static void -s390_format_VRS_VRRD(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3), - UChar v1, UChar b2, UShort d2, UChar r3, UChar rxb) +s390_format_VRSb(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3), + UChar v1, UChar b2, UShort d2, UChar r3, UChar rxb) { IRTemp op2addr = newTemp(Ity_I64); @@ -19496,9 +19494,11 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRSc_v3(ovl), VRSc_m4(ovl), VRSc_rxb(ovl)); goto ok; - case 0xe70000000022ULL: s390_format_VRS_VRRDM(s390_irgen_VLVG, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), VRS_v3(ovl), - VRS_m4(ovl), VRS_rxb(ovl)); goto ok; + case 0xe70000000022ULL: s390_format_VRSbm(s390_irgen_VLVG, VRSb_v1(ovl), + VRSb_b2(ovl), VRSb_d2(ovl), + VRSb_r3(ovl), VRSb_m4(ovl), + VRSb_rxb(ovl)); + goto ok; case 0xe70000000027ULL: s390_format_RXE(s390_irgen_LCBB, RXE_r1(ovl), RXE_x2(ovl), RXE_b2(ovl), RXE_d2(ovl), RXE_m3(ovl)); @@ -19518,9 +19518,10 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRSa_v3(ovl), VRSa_m4(ovl), VRSa_rxb(ovl)); goto ok; - case 0xe70000000037ULL: s390_format_VRS_VRRD(s390_irgen_VLL, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), VRS_r3(ovl), - VRS_rxb(ovl)); goto ok; + case 0xe70000000037ULL: s390_format_VRSb(s390_irgen_VLL, VRSb_v1(ovl), + VRSb_b2(ovl), VRSb_d2(ovl), + VRSb_r3(ovl), VRSb_rxb(ovl)); + goto ok; case 0xe70000000038ULL: s390_format_VRSa(s390_irgen_VESRL, VRSa_v1(ovl), VRSa_b2(ovl), VRSa_d2(ovl), VRSa_v3(ovl), VRSa_m4(ovl), @@ -19536,9 +19537,10 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRSa_v3(ovl), VRSa_m4(ovl), VRSa_rxb(ovl)); goto ok; - case 0xe7000000003fULL: s390_format_VRS_VRRD(s390_irgen_VSTL, VRS_v1(ovl), - VRS_b2(ovl), VRS_d2(ovl), VRS_r3(ovl), - VRS_rxb(ovl)); goto ok; + case 0xe7000000003fULL: s390_format_VRSb(s390_irgen_VSTL, VRSb_v1(ovl), + VRSb_b2(ovl), VRSb_d2(ovl), + VRSb_r3(ovl), VRSb_rxb(ovl)); + goto ok; case 0xe70000000040ULL: s390_format_VRI_VIM(s390_irgen_VLEIB, VRI_v1(ovl), VRI_i2(ovl), VRI_m3(ovl), VRI_rxb(ovl)); goto ok; From 1fa3b87d24bee22f904a018716ffa33390f0e014 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 22 Jan 2026 21:39:49 +0000 Subject: [PATCH 277/502] s390: s390_format_VRI related changes Rename: s390_format_VRI_V0UUU --> s390_format_VRIb s390_format_VRI_VVIMM --> s390_format_VRIe s390_format_VRId_VVVI --> s390_format_VRId s390_format_VRId_VVVIM --> s390_format_VRIdm s390_format_VRI_VVIM --> s390_format_VRIc s390_format_VRI_VIM --> s390_format_VRIa s390_format_VRI_V0U --> s390_format_VRIa0 Remove s390_format_VRI_V0IU (same as s390_format_VRI_VIM). --- VEX/priv/guest_s390_toIR.c | 152 ++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 80 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 334c54988..ef955d9f2 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -251,11 +251,11 @@ typedef enum { #define VRRe_m5(insn) (((insn) >> 32) & 0xf) #define VRRe_v4(insn) (((insn) >> 28) & 0xf) #define VRRe_rxb(insn) (((insn) >> 24) & 0xf) -#define VRI_v1(insn) (((insn) >> 52) & 0xf) -#define VRI_v3(insn) (((insn) >> 48) & 0xf) -#define VRI_i2(insn) (((insn) >> 32) & 0xffff) -#define VRI_m3(insn) (((insn) >> 28) & 0xf) -#define VRI_rxb(insn) (((insn) >> 24) & 0xf) +#define VRIa_v1(insn) (((insn) >> 52) & 0xf) +#define VRIa_v3(insn) (((insn) >> 48) & 0xf) +#define VRIa_i2(insn) (((insn) >> 32) & 0xffff) +#define VRIa_m3(insn) (((insn) >> 28) & 0xf) +#define VRIa_rxb(insn) (((insn) >> 24) & 0xf) #define VRIb_v1(insn) (((insn) >> 52) & 0xf) #define VRIb_i2(insn) (((insn) >> 40) & 0xff) #define VRIb_i3(insn) (((insn) >> 32) & 0xff) @@ -3107,8 +3107,8 @@ s390_format_VRR_VVM(void (*irgen)(UChar v1, UChar v2, UChar m3), static void -s390_format_VRI_V0U(void (*irgen)(UChar v1, UShort i2), - UChar v1, UShort i2, UChar rxb) +s390_format_VRIa0(void (*irgen)(UChar v1, UShort i2), + UChar v1, UShort i2, UChar rxb) { if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); @@ -3121,8 +3121,8 @@ s390_format_VRI_V0U(void (*irgen)(UChar v1, UShort i2), static void -s390_format_VRI_V0UUU(void (*irgen)(UChar v1, UChar i2, UChar i3, UChar m4), - UChar v1, UChar i2, UChar i3, UChar m4, UChar rxb) +s390_format_VRIb(void (*irgen)(UChar v1, UChar i2, UChar i3, UChar m4), + UChar v1, UChar i2, UChar i3, UChar m4, UChar rxb) { if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); @@ -3135,8 +3135,8 @@ s390_format_VRI_V0UUU(void (*irgen)(UChar v1, UChar i2, UChar i3, UChar m4), static void -s390_format_VRI_V0IU(void (*irgen)(UChar v1, UShort i2, UChar m3), - UChar v1, UShort i2, UChar m3, UChar rxb) +s390_format_VRIa(void (*irgen)(UChar v1, UShort i2, UChar m3), + UChar v1, UShort i2, UChar m3, UChar rxb) { if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); @@ -3149,22 +3149,8 @@ s390_format_VRI_V0IU(void (*irgen)(UChar v1, UShort i2, UChar m3), static void -s390_format_VRI_VIM(void (*irgen)(UChar v1, UShort i2, UChar m3), - UChar v1, UShort i2, UChar m3, UChar rxb) -{ - if (! s390_host_has_vx) { - emulation_failure(EmFail_S390X_vx); - return; - } - - v1 = s390_vr_getVRindex(v1, 1, rxb); - irgen(v1, i2, m3); -} - - -static void -s390_format_VRI_VVIM(void (*irgen)(UChar v1, UChar v3, UShort i2, UChar m4), - UChar v1, UChar v3, UShort i2, UChar m4, UChar rxb) +s390_format_VRIc(void (*irgen)(UChar v1, UChar v3, UShort i2, UChar m4), + UChar v1, UChar v3, UShort i2, UChar m4, UChar rxb) { if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); @@ -3177,10 +3163,8 @@ s390_format_VRI_VVIM(void (*irgen)(UChar v1, UChar v3, UShort i2, UChar m4), } static void -s390_format_VRI_VVIMM(void (*irgen)(UChar v1, UChar v2, UShort i3, - UChar m4, UChar m5), - UChar v1, UChar v2, UShort i3, UChar m4, UChar m5, - UChar rxb) +s390_format_VRIe(void (*irgen)(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5), + UChar v1, UChar v2, UShort i3, UChar m4, UChar m5, UChar rxb) { if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); @@ -3353,10 +3337,8 @@ s390_format_VRR_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, static void -s390_format_VRId_VVVIM(void (*irgen)(UChar v1, UChar v2, UChar v3, - UChar i4, UChar m5), - UChar v1, UChar v2, UChar v3, UChar i4, UChar m5, - UChar rxb) +s390_format_VRIdm(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4, UChar m5), + UChar v1, UChar v2, UChar v3, UChar i4, UChar m5, UChar rxb) { if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); @@ -3371,9 +3353,8 @@ s390_format_VRId_VVVIM(void (*irgen)(UChar v1, UChar v2, UChar v3, static void -s390_format_VRId_VVVI(void (*irgen)(UChar v1, UChar v2, UChar v3, - UChar i4), - UChar v1, UChar v2, UChar v3, UChar i4, UChar rxb) +s390_format_VRId(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4), + UChar v1, UChar v2, UChar v3, UChar i4, UChar rxb) { if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); @@ -19541,33 +19522,42 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRSb_b2(ovl), VRSb_d2(ovl), VRSb_r3(ovl), VRSb_rxb(ovl)); goto ok; - case 0xe70000000040ULL: s390_format_VRI_VIM(s390_irgen_VLEIB, VRI_v1(ovl), - VRI_i2(ovl), VRI_m3(ovl), - VRI_rxb(ovl)); goto ok; - case 0xe70000000041ULL: s390_format_VRI_VIM(s390_irgen_VLEIH, VRI_v1(ovl), - VRI_i2(ovl), VRI_m3(ovl), - VRI_rxb(ovl)); goto ok; - case 0xe70000000042ULL: s390_format_VRI_VIM(s390_irgen_VLEIG, VRI_v1(ovl), - VRI_i2(ovl), VRI_m3(ovl), - VRI_rxb(ovl)); goto ok; - case 0xe70000000043ULL: s390_format_VRI_VIM(s390_irgen_VLEIF, VRI_v1(ovl), - VRI_i2(ovl), VRI_m3(ovl), - VRI_rxb(ovl)); goto ok; - case 0xe70000000044ULL: s390_format_VRI_V0U(s390_irgen_VGBM, VRI_v1(ovl), - VRI_i2(ovl), VRI_rxb(ovl)); goto ok; - case 0xe70000000045ULL: s390_format_VRI_V0IU(s390_irgen_VREPI, VRI_v1(ovl), - VRI_i2(ovl), VRI_m3(ovl), - VRI_rxb(ovl)); goto ok; - case 0xe70000000046ULL: s390_format_VRI_V0UUU(s390_irgen_VGM, VRIb_v1(ovl), - VRIb_i2(ovl), VRIb_i3(ovl), VRIb_m4(ovl), - VRIb_rxb(ovl)); goto ok; - case 0xe7000000004aULL: s390_format_VRI_VVIMM(s390_irgen_VFTCI, VRIe_v1(ovl), - VRIe_v2(ovl), VRIe_i3(ovl), - VRIe_m4(ovl), VRIe_m5(ovl), - VRIe_rxb(ovl)); goto ok; - case 0xe7000000004dULL: s390_format_VRI_VVIM(s390_irgen_VREP, VRIc_v1(ovl), - VRIc_v3(ovl), VRIc_i2(ovl), - VRIc_m4(ovl), VRIc_rxb(ovl)); goto ok; + case 0xe70000000040ULL: s390_format_VRIa(s390_irgen_VLEIB, VRIa_v1(ovl), + VRIa_i2(ovl), VRIa_m3(ovl), + VRIa_rxb(ovl)); + goto ok; + case 0xe70000000041ULL: s390_format_VRIa(s390_irgen_VLEIH, VRIa_v1(ovl), + VRIa_i2(ovl), VRIa_m3(ovl), + VRIa_rxb(ovl)); + goto ok; + case 0xe70000000042ULL: s390_format_VRIa(s390_irgen_VLEIG, VRIa_v1(ovl), + VRIa_i2(ovl), VRIa_m3(ovl), + VRIa_rxb(ovl)); + goto ok; + case 0xe70000000043ULL: s390_format_VRIa(s390_irgen_VLEIF, VRIa_v1(ovl), + VRIa_i2(ovl), VRIa_m3(ovl), + VRIa_rxb(ovl)); + goto ok; + case 0xe70000000044ULL: s390_format_VRIa0(s390_irgen_VGBM, VRIa_v1(ovl), + VRIa_i2(ovl), VRIa_rxb(ovl)); + goto ok; + case 0xe70000000045ULL: s390_format_VRIa(s390_irgen_VREPI, VRIa_v1(ovl), + VRIa_i2(ovl), VRIa_m3(ovl), + VRIa_rxb(ovl)); + goto ok; + case 0xe70000000046ULL: s390_format_VRIb(s390_irgen_VGM, VRIb_v1(ovl), + VRIb_i2(ovl), VRIb_i3(ovl), + VRIb_m4(ovl), VRIb_rxb(ovl)); + goto ok; + case 0xe7000000004aULL: s390_format_VRIe(s390_irgen_VFTCI, VRIe_v1(ovl), + VRIe_v2(ovl), VRIe_i3(ovl), + VRIe_m4(ovl), VRIe_m5(ovl), + VRIe_rxb(ovl)); + goto ok; + case 0xe7000000004dULL: s390_format_VRIc(s390_irgen_VREP, VRIc_v1(ovl), + VRIc_v3(ovl), VRIc_i2(ovl), + VRIc_m4(ovl), VRIc_rxb(ovl)); + goto ok; case 0xe70000000050ULL: s390_format_VRR_VVM(s390_irgen_VPOPCT, VRRa_v1(ovl), VRRa_v2(ovl), VRRa_m3(ovl), VRR_rxb(ovl)); goto ok; @@ -19634,10 +19624,11 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe70000000070ULL: s390_format_VRR_VVVM(s390_irgen_VESLV, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000072ULL: s390_format_VRId_VVVIM(s390_irgen_VERIM, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), VRId_m5(ovl), - VRId_rxb(ovl)); goto ok; + case 0xe70000000072ULL: s390_format_VRIdm(s390_irgen_VERIM, VRId_v1(ovl), + VRId_v2(ovl), VRId_v3(ovl), + VRId_i4(ovl), VRId_m5(ovl), + VRId_rxb(ovl)); + goto ok; case 0xe70000000073ULL: s390_format_VRR_VVVM(s390_irgen_VERLLV, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; @@ -19647,9 +19638,10 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe70000000075ULL: s390_format_VRR_VVV(s390_irgen_VSLB, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000077ULL: s390_format_VRId_VVVI(s390_irgen_VSLDB, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), VRId_rxb(ovl)); goto ok; + case 0xe70000000077ULL: s390_format_VRId(s390_irgen_VSLDB, VRId_v1(ovl), + VRId_v2(ovl), VRId_v3(ovl), + VRId_i4(ovl), VRId_rxb(ovl)); + goto ok; case 0xe70000000078ULL: s390_format_VRR_VVVM(s390_irgen_VESRLV, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; @@ -19686,14 +19678,14 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe70000000085ULL: s390_format_VRR_VVV(s390_irgen_VBPERM, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000086ULL: s390_format_VRId_VVVI(s390_irgen_VSLD, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), - VRId_rxb(ovl)); goto ok; - case 0xe70000000087ULL: s390_format_VRId_VVVI(s390_irgen_VSRD, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), - VRId_rxb(ovl)); goto ok; + case 0xe70000000086ULL: s390_format_VRId(s390_irgen_VSLD, VRId_v1(ovl), + VRId_v2(ovl), VRId_v3(ovl), + VRId_i4(ovl), VRId_rxb(ovl)); + goto ok; + case 0xe70000000087ULL: s390_format_VRId(s390_irgen_VSRD, VRId_v1(ovl), + VRId_v2(ovl), VRId_v3(ovl), + VRId_i4(ovl), VRId_rxb(ovl)); + goto ok; case 0xe70000000088ULL: /* VEVAL */ goto unimplemented; case 0xe70000000089ULL: /* VBLEND */ goto unimplemented; case 0xe7000000008aULL: s390_format_VRR_VVVVMM(s390_irgen_VSTRC, VRRd_v1(ovl), From 1f5118fffdfbfb40405b8493ad6e8fee343c5759 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 24 Jan 2026 08:20:29 +0100 Subject: [PATCH 278/502] Bug 253436 - vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps) Patch submitted by jacobly.alt@gmail.com Regtest update submitted by Lukas Dullinger --- NEWS | 1 + VEX/priv/guest_amd64_toIR.c | 27 ++++++++++++++++++++++----- VEX/test/test-amd64.c | 4 ++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 9091f0a39..d907a32e4 100644 --- a/NEWS +++ b/NEWS @@ -45,6 +45,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 126256 (fnop) vex x86->IR: unhandled instruction bytes: 0xD9 0xD0 0x31 0xC0 228343 none/tests/darwin/bug228343 fails on OS X +253436 vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps) 258140 Valgrind on OS X always reports some memory "still reachable" 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) 487055 memcheck/tests/x86-linux/scalar fails running in Docker diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c index 5faf9c07c..39a88b4e6 100644 --- a/VEX/priv/guest_amd64_toIR.c +++ b/VEX/priv/guest_amd64_toIR.c @@ -20768,8 +20768,8 @@ Long dis_ESC_NONE ( dis_REP_op ( dres, AMD64CondAlways, dis_MOVS, sz, guest_RIP_curr_instr, guest_RIP_bbstart+delta, "rep movs", pfx ); - dres->whatNext = Dis_StopHere; - return delta; + vassert(dres->whatNext == Dis_StopHere); + return delta; } /* A4: movsb */ if (!haveF3(pfx) && !haveF2(pfx)) { @@ -20782,14 +20782,31 @@ Long dis_ESC_NONE ( case 0xA6: case 0xA7: - /* F3 A6/A7: repe cmps/rep cmps{w,l,q} */ - if (haveF3(pfx) && !haveF2(pfx)) { + /* F2 A6/A7: repne cmpsb/repne cmps{w,l,q} */ + if (haveF2(pfx) && !haveF3(pfx)) { + if (opc == 0xA6) + sz = 1; + dis_REP_op ( dres, AMD64CondNZ, dis_CMPS, sz, + guest_RIP_curr_instr, + guest_RIP_bbstart+delta, "repne cmps", pfx ); + vassert(dres->whatNext == Dis_StopHere); + return delta; + } + /* F3 A6/A7: repe cmpsb/repe cmps{w,l,q} */ + if (!haveF2(pfx) && haveF3(pfx)) { if (opc == 0xA6) sz = 1; dis_REP_op ( dres, AMD64CondZ, dis_CMPS, sz, guest_RIP_curr_instr, guest_RIP_bbstart+delta, "repe cmps", pfx ); - dres->whatNext = Dis_StopHere; + vassert(dres->whatNext == Dis_StopHere); + return delta; + } + /* A6/A7: cmpsb/cmps{w,l,q} */ + if (!haveF2(pfx) && !haveF3(pfx)) { + if (opc == 0xA6) + sz = 1; + dis_string_op ( dis_CMPS, sz, "cmps", pfx ); return delta; } goto decode_failure; diff --git a/VEX/test/test-amd64.c b/VEX/test/test-amd64.c index bedc99e98..981aa3ea0 100644 --- a/VEX/test/test-amd64.c +++ b/VEX/test/test-amd64.c @@ -1207,9 +1207,9 @@ void test_string(void) TEST_STRING(scas, ""); // REINSTATE: TEST_STRING(scas, "repz "); TEST_STRING(scas, "repnz "); - // REINSTATE: TEST_STRING(cmps, ""); + TEST_STRING(cmps, ""); TEST_STRING(cmps, "repz "); - // REINSTATE: TEST_STRING(cmps, "repnz "); + TEST_STRING(cmps, "repnz "); } /* VM86 test */ From 65d41bffbec97e0174db7101a42fb8a8cca21666 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 28 Jan 2026 13:38:39 +0100 Subject: [PATCH 279/502] Bug 514613 again (closing xml tag) Always close the tag after the heuristic details. Add 4 testcases, one with no errors, one with a simple leak, one with a simple reachable and one "Xmas tree" test (in reference to the TCP/IP Christmas tree packet https://en.wikipedia.org/wiki/Christmas_tree_packet). That has most of the errors that memcheck can produce. All of these tests get checked by xmllint. --- .gitignore | 4 + memcheck/mc_leakcheck.c | 16 ++-- memcheck/tests/Makefile.am | 13 +++- memcheck/tests/nothing.c | 5 ++ memcheck/tests/nothing_xml.vgtest | 4 + memcheck/tests/simple_leak.c | 10 +++ memcheck/tests/simple_leak_xml.vgtest | 4 + memcheck/tests/simple_reachable.c | 9 +++ memcheck/tests/simple_reachable_xml.vgtest | 4 + memcheck/tests/xmas_tree.cpp | 90 ++++++++++++++++++++++ memcheck/tests/xmas_tree_xml.supp | 7 ++ memcheck/tests/xmas_tree_xml.vgtest | 4 + 12 files changed, 161 insertions(+), 9 deletions(-) create mode 100644 memcheck/tests/nothing.c create mode 100644 memcheck/tests/nothing_xml.vgtest create mode 100644 memcheck/tests/simple_leak.c create mode 100644 memcheck/tests/simple_leak_xml.vgtest create mode 100644 memcheck/tests/simple_reachable.c create mode 100644 memcheck/tests/simple_reachable_xml.vgtest create mode 100644 memcheck/tests/xmas_tree.cpp create mode 100644 memcheck/tests/xmas_tree_xml.supp create mode 100644 memcheck/tests/xmas_tree_xml.vgtest diff --git a/.gitignore b/.gitignore index 12221dc8d..3276d8c66 100644 --- a/.gitignore +++ b/.gitignore @@ -974,6 +974,7 @@ /memcheck/tests/new_nothrow /memcheck/tests/new_override /memcheck/tests/noisy_child +/memcheck/tests/nothing /memcheck/tests/null_socket /memcheck/tests/origin1-yes /memcheck/tests/origin2-not-quite @@ -1009,6 +1010,8 @@ /memcheck/tests/sendmsg /memcheck/tests/sh-mem /memcheck/tests/sh-mem-random +/memcheck/tests/simple_leak +/memcheck/tests/simple_reachable /memcheck/tests/sized_aligned_new_delete_args /memcheck/tests/sized_aligned_new_delete_misaligned1 /memcheck/tests/sized_aligned_new_delete_misaligned2 @@ -1067,6 +1070,7 @@ /memcheck/tests/wrapmalloc /memcheck/tests/wrapmallocstatic /memcheck/tests/writev1 +/memcheck/tests/xmas_tree /memcheck/tests/xml1 /memcheck/tests/zeropage diff --git a/memcheck/mc_leakcheck.c b/memcheck/mc_leakcheck.c index 4df0b180d..b0056b65b 100644 --- a/memcheck/mc_leakcheck.c +++ b/memcheck/mc_leakcheck.c @@ -1768,23 +1768,23 @@ static void print_results(ThreadId tid, LeakCheckParams* lcp) umsg_or_xml(VG_(clo_xml) ? " \n" " %'lu%s\n" - " %'lu%s\n" - " \n" : + " %'lu%s\n" : " still reachable: %'lu%s bytes in %'lu%s blocks\n", MC_(bytes_reachable), DBY (MC_(bytes_reachable), old_bytes_reachable), MC_(blocks_reachable), DBL (MC_(blocks_reachable), old_blocks_reachable)); - for (i = 0; i < N_LEAK_CHECK_HEURISTICS; i++) + for (i = 0; i < N_LEAK_CHECK_HEURISTICS; i++) { if (old_blocks_heuristically_reachable[i] > 0 || MC_(blocks_heuristically_reachable)[i] > 0) { umsg_or_xml(VG_(clo_xml) ? "" : " of which " "reachable via heuristic:\n"); break; } - for (i = 0; i < N_LEAK_CHECK_HEURISTICS; i++) - if (old_blocks_heuristically_reachable[i] > 0 - || MC_(blocks_heuristically_reachable)[i] > 0) + } + for (i = 0; i < N_LEAK_CHECK_HEURISTICS; i++) { + if (old_blocks_heuristically_reachable[i] > 0 + || MC_(blocks_heuristically_reachable)[i] > 0) { umsg_or_xml(VG_(clo_xml) ? " \n" " %ls\n" @@ -1800,7 +1800,9 @@ static void print_results(ThreadId tid, LeakCheckParams* lcp) MC_(blocks_heuristically_reachable)[i], DBL (MC_(blocks_heuristically_reachable)[i], old_blocks_heuristically_reachable[i])); - if (VG_(clo_xml) && MC_(bytes_reachable)) { + } + } + if (VG_(clo_xml)) { umsg_or_xml(" \n"); } umsg_or_xml(VG_(clo_xml) ? diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index eb6014053..6a6eee61d 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -311,6 +311,7 @@ EXTRA_DIST = \ new_nothrow.vgtest \ new_override.stderr.exp new_override.stdout.exp new_override.vgtest \ noisy_child.vgtest noisy_child.stderr.exp \ + nothing_xml.vgtest \ null_socket.vgtest \ origin1-yes.vgtest origin1-yes.stderr.exp \ origin1-yes.stderr.exp-freebsd \ @@ -402,6 +403,7 @@ EXTRA_DIST = \ sigkill.stderr.exp-glibc-2.28 sigkill.vgtest \ signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ + simple_leak_xml.vgtest simple_reachable_xml.vgtest \ sized_delete.stderr.exp sized_delete.stderr.exp-x86 sized_delete.vgtest \ static_malloc.stderr.exp static_malloc.vgtest \ stpncpy.vgtest stpncpy.stderr.exp \ @@ -475,6 +477,7 @@ EXTRA_DIST = \ wrapmalloc.vgtest wrapmalloc.stdout.exp \ wrapmallocstatic.vgtest wrapmallocstatic.stdout.exp \ writev1.stderr.exp writev1.stderr.exp-solaris writev1.vgtest \ + xmas_tree_xml.vgtest xmas_tree_xml.supp \ xml1.stderr.exp xml1.stdout.exp xml1.vgtest xml1.stderr.exp-s390x-mvc check_PROGRAMS = \ @@ -536,6 +539,7 @@ check_PROGRAMS = \ mismatches new_override metadata \ nanoleak_supp nanoleak2 new_nothrow \ noisy_child \ + nothing \ null_socket \ origin1-yes origin2-not-quite origin3-no \ origin4-many origin5-bz2 origin6-fp \ @@ -553,7 +557,9 @@ check_PROGRAMS = \ sbfragment \ sendmsg \ sh-mem sh-mem-random \ - sigaltstack signal2 sigprocmask static_malloc sigkill \ + sigaltstack signal2 sigprocmask \ + simple_leak simple_reachable \ + static_malloc sigkill \ strchr \ str_tester \ supp_unknown supp1 supp2 suppfree \ @@ -572,7 +578,8 @@ check_PROGRAMS = \ wmemcmp \ wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \ wrapmalloc wrapmallocso.so wrapmallocstatic \ - writev1 + writev1 \ + xmas_tree if !SOLARIS_SUN_STUDIO_AS # Sun Studio assembler fails on "IDENT too long" @@ -970,3 +977,5 @@ endif writev1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_STRINGOP_OVERFLOW@ @FLAG_W_NO_STRINGOP_OVERREAD@ xml1_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@ +xmas_tree_SOURCES = xmas_tree.cpp +xmas_tree_CXXFLAGS = ${AM_CXXFLAGS} @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_MISMATCHED_NEW_DELETE@ @FLAG_W_ALLOC_SIZE_LARGER_THAN@ diff --git a/memcheck/tests/nothing.c b/memcheck/tests/nothing.c new file mode 100644 index 000000000..2e424a58d --- /dev/null +++ b/memcheck/tests/nothing.c @@ -0,0 +1,5 @@ +/* no errors, except Darwin */ +int main() +{ +} + diff --git a/memcheck/tests/nothing_xml.vgtest b/memcheck/tests/nothing_xml.vgtest new file mode 100644 index 000000000..db2eca402 --- /dev/null +++ b/memcheck/tests/nothing_xml.vgtest @@ -0,0 +1,4 @@ +prereq: which xmllint > /dev/null +prog: nothing +args: | xmllint --noout - +vgopts: --xml=yes --xml-fd=1 diff --git a/memcheck/tests/simple_leak.c b/memcheck/tests/simple_leak.c new file mode 100644 index 000000000..b94dade4c --- /dev/null +++ b/memcheck/tests/simple_leak.c @@ -0,0 +1,10 @@ +#include + +static void *p; + +int main () +{ + p = malloc (1024); + p = NULL; +} + diff --git a/memcheck/tests/simple_leak_xml.vgtest b/memcheck/tests/simple_leak_xml.vgtest new file mode 100644 index 000000000..9652b3276 --- /dev/null +++ b/memcheck/tests/simple_leak_xml.vgtest @@ -0,0 +1,4 @@ +prereq: which xmllint > /dev/null +prog: simple_leak +args: | xmllint --noout - +vgopts: --xml=yes --xml-fd=1 diff --git a/memcheck/tests/simple_reachable.c b/memcheck/tests/simple_reachable.c new file mode 100644 index 000000000..4fe1adaf4 --- /dev/null +++ b/memcheck/tests/simple_reachable.c @@ -0,0 +1,9 @@ +#include + +static void *p; + +int main () +{ + p = malloc (1024); +} + diff --git a/memcheck/tests/simple_reachable_xml.vgtest b/memcheck/tests/simple_reachable_xml.vgtest new file mode 100644 index 000000000..a64cb2ac5 --- /dev/null +++ b/memcheck/tests/simple_reachable_xml.vgtest @@ -0,0 +1,4 @@ +prereq: which xmllint > /dev/null +prog: simple_reachable +args: | xmllint --noout - +vgopts: --xml=yes --xml-fd=1 diff --git a/memcheck/tests/xmas_tree.cpp b/memcheck/tests/xmas_tree.cpp new file mode 100644 index 000000000..680833b46 --- /dev/null +++ b/memcheck/tests/xmas_tree.cpp @@ -0,0 +1,90 @@ +#include +#include +#include +#include +#include "../memcheck.h" + +struct Ae +{ + virtual ~Ae() + { + } +}; +struct Be +{ + virtual ~Be() + { + } +}; +struct Ce : public Ae, public Be +{ + virtual ~Ce() + { + } +}; + +void* reachable; +Be *interior; + +int suppress_me() +{ + int qqq; + if (qqq) + return 2; + return 1; +} + +int main() +{ + std::align_val_t misalign(static_cast(63U)); + std::align_val_t align(static_cast(64U)); + std::align_val_t align2(static_cast(32U)); + std::size_t size(32); + std::size_t badsize(42); + std::nothrow_t tag; + int count{0}; + + char *mem = static_cast(operator new[](size, tag)); + if (mem[31]) + ++count; + if (mem[32]) + ++count; + operator delete(mem, misalign, tag); + + mem = static_cast(operator new(size, align, tag)); + operator delete(mem, align2, tag); + + mem = static_cast(malloc(20)); + mem = static_cast(realloc(mem, 0)); + delete mem; + + mem = static_cast(operator new[](size)); + memcpy(mem+10, mem+5, 10); + operator delete[](mem, badsize); + + mem = static_cast(malloc(-1)); + + int fd{42}; + int bad; + fd += bad; + fd -= bad; + char* buf{nullptr}; + ++buf; + write(fd, buf, fd); + + int zzz; + VALGRIND_CHECK_MEM_IS_DEFINED(&zzz, 4); + + reachable = malloc(10); + mem = static_cast(malloc(20)); + + char* indirect = static_cast(malloc(30)); + memcpy(&mem[8], &indirect, sizeof(indirect)); + mem = nullptr; + + count += suppress_me(); + + interior = new Ce; // interior ptr. + + return count; +} diff --git a/memcheck/tests/xmas_tree_xml.supp b/memcheck/tests/xmas_tree_xml.supp new file mode 100644 index 000000000..264337160 --- /dev/null +++ b/memcheck/tests/xmas_tree_xml.supp @@ -0,0 +1,7 @@ +{ + Hello, suppression World! + Memcheck:Cond + fun:_Z11suppress_mev + fun:main +} + diff --git a/memcheck/tests/xmas_tree_xml.vgtest b/memcheck/tests/xmas_tree_xml.vgtest new file mode 100644 index 000000000..5061ad12a --- /dev/null +++ b/memcheck/tests/xmas_tree_xml.vgtest @@ -0,0 +1,4 @@ +prereq: which xmllint > /dev/null +prog: xmas_tree +args: | xmllint --noout - +vgopts: --xml=yes --xml-fd=1 --leak-check=full --suppressions=xmas_tree_xml.supp --leak-check-heuristics=multipleinheritance From 141c2c650efd0272b0317f45f3340f33e8a00fab Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 29 Jan 2026 13:45:21 +0100 Subject: [PATCH 280/502] Warning cleanup --- coregrind/m_syswrap/syswrap-freebsd.c | 14 ++++---------- coregrind/vgdb-invoker-freebsd.c | 6 +++--- memcheck/tests/amd64-freebsd/scalar_arg_check.c | 1 + memcheck/tests/freebsd/Makefile.am | 2 +- memcheck/tests/x86-freebsd/scalar_arg_check.c | 1 + 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index a69fb4fb2..20e46fb5e 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -6854,16 +6854,10 @@ PRE(sys_aio_writev) // by the members of the iocb->aio_iov array // FreeBSD headers #define define this to aio_iovcnt SizeT vec_count = (SizeT)iocb->aio_nbytes; -#if defined(__clang__) -#pragma clang diagnostic push - // yes, I know it is volatile -#pragma clang diagnostic ignored "-Wcast-qual" -#endif - struct vki_iovec* p_iovec = (struct vki_iovec*)iocb->aio_buf; -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - PRE_MEM_READ("aio_writev(iocb->aio_iov)", (Addr)p_iovec, vec_count*sizeof(struct vki_iovec)); + uintptr_t uint_aio_buf = (uintptr_t)iocb->aio_buf; + struct vki_iovec* p_iovec = (struct vki_iovec*)uint_aio_buf; + + PRE_MEM_READ("aio_writev(iocb->aio_iov)", uint_aio_buf, vec_count*sizeof(struct vki_iovec)); // and this to aio_iov if (ML_(safe_to_deref)(p_iovec, vec_count*sizeof(struct vki_iovec))) { diff --git a/coregrind/vgdb-invoker-freebsd.c b/coregrind/vgdb-invoker-freebsd.c index ec42ab23a..129d10a5c 100644 --- a/coregrind/vgdb-invoker-freebsd.c +++ b/coregrind/vgdb-invoker-freebsd.c @@ -203,10 +203,10 @@ Bool waitstopped (pid_t pid, int signal_expected, const char *msg) msg, signal_expected); p = waitpid(pid, &status, 0); /* PJF options was __WALL */ DEBUG(1, "after waitpid pid %d p %d status 0x%x %s\n", pid, p, - status, status_image (status)); + (unsigned)status, status_image (status)); if (p != pid) { ERROR(errno, "%s waitpid pid %d in waitstopped %d status 0x%x %s\n", - msg, pid, p, status, status_image (status)); + msg, pid, p, (unsigned)status, status_image (status)); return False; } @@ -468,7 +468,7 @@ Bool invoker_invoke_gdbserver (pid_t pid) e.g. http://sourceware.org/ml/gdb-patches/2009-11/msg00592.html */ *(long *)®_save.r_rax = *(int*)®_save.r_rax; DEBUG(1, "Sign extending %8.8lx to %8.8lx\n", - reg_mod.r_rax, reg_save.r_rax); + (unsigned long)reg_mod.r_rax, (unsigned long)reg_save.r_rax); } #elif defined(VGA_arm64) sp = reg_mod.sp; diff --git a/memcheck/tests/amd64-freebsd/scalar_arg_check.c b/memcheck/tests/amd64-freebsd/scalar_arg_check.c index cfa6d4ea0..0a847d64f 100644 --- a/memcheck/tests/amd64-freebsd/scalar_arg_check.c +++ b/memcheck/tests/amd64-freebsd/scalar_arg_check.c @@ -4,5 +4,6 @@ int main(void) { /* sendfile uses 7 args */ SY(SYS_sendfile, 101, 102, 103, 104, 105, 106, 107); + x0 = 0; } diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index ba17000c4..96c57e21e 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -249,7 +249,7 @@ openpty_LDFLAGS = ${AM_LDFLAGS} -lutil pdfork_pdkill_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_MAYBE_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@ realpathat_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@ @FLAG_W_NO_ALLOC_SIZE@ revoke_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@ -scalar_CFLAGS = ${AM_CFLAGS} -g @FLAG_W_NO_UNINITIALIZED@ +scalar_CFLAGS = ${AM_CFLAGS} -g @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@ scalar_abort2_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNINITIALIZED@ scalar_fork_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNUSED_VARIABLE@ scalar_pdfork_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_UNINITIALIZED@ diff --git a/memcheck/tests/x86-freebsd/scalar_arg_check.c b/memcheck/tests/x86-freebsd/scalar_arg_check.c index c608150f2..74cacd299 100644 --- a/memcheck/tests/x86-freebsd/scalar_arg_check.c +++ b/memcheck/tests/x86-freebsd/scalar_arg_check.c @@ -4,5 +4,6 @@ int main(void) { /* sendfile uses 8 args */ SY(SYS_sendfile, 101, 102, 103, 104, 105, 106, 107, 108); + x0 = 0; } From 7118dccfeac4708608cb7e61b73066c98b2c21dd Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 29 Jan 2026 20:32:05 +0100 Subject: [PATCH 281/502] More warning cleanup Fix a cast from volatile that has been bothering me for a while. Also a warning dur to some Darwin code that reuses a ULong for a memory address. That causes a warning on 32bits because pointers are 32bit but ULong is always 64bit. --- coregrind/m_debuginfo/image.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c index bbcffd511..7f9cfff64 100644 --- a/coregrind/m_debuginfo/image.c +++ b/coregrind/m_debuginfo/image.c @@ -94,7 +94,12 @@ typedef // The rest of these fields are only valid when using remote files // (that is, using a debuginfo server; hence when is_local==False) // Session ID allocated to us by the server. Cannot be zero. - ULong session_id; + // The memory union member is used by Darwin when reading the DiImage + // from memory when there is no local file and fd is -1. + union { + ULong session_id; + Addr memory; + }; } Source; @@ -588,7 +593,7 @@ static void set_CEnt ( const DiImage* img, UInt entNo, DiOffT off ) if (img->source.is_local) { // Simple: just read it if (img->source.fd == -1) { - VG_(memcpy)(&ce->data[0], ((const char *)img->source.session_id) + off, len); + VG_(memcpy)(&ce->data[0], ((const char *)img->source.memory) + off, len); } else { // PJF not quite so simple - see // https://bugs.kde.org/show_bug.cgi?id=480405 @@ -974,7 +979,7 @@ DiImage* ML_(img_from_memory)(Addr a, SizeT size, const HChar* fullpath) DiImage* img = ML_(dinfo_zalloc)("di.image.ML_iflf.1", sizeof(DiImage)); img->source.is_local = True; img->source.fd = -1; - img->source.session_id = a; // FIXME: hacky, but avoids a new variable + img->source.memory = a; img->size = size; img->real_size = size; img->ces_used = 0; From 48a4d84acb97aef98c7d5797c928141b257a8935 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 30 Jan 2026 21:21:57 +0100 Subject: [PATCH 282/502] Regtest: fix build for old compilers without aligned new/delete --- memcheck/tests/Makefile.am | 6 +++--- memcheck/tests/xmas_tree_xml.vgtest | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 6a6eee61d..89937a7cb 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -578,8 +578,7 @@ check_PROGRAMS = \ wmemcmp \ wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \ wrapmalloc wrapmallocso.so wrapmallocstatic \ - writev1 \ - xmas_tree + writev1 if !SOLARIS_SUN_STUDIO_AS # Sun Studio assembler fails on "IDENT too long" @@ -627,7 +626,8 @@ check_PROGRAMS += cxx17_aligned_new sized_aligned_new_delete_args \ new_aligned_delete_default \ sized_aligned_new_delete_misaligned1 \ sized_aligned_new_delete_misaligned2 \ - sized_aligned_new_delete_misaligned3 + sized_aligned_new_delete_misaligned3 \ + xmas_tree endif if HAVE_CLOSE_RANGE diff --git a/memcheck/tests/xmas_tree_xml.vgtest b/memcheck/tests/xmas_tree_xml.vgtest index 5061ad12a..673eae3a1 100644 --- a/memcheck/tests/xmas_tree_xml.vgtest +++ b/memcheck/tests/xmas_tree_xml.vgtest @@ -1,4 +1,4 @@ -prereq: which xmllint > /dev/null +prereq: test -e xmas_tree && which xmllint > /dev/null prog: xmas_tree args: | xmllint --noout - vgopts: --xml=yes --xml-fd=1 --leak-check=full --suppressions=xmas_tree_xml.supp --leak-check-heuristics=multipleinheritance From 5b3d177baa4c9b6535478aa230c4230fafc615a3 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 3 Feb 2026 13:56:24 +0100 Subject: [PATCH 283/502] Make configure.ac POSIX-friendly Reported by Thomas Klausner --- configure.ac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index bca2b1902..ea50189ab 100644 --- a/configure.ac +++ b/configure.ac @@ -155,13 +155,13 @@ case $host_os in [ --with-darwin-platform=PLAT Specify which Darwin platform we are compiling for (macOS, iOS, etc)], [ # TODO: some kind of case-insensitive check? - if test "x$withval" == "xmacOS"; then + if test "x$withval" = "xmacOS"; then darwin_platform="macosx" - elif test "x$withval" == "xmacos"; then + elif test "x$withval" = "xmacos"; then darwin_platform="macosx" - elif test "x$withval" == "xiOS"; then + elif test "x$withval" = "xiOS"; then darwin_platform="iphoneos" - elif test "x$withval" == "xios"; then + elif test "x$withval" = "xios"; then darwin_platform="iphoneos" else darwin_platform="$withval" From 76391e9987212f6e4d5c2574f56c60c690ce6ced Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 3 Feb 2026 19:28:46 +0100 Subject: [PATCH 284/502] Fix asserts in testcases close_range, bug514094 and readlinkat_self. These tests did an assert (errno = EFAULT) instead of an assert on errno == EFAULT. close_range was also using an valid flag 2 (CLOSE_RANGE_UNSHARE) instead of a bad one. --- memcheck/tests/close_range.c | 6 +++--- none/tests/bug514094.c | 2 +- none/tests/linux/readlinkat_self.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/memcheck/tests/close_range.c b/memcheck/tests/close_range.c index 5c21e7f42..93e840072 100644 --- a/memcheck/tests/close_range.c +++ b/memcheck/tests/close_range.c @@ -60,13 +60,13 @@ int main(void) errno = 0; // bad flag - close_range(fd1, fd3, 2); - assert(errno = EINVAL); + close_range(fd1, fd3, 231); + assert(errno == EINVAL); errno = 0; // wrong order close_range(fd3, fd1, 0); - assert(errno = EINVAL); + assert(errno == EINVAL); errno = 0; getrlimit(RLIMIT_NOFILE, &rl); diff --git a/none/tests/bug514094.c b/none/tests/bug514094.c index a62a6406b..6a45f0949 100644 --- a/none/tests/bug514094.c +++ b/none/tests/bug514094.c @@ -43,6 +43,6 @@ int main(int argc, char** argv) ret = readlink("/proc/self/exe", (char*)1, 100); #endif assert(ret == -1); - assert(errno = EFAULT); + assert(errno == EFAULT); } diff --git a/none/tests/linux/readlinkat_self.c b/none/tests/linux/readlinkat_self.c index 586581a0d..ded4c796b 100644 --- a/none/tests/linux/readlinkat_self.c +++ b/none/tests/linux/readlinkat_self.c @@ -29,6 +29,6 @@ int main(int argc, char** argv) ret = readlinkat(101, "/proc/self/exe", (char*)1, 100); assert(ret == -1); - assert(errno = EFAULT); + assert(errno == EFAULT); } From e197f26cd6e0be3fecd11ab363c1faf2872b7836 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Wed, 4 Feb 2026 13:10:18 +0100 Subject: [PATCH 285/502] regtest: add -std=c++17 for memcheck xmas_tree For middle-aged compilers that support C++17 but not by default. --- memcheck/tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 89937a7cb..88e995cde 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -978,4 +978,4 @@ writev1_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_STRINGOP_OVERFLOW@ @FLAG_W_NO_STRINGOP xml1_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_USE_AFTER_FREE@ xmas_tree_SOURCES = xmas_tree.cpp -xmas_tree_CXXFLAGS = ${AM_CXXFLAGS} @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_MISMATCHED_NEW_DELETE@ @FLAG_W_ALLOC_SIZE_LARGER_THAN@ +xmas_tree_CXXFLAGS = ${AM_CXXFLAGS} -std=c++17 @FLAG_W_NO_UNINITIALIZED@ @FLAG_W_NO_MISMATCHED_NEW_DELETE@ @FLAG_W_ALLOC_SIZE_LARGER_THAN@ From 1500915a838da9f7013e8721bf4bb02b0dc3072f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 4 Feb 2026 16:03:30 +0000 Subject: [PATCH 286/502] s390: The 2nd coming of disasm-test With the advent of objdump-based disassembly there is no need anymore to ensure that the disassembled insns out of valgrind match those from objdump. This is now correct by construction. In this patch the disasm-test functionality is changed to ensure that all expected specification exceptions as specified in the Principles of Operations are detected and no unexpected specification exceptions are found. For a given opcode 2 sets of testcases will now be generated: - one where every insn causes a specification exception This catches missed specification exceptions. - one where no insn causes a specification exception This catches unexpected specification exceptions. Changes: Remove command line options --generate and --verify. Those were useful in the early stages of development but not anymore. Remove command line options --show-spec-exc and --no-show-miscompares which are obsolete now. Replace command line option --check-prereq with --check-march=ARCH. Remove command line option --all-except-exrl. Add --exclude option which is more general. Add command line options --spec-exc and --no-spec-exc. Remove functions check_objdump and disasm_same. From verify_stats remove num_mismatch and num_verified members. Rename verify_stats --> test_stats and add num_generated member. Rename verify_disassembly --> verify_spec_exceptions. No longer write .vex file. Write .spec-exc file instead. Factor out functions run_opcode and choose_int_and_iterate. New functions asm_detects_spec_exc and insn_bytes_as_string. Opcode table in opcode.c: - Remove all constraints that do not cause a specification exception. - Change modelling of the "Rotate and ...." opcodes. Previously the i3, i4 and i5 fields are modelled as masks. That was a work-around in order to be able to specify interesting values and is no longer needed. Model those fields as integers instead. Update disasm-test.vgtest. Update README. Copyright year updated. --- none/tests/s390x/disasm-test/README | 96 ++-- .../s390x/disasm-test/disasm-test.post.exp | 10 +- .../s390x/disasm-test/disasm-test.vgtest | 20 +- none/tests/s390x/disasm-test/generate.c | 264 +++++++---- none/tests/s390x/disasm-test/main.c | 435 ++++++++++-------- none/tests/s390x/disasm-test/main.h | 14 +- none/tests/s390x/disasm-test/objdump.c | 2 +- none/tests/s390x/disasm-test/objdump.h | 4 +- none/tests/s390x/disasm-test/opcode.c | 100 ++-- none/tests/s390x/disasm-test/verify.c | 172 ++----- none/tests/s390x/disasm-test/vex.c | 18 +- none/tests/s390x/disasm-test/vex.h | 2 +- 12 files changed, 586 insertions(+), 551 deletions(-) diff --git a/none/tests/s390x/disasm-test/README b/none/tests/s390x/disasm-test/README index ef8904323..56a139125 100644 --- a/none/tests/s390x/disasm-test/README +++ b/none/tests/s390x/disasm-test/README @@ -1,8 +1,9 @@ disasm-test -The purpose of this program is to ensure that the disassembly as -generated by s390_disasm matches what objdump -d produces for any -given insn. As such the program runs as part of "make regtest". +The purpose of this program is to ensure that +(a) specification exceptions caused by invalid insn encodings as + described in Principles of Operations are detected +(b) no unexpected specification exceptions are detected How it works @@ -11,11 +12,9 @@ How it works 2) Compile the C file. 3) Run objdump -d on the object file and capture the result in a file. This file will be referred to as "the objdump file". -4) Read the objdump file, extract the insn bytes and disassembly. +4) Read the objdump file, extract the insn bytes. 5) Feed the so-extracted insn bytes into VEX's decode-and-irgen - machinery with disassembly (= tracing frontend) being enabled. -6) Intercept the so-disassembled text and compare it with the - disassembly in the objdump file. + machinery and observe whether specification exceptions are generated. Invocation @@ -26,19 +25,6 @@ disasm-test --all For all opcodes known to disasm-test, generate testcases and verify the disassembly. -disasm-test --all-except-exrl - As the option name suggests. This is how disasm-test is invoked - during regression testing. - -disasm-test --generate OPCODE_NAMEs - For each specified opcode, generate a C file with testcases, - compile it and create the objdump file. - Useful when adding new opcodes. - -disasm-test --verify OBJDUMP_FILEs - For each specified objdump file, verify that the disassembly via VEX - matches. Useful when adding new opcodes. - disasm-test --run OPCODE_NAMEs Combines --generate and --verify. Useful when adding new opcodes. @@ -52,6 +38,9 @@ Other non-debugging options Write out test generation summary. This option is only observed in combination with --all. +--exclude OPCODE_NAMEs + Do not generate testcases for the names opcodes. + --gcc=/path/to/gcc Specify which GCC to use. Default is: gcc on $PATH. @@ -65,14 +54,11 @@ Other non-debugging options Keep generated files: .c file with testcases, object file, objdump file, and .vex file ---show-exc-spec - Show generated insns that cause specification exceptions. - Because insns causing specification exceptions are typically accepted - by GCC and objdump an objdump file may contain them. But comparing - them is pointless. +--spec-exc + Generate only those testcases that cause specification exceptions. ---no-show-miscompares - Do not show miscomparing insns. +--no-spec-exc + Generate only those testcases that do not cause specification exceptions. Debugging options @@ -105,7 +91,8 @@ Why are we picking these values? Boundary cases are *always* interesting, as is 0. '1' is picked because it is odd and '2' is picked because it is even. -Note: if an opcode has more than one GPR (without specification) choose +FIXME: this is obsolete and the code should be changed accordingly +Note: if an opcode has more than one GPR (without constraint) choose different registers. We do this because we want to catch bugs due to mixed up registers. E.g. If the testcase is "brxh r1,r2,8" and s390_disasm produces @@ -116,58 +103,41 @@ need to be different. The same applies to ARs, FPRs and VRs. Adding a new opcode ------------------- See extensive documentation at the top of file opcode.c -Any opcode can be added. It is not necessary for the opcode to have -extended mnemonics. Integration into regression testing ----------------------------------- 1) Observe the exit code - disasm-test --all --no-show-miscompares - - There will be no output to stdout and stderr. If there are no - miscompares in the disassembly the exit code will be 0. Otherwise, - it will be 1. - -2) Observe stderr - disasm-test --all - Miscomparing disassembly will be written to stderr. Exit code as - described above. + There will be no output to stdout and stderr. If there all expected + specification exceptions and no unexpected ones are found the exit + code will be 0. Otherwise, it will be 1. -3) Observe testcase summary +2) Observe testcase summary - disasm-test --all --no-show-miscompares --summary + disasm-test --all --summary - Will write information about #testcases as well as failing ones - to stdout. Exit code as described above. + Will write information about #testcases and observed specification + exceptions to stdout. Exit code as described above. Status ------ -All opcodes which are implemented in valgrind are considered. +All opcodes described in 13th edition of "Principles of Operations" +which are implemented in valgrind are considered. NOTES ----- -(1) Testcase generation for the "Rotate and ..." family of opcodes needs - to be improved. Several interesting cases involving the T- and Z-bit - are not considered. - -(2) Different versions of objdump produce slightly different disassembly. - In 2.38 base register 0 is written as "%r0". In current binutils git - that register will be output as "0". - -(3) Generated testcases may cause specification exceptions. This - happens iff a constraint involves more than one opcode field. +(1) Not all constraints that cause specification exceptions can be + expressed in opcode.c. This happens iff a constraint involves more + than one opcode field. E.g.: for the VREP opcode the M4 value determines which I2 values - are allowed. This constraint cannot be expressed. However, the - disassembly for such insns is not compared. Use --show-spec-exc - to show those insns. + are allowed. This constraint cannot be expressed. -(4) In s390_decode_and_irgen the code peeks past the current insn: +(2) In s390_decode_and_irgen the code peeks past the current insn: /* If next instruction is execute, stop here */ if (dis_res->whatNext == Dis_Continue && @@ -180,9 +150,9 @@ NOTES Perhaps disable the peek-ahead when inside disasm-test by means of some global variable? Not pretty either, but explicit. -(5) For D20XB and D12XB operands add a test with B == X and B != 0 +(3) For D20XB and D12XB operands add a test with B == X and B != 0 Not exactly easy to do. -(6) For objdump-based disassembly the offset in the EXRL insn is expected - to denote a decodable insn. This is obviously not the case here and - therefore causing a miscompare. +(4) The offset in the EXRL insn is expected to denote a decodable insn. + This is obviously not the case here and therefore that opcode is + excluded. diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index 2e0d1b893..68c0b9adb 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,4 +1,6 @@ -Total: 148757 tests generated -Total: 148665 insns verified -Total: 0 disassembly mismatches -Total: 92 specification exceptions +Looking for missed specification exceptions +Total: 42131 tests generated +Total: 42131 specification exceptions +Looking for unexpected specification exceptions +Total: 153637 tests generated +Total: 0 specification exceptions diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index e45b61ceb..807250ba1 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -2,9 +2,25 @@ # We do not want disasm-test to be run under the auspices of valgrind. # Therefore the real test here is run in the "post" command. # -prereq: ./disasm-test --check-prereq +# Excluded opcodes: +# exrl - Offset is expected to denote a decodable insn; no such scaffolding +# kma - cannot express constraint that r3 must be different from r1 and r2 +# The following need to be fixed +# vmsl - m6 does not cause a spec exc. +# vgef - runs into an assert instead of spec. exc. +# vgeg - runs into an assert instead of spec. exc. +# vscef - runs into an assert instead of spec. exc. +# vsceg - runs into an assert instead of spec. exc. +# vstef - runs into an assert instead of spec. exc. +# popcnt - s390_insn_assert is wrong; just "may not operate correctly" +# srnmb - The compile-time checkable constraint cannot be expressed in opcode.c +# But the s390_insn_assert is wrong nevertheless because bits [0:55] are ignored. +# Need to mask d2 before checking (d2 & 0xff) +# vster - should be s390_insn_assert(m3 >= 1 && m3 <= 3); // 3 not 4 + +prereq: ./disasm-test --check-march=arch14 prog: /bin/true -post: ./disasm-test --all-except-exrl --summary +post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef popcnt srnmb vster --summary vgopts: -q stderr_filter: stderrB_filter: diff --git a/none/tests/s390x/disasm-test/generate.c b/none/tests/s390x/disasm-test/generate.c index abde6bfef..d42983ff8 100644 --- a/none/tests/s390x/disasm-test/generate.c +++ b/none/tests/s390x/disasm-test/generate.c @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -108,11 +108,6 @@ random_reg(opnd_t reg_kind, int r0_allowed) } -#if 0 -/* These functions are currently unused. But may become useful in - alternate test generation strategies that use random values instead - of hardwired interesting ones. */ - static unsigned random_uint(unsigned num_bits) { @@ -141,20 +136,6 @@ random_sint(unsigned num_bits) } -static unsigned -d12_value(void) -{ - return random_uint(12); -} - - -static int -d20_value(void) -{ - return random_sint(20); -} - - static unsigned uint_value(unsigned num_bits) { @@ -171,7 +152,7 @@ sint_value(unsigned num_bits) fatal("integer operand > 32 bits not supported\n"); return random_sint(num_bits); } -#endif + /* MASK is a bitvector. For an e.g. GPR rk the k'th bit will be set. The function returns a register number which has not been used and @@ -193,6 +174,20 @@ unique_reg(opnd_t reg_kind, unsigned regno, unsigned *mask) } +/* Is VALUE an allowed value for OPERAND (which has a constraint) */ +static int +is_allowed_value(long long value, const opnd *operand) +{ + int num_val = operand->allowed_values[0]; + + for (int i = 1; i <= num_val; ++i) + if (value == operand->allowed_values[i]) + return 1; + + return 0; +} + + /* Field */ typedef struct { const opnd *operand; // the operand to which this field belongs @@ -203,11 +198,15 @@ typedef struct { } field; static void choose_reg_and_iterate(FILE *, const opcode *, const opnd *, - field [], unsigned); + field [], unsigned, int); +static void choose_int_and_iterate(FILE *, const opcode *, const opnd *, + field [], unsigned, const long long *, + unsigned, int); /* Write out a single ASM statement for OPC. */ static void -write_asm_stmt(FILE *fp, const opcode *opc, const field fields[]) +write_asm_stmt(FILE *fp, const opcode *opc, const field fields[], + int gen_spec_exc_tests) { fprintf(fp, " asm volatile(\"%s ", opc->name); @@ -293,7 +292,8 @@ write_asm_stmt(FILE *fp, const opcode *opc, const field fields[]) assert(0); } } - fprintf(fp, "\");\n"); + fprintf(fp, "\");"); + fprintf(fp, " // %s spec. exception\n", gen_spec_exc_tests ? " " : "no"); ++num_tests; } @@ -302,11 +302,12 @@ write_asm_stmt(FILE *fp, const opcode *opc, const field fields[]) /* IX identifies the element of the FIELDS array to which a value will be assigned in this iteration. */ static void -iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix) +iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix, + int gen_spec_exc_tests) { /* All fields are assigned. Write out the asm stmt */ if (ix == opc->num_fields) { - write_asm_stmt(fp, opc, fields); + write_asm_stmt(fp, opc, fields, gen_spec_exc_tests); return; } @@ -318,19 +319,19 @@ iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix) if (operand->name[0] == 'b' || operand->name[0] == 'x') { /* Choose r0 */ f->assigned_value = 0; - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); /* Choose any GPR other than r0 */ f->assigned_value = random_reg(operand->kind, /* r0_allowed */ 0); - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } else { - choose_reg_and_iterate(fp, opc, operand, fields, ix); + choose_reg_and_iterate(fp, opc, operand, fields, ix, gen_spec_exc_tests); } break; case OPND_AR: case OPND_FPR: case OPND_VR: - choose_reg_and_iterate(fp, opc, operand, fields, ix); + choose_reg_and_iterate(fp, opc, operand, fields, ix, gen_spec_exc_tests); break; case OPND_D12B: @@ -343,7 +344,7 @@ iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix) for (int i = 0; i < sizeof values / sizeof *values; ++i) { f->assigned_value = values[i]; - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } } else if (f->is_length) { /* Choose these interesting values */ @@ -351,20 +352,20 @@ iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix) for (int i = 0; i < sizeof values / sizeof *values; ++i) { f->assigned_value = values[i]; - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } } else if (f->is_vr) { /* v0 is not special AFAICT */ f->assigned_value = random_reg(OPND_VR, /* r0_allowed */ 11); - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } else { /* Base or index register */ /* Choose r0 */ f->assigned_value = 0; - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); /* Choose any GPR other than r0 */ f->assigned_value = random_reg(OPND_GPR, /* r0_allowed */ 0); - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } break; @@ -378,60 +379,36 @@ iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix) for (int i = 0; i < sizeof values / sizeof *values; ++i) { f->assigned_value = values[i]; - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } } else { /* base or index register */ f->assigned_value = 0; - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); f->assigned_value = random_reg(OPND_GPR, /* r0_allowed */ 0); - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } break; case OPND_SINT: - case OPND_PCREL: - if (operand->allowed_values == NULL) { - /* No constraint: Choose these interesting values */ - const long long values[] = { - 0, 1, 2, -1, -2, (1LL << (operand->num_bits - 1)) - 1, - -(1LL << (operand->num_bits - 1)) - }; - - for (int i = 0; i < sizeof values / sizeof *values; ++i) { - f->assigned_value = values[i]; - iterate(fp, opc, fields, ix + 1); - } - } else { - /* Constraint. Choose only allowed values */ - unsigned num_val = operand->allowed_values[0]; - for (int i = 1; i <= num_val; ++i) { - f->assigned_value = operand->allowed_values[i]; - iterate(fp, opc, fields, ix + 1); - } - } + case OPND_PCREL: { + const long long values[] = { + 0, 1, 2, -1, -2, (1LL << (operand->num_bits - 1)) - 1, + -(1LL << (operand->num_bits - 1)) + }; + choose_int_and_iterate(fp, opc, operand, fields, ix, values, + sizeof values / sizeof *values, gen_spec_exc_tests); break; + } - case OPND_UINT: - if (operand->allowed_values == NULL) { - /* No constraint: Choose these interesting values */ - const long long values[] = { - 0, 1, 2, (1LL << operand->num_bits) - 1 - }; - - for (int i = 0; i < sizeof values / sizeof *values; ++i) { - f->assigned_value = values[i]; - iterate(fp, opc, fields, ix + 1); - } - } else { - /* Constraint. Choose only allowed values */ - unsigned num_val = operand->allowed_values[0]; - for (int i = 1; i <= num_val; ++i) { - f->assigned_value = operand->allowed_values[i]; - iterate(fp, opc, fields, ix + 1); - } - } + case OPND_UINT: { + const long long values[] = { + 0, 1, 2, (1LL << operand->num_bits) - 1 + }; + choose_int_and_iterate(fp, opc, operand, fields, ix, values, + sizeof values / sizeof *values, gen_spec_exc_tests); break; + } case OPND_MASK: if (operand->allowed_values == NULL) { @@ -439,14 +416,32 @@ iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix) unsigned maxval = (1u << operand->num_bits) - 1; for (int val = 0; val <= maxval; ++val) { f->assigned_value = val; - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } } else { - /* Constraint. Choose only allowed values */ - unsigned num_val = operand->allowed_values[0]; - for (int i = 1; i <= num_val; ++i) { - f->assigned_value = operand->allowed_values[i]; - iterate(fp, opc, fields, ix + 1); + if (gen_spec_exc_tests) { + /* Choose only disallowed values */ + if (asm_detects_spec_exc(operand)) { + /* Pick an allowed value to avoid an asm error message */ + f->assigned_value = operand->allowed_values[1]; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } else { + unsigned maxval = (1 << operand->num_bits) - 1; + /* Enumerate all possible disallowed values for the operand */ + for (int val = 0; val <= maxval; ++val) { + if (! is_allowed_value(val, operand)) { + f->assigned_value = val; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } + } + } + } else { + /* Constraint. Choose only allowed values */ + unsigned num_val = operand->allowed_values[0]; + for (int i = 1; i <= num_val; ++i) { + f->assigned_value = operand->allowed_values[i]; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } } } break; @@ -459,7 +454,7 @@ iterate(FILE *fp, const opcode *opc, field fields[], unsigned ix) static void -generate(FILE *fp, const opcode *opc) +generate(FILE *fp, const opcode *opc, int gen_spec_exc_tests) { /* Array of opcode fields to which we need to assign values. */ field fields[opc->num_fields]; @@ -531,12 +526,12 @@ generate(FILE *fp, const opcode *opc) } assert(ix == opc->num_fields); - iterate(fp, opc, fields, 0); + iterate(fp, opc, fields, 0, gen_spec_exc_tests); } unsigned -generate_tests(const opcode *opc) +generate_tests(const opcode *opc, int gen_spec_exc_tests) { srand(42); @@ -545,8 +540,8 @@ generate_tests(const opcode *opc) num_tests = 0; - char file[strlen(opc->name) + 3]; - sprintf(file, "%s.c", opc->name); + char file[strlen(opc->name) + 10]; // large enough + sprintf(file, "%s-%s.c", opc->name, gen_spec_exc_tests ? "se" : "no-se"); FILE *fp = fopen(file, "w"); if (fp == NULL) { @@ -558,18 +553,18 @@ generate_tests(const opcode *opc) fprintf(fp, "main(void)\n"); fprintf(fp, "{\n"); fprintf(fp, " asm volatile(\"%s\");\n", MARK); - generate(fp, opc); + generate(fp, opc, gen_spec_exc_tests); fprintf(fp, " asm volatile(\"%s\");\n", MARK); fprintf(fp, "}\n"); fclose(fp); if (verbose) - printf("...%u testcases generated for '%s'\n", num_tests, - opc->name); + printf("...%u testcases generated for '%s'\n", num_tests, opc->name); - run_cmd("%s -c %s %s.c", gcc, gcc_flags, opc->name); - run_cmd("%s --disassemble=%s %s.o > %s.dump", objdump, FUNCTION, - opc->name, opc->name); + const char *ext = gen_spec_exc_tests ? "se" : "no-se"; + run_cmd("%s -c %s %s", gcc, gcc_flags, file); + run_cmd("%s --disassemble=%s %s-%s.o > %s-%s.dump", objdump, FUNCTION, + opc->name, ext, opc->name, ext); return num_tests; } @@ -577,20 +572,87 @@ generate_tests(const opcode *opc) static void choose_reg_and_iterate(FILE *fp, const opcode *opc, const opnd *operand, - field fields[], unsigned ix) + field fields[], unsigned ix, int gen_spec_exc_tests) { field *f = fields + ix; if (operand->allowed_values == NULL) { /* No constraint. Pick register at random. */ f->assigned_value = random_reg(operand->kind, /* r0_allowed */ 1); - iterate(fp, opc, fields, ix + 1); + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); } else { - /* Constraint. Choose only allowed values */ - unsigned num_val = operand->allowed_values[0]; - for (int i = 1; i <= num_val; ++i) { - f->assigned_value = operand->allowed_values[i]; - iterate(fp, opc, fields, ix + 1); + if (gen_spec_exc_tests) { + /* Choose only disallowed values */ + if (asm_detects_spec_exc(operand)) { + /* Pick an allowed value to avoid an asm error message */ + f->assigned_value = operand->allowed_values[1]; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } else { + unsigned maxval = (1 << operand->num_bits) - 1; + /* Enumerate all possible disallowed values for the operand */ + for (int val = 0; val <= maxval; ++val) { + if (! is_allowed_value(val, operand)) { + f->assigned_value = val; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } + } + } + } else { + /* Choose only allowed values */ + unsigned num_val = operand->allowed_values[0]; + for (int i = 1; i <= num_val; ++i) { + f->assigned_value = operand->allowed_values[i]; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } + } + } +} + + +static void +choose_int_and_iterate(FILE *fp, const opcode *opc, const opnd *operand, + field fields[], unsigned ix, const long long *values, + unsigned num_values, int gen_spec_exc_tests) +{ + field *f = fields + ix; + + if (operand->allowed_values == NULL) { + /* No constraint: Choose the passed-in interesting values */ + for (int i = 0; i < num_values; ++i) { + f->assigned_value = values[i]; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } + } else { + if (gen_spec_exc_tests) { + /* Choose only disallowed values */ + if (operand->num_bits <= 4) { + unsigned maxval = (1 << operand->num_bits) - 1; + /* Enumerate all possible disallowed values for the operand */ + for (int val = 0; val <= maxval; ++val) { + if (! is_allowed_value(val, operand)) { + f->assigned_value = val; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } + } + } else { + /* Choose 4 random values */ + for (int count = 0; count < 4; ) { + long long val = + operand->is_unsigned ? uint_value(operand->num_bits) + : sint_value(operand->num_bits); + if (is_allowed_value(val, operand)) continue; + ++count; + f->assigned_value = val; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } + } + } else { + /* Choose only allowed values */ + unsigned num_val = operand->allowed_values[0]; + for (int i = 1; i <= num_val; ++i) { + f->assigned_value = operand->allowed_values[i]; + iterate(fp, opc, fields, ix + 1, gen_spec_exc_tests); + } } } } diff --git a/none/tests/s390x/disasm-test/main.c b/none/tests/s390x/disasm-test/main.c index 6d8f8353b..286c9ef40 100644 --- a/none/tests/s390x/disasm-test/main.c +++ b/none/tests/s390x/disasm-test/main.c @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -25,7 +25,7 @@ #include // NULL #include // exit, malloc #include // vfprintf -#include // isdigit +#include // isalpha #include // va_list #include // strchr #include // assert @@ -33,61 +33,63 @@ #include "vex.h" // vex_init #include "main.h" -int verbose, debug, show_spec_exc, show_miscompares; +int verbose, debug; const char *gcc = "gcc"; // path to GCC const char *objdump = "objdump"; // path to objdump const char *gcc_flags = "-march=arch14"; -#define MIN_OBJDUMP_VERSION 2044000 /* 2.44 */ - #define CHECK_CLO(x, s) (strncmp(x, s, sizeof s - 1) == 0) static const char usage[] = "Usage:\n\n" - "disasm-test --generate OPCODES\n" - " Generate testcases for the given opcodes and prepare objdump files.\n\n" - "disasm-test --verify FILES\n" - " Read specified objdump files and compare with VEX disassembly.\n\n" "disasm-test --run OPCODES\n" - " Generate testcases for the given opcodes and compare the disassembly.\n\n" + " Generate testcases for the given opcodes and check for missed and unexpected specification exceptions.\n\n" "disasm-test --all\n" - " For all opcodes generate testcases and compare the disassembly.\n\n" + " For all opcodes generate testcases and check for missed and unexpected specification exceptions.\n\n" "disasm-test --unit-test\n" " Run unit tests. All other command line options are ignored.\n\n" "Additional options:\n" " --verbose\n" " --debug\n" + " --spec-exc - Only generate testcases causing spec. exceptions\n" + " --no-spec-exc - Do not generate testcases causing spec. exceptions\n" + " --exclude OPCODES - Do not generate testcases for named opcodes\n" " --gcc=/path/to/gcc\n" " --gcc-flags=FLAGS\n" " --objdump=/path/to/objdump\n" " --keep-temp - Do not remove temporary files\n" " --summary - Output test generation summary (with --all)\n" " --unit-test - Run unit tests\n" - " --show-spec-exc - Show insns causing specification exceptions\n" - " --no-show-miscompares - Do not show disassembly miscompares\n" - " --check-prereq - Check prerequisites (e.g. objdump version)\n" + " --check-march=ARCH - Check whether GCC supports -march=ARCH\n" ; -static void remove_temp_files(const char *); +static int check_march_level(const char *); +static void remove_temp_files(const char *, int); static int opcode_has_errors(const opcode *); -static int check_objdump(void); +static int is_excluded_opcode(const opcode *); +static int skip_opcode(const opcode *, int); +static test_stats run_opcode(opcode *, int); static int keep_temp = 0; static int summary = 0; +static const char **excluded_opcodes; +static unsigned num_excluded_opcodes; +#define GEN_SPEC_EXC 1 +#define GEN_NO_SPEC_EXC 2 -/* Return code: 0 no disassembly mismatches - Return code: 1 at least one disassembly mismatch - Specification exceptions do not influence the return code. */ +/* Return code: 0 No missed or unexpected specification exceptions + Return code: 1 False missed and/or unexpected specification exceptions found */ int main(int argc, char *argv[]) { - int all = 0, verify = 0, generate = 0, unit_test = 0, all_except_exrl = 0; - int num_clargs = 0; - int run = 0, check_prereq = 0; - const char *clargs[argc]; + int all = 0, unit_test = 0, run = 0; + int num_to_run = 0, check_march = 0; + int mode = 0; + const char *to_run[argc]; + const char *arch; assert(sizeof(long long) == 8); @@ -95,39 +97,29 @@ main(int argc, char *argv[]) setlinebuf(stdout); setlinebuf(stderr); - show_miscompares = 1; - /* Collect options and arguments */ for (int i = 1; i < argc; ++i) { const char *clo = argv[i]; - if (CHECK_CLO(clo, "--verify")) { - verify = 1; - } else if (CHECK_CLO(clo, "--generate")) { - generate = 1; - } else if (CHECK_CLO(clo, "--all-except-exrl")) { - all = 1; - all_except_exrl = 1; - } else if (CHECK_CLO(clo, "--all")) { + if (CHECK_CLO(clo, "--all")) { all = 1; } else if (CHECK_CLO(clo, "--verbose")) { verbose = 1; } else if (CHECK_CLO(clo, "--debug")) { debug = 1; + } else if (CHECK_CLO(clo, "--spec-exc")) { + mode |= GEN_SPEC_EXC; + } else if (CHECK_CLO(clo, "--no-spec-exc")) { + mode |= GEN_NO_SPEC_EXC; } else if (CHECK_CLO(clo, "--summary")) { summary = 1; } else if (CHECK_CLO(clo, "--unit-test")) { unit_test = 1; - } else if (CHECK_CLO(clo, "--show-spec-exc")) { - show_spec_exc = 1; - } else if (CHECK_CLO(clo, "--no-show-miscompares")) { - show_miscompares = 0; } else if (CHECK_CLO(clo, "--keep-temp")) { keep_temp = 1; - } else if (CHECK_CLO(clo, "--run")) { - run = 1; - } else if (CHECK_CLO(clo, "--check-prereq")) { - check_prereq = 1; + } else if (CHECK_CLO(clo, "--check-march=")) { + check_march = 1; + arch = strchr(clo, '=') + 1; } else if (CHECK_CLO(clo, "--help")) { printf("%s\n", usage); return 0; @@ -137,154 +129,273 @@ main(int argc, char *argv[]) gcc_flags = strchr(clo, '=') + 1; } else if (CHECK_CLO(clo, "--objdump=")) { objdump = strchr(clo, '=') + 1; + } else if (CHECK_CLO(clo, "--run")) { + run = 1; + num_to_run = 0; + int j; + for (j = i + 1; j < argc; ++j) { + if (! isalpha(argv[j][0])) + break; + if (get_opcode_by_name(argv[j]) == NULL) + error("'%s' is not a recognised opcode\n", argv[j]); + else + to_run[num_to_run++] = argv[j]; + } + if (num_to_run == 0) + error("Missing opcode(s) for --run\n"); + i = j - 1; + } else if (CHECK_CLO(clo, "--exclude")) { + num_excluded_opcodes = 0; + excluded_opcodes = mallock(argc * sizeof(char *)); + int j; + for (j = i + 1; j < argc; ++j) { + if (argv[j][0] == '-') + break; + excluded_opcodes[num_excluded_opcodes++] = argv[j]; + } + if (num_excluded_opcodes == 0) + error("Missing opcode(s) for --exclude\n"); + i = j - 1; } else { if (strncmp(clo, "--", 2) == 0) fatal("Invalid command line option '%s'\n", clo); - clargs[num_clargs++] = clo; + else + fatal("Excess arguments on command line\n"); } } - if (check_prereq) - return check_objdump(); + if (check_march) + return check_march_level(arch); /* Check consistency of command line options */ - if (verify + generate + run + all + unit_test == 0) - fatal("One of --verify, --generate, --run, --all, or --unit-test " - "is required\n"); - if (verify + generate + run + all + unit_test != 1) - fatal("At most one of --verify, --generate, --run, --all, or " - " --unit-test can be given\n"); + if (run + all + unit_test == 0) + fatal("One of --run, --all, or --unit-test is required\n"); + if (run + all + unit_test != 1) + fatal("At most one of --run, --all, or --unit-test can be given\n"); + + /* Nothing specified: look for both false positives and false negatives */ + if (mode == 0) + mode = GEN_SPEC_EXC | GEN_NO_SPEC_EXC; vex_init(); - if (generate) { - if (num_clargs == 0) - fatal("Missing opcode name[s]\n"); + if (run) { + int rc = 0; + + if (mode & GEN_SPEC_EXC) { + unsigned num_tests = 0, num_spec_exc = 0; + if (verbose) + printf("Looking for missed specification exceptions\n"); - for (int i = 0; i < num_clargs; ++i) { - const char *name = clargs[i]; + for (int i = 0; i < num_to_run; ++i) { + const char *name = to_run[i]; - opcode *opc = get_opcode_by_name(name); + opcode *opc = get_opcode_by_name(name); // never NULL - if (opc == NULL) { - error("'%s' is not a recognised opcode\n", name); - } else if (opcode_has_errors(opc)) { - error("Opcode '%s' ignored due to syntax errors\n", name); - } else { - generate_tests(opc); - release_opcode(opc); + test_stats stats = run_opcode(opc, /* gen-spec-exc-tests */ 1); + num_tests += stats.num_generated; + num_spec_exc += stats.num_spec_exc; } + rc += num_tests != num_spec_exc; } - return 0; - } + if (mode & GEN_NO_SPEC_EXC) { + unsigned num_tests = 0, num_spec_exc = 0; + if (verbose) + printf("Looking for unexpected specification exceptions\n"); - if (verify) { - if (num_clargs == 0) - fatal("Missing file name[s]\n"); + for (int i = 0; i < num_to_run; ++i) { + const char *name = to_run[i]; - int num_mismatch = 0; + opcode *opc = get_opcode_by_name(name); // never NULL - for (int i = 0; i < num_clargs; ++i) { - verify_stats stats = verify_disassembly(clargs[i]); - num_mismatch += stats.num_mismatch; + test_stats stats = run_opcode(opc, /* gen-spec-exc-tests */ 0); + num_tests += stats.num_generated; + num_spec_exc += stats.num_spec_exc; + } + rc += num_spec_exc != 0; } - return num_mismatch != 0; + return rc; } - if (run) { - if (num_clargs == 0) - fatal("Missing opcode name[s]\n"); - - unsigned num_mismatch = 0; - - for (int i = 0; i < num_clargs; ++i) { - const char *name = clargs[i]; - - opcode *opc = get_opcode_by_name(name); + if (all) { + int rc = 0; + + if (mode & GEN_SPEC_EXC) { + unsigned num_tests = 0, num_spec_exc = 0; + if (verbose || summary) + printf("Looking for missed specification exceptions\n"); + for (int i = 0; i < num_opcodes; ++i) { + opcode *opc = get_opcode_by_index(i); // never NULL + + test_stats stats = run_opcode(opc, /* gen-spec-exc-tests */ 1); + num_tests += stats.num_generated; + num_spec_exc += stats.num_spec_exc; + } + if (verbose || summary) { + printf("Total: %6u tests generated\n", num_tests); + printf("Total: %6u specification exceptions\n", num_spec_exc); + } + rc += num_tests != num_spec_exc; + } + if (mode & GEN_NO_SPEC_EXC) { + unsigned num_tests = 0, num_spec_exc = 0; + if (verbose || summary) + printf("Looking for unexpected specification exceptions\n"); + for (int i = 0; i < num_opcodes; ++i) { + opcode *opc = get_opcode_by_index(i); // never NULL + + test_stats stats = run_opcode(opc, /* gen-spec-exc-tests */ 0); + num_tests += stats.num_generated; + num_spec_exc += stats.num_spec_exc; + } + if (verbose || summary) { + printf("Total: %6u tests generated\n", num_tests); + printf("Total: %6u specification exceptions\n", num_spec_exc); + } + rc += num_spec_exc != 0; + } + return rc != 0; + } - if (opc == NULL) { - error("'%s' is not a recognised opcode\n", name); - } else if (opcode_has_errors(opc)) { - error("Opcode '%s' ignored due to syntax errors\n", name); - } else { - generate_tests(opc); + if (unit_test) + run_unit_tests(); - char file[strlen(name) + 10]; // large enough - sprintf(file, "%s.dump", name); + return 0; +} - verify_stats stats = verify_disassembly(file); - num_mismatch += stats.num_mismatch; - if (! keep_temp) - remove_temp_files(name); - release_opcode(opc); - } - } - return num_mismatch != 0; +static test_stats +run_opcode(opcode *opc, int gen_spec_exc_tests) +{ + test_stats stats = { 0, 0 }; // return value + + if (opcode_has_errors(opc)) { + error("Opcode '%s' ignored due to syntax errors\n", opc->name); + } else if (skip_opcode(opc, gen_spec_exc_tests)) { + if (verbose) + printf("Opcode '%s' skipped\n", opc->name); + } else if (is_excluded_opcode(opc)) { + if (verbose) + printf("Opcode '%s' excluded via command line\n", opc->name); + } else { + unsigned num_generated = generate_tests(opc, gen_spec_exc_tests); + + stats = verify_spec_exceptions(opc, gen_spec_exc_tests); + stats.num_generated = num_generated; + + if (! keep_temp) + remove_temp_files(opc->name, gen_spec_exc_tests); + release_opcode(opc); } + return stats; +} - if (all) { - if (num_clargs != 0) - fatal("Excess arguments on command line\n"); - unsigned num_tests, num_verified, num_mismatch, num_spec_exc; - num_tests = num_verified = num_mismatch = num_spec_exc = 0; +/* The GNU assembler detects certain insns that would cause a + specification exception, namely: + - an invalid register identifying a GPR pair is used + - an invalid register identifying a FPR pair is used + We do not want the assembler to complain and therefore need + to construct testcases accordingly. */ +int +asm_detects_spec_exc(const opnd *operand) +{ + assert(operand->allowed_values); - for (int i = 0; i < num_opcodes; ++i) { - opcode *opc = get_opcode_by_index(i); // never NULL + if (operand->kind == OPND_GPR) { + /* Check for constraint on a GPR pair. */ + int expected[8] = { 0,2,4,6,8,10,12,14 }; + if (operand->allowed_values[0] != 8) return 0; - if (all_except_exrl && strcmp(opc->name, "exrl") == 0) - continue; + for (int i = 1; i <= 8; ++i) { + if (operand->allowed_values[i] != expected[i - 1]) + return 0; + } + return 1; + } - if (opcode_has_errors(opc)) { - error("Opcode '%s' ignored due to syntax errors\n", - opc->name); - continue; - } - num_tests += generate_tests(opc); + if (operand->kind == OPND_FPR) { + /* Check for constraint on an FPR pair. */ + int expected[8] = { 0,1,4,5,8,9,12,13 }; + if (operand->allowed_values[0] != 8) return 0; - char file[strlen(opc->name) + 10]; - sprintf(file, "%s.dump", opc->name); + for (int i = 1; i <= 8; ++i) { + if (operand->allowed_values[i] != expected[i - 1]) + return 0; + } + return 1; + } - verify_stats stats = verify_disassembly(file); + return 0; +} - num_verified += stats.num_verified; - num_mismatch += stats.num_mismatch; - num_spec_exc += stats.num_spec_exc; - if (! keep_temp) - remove_temp_files(opc->name); - release_opcode(opc); - } - if (verbose || summary) { - printf("Total: %6u tests generated\n", num_tests); - printf("Total: %6u insns verified\n", num_verified); - printf("Total: %6u disassembly mismatches\n", num_mismatch); - printf("Total: %6u specification exceptions\n", num_spec_exc); +static int +skip_opcode(const opcode *opc, int gen_spec_exc_tests) +{ + if (gen_spec_exc_tests) { + /* Looking for false negatives. I.e. insns that cause spec. exception. + That means: + a) opcode must have at least one constraint (necessary condition) + b) at least one of those constraints is such that a constraint + violation is not detected by the assembler (sufficient condition) + */ + for (int i = 0; i < opc->num_opnds; ++i) { + const opnd *operand = opc->opnds + i; + + if (operand->allowed_values) + if (! asm_detects_spec_exc(operand)) + return 0; } - return num_mismatch != 0; + return 1; + } else { + /* Looking for false positives. I.e. opcodes that should not cause + a spec. exception. That is: + a) opcodes without constraints + b) opcodes with satisfied constraints */ + return 0; } +} - if (unit_test) - run_unit_tests(); - return 0; +static int +check_march_level(const char *arch) +{ + const char *cmd = "%s -c -march=%s /dev/null 2> /dev/null"; + char buf[strlen(gcc) + strlen(cmd) + strlen(arch) + 10]; + sprintf(buf, cmd, gcc, arch); + + int rc = system(buf); + return rc == 0 ? 0 : 1; } static void -remove_temp_files(const char *op) +remove_temp_files(const char *op, int gen_spec_exc_tests) { - char file[strlen(op) + 10]; // large enough - static const char *suffix[] = { ".c", ".o", ".dump", ".vex" }; + char file[strlen(op) + 20]; // large enough + static const char *suffix[] = { ".c", ".o", ".dump", ".spec-exc" }; for (int i = 0; i < sizeof suffix / sizeof *suffix; ++i) { - sprintf(file, "%s%s", op, suffix[i]); + sprintf(file, "%s-%s%s", op, gen_spec_exc_tests ? "se" : "no-se", + suffix[i]); unlink(file); } } +static int +is_excluded_opcode(const opcode *opc) +{ + if (excluded_opcodes) { + for (int i = 0; i < num_excluded_opcodes; ++i) + if (strcmp(opc->name, excluded_opcodes[i]) == 0) + return 1; + } + return 0; +} + + /* A few convenience utilities */ void error(const char *fmt, ...) @@ -349,53 +460,3 @@ opcode_has_errors(const opcode *opc) } return 0; } - - -/* Objdump version 2.44 or later is required, Return 0, if that's - the case. */ -static int -check_objdump(void) -{ - unsigned need = strlen(objdump) + 3 + 1; - char *cmd = mallock(need); - - sprintf(cmd, "%s -V", objdump); - FILE *fp = popen(cmd, "r"); - - /* The version number is expected on the first line and its - format ought to be one of X or X.Y or X.Y.Z where X,Y,Z are - positive integers. */ - int c, rc = 1; - while ((c = fgetc(fp)) != EOF) { - if (c == '\n') break; - if (! isdigit(c)) continue; - - /* Version number is expected to be X or X.Y or X.Y.Z */ - char buf[32]; // assumed large enough - int ix = 0; - do { - buf[ix++] = c; - c = fgetc(fp); - } while (isdigit(c) || c == '.'); - buf[ix] = '\0'; - - unsigned version = 0, v1, v2, v3; - if (sscanf(buf, "%u.%u.%u", &v1,&v2,&v3) == 3) { - version = v1*1000000 + v2*1000 + v3; - } else if (sscanf(buf, "%u.%u", &v1,&v2) == 2) { - version = v1*1000000 + v2*1000; - } else if (sscanf(buf, "%u", &v1) == 1) { - version = v1*1000000; - } else { - error("Could not determine objdump version\n"); - break; - } - if (version >= MIN_OBJDUMP_VERSION) - rc = 0; - break; - } - pclose(fp); - free(cmd); - - return rc; -} diff --git a/none/tests/s390x/disasm-test/main.h b/none/tests/s390x/disasm-test/main.h index cdf75d241..155bc0cb4 100644 --- a/none/tests/s390x/disasm-test/main.h +++ b/none/tests/s390x/disasm-test/main.h @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -66,22 +66,22 @@ typedef struct { } opcode; typedef struct { - unsigned num_verified; - unsigned num_mismatch; + unsigned num_generated; unsigned num_spec_exc; -} verify_stats; +} test_stats; __attribute__((format(printf, 1, 2))) void error(const char *, ...); __attribute__((noreturn)) __attribute__((format(printf, 1, 2))) void fatal(const char *, ...); -verify_stats verify_disassembly(const char *); -unsigned generate_tests(const opcode *); +test_stats verify_spec_exceptions(const opcode *, int); +unsigned generate_tests(const opcode *, int); opcode *get_opcode_by_name(const char *); opcode *get_opcode_by_index(unsigned); void release_opcode(opcode *); void run_unit_tests(void); +int asm_detects_spec_exc(const opnd *); void *mallock(unsigned); char *strsave(const char *); @@ -89,8 +89,6 @@ char *strnsave(const char *, unsigned); extern int verbose; extern int debug; -extern int show_spec_exc; -extern int show_miscompares; extern unsigned num_opcodes; extern const char *gcc; extern const char *gcc_flags; diff --git a/none/tests/s390x/disasm-test/objdump.c b/none/tests/s390x/disasm-test/objdump.c index cabb0af7c..40208ab5d 100644 --- a/none/tests/s390x/disasm-test/objdump.c +++ b/none/tests/s390x/disasm-test/objdump.c @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/none/tests/s390x/disasm-test/objdump.h b/none/tests/s390x/disasm-test/objdump.h index ac6f72e27..33c601cd1 100644 --- a/none/tests/s390x/disasm-test/objdump.h +++ b/none/tests/s390x/disasm-test/objdump.h @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -26,7 +26,7 @@ #define OBJDUMP_H /* An opcode which marks the begin and end of a sequence of insns - in a testcase whose disassembly should be verified. */ + in a testcase. */ #define MARK "csch" /* Name of the C function containing the generated insns. */ diff --git a/none/tests/s390x/disasm-test/opcode.c b/none/tests/s390x/disasm-test/opcode.c index 12af90f6a..cb863cfa5 100644 --- a/none/tests/s390x/disasm-test/opcode.c +++ b/none/tests/s390x/disasm-test/opcode.c @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -71,12 +71,14 @@ If a set of allowed values is specified for an operand this implies that any other value would cause a specification exception. - UNLESS otherwise noted. */ -/* List of for hardware facilities. +/* List of hardware facilities. The abbreviated name appears as structured comment in below opcode list to - indicate that the opcode is only available when the facility is installed. + indicate that + a) the opcode is only available when the facility is installed OR + b) the opcode semantics depend on the presence of the facility. E.g. a + certain opcode field is ignored when the facility is not present. dflt --> deflate-conversion facility dfp --> decimal floating point facility @@ -396,16 +398,16 @@ static const char *opcodes[] = { "cvdy r1,d20(x2,b2)", // cvdg not implemented - "cu24 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3:{0,1}", // extr3 no spec exc for m3 + "cu24 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3", // extr3 - "cu21 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3:{0,1}", // no spec exc for m3 + "cu21 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3", // extr3 - "cu42 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14}", // extr3 - "cu41 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14}", // extr3 + "cu42 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14}", // extr3 + "cu41 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14}", // extr3 - "cu12 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3:{0,1}", // no spec exc for m3 + "cu12 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3", // extr3 - "cu14 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3:{0,1}", // extr3 no spec exc for m3 + "cu14 r1:{0,2,4,6,8,10,12,14},r2:{0,2,4,6,8,10,12,14},m3", // extr3 "cpya a1,a2", @@ -692,7 +694,7 @@ static const char *opcodes[] = { "nnrk r1,r2,r3", // mi3 "nngrk r1,r2,r3", // mi3 - "niai i1:u4{0..3},i2:u4{0..3}", // exhi no spec exc for i1,i2 + "niai i1:u4,i2:u4", // exhi // ntstg not implemented @@ -730,12 +732,12 @@ static const char *opcodes[] = { "pcc", // msa4 // plo not implemented - "ppa r1,r2,m3:{1,15}", // ppa no spec exception for m3 + "ppa r1,r2,m3", // ppa "ppno r1,r2", // msa5 "prno r1,r2", // msa5 - "popcnt r1,r2,m3:{0,8}", // popc no spec exception for m3 + "popcnt r1,r2,m3", // popc "pfd m1,d20(x2,b2)", // gie "pfdrl m1,ri2:s32", // gie @@ -743,29 +745,15 @@ static const char *opcodes[] = { "rll r1,r3,d20(b2)", "rllg r1,r3,d20(b2)", - // Rotate and .... opcodes require special handling - // - // For rosbg and friends - // - Bit #0 of i3 is the T-bit and bit #1 of i3 ought to be 0. - // - i5 is optional and will not be written when 0 - // - // For risbg and friends - // - Bit #0 of i4 is the Z-bit and bit #1 of i4 ought to be 0. - // - i5 is optional and will not be written when 0 - // - // This implies that we need to model i3, i4 and i5 as masks so - // we can manipulate their value when disassembling or suppress - // the mask altogether. Note that we limit the set of allowed values - // for those masks to avoid excessively large numbers of testcases. - "rnsbg r1,r2,m3:u8{0,1,2,63,128,129,191},m4:u6{0,1,2,63},m5:u6{0,1,2,63}", // gie - "rxsbg r1,r2,m3:u8{0,1,2,63,128,129,191},m4:u6{0,1,2,63},m5:u6{0,1,2,63}", // gie - "rosbg r1,r2,m3:u8{0,1,2,63,128,129,191},m4:u6{0,1,2,63},m5:u6{0,1,2,63}", // gie - - "risbg r1,r2,m3:u6{0,1,2,63},m4:u8{0,1,2,63,128,129,191},m5:u6{0,1,2,63}", // gie - "risbgn r1,r2,m3:u6{0,1,2,63},m4:u8{0,1,2,63,128,129,191},m5:u6{0,1,2,63}", // mi1 - - "risbhg r1,r2,m3:u5{0,1,2,31},m4:u8{0,1,2,31,128,129,159},m5:u6{0,1,2,63}", // hiwo - "risblg r1,r2,m3:u5{0,1,2,31},m4:u8{0,1,2,31,128,129,159},m5:u6{0,1,2,63}", // hiwo + "rnsbg r1,r2,i3:u8,i4:u6,i5:u6", // gie + "rxsbg r1,r2,i3:u8,i4:u6,i5:u6", // gie + "rosbg r1,r2,i3:u8,i4:u6,i5:u6", // gie + + "risbg r1,r2,i3:u6,i4:u8,i5:u6", // gie + "risbgn r1,r2,i3:u6,i4:u8,i5:u6", // mi1 + + "risbhg r1,r2,i3:u5,i4:u8,i5:u6", // hiwo + "risblg r1,r2,i3:u5,i4:u8,i5:u6", // hiwo "srst r1,r2", @@ -924,10 +912,10 @@ static const char *opcodes[] = { "tre r1:{0,2,4,6,8,10,12,14},r2", - "troo r1:{0,2,4,6,8,10,12,14},r2,m3:{0,1}", // extr2 no spec exception on m3 - "trot r1:{0,2,4,6,8,10,12,14},r2,m3:{0,1}", // extr2 no spec exception on m3 - "trto r1:{0,2,4,6,8,10,12,14},r2,m3:{0,1}", // extr2 no spec exception on m3 - "trtt r1:{0,2,4,6,8,10,12,14},r2,m3:{0,1}", // extr2 no spec exception on m3 + "troo r1:{0,2,4,6,8,10,12,14},r2,m3", // extr2 + "trot r1:{0,2,4,6,8,10,12,14},r2,m3", // extr2 + "trto r1:{0,2,4,6,8,10,12,14},r2,m3", // extr2 + "trtt r1:{0,2,4,6,8,10,12,14},r2,m3", // extr2 // unpk not implemented // unpka not implemented @@ -1203,7 +1191,7 @@ static const char *opcodes[] = { "vgeg v1,d12(v2,b2),m3:{0,1}", "vgbm v1,i2:u16", "vgm v1,i2:u8,i3:u8,m4:{0..3}", - "vl v1,d12(x2,b2),m3:{0,3,4}", // no spec. exc + "vl v1,d12(x2,b2),m3", "vlr v1,v2", "vlrep v1,d12(x2,b2),m3:{0..3}", "vlebrh v1,d12(x2,b2),m3:{0..7}", // vxe2 @@ -1233,11 +1221,11 @@ static const char *opcodes[] = { "vmrh v1,v2,v3,m4:{0..3}", "vmrl v1,v2,v3,m4:{0..3}", "vpk v1,v2,v3,m4:{1..3}", - "vpks v1,v2,v3,m4:{1..3},m5:{0,1}", // no spec. exception for m5 - "vpkls v1,v2,v3,m4:{1..3},m5:{0,1}", // no spec. exception for m5 + "vpks v1,v2,v3,m4:{1..3},m5", + "vpkls v1,v2,v3,m4:{1..3},m5", "vperm v1,v2,v3,v4", - "vpdi v1,v2,v3,m4:{0,1,4,5}", // no spec. exception for m4 -// "vrep v1,v3,i2:u16,m4:{0..3}", + "vpdi v1,v2,v3,m4", +// "vrep v1,v3,i2:u16,m4:{0..3}", // cannot express constraint "vrepi v1,i2:s16,m3:{0..3}", "vscef v1,d12(v2,b2),m3:{0..3}", "vsceg v1,d12(v2,b2),m3:{0,1}", @@ -1274,9 +1262,9 @@ static const char *opcodes[] = { "vcksm v1,v2,v3", "vec v1,v2,m3:{0..3}", "vecl v1,v2,m3:{0..3}", - "vceq v1,v2,v3,m4:{0..3},m5:{0,1}", // no spec. exception for m5 - "vch v1,v2,v3,m4:{0..3},m5:{0,1}", // no spec. exception for m5 - "vchl v1,v2,v3,m4:{0..3},m5:{0,1}", // no spec. exception for m5 + "vceq v1,v2,v3,m4:{0..3},m5", + "vch v1,v2,v3,m4:{0..3},m5", + "vchl v1,v2,v3,m4:{0..3},m5", "vclz v1,v2,m3:{0..3}", "vctz v1,v2,m3:{0..3}", "vx v1,v2,v3", @@ -1302,7 +1290,7 @@ static const char *opcodes[] = { "vmle v1,v2,v3,m4:{0..2}", "vmo v1,v2,v3,m4:{0..2}", "vmlo v1,v2,v3,m4:{0..2}", - "vmsl v1,v2,v3,v4,m5:{3},m6:{0,4,8,12}", // vxe no spec. exception for m6 + "vmsl v1,v2,v3,v4,m5:{3},m6", // vxe "vnn v1,v2,v3", // vxe "vno v1,v2,v3", "vnx v1,v2,v3", // vxe @@ -1320,8 +1308,8 @@ static const char *opcodes[] = { "vesrl v1,v3,d12(b2),m4:{0..3}", "vsl v1,v2,v3", "vslb v1,v2,v3", - "vsld v1,v2,v3,i4:u8{0..7}", // vxe2 spec exc. - "vsldb v1,v2,v3,i4:u8{0..15}", // no spec. exception - otherwise unpredictable + "vsld v1,v2,v3,i4:u8{0..7}", // vxe2 + "vsldb v1,v2,v3,i4:u8", "vsra v1,v2,v3", "vsrab v1,v2,v3", "vsrd v1,v2,v3,i4:u8{0..7}", // vxe2 @@ -1384,11 +1372,11 @@ static const char *opcodes[] = { // "nnpa", // cannot express constraint // nnpa // sortl not implemented - "vclfnh v1,v2,m3:{3},m4:{0}", // nnpa no spec exc. for m3, m4 but IEEE exc. - "vclfnl v1,v2,m3:{3},m4:{0}", // nnpa no spec exc. for m3, m4 but IEEE exc. - "vcrnf v1,v2,v3,m4:{0},m5:{2}", // nnpa no spec exc. for m4, m5 but IEEE exc. - "vcfn v1,v2,m3:{1},m4:{0}", // nnpa no spec exc. for m3, m4 but IEEE exc. - "vcnf v1,v2,m3:{0},m4:{1}", // nnpa no spec exc. for m3, m4 but IEEE exc. + "vclfnh v1,v2,m3,m4", // nnpa + "vclfnl v1,v2,m3,m4", // nnpa + "vcrnf v1,v2,v3,m4,m5", // nnpa + "vcfn v1,v2,m3,m4", // nnpa + "vcnf v1,v2,m3,m4", // nnpa }; unsigned num_opcodes = sizeof opcodes / sizeof *opcodes; diff --git a/none/tests/s390x/disasm-test/verify.c b/none/tests/s390x/disasm-test/verify.c index b80e270e3..d1686ccdc 100644 --- a/none/tests/s390x/disasm-test/verify.c +++ b/none/tests/s390x/disasm-test/verify.c @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -29,14 +29,30 @@ #include "main.h" // verbose #include "vex.h" // vex_disasm -static int disasm_same(const char *, const char *, unsigned); +/* Watch out: returned string is allocated in a static buffer which will + be overwritten in the next invocation. */ +static const char * +insn_bytes_as_string(const unsigned char *bytes, unsigned num_bytes) +{ + static char buf[4 + 1 + 4 + 1 + 4 + 1]; + + char *p = buf; + for (int j = 0; j < num_bytes; j += 2) + p += sprintf(p, "%02X%02X ", bytes[j], bytes[j + 1]); + *--p = '\0'; + + return buf; +} -/* Return number of disassembly mismatches. */ -verify_stats -verify_disassembly(const char *file) + +test_stats +verify_spec_exceptions(const opcode *opc, int gen_spec_exc_tests) { - verify_stats stats = { 0, 0, 0 }; // return value + test_stats stats = { 0, 0 }; // return value + + char file[strlen(opc->name) + 15]; // large enough + sprintf(file, "%s-%s.dump", opc->name, gen_spec_exc_tests ? "se" : "no-se"); objdump_file *ofile = read_objdump(file); if (ofile == NULL) @@ -45,139 +61,45 @@ verify_disassembly(const char *file) if (verbose) printf("...verifying %u insns in '%s'\n", ofile->num_lines, file); - const char *p = strchr(file, '.'); - char vex_file[strlen(file) + 5]; + char se_file[strlen(opc->name) + 15]; // large enough + sprintf(se_file, "%s-%s.spec-exc", opc->name, + gen_spec_exc_tests ? "se" : "no-se"); - if (p == NULL) { - sprintf(vex_file, "%s.vex", file); - } else { - int len = p - file; - strncpy(vex_file, file, len); - strcpy(vex_file + len, ".vex"); - } - FILE *fpvex = fopen(vex_file, "w"); - if (fpvex == NULL) - error("%s: fopen failed\n", vex_file); + FILE *fpse = fopen(se_file, "w"); + if (fpse == NULL) + error("%s: fopen failed\n", se_file); for (int i = 0; i < ofile->num_lines; ++i) { const objdump_line *oline = ofile->lines + i; int spec_exc = 0; const char *disassembly_from_vex = vex_disasm(oline->insn_bytes, &spec_exc); + const char *insn_bytes = + insn_bytes_as_string(oline->insn_bytes, oline->insn_len); - if (spec_exc) { - ++stats.num_spec_exc; - - if (show_spec_exc) { - fprintf(stderr, "*** specification exception for insn "); - for (int j = 0; j < oline->insn_len; ++j) - fprintf(stderr, "%02X", oline->insn_bytes[j]); - fprintf(stderr, " in %s\n", file); - } - /* Instructions causing specification exceptions are not - compared */ + if (disassembly_from_vex == NULL) { + error("Disasm failed for %s\n", insn_bytes); continue; } - if (disassembly_from_vex == NULL) - disassembly_from_vex = "MISSING disassembly from VEX"; - if (fpvex) - fprintf(fpvex, "%s\n", disassembly_from_vex); - - /* Compare disassembled insns */ - ++stats.num_verified; - if (! disasm_same(oline->disassembled_insn, disassembly_from_vex, - oline->address)) { - ++stats.num_mismatch; - if (show_miscompares) { - int n = fprintf(stderr, "*** mismatch VEX: |%s|", - disassembly_from_vex); - fprintf(stderr, "%*c", 50 - n, ' '); - fprintf(stderr, "objdump: |%s|\n", oline->disassembled_insn); - } + if (spec_exc) { + ++stats.num_spec_exc; + + if (fpse) + fprintf(fpse, "%s %s\n", insn_bytes, disassembly_from_vex); + if (! gen_spec_exc_tests) + error("Unexpected spec. exc. detected for %s %s\n", insn_bytes, + disassembly_from_vex); + } else { + if (gen_spec_exc_tests) + error("Spec. exc. not detected for %s %s\n", insn_bytes, + disassembly_from_vex); } } - if (fpvex) - fclose(fpvex); - release_objdump(ofile); - if (verbose) { - printf("...%u insns verified\n", stats.num_verified); - printf("...%u disassembly mismatches\n", stats.num_mismatch); - printf("...%u specification exceptions\n", stats.num_spec_exc); - } + if (fpse) + fclose(fpse); + release_objdump(ofile); return stats; } - - -/* Compare two disassembled insns ignoring white space. Return 1 if - equal. */ -static int -disasm_same(const char *from_objdump, const char *from_vex, - unsigned address) -{ - const char *p1 = from_objdump; - const char *p2 = from_vex; - - while (42) { - while (isspace(*p1)) - ++p1; - while (isspace(*p2)) - ++p2; - if (*p1 == '\0' && *p2 == '\0') - return 1; - if (*p1 == '\0' || *p2 == '\0') - return 0; - - if (*p1 == *p2) { - ++p1; - ++p2; - continue; - } - - /* Consider the case where the VEX disassembly has ".+integer" - or ".-integer" and the objdump disassembly has an hex address - possibly followed by a symbolic address, e.g. . */ - if (*p2++ != '.') return 0; - - long long offset_in_bytes = 0; - unsigned long long target_address = 0; - - while (isxdigit(*p1)) { - target_address *= 16; - if (isdigit(*p1)) - target_address += *p1 - '0'; - else { - int c = tolower(*p1); - if (c >= 'a' && c <= 'f') - target_address += 10 + c - 'a'; - else - return 0; // error - } - ++p1; - } - while (isspace(*p1)) - ++p1; - if (*p1 == '<') { - while (*p1++ != '>') - ; - } - - int is_negative = 0; - if (*p2 == '-') { - is_negative = 1; - ++p2; - } else if (*p2 == '+') - ++p2; - while (isdigit(*p2)) { - offset_in_bytes *= 10; - offset_in_bytes += *p2 - '0'; - ++p2; - } - if (is_negative) - offset_in_bytes *= -1; - - if (address + offset_in_bytes != target_address) return 0; - } -} diff --git a/none/tests/s390x/disasm-test/vex.c b/none/tests/s390x/disasm-test/vex.c index bb850b8eb..3e98aa3b6 100644 --- a/none/tests/s390x/disasm-test/vex.c +++ b/none/tests/s390x/disasm-test/vex.c @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -147,5 +147,21 @@ vex_disasm(const unsigned char *codebuf, int *spec_exc) *spec_exc = 1; } + if (last_vex_string) { + /* Compress a sequence of spaces with a single blank. */ + int space_seen = 0; + char *p, *q; + for (p = q = last_vex_string; *p; ++p) { + if (isspace(*p)) { + if (space_seen) continue; + space_seen = 1; + } else { + space_seen = 0; + } + *q++ = *p; + } + *q = '\0'; + } + return last_vex_string; } diff --git a/none/tests/s390x/disasm-test/vex.h b/none/tests/s390x/disasm-test/vex.h index 627c1e55e..da46fb808 100644 --- a/none/tests/s390x/disasm-test/vex.h +++ b/none/tests/s390x/disasm-test/vex.h @@ -4,7 +4,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2024-2025 Florian Krohm + Copyright (C) 2024-2026 Florian Krohm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as From 47eb47d22c4934812bb6a16124bf7d90f4dd29d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= Date: Fri, 30 Jan 2026 05:06:17 -0500 Subject: [PATCH 287/502] Add BLENDPS and PBLENDW support for x86 32 bit Add decode_sse4_blend_imm which allows to reuse BLENDPD decoder code for BLENDPS and PBLENDW. Moved math_BLENDPS_128, math_PBLENDW_128 and math_PBLENDVB_128 from VEX/priv/guest_amd64_toIR.c to VEX/priv/guest_generic_sse.h to be able to reuse existing amd64 code for x86 implementation. Moved test_BLENDPS and test_PBLENDW from none/tests/amd64/sse4-64.c to none/tests/sse4-common.h and updated the expected tests output to match the new implementation. Removed vassert(0) in VEX/priv/host_x86_defs.c in push_word_from_tags in order for test_PBLENDW to be able to pass. BZ: https://bugs.kde.org/show_bug.cgi?id=515265 --- NEWS | 1 + VEX/priv/guest_amd64_toIR.c | 66 --- VEX/priv/guest_generic_sse.h | 69 +++ VEX/priv/guest_x86_toIR.c | 105 ++-- VEX/priv/host_x86_defs.c | 1 - none/tests/amd64/sse4-64.c | 290 ---------- none/tests/sse4-common.h | 291 ++++++++++ none/tests/x86/sse4-x86.c | 2 + none/tests/x86/sse4-x86.stdout.exp | 832 +++++++++++++++++++++++++++++ 9 files changed, 1255 insertions(+), 402 deletions(-) diff --git a/NEWS b/NEWS index d907a32e4..81f154526 100644 --- a/NEWS +++ b/NEWS @@ -77,6 +77,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 514659 ltp 20250930 vs linux 6.18.3 doesn't build 514762 Many "Bad file descriptor" messages when using --track-fds=yes and -d on systems without /proc +515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c index 39a88b4e6..ff31ad4ee 100644 --- a/VEX/priv/guest_amd64_toIR.c +++ b/VEX/priv/guest_amd64_toIR.c @@ -11248,26 +11248,6 @@ static IRTemp math_BLENDPD_256 ( IRTemp sV, IRTemp dV, UInt imm8 ) return rV; } - -static IRTemp math_BLENDPS_128 ( IRTemp sV, IRTemp dV, UInt imm8 ) -{ - UShort imm8_perms[16] = { 0x0000, 0x000F, 0x00F0, 0x00FF, 0x0F00, - 0x0F0F, 0x0FF0, 0x0FFF, 0xF000, 0xF00F, - 0xF0F0, 0xF0FF, 0xFF00, 0xFF0F, 0xFFF0, - 0xFFFF }; - IRTemp imm8_mask = newTemp(Ity_V128); - assign( imm8_mask, mkV128( imm8_perms[ (imm8 & 15) ] ) ); - - IRTemp res = newTemp(Ity_V128); - assign ( res, binop( Iop_OrV128, - binop( Iop_AndV128, mkexpr(sV), - mkexpr(imm8_mask) ), - binop( Iop_AndV128, mkexpr(dV), - unop( Iop_NotV128, mkexpr(imm8_mask) ) ) ) ); - return res; -} - - static IRTemp math_BLENDPS_256 ( IRTemp sV, IRTemp dV, UInt imm8 ) { IRTemp sVhi = IRTemp_INVALID, sVlo = IRTemp_INVALID; @@ -11282,29 +11262,6 @@ static IRTemp math_BLENDPS_256 ( IRTemp sV, IRTemp dV, UInt imm8 ) } -static IRTemp math_PBLENDW_128 ( IRTemp sV, IRTemp dV, UInt imm8 ) -{ - /* Make w be a 16-bit version of imm8, formed by duplicating each - bit in imm8. */ - Int i; - UShort imm16 = 0; - for (i = 0; i < 8; i++) { - if (imm8 & (1 << i)) - imm16 |= (3 << (2*i)); - } - IRTemp imm16_mask = newTemp(Ity_V128); - assign( imm16_mask, mkV128( imm16 )); - - IRTemp res = newTemp(Ity_V128); - assign ( res, binop( Iop_OrV128, - binop( Iop_AndV128, mkexpr(sV), - mkexpr(imm16_mask) ), - binop( Iop_AndV128, mkexpr(dV), - unop( Iop_NotV128, mkexpr(imm16_mask) ) ) ) ); - return res; -} - - static IRTemp math_PMULUDQ_128 ( IRTemp sV, IRTemp dV ) { /* This is a really poor translation -- could be improved if @@ -16674,29 +16631,6 @@ Long dis_ESC_0F__SSE4 ( Bool* decode_OK, /*--- ---*/ /*------------------------------------------------------------*/ -static IRTemp math_PBLENDVB_128 ( IRTemp vecE, IRTemp vecG, - IRTemp vec0/*controlling mask*/, - UInt gran, IROp opSAR ) -{ - /* The tricky bit is to convert vec0 into a suitable mask, by - copying the most significant bit of each lane into all positions - in the lane. */ - IRTemp sh = newTemp(Ity_I8); - assign(sh, mkU8(8 * gran - 1)); - - IRTemp mask = newTemp(Ity_V128); - assign(mask, binop(opSAR, mkexpr(vec0), mkexpr(sh))); - - IRTemp notmask = newTemp(Ity_V128); - assign(notmask, unop(Iop_NotV128, mkexpr(mask))); - - IRTemp res = newTemp(Ity_V128); - assign(res, binop(Iop_OrV128, - binop(Iop_AndV128, mkexpr(vecE), mkexpr(mask)), - binop(Iop_AndV128, mkexpr(vecG), mkexpr(notmask)))); - return res; -} - static IRTemp math_PBLENDVB_256 ( IRTemp vecE, IRTemp vecG, IRTemp vec0/*controlling mask*/, UInt gran, IROp opSAR128 ) diff --git a/VEX/priv/guest_generic_sse.h b/VEX/priv/guest_generic_sse.h index 28f6079ff..6f0000285 100644 --- a/VEX/priv/guest_generic_sse.h +++ b/VEX/priv/guest_generic_sse.h @@ -83,6 +83,75 @@ static inline IRTemp math_BLENDPD_128 ( IRTemp sV, IRTemp dV, UInt imm8 ) return res; } +static inline IRTemp math_BLENDPS_128 ( IRTemp sV, IRTemp dV, UInt imm8 ) +{ + UShort imm8_perms[16] = { 0x0000, 0x000F, 0x00F0, 0x00FF, 0x0F00, + 0x0F0F, 0x0FF0, 0x0FFF, 0xF000, 0xF00F, + 0xF0F0, 0xF0FF, 0xFF00, 0xFF0F, 0xFFF0, + 0xFFFF }; + IRTemp imm8_mask = newTemp(Ity_V128); + assign( imm8_mask, mkV128( imm8_perms[ (imm8 & 15) ] ) ); + + IRTemp res = newTemp(Ity_V128); + assign ( res, binop( Iop_OrV128, + binop( Iop_AndV128, mkexpr(sV), + mkexpr(imm8_mask) ), + binop( Iop_AndV128, mkexpr(dV), + unop( Iop_NotV128, mkexpr(imm8_mask) ) ) ) ); + return res; +} + +/*------------------------------------------------------------*/ +/*--- ---*/ +/*--- Top-level SSE4: dis_ESC_0F38__SSE4 ---*/ +/*--- ---*/ +/*------------------------------------------------------------*/ + +static inline IRTemp math_PBLENDVB_128 ( IRTemp vecE, IRTemp vecG, + IRTemp vec0/*controlling mask*/, + UInt gran, IROp opSAR ) +{ + /* The tricky bit is to convert vec0 into a suitable mask, by + copying the most significant bit of each lane into all positions + in the lane. */ + IRTemp sh = newTemp(Ity_I8); + assign(sh, mkU8(8 * gran - 1)); + + IRTemp mask = newTemp(Ity_V128); + assign(mask, binop(opSAR, mkexpr(vec0), mkexpr(sh))); + + IRTemp notmask = newTemp(Ity_V128); + assign(notmask, unop(Iop_NotV128, mkexpr(mask))); + + IRTemp res = newTemp(Ity_V128); + assign(res, binop(Iop_OrV128, + binop(Iop_AndV128, mkexpr(vecE), mkexpr(mask)), + binop(Iop_AndV128, mkexpr(vecG), mkexpr(notmask)))); + return res; +} + +static inline IRTemp math_PBLENDW_128 ( IRTemp sV, IRTemp dV, UInt imm8 ) +{ + /* Make w be a 16-bit version of imm8, formed by duplicating each + bit in imm8. */ + Int i; + UShort imm16 = 0; + for (i = 0; i < 8; i++) { + if (imm8 & (1 << i)) + imm16 |= (3 << (2*i)); + } + IRTemp imm16_mask = newTemp(Ity_V128); + assign( imm16_mask, mkV128( imm16 )); + + IRTemp res = newTemp(Ity_V128); + assign ( res, binop( Iop_OrV128, + binop( Iop_AndV128, mkexpr(sV), + mkexpr(imm16_mask) ), + binop( Iop_AndV128, mkexpr(dV), + unop( Iop_NotV128, mkexpr(imm16_mask) ) ) ) ); + return res; +} + #endif /* ndef __VEX_GUEST_GENERIC_SSE_H */ /*---------------------------------------------------------------*/ diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c index 5312fab87..166d5afaa 100644 --- a/VEX/priv/guest_x86_toIR.c +++ b/VEX/priv/guest_x86_toIR.c @@ -8053,6 +8053,54 @@ static IRTemp math_BSWAP ( IRTemp t1, IRType ty ) return IRTemp_INVALID; } +/*------------------------------------------------------------*/ +/*--- SSE4.1 BLEND instruction helpers ---*/ +/*------------------------------------------------------------*/ + +/* decode_sse4_blend_imm: Helper for decoding BLEND instructions + (BLENDPS, BLENDPD, PBLENDW). */ +static void decode_sse4_blend_imm (Int* delta_inout, const UChar* insn, + const HChar* insn_name, + IRTemp (*math_fn)(IRTemp, IRTemp, UInt), + UChar sorb) +{ + Int imm8, alen; + UChar modrm; + IRTemp addr; + HChar dis_buf[50]; + Int delta = *delta_inout; + IRTemp dst_vec = newTemp(Ity_V128); + IRTemp src_vec = newTemp(Ity_V128); + + //no REX prefix on 32bit + modrm = insn[3]; + assign( dst_vec, getXMMReg( gregOfRM(modrm) ) ); + + if ( epartIsReg(modrm) ) { + imm8 = insn[4]; + assign( src_vec, getXMMReg( eregOfRM(modrm) ) ); + //skip opcode bytes: +3 + delta += 1 + 1 + 3; + DIP( "%s $%d, %s,%s\n", insn_name, imm8, + nameXMMReg( eregOfRM(modrm) ), + nameXMMReg( gregOfRM(modrm) ) ); + } else { + //delta + 3 skips the opcode bytes + addr = disAMode( &alen, sorb, delta + 3, dis_buf); + assign( src_vec, loadLE( Ity_V128, mkexpr(addr) ) ); + imm8 = insn[3 + alen]; + //skip opcode bytes: +3 + delta += alen + 1 + 3; + DIP( "%s $%d, %s,%s\n", insn_name, + imm8, dis_buf, nameXMMReg( gregOfRM(modrm) ) ); + } + + putXMMReg( gregOfRM(modrm), + mkexpr( math_fn( src_vec, dst_vec, imm8) ) ); + + *delta_inout = delta; +} + /*------------------------------------------------------------*/ /*--- Disassemble a single instruction ---*/ /*------------------------------------------------------------*/ @@ -13001,54 +13049,21 @@ DisResult disInstr_X86_WRK ( goto decode_success; } - /* 66 0F 3A 0D /r ib = BLENDPD xmm1, xmm2/m128, imm8 - Blend Packed Double Precision Floating-Point Values (XMM) - - 66 = mandatory prefix (this is what makes sz == 2) - - 0F 3A 0D = three opcode bytes - - /r = ModR/M byte follows (specifies registers or memory addressing) - - ib = immediate byte follows (1 byte immediate value) - insn[] array layout: - - insn[0] = 0x0F (first opcode byte) - insn[1] = 0x3A (second opcode byte) - insn[2] = 0x0D (third opcode byte) - insn[3] = ModR/M (specifies source/dest registers or memory mode) - - Register-to-register form: - insn[3] = ModR/M byte (tells us which registers) - insn[4] = immediate byte - alen var tells us how many bytes the addressing mode consumed after the ModR/M byte -*/ + /* 66 0F 3A 0D /r ib = BLENDPD */ if (sz == 2 && insn[0] == 0x0F && insn[1] == 0x3A && insn[2] == 0x0D) { - Int imm8; - IRTemp dst_vec = newTemp(Ity_V128); - IRTemp src_vec = newTemp(Ity_V128); - - modrm = insn[3]; - //no REX prefix on 32bit - assign( dst_vec, getXMMReg( gregOfRM(modrm) ) ); + decode_sse4_blend_imm(&delta, insn, "blendpd", math_BLENDPD_128, sorb); + goto decode_success; + } - if ( epartIsReg( modrm ) ) { - imm8 = insn[4]; - assign( src_vec, getXMMReg( eregOfRM(modrm) ) ); - //skip 0F 3A 0D opcode bytes: +3 - delta += 1+1 + 3; - DIP( "blendpd $%d, %s,%s\n", imm8, - nameXMMReg( eregOfRM(modrm) ), - nameXMMReg( gregOfRM(modrm) ) ); - } else { - //delta+3 skips the 0F 3A 0D bytes - addr = disAMode( &alen, sorb, delta + 3, dis_buf); - assign( src_vec, loadLE( Ity_V128, mkexpr(addr) ) ); - imm8 = insn[3+alen]; - //skip 0F 3A 0D opcode bytes: +3 - delta += alen+1 + 3; - DIP( "blendpd $%d, %s,%s\n", - imm8, dis_buf, nameXMMReg( gregOfRM(modrm) ) ); - } + /* 66 0F 3A 0C /r ib = BLENDPS */ + if (sz == 2 && insn[0] == 0x0F && insn[1] == 0x3A && insn[2] == 0x0C) { + decode_sse4_blend_imm(&delta, insn, "blendps", math_BLENDPS_128, sorb); + goto decode_success; + } - putXMMReg( gregOfRM(modrm), - mkexpr( math_BLENDPD_128( src_vec, dst_vec, imm8) ) ); + /* 66 0F 3A 0E /r ib = PBLENDW */ + if (sz == 2 && insn[0] == 0x0F && insn[1] == 0x3A && insn[2] == 0x0E) { + decode_sse4_blend_imm(&delta, insn, "pblendw", math_PBLENDW_128, sorb); goto decode_success; } diff --git a/VEX/priv/host_x86_defs.c b/VEX/priv/host_x86_defs.c index 5b50d8a53..5ef43eb95 100644 --- a/VEX/priv/host_x86_defs.c +++ b/VEX/priv/host_x86_defs.c @@ -2102,7 +2102,6 @@ static UChar* push_word_from_tags ( UChar* p, UShort tags ) *p++ = 0x6A; *p++ = 0xFF; } else { - vassert(0); /* awaiting test case */ w = 0; if (tags & 1) w |= 0x000000FF; if (tags & 2) w |= 0x0000FF00; diff --git a/none/tests/amd64/sse4-64.c b/none/tests/amd64/sse4-64.c index 9ba5162fd..ca100e1ef 100644 --- a/none/tests/amd64/sse4-64.c +++ b/none/tests/amd64/sse4-64.c @@ -152,31 +152,6 @@ void set_sse_roundingmode ( UInt m ) -void test_BLENDPS ( void ) -{ - V128 src, dst; - Int i; - for (i = 0; i < 10; i++) { - randV128(&src); - randV128(&dst); - DO_imm_mandr_r("blendps", 0, src, dst); - DO_imm_mandr_r("blendps", 1, src, dst); - DO_imm_mandr_r("blendps", 2, src, dst); - DO_imm_mandr_r("blendps", 3, src, dst); - DO_imm_mandr_r("blendps", 4, src, dst); - DO_imm_mandr_r("blendps", 5, src, dst); - DO_imm_mandr_r("blendps", 6, src, dst); - DO_imm_mandr_r("blendps", 7, src, dst); - DO_imm_mandr_r("blendps", 8, src, dst); - DO_imm_mandr_r("blendps", 9, src, dst); - DO_imm_mandr_r("blendps", 10, src, dst); - DO_imm_mandr_r("blendps", 11, src, dst); - DO_imm_mandr_r("blendps", 12, src, dst); - DO_imm_mandr_r("blendps", 13, src, dst); - DO_imm_mandr_r("blendps", 14, src, dst); - DO_imm_mandr_r("blendps", 15, src, dst); - } -} void test_DPPD ( void ) { @@ -1029,271 +1004,6 @@ void test_PACKUSDW ( void ) } } -void test_PBLENDW ( void ) -{ - V128 src, dst; - randV128(&src); - randV128(&dst); - { - DO_imm_mandr_r("pblendw", 0, src, dst); - DO_imm_mandr_r("pblendw", 1, src, dst); - DO_imm_mandr_r("pblendw", 2, src, dst); - DO_imm_mandr_r("pblendw", 3, src, dst); - DO_imm_mandr_r("pblendw", 4, src, dst); - DO_imm_mandr_r("pblendw", 5, src, dst); - DO_imm_mandr_r("pblendw", 6, src, dst); - DO_imm_mandr_r("pblendw", 7, src, dst); - DO_imm_mandr_r("pblendw", 8, src, dst); - DO_imm_mandr_r("pblendw", 9, src, dst); - DO_imm_mandr_r("pblendw", 10, src, dst); - DO_imm_mandr_r("pblendw", 11, src, dst); - DO_imm_mandr_r("pblendw", 12, src, dst); - DO_imm_mandr_r("pblendw", 13, src, dst); - DO_imm_mandr_r("pblendw", 14, src, dst); - DO_imm_mandr_r("pblendw", 15, src, dst); - DO_imm_mandr_r("pblendw", 16, src, dst); - DO_imm_mandr_r("pblendw", 17, src, dst); - DO_imm_mandr_r("pblendw", 18, src, dst); - DO_imm_mandr_r("pblendw", 19, src, dst); - DO_imm_mandr_r("pblendw", 20, src, dst); - DO_imm_mandr_r("pblendw", 21, src, dst); - DO_imm_mandr_r("pblendw", 22, src, dst); - DO_imm_mandr_r("pblendw", 23, src, dst); - DO_imm_mandr_r("pblendw", 24, src, dst); - DO_imm_mandr_r("pblendw", 25, src, dst); - DO_imm_mandr_r("pblendw", 26, src, dst); - DO_imm_mandr_r("pblendw", 27, src, dst); - DO_imm_mandr_r("pblendw", 28, src, dst); - DO_imm_mandr_r("pblendw", 29, src, dst); - DO_imm_mandr_r("pblendw", 30, src, dst); - DO_imm_mandr_r("pblendw", 31, src, dst); - DO_imm_mandr_r("pblendw", 32, src, dst); - DO_imm_mandr_r("pblendw", 33, src, dst); - DO_imm_mandr_r("pblendw", 34, src, dst); - DO_imm_mandr_r("pblendw", 35, src, dst); - DO_imm_mandr_r("pblendw", 36, src, dst); - DO_imm_mandr_r("pblendw", 37, src, dst); - DO_imm_mandr_r("pblendw", 38, src, dst); - DO_imm_mandr_r("pblendw", 39, src, dst); - DO_imm_mandr_r("pblendw", 40, src, dst); - DO_imm_mandr_r("pblendw", 41, src, dst); - DO_imm_mandr_r("pblendw", 42, src, dst); - DO_imm_mandr_r("pblendw", 43, src, dst); - DO_imm_mandr_r("pblendw", 44, src, dst); - DO_imm_mandr_r("pblendw", 45, src, dst); - DO_imm_mandr_r("pblendw", 46, src, dst); - DO_imm_mandr_r("pblendw", 47, src, dst); - DO_imm_mandr_r("pblendw", 48, src, dst); - DO_imm_mandr_r("pblendw", 49, src, dst); - DO_imm_mandr_r("pblendw", 50, src, dst); - DO_imm_mandr_r("pblendw", 51, src, dst); - DO_imm_mandr_r("pblendw", 52, src, dst); - DO_imm_mandr_r("pblendw", 53, src, dst); - DO_imm_mandr_r("pblendw", 54, src, dst); - DO_imm_mandr_r("pblendw", 55, src, dst); - DO_imm_mandr_r("pblendw", 56, src, dst); - DO_imm_mandr_r("pblendw", 57, src, dst); - DO_imm_mandr_r("pblendw", 58, src, dst); - DO_imm_mandr_r("pblendw", 59, src, dst); - DO_imm_mandr_r("pblendw", 60, src, dst); - DO_imm_mandr_r("pblendw", 61, src, dst); - DO_imm_mandr_r("pblendw", 62, src, dst); - DO_imm_mandr_r("pblendw", 63, src, dst); - DO_imm_mandr_r("pblendw", 64, src, dst); - DO_imm_mandr_r("pblendw", 65, src, dst); - DO_imm_mandr_r("pblendw", 66, src, dst); - DO_imm_mandr_r("pblendw", 67, src, dst); - DO_imm_mandr_r("pblendw", 68, src, dst); - DO_imm_mandr_r("pblendw", 69, src, dst); - DO_imm_mandr_r("pblendw", 70, src, dst); - DO_imm_mandr_r("pblendw", 71, src, dst); - DO_imm_mandr_r("pblendw", 72, src, dst); - DO_imm_mandr_r("pblendw", 73, src, dst); - DO_imm_mandr_r("pblendw", 74, src, dst); - DO_imm_mandr_r("pblendw", 75, src, dst); - DO_imm_mandr_r("pblendw", 76, src, dst); - DO_imm_mandr_r("pblendw", 77, src, dst); - DO_imm_mandr_r("pblendw", 78, src, dst); - DO_imm_mandr_r("pblendw", 79, src, dst); - DO_imm_mandr_r("pblendw", 80, src, dst); - DO_imm_mandr_r("pblendw", 81, src, dst); - DO_imm_mandr_r("pblendw", 82, src, dst); - DO_imm_mandr_r("pblendw", 83, src, dst); - DO_imm_mandr_r("pblendw", 84, src, dst); - DO_imm_mandr_r("pblendw", 85, src, dst); - DO_imm_mandr_r("pblendw", 86, src, dst); - DO_imm_mandr_r("pblendw", 87, src, dst); - DO_imm_mandr_r("pblendw", 88, src, dst); - DO_imm_mandr_r("pblendw", 89, src, dst); - DO_imm_mandr_r("pblendw", 90, src, dst); - DO_imm_mandr_r("pblendw", 91, src, dst); - DO_imm_mandr_r("pblendw", 92, src, dst); - DO_imm_mandr_r("pblendw", 93, src, dst); - DO_imm_mandr_r("pblendw", 94, src, dst); - DO_imm_mandr_r("pblendw", 95, src, dst); - DO_imm_mandr_r("pblendw", 96, src, dst); - DO_imm_mandr_r("pblendw", 97, src, dst); - DO_imm_mandr_r("pblendw", 98, src, dst); - DO_imm_mandr_r("pblendw", 99, src, dst); - DO_imm_mandr_r("pblendw", 100, src, dst); - DO_imm_mandr_r("pblendw", 101, src, dst); - DO_imm_mandr_r("pblendw", 102, src, dst); - DO_imm_mandr_r("pblendw", 103, src, dst); - DO_imm_mandr_r("pblendw", 104, src, dst); - DO_imm_mandr_r("pblendw", 105, src, dst); - DO_imm_mandr_r("pblendw", 106, src, dst); - DO_imm_mandr_r("pblendw", 107, src, dst); - DO_imm_mandr_r("pblendw", 108, src, dst); - DO_imm_mandr_r("pblendw", 109, src, dst); - DO_imm_mandr_r("pblendw", 110, src, dst); - DO_imm_mandr_r("pblendw", 111, src, dst); - DO_imm_mandr_r("pblendw", 112, src, dst); - DO_imm_mandr_r("pblendw", 113, src, dst); - DO_imm_mandr_r("pblendw", 114, src, dst); - DO_imm_mandr_r("pblendw", 115, src, dst); - DO_imm_mandr_r("pblendw", 116, src, dst); - DO_imm_mandr_r("pblendw", 117, src, dst); - DO_imm_mandr_r("pblendw", 118, src, dst); - DO_imm_mandr_r("pblendw", 119, src, dst); - DO_imm_mandr_r("pblendw", 120, src, dst); - DO_imm_mandr_r("pblendw", 121, src, dst); - DO_imm_mandr_r("pblendw", 122, src, dst); - DO_imm_mandr_r("pblendw", 123, src, dst); - DO_imm_mandr_r("pblendw", 124, src, dst); - DO_imm_mandr_r("pblendw", 125, src, dst); - DO_imm_mandr_r("pblendw", 126, src, dst); - DO_imm_mandr_r("pblendw", 127, src, dst); - DO_imm_mandr_r("pblendw", 128, src, dst); - DO_imm_mandr_r("pblendw", 129, src, dst); - DO_imm_mandr_r("pblendw", 130, src, dst); - DO_imm_mandr_r("pblendw", 131, src, dst); - DO_imm_mandr_r("pblendw", 132, src, dst); - DO_imm_mandr_r("pblendw", 133, src, dst); - DO_imm_mandr_r("pblendw", 134, src, dst); - DO_imm_mandr_r("pblendw", 135, src, dst); - DO_imm_mandr_r("pblendw", 136, src, dst); - DO_imm_mandr_r("pblendw", 137, src, dst); - DO_imm_mandr_r("pblendw", 138, src, dst); - DO_imm_mandr_r("pblendw", 139, src, dst); - DO_imm_mandr_r("pblendw", 140, src, dst); - DO_imm_mandr_r("pblendw", 141, src, dst); - DO_imm_mandr_r("pblendw", 142, src, dst); - DO_imm_mandr_r("pblendw", 143, src, dst); - DO_imm_mandr_r("pblendw", 144, src, dst); - DO_imm_mandr_r("pblendw", 145, src, dst); - DO_imm_mandr_r("pblendw", 146, src, dst); - DO_imm_mandr_r("pblendw", 147, src, dst); - DO_imm_mandr_r("pblendw", 148, src, dst); - DO_imm_mandr_r("pblendw", 149, src, dst); - DO_imm_mandr_r("pblendw", 150, src, dst); - DO_imm_mandr_r("pblendw", 151, src, dst); - DO_imm_mandr_r("pblendw", 152, src, dst); - DO_imm_mandr_r("pblendw", 153, src, dst); - DO_imm_mandr_r("pblendw", 154, src, dst); - DO_imm_mandr_r("pblendw", 155, src, dst); - DO_imm_mandr_r("pblendw", 156, src, dst); - DO_imm_mandr_r("pblendw", 157, src, dst); - DO_imm_mandr_r("pblendw", 158, src, dst); - DO_imm_mandr_r("pblendw", 159, src, dst); - DO_imm_mandr_r("pblendw", 160, src, dst); - DO_imm_mandr_r("pblendw", 161, src, dst); - DO_imm_mandr_r("pblendw", 162, src, dst); - DO_imm_mandr_r("pblendw", 163, src, dst); - DO_imm_mandr_r("pblendw", 164, src, dst); - DO_imm_mandr_r("pblendw", 165, src, dst); - DO_imm_mandr_r("pblendw", 166, src, dst); - DO_imm_mandr_r("pblendw", 167, src, dst); - DO_imm_mandr_r("pblendw", 168, src, dst); - DO_imm_mandr_r("pblendw", 169, src, dst); - DO_imm_mandr_r("pblendw", 170, src, dst); - DO_imm_mandr_r("pblendw", 171, src, dst); - DO_imm_mandr_r("pblendw", 172, src, dst); - DO_imm_mandr_r("pblendw", 173, src, dst); - DO_imm_mandr_r("pblendw", 174, src, dst); - DO_imm_mandr_r("pblendw", 175, src, dst); - DO_imm_mandr_r("pblendw", 176, src, dst); - DO_imm_mandr_r("pblendw", 177, src, dst); - DO_imm_mandr_r("pblendw", 178, src, dst); - DO_imm_mandr_r("pblendw", 179, src, dst); - DO_imm_mandr_r("pblendw", 180, src, dst); - DO_imm_mandr_r("pblendw", 181, src, dst); - DO_imm_mandr_r("pblendw", 182, src, dst); - DO_imm_mandr_r("pblendw", 183, src, dst); - DO_imm_mandr_r("pblendw", 184, src, dst); - DO_imm_mandr_r("pblendw", 185, src, dst); - DO_imm_mandr_r("pblendw", 186, src, dst); - DO_imm_mandr_r("pblendw", 187, src, dst); - DO_imm_mandr_r("pblendw", 188, src, dst); - DO_imm_mandr_r("pblendw", 189, src, dst); - DO_imm_mandr_r("pblendw", 190, src, dst); - DO_imm_mandr_r("pblendw", 191, src, dst); - DO_imm_mandr_r("pblendw", 192, src, dst); - DO_imm_mandr_r("pblendw", 193, src, dst); - DO_imm_mandr_r("pblendw", 194, src, dst); - DO_imm_mandr_r("pblendw", 195, src, dst); - DO_imm_mandr_r("pblendw", 196, src, dst); - DO_imm_mandr_r("pblendw", 197, src, dst); - DO_imm_mandr_r("pblendw", 198, src, dst); - DO_imm_mandr_r("pblendw", 199, src, dst); - DO_imm_mandr_r("pblendw", 200, src, dst); - DO_imm_mandr_r("pblendw", 201, src, dst); - DO_imm_mandr_r("pblendw", 202, src, dst); - DO_imm_mandr_r("pblendw", 203, src, dst); - DO_imm_mandr_r("pblendw", 204, src, dst); - DO_imm_mandr_r("pblendw", 205, src, dst); - DO_imm_mandr_r("pblendw", 206, src, dst); - DO_imm_mandr_r("pblendw", 207, src, dst); - DO_imm_mandr_r("pblendw", 208, src, dst); - DO_imm_mandr_r("pblendw", 209, src, dst); - DO_imm_mandr_r("pblendw", 210, src, dst); - DO_imm_mandr_r("pblendw", 211, src, dst); - DO_imm_mandr_r("pblendw", 212, src, dst); - DO_imm_mandr_r("pblendw", 213, src, dst); - DO_imm_mandr_r("pblendw", 214, src, dst); - DO_imm_mandr_r("pblendw", 215, src, dst); - DO_imm_mandr_r("pblendw", 216, src, dst); - DO_imm_mandr_r("pblendw", 217, src, dst); - DO_imm_mandr_r("pblendw", 218, src, dst); - DO_imm_mandr_r("pblendw", 219, src, dst); - DO_imm_mandr_r("pblendw", 220, src, dst); - DO_imm_mandr_r("pblendw", 221, src, dst); - DO_imm_mandr_r("pblendw", 222, src, dst); - DO_imm_mandr_r("pblendw", 223, src, dst); - DO_imm_mandr_r("pblendw", 224, src, dst); - DO_imm_mandr_r("pblendw", 225, src, dst); - DO_imm_mandr_r("pblendw", 226, src, dst); - DO_imm_mandr_r("pblendw", 227, src, dst); - DO_imm_mandr_r("pblendw", 228, src, dst); - DO_imm_mandr_r("pblendw", 229, src, dst); - DO_imm_mandr_r("pblendw", 230, src, dst); - DO_imm_mandr_r("pblendw", 231, src, dst); - DO_imm_mandr_r("pblendw", 232, src, dst); - DO_imm_mandr_r("pblendw", 233, src, dst); - DO_imm_mandr_r("pblendw", 234, src, dst); - DO_imm_mandr_r("pblendw", 235, src, dst); - DO_imm_mandr_r("pblendw", 236, src, dst); - DO_imm_mandr_r("pblendw", 237, src, dst); - DO_imm_mandr_r("pblendw", 238, src, dst); - DO_imm_mandr_r("pblendw", 239, src, dst); - DO_imm_mandr_r("pblendw", 240, src, dst); - DO_imm_mandr_r("pblendw", 241, src, dst); - DO_imm_mandr_r("pblendw", 242, src, dst); - DO_imm_mandr_r("pblendw", 243, src, dst); - DO_imm_mandr_r("pblendw", 244, src, dst); - DO_imm_mandr_r("pblendw", 245, src, dst); - DO_imm_mandr_r("pblendw", 246, src, dst); - DO_imm_mandr_r("pblendw", 247, src, dst); - DO_imm_mandr_r("pblendw", 248, src, dst); - DO_imm_mandr_r("pblendw", 249, src, dst); - DO_imm_mandr_r("pblendw", 250, src, dst); - DO_imm_mandr_r("pblendw", 251, src, dst); - DO_imm_mandr_r("pblendw", 252, src, dst); - DO_imm_mandr_r("pblendw", 253, src, dst); - DO_imm_mandr_r("pblendw", 254, src, dst); - DO_imm_mandr_r("pblendw", 255, src, dst); - } -} - void test_PCMPEQQ ( void ) { diff --git a/none/tests/sse4-common.h b/none/tests/sse4-common.h index 62c112548..a83ee6811 100644 --- a/none/tests/sse4-common.h +++ b/none/tests/sse4-common.h @@ -365,4 +365,295 @@ static inline void test_BLENDPD ( void ) } } +static inline void test_BLENDPS ( void ) +{ + V128 src, dst; + Int i; + for (i = 0; i < 10; i++) { + randV128(&src); + randV128(&dst); + DO_imm_mandr_r("blendps", 0, src, dst); + DO_imm_mandr_r("blendps", 1, src, dst); + DO_imm_mandr_r("blendps", 2, src, dst); + DO_imm_mandr_r("blendps", 3, src, dst); + DO_imm_mandr_r("blendps", 4, src, dst); + DO_imm_mandr_r("blendps", 5, src, dst); + DO_imm_mandr_r("blendps", 6, src, dst); + DO_imm_mandr_r("blendps", 7, src, dst); + DO_imm_mandr_r("blendps", 8, src, dst); + DO_imm_mandr_r("blendps", 9, src, dst); + DO_imm_mandr_r("blendps", 10, src, dst); + DO_imm_mandr_r("blendps", 11, src, dst); + DO_imm_mandr_r("blendps", 12, src, dst); + DO_imm_mandr_r("blendps", 13, src, dst); + DO_imm_mandr_r("blendps", 14, src, dst); + DO_imm_mandr_r("blendps", 15, src, dst); + } +} + +static inline void test_PBLENDW ( void ) +{ + V128 src, dst; + randV128(&src); + randV128(&dst); + { + DO_imm_mandr_r("pblendw", 0, src, dst); + DO_imm_mandr_r("pblendw", 1, src, dst); + DO_imm_mandr_r("pblendw", 2, src, dst); + DO_imm_mandr_r("pblendw", 3, src, dst); + DO_imm_mandr_r("pblendw", 4, src, dst); + DO_imm_mandr_r("pblendw", 5, src, dst); + DO_imm_mandr_r("pblendw", 6, src, dst); + DO_imm_mandr_r("pblendw", 7, src, dst); + DO_imm_mandr_r("pblendw", 8, src, dst); + DO_imm_mandr_r("pblendw", 9, src, dst); + DO_imm_mandr_r("pblendw", 10, src, dst); + DO_imm_mandr_r("pblendw", 11, src, dst); + DO_imm_mandr_r("pblendw", 12, src, dst); + DO_imm_mandr_r("pblendw", 13, src, dst); + DO_imm_mandr_r("pblendw", 14, src, dst); + DO_imm_mandr_r("pblendw", 15, src, dst); + DO_imm_mandr_r("pblendw", 16, src, dst); + DO_imm_mandr_r("pblendw", 17, src, dst); + DO_imm_mandr_r("pblendw", 18, src, dst); + DO_imm_mandr_r("pblendw", 19, src, dst); + DO_imm_mandr_r("pblendw", 20, src, dst); + DO_imm_mandr_r("pblendw", 21, src, dst); + DO_imm_mandr_r("pblendw", 22, src, dst); + DO_imm_mandr_r("pblendw", 23, src, dst); + DO_imm_mandr_r("pblendw", 24, src, dst); + DO_imm_mandr_r("pblendw", 25, src, dst); + DO_imm_mandr_r("pblendw", 26, src, dst); + DO_imm_mandr_r("pblendw", 27, src, dst); + DO_imm_mandr_r("pblendw", 28, src, dst); + DO_imm_mandr_r("pblendw", 29, src, dst); + DO_imm_mandr_r("pblendw", 30, src, dst); + DO_imm_mandr_r("pblendw", 31, src, dst); + DO_imm_mandr_r("pblendw", 32, src, dst); + DO_imm_mandr_r("pblendw", 33, src, dst); + DO_imm_mandr_r("pblendw", 34, src, dst); + DO_imm_mandr_r("pblendw", 35, src, dst); + DO_imm_mandr_r("pblendw", 36, src, dst); + DO_imm_mandr_r("pblendw", 37, src, dst); + DO_imm_mandr_r("pblendw", 38, src, dst); + DO_imm_mandr_r("pblendw", 39, src, dst); + DO_imm_mandr_r("pblendw", 40, src, dst); + DO_imm_mandr_r("pblendw", 41, src, dst); + DO_imm_mandr_r("pblendw", 42, src, dst); + DO_imm_mandr_r("pblendw", 43, src, dst); + DO_imm_mandr_r("pblendw", 44, src, dst); + DO_imm_mandr_r("pblendw", 45, src, dst); + DO_imm_mandr_r("pblendw", 46, src, dst); + DO_imm_mandr_r("pblendw", 47, src, dst); + DO_imm_mandr_r("pblendw", 48, src, dst); + DO_imm_mandr_r("pblendw", 49, src, dst); + DO_imm_mandr_r("pblendw", 50, src, dst); + DO_imm_mandr_r("pblendw", 51, src, dst); + DO_imm_mandr_r("pblendw", 52, src, dst); + DO_imm_mandr_r("pblendw", 53, src, dst); + DO_imm_mandr_r("pblendw", 54, src, dst); + DO_imm_mandr_r("pblendw", 55, src, dst); + DO_imm_mandr_r("pblendw", 56, src, dst); + DO_imm_mandr_r("pblendw", 57, src, dst); + DO_imm_mandr_r("pblendw", 58, src, dst); + DO_imm_mandr_r("pblendw", 59, src, dst); + DO_imm_mandr_r("pblendw", 60, src, dst); + DO_imm_mandr_r("pblendw", 61, src, dst); + DO_imm_mandr_r("pblendw", 62, src, dst); + DO_imm_mandr_r("pblendw", 63, src, dst); + DO_imm_mandr_r("pblendw", 64, src, dst); + DO_imm_mandr_r("pblendw", 65, src, dst); + DO_imm_mandr_r("pblendw", 66, src, dst); + DO_imm_mandr_r("pblendw", 67, src, dst); + DO_imm_mandr_r("pblendw", 68, src, dst); + DO_imm_mandr_r("pblendw", 69, src, dst); + DO_imm_mandr_r("pblendw", 70, src, dst); + DO_imm_mandr_r("pblendw", 71, src, dst); + DO_imm_mandr_r("pblendw", 72, src, dst); + DO_imm_mandr_r("pblendw", 73, src, dst); + DO_imm_mandr_r("pblendw", 74, src, dst); + DO_imm_mandr_r("pblendw", 75, src, dst); + DO_imm_mandr_r("pblendw", 76, src, dst); + DO_imm_mandr_r("pblendw", 77, src, dst); + DO_imm_mandr_r("pblendw", 78, src, dst); + DO_imm_mandr_r("pblendw", 79, src, dst); + DO_imm_mandr_r("pblendw", 80, src, dst); + DO_imm_mandr_r("pblendw", 81, src, dst); + DO_imm_mandr_r("pblendw", 82, src, dst); + DO_imm_mandr_r("pblendw", 83, src, dst); + DO_imm_mandr_r("pblendw", 84, src, dst); + DO_imm_mandr_r("pblendw", 85, src, dst); + DO_imm_mandr_r("pblendw", 86, src, dst); + DO_imm_mandr_r("pblendw", 87, src, dst); + DO_imm_mandr_r("pblendw", 88, src, dst); + DO_imm_mandr_r("pblendw", 89, src, dst); + DO_imm_mandr_r("pblendw", 90, src, dst); + DO_imm_mandr_r("pblendw", 91, src, dst); + DO_imm_mandr_r("pblendw", 92, src, dst); + DO_imm_mandr_r("pblendw", 93, src, dst); + DO_imm_mandr_r("pblendw", 94, src, dst); + DO_imm_mandr_r("pblendw", 95, src, dst); + DO_imm_mandr_r("pblendw", 96, src, dst); + DO_imm_mandr_r("pblendw", 97, src, dst); + DO_imm_mandr_r("pblendw", 98, src, dst); + DO_imm_mandr_r("pblendw", 99, src, dst); + DO_imm_mandr_r("pblendw", 100, src, dst); + DO_imm_mandr_r("pblendw", 101, src, dst); + DO_imm_mandr_r("pblendw", 102, src, dst); + DO_imm_mandr_r("pblendw", 103, src, dst); + DO_imm_mandr_r("pblendw", 104, src, dst); + DO_imm_mandr_r("pblendw", 105, src, dst); + DO_imm_mandr_r("pblendw", 106, src, dst); + DO_imm_mandr_r("pblendw", 107, src, dst); + DO_imm_mandr_r("pblendw", 108, src, dst); + DO_imm_mandr_r("pblendw", 109, src, dst); + DO_imm_mandr_r("pblendw", 110, src, dst); + DO_imm_mandr_r("pblendw", 111, src, dst); + DO_imm_mandr_r("pblendw", 112, src, dst); + DO_imm_mandr_r("pblendw", 113, src, dst); + DO_imm_mandr_r("pblendw", 114, src, dst); + DO_imm_mandr_r("pblendw", 115, src, dst); + DO_imm_mandr_r("pblendw", 116, src, dst); + DO_imm_mandr_r("pblendw", 117, src, dst); + DO_imm_mandr_r("pblendw", 118, src, dst); + DO_imm_mandr_r("pblendw", 119, src, dst); + DO_imm_mandr_r("pblendw", 120, src, dst); + DO_imm_mandr_r("pblendw", 121, src, dst); + DO_imm_mandr_r("pblendw", 122, src, dst); + DO_imm_mandr_r("pblendw", 123, src, dst); + DO_imm_mandr_r("pblendw", 124, src, dst); + DO_imm_mandr_r("pblendw", 125, src, dst); + DO_imm_mandr_r("pblendw", 126, src, dst); + DO_imm_mandr_r("pblendw", 127, src, dst); + DO_imm_mandr_r("pblendw", 128, src, dst); + DO_imm_mandr_r("pblendw", 129, src, dst); + DO_imm_mandr_r("pblendw", 130, src, dst); + DO_imm_mandr_r("pblendw", 131, src, dst); + DO_imm_mandr_r("pblendw", 132, src, dst); + DO_imm_mandr_r("pblendw", 133, src, dst); + DO_imm_mandr_r("pblendw", 134, src, dst); + DO_imm_mandr_r("pblendw", 135, src, dst); + DO_imm_mandr_r("pblendw", 136, src, dst); + DO_imm_mandr_r("pblendw", 137, src, dst); + DO_imm_mandr_r("pblendw", 138, src, dst); + DO_imm_mandr_r("pblendw", 139, src, dst); + DO_imm_mandr_r("pblendw", 140, src, dst); + DO_imm_mandr_r("pblendw", 141, src, dst); + DO_imm_mandr_r("pblendw", 142, src, dst); + DO_imm_mandr_r("pblendw", 143, src, dst); + DO_imm_mandr_r("pblendw", 144, src, dst); + DO_imm_mandr_r("pblendw", 145, src, dst); + DO_imm_mandr_r("pblendw", 146, src, dst); + DO_imm_mandr_r("pblendw", 147, src, dst); + DO_imm_mandr_r("pblendw", 148, src, dst); + DO_imm_mandr_r("pblendw", 149, src, dst); + DO_imm_mandr_r("pblendw", 150, src, dst); + DO_imm_mandr_r("pblendw", 151, src, dst); + DO_imm_mandr_r("pblendw", 152, src, dst); + DO_imm_mandr_r("pblendw", 153, src, dst); + DO_imm_mandr_r("pblendw", 154, src, dst); + DO_imm_mandr_r("pblendw", 155, src, dst); + DO_imm_mandr_r("pblendw", 156, src, dst); + DO_imm_mandr_r("pblendw", 157, src, dst); + DO_imm_mandr_r("pblendw", 158, src, dst); + DO_imm_mandr_r("pblendw", 159, src, dst); + DO_imm_mandr_r("pblendw", 160, src, dst); + DO_imm_mandr_r("pblendw", 161, src, dst); + DO_imm_mandr_r("pblendw", 162, src, dst); + DO_imm_mandr_r("pblendw", 163, src, dst); + DO_imm_mandr_r("pblendw", 164, src, dst); + DO_imm_mandr_r("pblendw", 165, src, dst); + DO_imm_mandr_r("pblendw", 166, src, dst); + DO_imm_mandr_r("pblendw", 167, src, dst); + DO_imm_mandr_r("pblendw", 168, src, dst); + DO_imm_mandr_r("pblendw", 169, src, dst); + DO_imm_mandr_r("pblendw", 170, src, dst); + DO_imm_mandr_r("pblendw", 171, src, dst); + DO_imm_mandr_r("pblendw", 172, src, dst); + DO_imm_mandr_r("pblendw", 173, src, dst); + DO_imm_mandr_r("pblendw", 174, src, dst); + DO_imm_mandr_r("pblendw", 175, src, dst); + DO_imm_mandr_r("pblendw", 176, src, dst); + DO_imm_mandr_r("pblendw", 177, src, dst); + DO_imm_mandr_r("pblendw", 178, src, dst); + DO_imm_mandr_r("pblendw", 179, src, dst); + DO_imm_mandr_r("pblendw", 180, src, dst); + DO_imm_mandr_r("pblendw", 181, src, dst); + DO_imm_mandr_r("pblendw", 182, src, dst); + DO_imm_mandr_r("pblendw", 183, src, dst); + DO_imm_mandr_r("pblendw", 184, src, dst); + DO_imm_mandr_r("pblendw", 185, src, dst); + DO_imm_mandr_r("pblendw", 186, src, dst); + DO_imm_mandr_r("pblendw", 187, src, dst); + DO_imm_mandr_r("pblendw", 188, src, dst); + DO_imm_mandr_r("pblendw", 189, src, dst); + DO_imm_mandr_r("pblendw", 190, src, dst); + DO_imm_mandr_r("pblendw", 191, src, dst); + DO_imm_mandr_r("pblendw", 192, src, dst); + DO_imm_mandr_r("pblendw", 193, src, dst); + DO_imm_mandr_r("pblendw", 194, src, dst); + DO_imm_mandr_r("pblendw", 195, src, dst); + DO_imm_mandr_r("pblendw", 196, src, dst); + DO_imm_mandr_r("pblendw", 197, src, dst); + DO_imm_mandr_r("pblendw", 198, src, dst); + DO_imm_mandr_r("pblendw", 199, src, dst); + DO_imm_mandr_r("pblendw", 200, src, dst); + DO_imm_mandr_r("pblendw", 201, src, dst); + DO_imm_mandr_r("pblendw", 202, src, dst); + DO_imm_mandr_r("pblendw", 203, src, dst); + DO_imm_mandr_r("pblendw", 204, src, dst); + DO_imm_mandr_r("pblendw", 205, src, dst); + DO_imm_mandr_r("pblendw", 206, src, dst); + DO_imm_mandr_r("pblendw", 207, src, dst); + DO_imm_mandr_r("pblendw", 208, src, dst); + DO_imm_mandr_r("pblendw", 209, src, dst); + DO_imm_mandr_r("pblendw", 210, src, dst); + DO_imm_mandr_r("pblendw", 211, src, dst); + DO_imm_mandr_r("pblendw", 212, src, dst); + DO_imm_mandr_r("pblendw", 213, src, dst); + DO_imm_mandr_r("pblendw", 214, src, dst); + DO_imm_mandr_r("pblendw", 215, src, dst); + DO_imm_mandr_r("pblendw", 216, src, dst); + DO_imm_mandr_r("pblendw", 217, src, dst); + DO_imm_mandr_r("pblendw", 218, src, dst); + DO_imm_mandr_r("pblendw", 219, src, dst); + DO_imm_mandr_r("pblendw", 220, src, dst); + DO_imm_mandr_r("pblendw", 221, src, dst); + DO_imm_mandr_r("pblendw", 222, src, dst); + DO_imm_mandr_r("pblendw", 223, src, dst); + DO_imm_mandr_r("pblendw", 224, src, dst); + DO_imm_mandr_r("pblendw", 225, src, dst); + DO_imm_mandr_r("pblendw", 226, src, dst); + DO_imm_mandr_r("pblendw", 227, src, dst); + DO_imm_mandr_r("pblendw", 228, src, dst); + DO_imm_mandr_r("pblendw", 229, src, dst); + DO_imm_mandr_r("pblendw", 230, src, dst); + DO_imm_mandr_r("pblendw", 231, src, dst); + DO_imm_mandr_r("pblendw", 232, src, dst); + DO_imm_mandr_r("pblendw", 233, src, dst); + DO_imm_mandr_r("pblendw", 234, src, dst); + DO_imm_mandr_r("pblendw", 235, src, dst); + DO_imm_mandr_r("pblendw", 236, src, dst); + DO_imm_mandr_r("pblendw", 237, src, dst); + DO_imm_mandr_r("pblendw", 238, src, dst); + DO_imm_mandr_r("pblendw", 239, src, dst); + DO_imm_mandr_r("pblendw", 240, src, dst); + DO_imm_mandr_r("pblendw", 241, src, dst); + DO_imm_mandr_r("pblendw", 242, src, dst); + DO_imm_mandr_r("pblendw", 243, src, dst); + DO_imm_mandr_r("pblendw", 244, src, dst); + DO_imm_mandr_r("pblendw", 245, src, dst); + DO_imm_mandr_r("pblendw", 246, src, dst); + DO_imm_mandr_r("pblendw", 247, src, dst); + DO_imm_mandr_r("pblendw", 248, src, dst); + DO_imm_mandr_r("pblendw", 249, src, dst); + DO_imm_mandr_r("pblendw", 250, src, dst); + DO_imm_mandr_r("pblendw", 251, src, dst); + DO_imm_mandr_r("pblendw", 252, src, dst); + DO_imm_mandr_r("pblendw", 253, src, dst); + DO_imm_mandr_r("pblendw", 254, src, dst); + DO_imm_mandr_r("pblendw", 255, src, dst); + } +} + #endif /* __SSE4_COMMON_H */ diff --git a/none/tests/x86/sse4-x86.c b/none/tests/x86/sse4-x86.c index c834758ec..167fe485d 100644 --- a/none/tests/x86/sse4-x86.c +++ b/none/tests/x86/sse4-x86.c @@ -114,6 +114,8 @@ int main(void) test_PMINUW(); test_PMULLD(); test_BLENDPD(); + test_BLENDPS(); + test_PBLENDW(); return 0; } diff --git a/none/tests/x86/sse4-x86.stdout.exp b/none/tests/x86/sse4-x86.stdout.exp index db6addce9..819584880 100644 --- a/none/tests/x86/sse4-x86.stdout.exp +++ b/none/tests/x86/sse4-x86.stdout.exp @@ -266,3 +266,835 @@ r blendpd $2 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2 m blendpd $2 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f b2ed4ecc1e172df2ef9f8c927c405d2f r blendpd $3 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f b2ed4ecc1e172df2d3a0a41fce854ae7 m blendpd $3 b2ed4ecc1e172df2d3a0a41fce854ae7 06a10a317fc4b5b3ef9f8c927c405d2f b2ed4ecc1e172df2d3a0a41fce854ae7 +r blendps $0 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d48d969e225f9318a0 +m blendps $0 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d48d969e225f9318a0 +r blendps $1 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d48d969e22fbdea09a +m blendps $1 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d48d969e22fbdea09a +r blendps $2 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d493aee0cf5f9318a0 +m blendps $2 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d493aee0cf5f9318a0 +r blendps $3 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d493aee0cffbdea09a +m blendps $3 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3e4b100d493aee0cffbdea09a +r blendps $4 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c78d969e225f9318a0 +m blendps $4 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c78d969e225f9318a0 +r blendps $5 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c78d969e22fbdea09a +m blendps $5 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c78d969e22fbdea09a +r blendps $6 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c793aee0cf5f9318a0 +m blendps $6 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c793aee0cf5f9318a0 +r blendps $7 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c793aee0cffbdea09a +m blendps $7 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 84db9fe3c001d4c793aee0cffbdea09a +r blendps $8 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d48d969e225f9318a0 +m blendps $8 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d48d969e225f9318a0 +r blendps $9 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d48d969e22fbdea09a +m blendps $9 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d48d969e22fbdea09a +r blendps $10 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d493aee0cf5f9318a0 +m blendps $10 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d493aee0cf5f9318a0 +r blendps $11 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d493aee0cffbdea09a +m blendps $11 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9e4b100d493aee0cffbdea09a +r blendps $12 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c78d969e225f9318a0 +m blendps $12 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c78d969e225f9318a0 +r blendps $13 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c78d969e22fbdea09a +m blendps $13 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c78d969e22fbdea09a +r blendps $14 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c793aee0cf5f9318a0 +m blendps $14 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c793aee0cf5f9318a0 +r blendps $15 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c793aee0cffbdea09a +m blendps $15 0e1d55b9c001d4c793aee0cffbdea09a 84db9fe3e4b100d48d969e225f9318a0 0e1d55b9c001d4c793aee0cffbdea09a +r blendps $0 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f0bf7ba2283e22a31 +m blendps $0 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f0bf7ba2283e22a31 +r blendps $1 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f0bf7ba229beeae16 +m blendps $1 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f0bf7ba229beeae16 +r blendps $2 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f8680a73983e22a31 +m blendps $2 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f8680a73983e22a31 +r blendps $3 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f8680a7399beeae16 +m blendps $3 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df041cdc14f8680a7399beeae16 +r blendps $4 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e00bf7ba2283e22a31 +m blendps $4 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e00bf7ba2283e22a31 +r blendps $5 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e00bf7ba229beeae16 +m blendps $5 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e00bf7ba229beeae16 +r blendps $6 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e08680a73983e22a31 +m blendps $6 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e08680a73983e22a31 +r blendps $7 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e08680a7399beeae16 +m blendps $7 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 09e14df0ce1492e08680a7399beeae16 +r blendps $8 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f0bf7ba2283e22a31 +m blendps $8 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f0bf7ba2283e22a31 +r blendps $9 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f0bf7ba229beeae16 +m blendps $9 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f0bf7ba229beeae16 +r blendps $10 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f8680a73983e22a31 +m blendps $10 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f8680a73983e22a31 +r blendps $11 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f8680a7399beeae16 +m blendps $11 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378b41cdc14f8680a7399beeae16 +r blendps $12 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e00bf7ba2283e22a31 +m blendps $12 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e00bf7ba2283e22a31 +r blendps $13 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e00bf7ba229beeae16 +m blendps $13 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e00bf7ba229beeae16 +r blendps $14 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e08680a73983e22a31 +m blendps $14 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e08680a73983e22a31 +r blendps $15 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e08680a7399beeae16 +m blendps $15 04b4378bce1492e08680a7399beeae16 09e14df041cdc14f0bf7ba2283e22a31 04b4378bce1492e08680a7399beeae16 +r blendps $0 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d0478d5d7e053a4e0c +m blendps $0 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d0478d5d7e053a4e0c +r blendps $1 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d0478d5d7ecbc13287 +m blendps $1 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d0478d5d7ecbc13287 +r blendps $2 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d088e2774a053a4e0c +m blendps $2 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d088e2774a053a4e0c +r blendps $3 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d088e2774acbc13287 +m blendps $3 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c432a534d088e2774acbc13287 +r blendps $4 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e8478d5d7e053a4e0c +m blendps $4 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e8478d5d7e053a4e0c +r blendps $5 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e8478d5d7ecbc13287 +m blendps $5 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e8478d5d7ecbc13287 +r blendps $6 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e888e2774a053a4e0c +m blendps $6 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e888e2774a053a4e0c +r blendps $7 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e888e2774acbc13287 +m blendps $7 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f30110c4e1dda4e888e2774acbc13287 +r blendps $8 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d0478d5d7e053a4e0c +m blendps $8 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d0478d5d7e053a4e0c +r blendps $9 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d0478d5d7ecbc13287 +m blendps $9 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d0478d5d7ecbc13287 +r blendps $10 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d088e2774a053a4e0c +m blendps $10 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d088e2774a053a4e0c +r blendps $11 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d088e2774acbc13287 +m blendps $11 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0ae32a534d088e2774acbc13287 +r blendps $12 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e8478d5d7e053a4e0c +m blendps $12 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e8478d5d7e053a4e0c +r blendps $13 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e8478d5d7ecbc13287 +m blendps $13 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e8478d5d7ecbc13287 +r blendps $14 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e888e2774a053a4e0c +m blendps $14 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e888e2774a053a4e0c +r blendps $15 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e888e2774acbc13287 +m blendps $15 f0fdf0aee1dda4e888e2774acbc13287 f30110c432a534d0478d5d7e053a4e0c f0fdf0aee1dda4e888e2774acbc13287 +r blendps $0 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c594021c25022200a7415e +m blendps $0 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c594021c25022200a7415e +r blendps $1 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c594021c250222a561e618 +m blendps $1 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c594021c250222a561e618 +r blendps $2 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c5940275a0cbed00a7415e +m blendps $2 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c5940275a0cbed00a7415e +r blendps $3 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c5940275a0cbeda561e618 +m blendps $3 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb54c5940275a0cbeda561e618 +r blendps $4 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c1c25022200a7415e +m blendps $4 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c1c25022200a7415e +r blendps $5 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c1c250222a561e618 +m blendps $5 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c1c250222a561e618 +r blendps $6 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c75a0cbed00a7415e +m blendps $6 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c75a0cbed00a7415e +r blendps $7 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c75a0cbeda561e618 +m blendps $7 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 9c86e5cb98e7468c75a0cbeda561e618 +r blendps $8 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c594021c25022200a7415e +m blendps $8 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c594021c25022200a7415e +r blendps $9 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c594021c250222a561e618 +m blendps $9 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c594021c250222a561e618 +r blendps $10 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c5940275a0cbed00a7415e +m blendps $10 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c5940275a0cbed00a7415e +r blendps $11 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c5940275a0cbeda561e618 +m blendps $11 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e54c5940275a0cbeda561e618 +r blendps $12 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c1c25022200a7415e +m blendps $12 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c1c25022200a7415e +r blendps $13 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c1c250222a561e618 +m blendps $13 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c1c250222a561e618 +r blendps $14 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c75a0cbed00a7415e +m blendps $14 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c75a0cbed00a7415e +r blendps $15 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c75a0cbeda561e618 +m blendps $15 2e467d8e98e7468c75a0cbeda561e618 9c86e5cb54c594021c25022200a7415e 2e467d8e98e7468c75a0cbeda561e618 +r blendps $0 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e92668b24fb9133bf52 +m blendps $0 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e92668b24fb9133bf52 +r blendps $1 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e92668b24fb48dc87f5 +m blendps $1 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e92668b24fb48dc87f5 +r blendps $2 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e9229861f0d9133bf52 +m blendps $2 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e9229861f0d9133bf52 +r blendps $3 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e9229861f0d48dc87f5 +m blendps $3 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc77143b71e9229861f0d48dc87f5 +r blendps $4 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb478668b24fb9133bf52 +m blendps $4 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb478668b24fb9133bf52 +r blendps $5 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb478668b24fb48dc87f5 +m blendps $5 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb478668b24fb48dc87f5 +r blendps $6 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb47829861f0d9133bf52 +m blendps $6 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb47829861f0d9133bf52 +r blendps $7 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb47829861f0d48dc87f5 +m blendps $7 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 62bbc7718cbfb47829861f0d48dc87f5 +r blendps $8 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e92668b24fb9133bf52 +m blendps $8 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e92668b24fb9133bf52 +r blendps $9 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e92668b24fb48dc87f5 +m blendps $9 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e92668b24fb48dc87f5 +r blendps $10 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e9229861f0d9133bf52 +m blendps $10 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e9229861f0d9133bf52 +r blendps $11 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e9229861f0d48dc87f5 +m blendps $11 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad89743b71e9229861f0d48dc87f5 +r blendps $12 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb478668b24fb9133bf52 +m blendps $12 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb478668b24fb9133bf52 +r blendps $13 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb478668b24fb48dc87f5 +m blendps $13 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb478668b24fb48dc87f5 +r blendps $14 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb47829861f0d9133bf52 +m blendps $14 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb47829861f0d9133bf52 +r blendps $15 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb47829861f0d48dc87f5 +m blendps $15 1adad8978cbfb47829861f0d48dc87f5 62bbc77143b71e92668b24fb9133bf52 1adad8978cbfb47829861f0d48dc87f5 +r blendps $0 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c018b42f3d3ec8415 +m blendps $0 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c018b42f3d3ec8415 +r blendps $1 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c018b42f3ce3ed14b +m blendps $1 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c018b42f3ce3ed14b +r blendps $2 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c805ff098d3ec8415 +m blendps $2 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c805ff098d3ec8415 +r blendps $3 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c805ff098ce3ed14b +m blendps $3 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2229a090d2c805ff098ce3ed14b +r blendps $4 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957018b42f3d3ec8415 +m blendps $4 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957018b42f3d3ec8415 +r blendps $5 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957018b42f3ce3ed14b +m blendps $5 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957018b42f3ce3ed14b +r blendps $6 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957805ff098d3ec8415 +m blendps $6 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957805ff098d3ec8415 +r blendps $7 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957805ff098ce3ed14b +m blendps $7 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 9fedb2225bf02957805ff098ce3ed14b +r blendps $8 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c018b42f3d3ec8415 +m blendps $8 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c018b42f3d3ec8415 +r blendps $9 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c018b42f3ce3ed14b +m blendps $9 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c018b42f3ce3ed14b +r blendps $10 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c805ff098d3ec8415 +m blendps $10 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c805ff098d3ec8415 +r blendps $11 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c805ff098ce3ed14b +m blendps $11 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff359a090d2c805ff098ce3ed14b +r blendps $12 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957018b42f3d3ec8415 +m blendps $12 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957018b42f3d3ec8415 +r blendps $13 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957018b42f3ce3ed14b +m blendps $13 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957018b42f3ce3ed14b +r blendps $14 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957805ff098d3ec8415 +m blendps $14 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957805ff098d3ec8415 +r blendps $15 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957805ff098ce3ed14b +m blendps $15 1004ff355bf02957805ff098ce3ed14b 9fedb2229a090d2c018b42f3d3ec8415 1004ff355bf02957805ff098ce3ed14b +r blendps $0 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7bc9f1d5f8e2de4bd3 +m blendps $0 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7bc9f1d5f8e2de4bd3 +r blendps $1 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7bc9f1d5f853917f46 +m blendps $1 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7bc9f1d5f853917f46 +r blendps $2 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7b55f9b979e2de4bd3 +m blendps $2 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7b55f9b979e2de4bd3 +r blendps $3 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7b55f9b97953917f46 +m blendps $3 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24af5479e7b55f9b97953917f46 +r blendps $4 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d6c9f1d5f8e2de4bd3 +m blendps $4 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d6c9f1d5f8e2de4bd3 +r blendps $5 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d6c9f1d5f853917f46 +m blendps $5 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d6c9f1d5f853917f46 +r blendps $6 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d655f9b979e2de4bd3 +m blendps $6 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d655f9b979e2de4bd3 +r blendps $7 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d655f9b97953917f46 +m blendps $7 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 b168a24aa106e2d655f9b97953917f46 +r blendps $8 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7bc9f1d5f8e2de4bd3 +m blendps $8 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7bc9f1d5f8e2de4bd3 +r blendps $9 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7bc9f1d5f853917f46 +m blendps $9 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7bc9f1d5f853917f46 +r blendps $10 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7b55f9b979e2de4bd3 +m blendps $10 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7b55f9b979e2de4bd3 +r blendps $11 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7b55f9b97953917f46 +m blendps $11 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5f5479e7b55f9b97953917f46 +r blendps $12 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d6c9f1d5f8e2de4bd3 +m blendps $12 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d6c9f1d5f8e2de4bd3 +r blendps $13 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d6c9f1d5f853917f46 +m blendps $13 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d6c9f1d5f853917f46 +r blendps $14 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d655f9b979e2de4bd3 +m blendps $14 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d655f9b979e2de4bd3 +r blendps $15 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d655f9b97953917f46 +m blendps $15 6c11edd5a106e2d655f9b97953917f46 b168a24af5479e7bc9f1d5f8e2de4bd3 6c11edd5a106e2d655f9b97953917f46 +r blendps $0 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b99885af4db13d1b7 +m blendps $0 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b99885af4db13d1b7 +r blendps $1 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b99885af4f4e34e11 +m blendps $1 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b99885af4f4e34e11 +r blendps $2 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b861ef69cdb13d1b7 +m blendps $2 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b861ef69cdb13d1b7 +r blendps $3 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b861ef69cf4e34e11 +m blendps $3 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f1fb0d2b861ef69cf4e34e11 +r blendps $4 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa099885af4db13d1b7 +m blendps $4 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa099885af4db13d1b7 +r blendps $5 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa099885af4f4e34e11 +m blendps $5 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa099885af4f4e34e11 +r blendps $6 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa0861ef69cdb13d1b7 +m blendps $6 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa0861ef69cdb13d1b7 +r blendps $7 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa0861ef69cf4e34e11 +m blendps $7 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 f2789356f98d1aa0861ef69cf4e34e11 +r blendps $8 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b99885af4db13d1b7 +m blendps $8 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b99885af4db13d1b7 +r blendps $9 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b99885af4f4e34e11 +m blendps $9 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b99885af4f4e34e11 +r blendps $10 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b861ef69cdb13d1b7 +m blendps $10 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b861ef69cdb13d1b7 +r blendps $11 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b861ef69cf4e34e11 +m blendps $11 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f1fb0d2b861ef69cf4e34e11 +r blendps $12 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa099885af4db13d1b7 +m blendps $12 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa099885af4db13d1b7 +r blendps $13 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa099885af4f4e34e11 +m blendps $13 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa099885af4f4e34e11 +r blendps $14 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa0861ef69cdb13d1b7 +m blendps $14 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa0861ef69cdb13d1b7 +r blendps $15 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa0861ef69cf4e34e11 +m blendps $15 894d9fe1f98d1aa0861ef69cf4e34e11 f2789356f1fb0d2b99885af4db13d1b7 894d9fe1f98d1aa0861ef69cf4e34e11 +r blendps $0 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396ea4f1e4ed5da99d2ee +m blendps $0 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396ea4f1e4ed5da99d2ee +r blendps $1 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396ea4f1e4ed5cc40fad9 +m blendps $1 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396ea4f1e4ed5cc40fad9 +r blendps $2 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396eaee9b23edda99d2ee +m blendps $2 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396eaee9b23edda99d2ee +r blendps $3 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396eaee9b23edcc40fad9 +m blendps $3 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b029b396eaee9b23edcc40fad9 +r blendps $4 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f624f1e4ed5da99d2ee +m blendps $4 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f624f1e4ed5da99d2ee +r blendps $5 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f624f1e4ed5cc40fad9 +m blendps $5 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f624f1e4ed5cc40fad9 +r blendps $6 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f62ee9b23edda99d2ee +m blendps $6 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f62ee9b23edda99d2ee +r blendps $7 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f62ee9b23edcc40fad9 +m blendps $7 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee bf6982b000120f62ee9b23edcc40fad9 +r blendps $8 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396ea4f1e4ed5da99d2ee +m blendps $8 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396ea4f1e4ed5da99d2ee +r blendps $9 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396ea4f1e4ed5cc40fad9 +m blendps $9 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396ea4f1e4ed5cc40fad9 +r blendps $10 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396eaee9b23edda99d2ee +m blendps $10 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396eaee9b23edda99d2ee +r blendps $11 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396eaee9b23edcc40fad9 +m blendps $11 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc729b396eaee9b23edcc40fad9 +r blendps $12 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f624f1e4ed5da99d2ee +m blendps $12 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f624f1e4ed5da99d2ee +r blendps $13 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f624f1e4ed5cc40fad9 +m blendps $13 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f624f1e4ed5cc40fad9 +r blendps $14 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f62ee9b23edda99d2ee +m blendps $14 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f62ee9b23edda99d2ee +r blendps $15 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f62ee9b23edcc40fad9 +m blendps $15 c5040fc700120f62ee9b23edcc40fad9 bf6982b029b396ea4f1e4ed5da99d2ee c5040fc700120f62ee9b23edcc40fad9 +r blendps $0 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562c67d2c86fa7c09a3 +m blendps $0 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562c67d2c86fa7c09a3 +r blendps $1 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562c67d2c86f8b23fca +m blendps $1 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562c67d2c86f8b23fca +r blendps $2 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562683cbc58fa7c09a3 +m blendps $2 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562683cbc58fa7c09a3 +r blendps $3 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562683cbc58f8b23fca +m blendps $3 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac63afb7562683cbc58f8b23fca +r blendps $4 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8c67d2c86fa7c09a3 +m blendps $4 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8c67d2c86fa7c09a3 +r blendps $5 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8c67d2c86f8b23fca +m blendps $5 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8c67d2c86f8b23fca +r blendps $6 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8683cbc58fa7c09a3 +m blendps $6 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8683cbc58fa7c09a3 +r blendps $7 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8683cbc58f8b23fca +m blendps $7 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 74876ac65120fbc8683cbc58f8b23fca +r blendps $8 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562c67d2c86fa7c09a3 +m blendps $8 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562c67d2c86fa7c09a3 +r blendps $9 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562c67d2c86f8b23fca +m blendps $9 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562c67d2c86f8b23fca +r blendps $10 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562683cbc58fa7c09a3 +m blendps $10 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562683cbc58fa7c09a3 +r blendps $11 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562683cbc58f8b23fca +m blendps $11 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf13afb7562683cbc58f8b23fca +r blendps $12 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8c67d2c86fa7c09a3 +m blendps $12 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8c67d2c86fa7c09a3 +r blendps $13 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8c67d2c86f8b23fca +m blendps $13 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8c67d2c86f8b23fca +r blendps $14 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8683cbc58fa7c09a3 +m blendps $14 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8683cbc58fa7c09a3 +r blendps $15 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8683cbc58f8b23fca +m blendps $15 7b813bf15120fbc8683cbc58f8b23fca 74876ac63afb7562c67d2c86fa7c09a3 7b813bf15120fbc8683cbc58f8b23fca +r pblendw $0 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f257c73303 +m pblendw $0 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f257c73303 +r pblendw $1 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f257c7d80f +m pblendw $1 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f257c7d80f +r pblendw $2 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f293473303 +m pblendw $2 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f293473303 +r pblendw $3 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f29347d80f +m pblendw $3 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd97270f29347d80f +r pblendw $4 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca57c73303 +m pblendw $4 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca57c73303 +r pblendw $5 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca57c7d80f +m pblendw $5 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca57c7d80f +r pblendw $6 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca93473303 +m pblendw $6 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca93473303 +r pblendw $7 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca9347d80f +m pblendw $7 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd9723eca9347d80f +r pblendw $8 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f257c73303 +m pblendw $8 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f257c73303 +r pblendw $9 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f257c7d80f +m pblendw $9 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f257c7d80f +r pblendw $10 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f293473303 +m pblendw $10 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f293473303 +r pblendw $11 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f29347d80f +m pblendw $11 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc70f29347d80f +r pblendw $12 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca57c73303 +m pblendw $12 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca57c73303 +r pblendw $13 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca57c7d80f +m pblendw $13 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca57c7d80f +r pblendw $14 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca93473303 +m pblendw $14 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca93473303 +r pblendw $15 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca9347d80f +m pblendw $15 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5de53fd2cc3eca9347d80f +r pblendw $16 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f257c73303 +m pblendw $16 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f257c73303 +r pblendw $17 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f257c7d80f +m pblendw $17 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f257c7d80f +r pblendw $18 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f293473303 +m pblendw $18 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f293473303 +r pblendw $19 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f29347d80f +m pblendw $19 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd97270f29347d80f +r pblendw $20 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca57c73303 +m pblendw $20 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca57c73303 +r pblendw $21 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca57c7d80f +m pblendw $21 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca57c7d80f +r pblendw $22 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca93473303 +m pblendw $22 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca93473303 +r pblendw $23 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca9347d80f +m pblendw $23 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd9723eca9347d80f +r pblendw $24 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f257c73303 +m pblendw $24 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f257c73303 +r pblendw $25 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f257c7d80f +m pblendw $25 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f257c7d80f +r pblendw $26 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f293473303 +m pblendw $26 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f293473303 +r pblendw $27 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f29347d80f +m pblendw $27 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc70f29347d80f +r pblendw $28 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca57c73303 +m pblendw $28 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca57c73303 +r pblendw $29 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca57c7d80f +m pblendw $29 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca57c7d80f +r pblendw $30 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca93473303 +m pblendw $30 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca93473303 +r pblendw $31 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca9347d80f +m pblendw $31 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d4703bf5d1b7dd2cc3eca9347d80f +r pblendw $32 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f257c73303 +m pblendw $32 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f257c73303 +r pblendw $33 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f257c7d80f +m pblendw $33 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f257c7d80f +r pblendw $34 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f293473303 +m pblendw $34 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f293473303 +r pblendw $35 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f29347d80f +m pblendw $35 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd97270f29347d80f +r pblendw $36 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca57c73303 +m pblendw $36 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca57c73303 +r pblendw $37 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca57c7d80f +m pblendw $37 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca57c7d80f +r pblendw $38 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca93473303 +m pblendw $38 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca93473303 +r pblendw $39 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca9347d80f +m pblendw $39 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd9723eca9347d80f +r pblendw $40 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f257c73303 +m pblendw $40 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f257c73303 +r pblendw $41 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f257c7d80f +m pblendw $41 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f257c7d80f +r pblendw $42 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f293473303 +m pblendw $42 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f293473303 +r pblendw $43 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f29347d80f +m pblendw $43 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc70f29347d80f +r pblendw $44 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca57c73303 +m pblendw $44 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca57c73303 +r pblendw $45 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca57c7d80f +m pblendw $45 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca57c7d80f +r pblendw $46 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca93473303 +m pblendw $46 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca93473303 +r pblendw $47 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca9347d80f +m pblendw $47 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d47038844e53fd2cc3eca9347d80f +r pblendw $48 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f257c73303 +m pblendw $48 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f257c73303 +r pblendw $49 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f257c7d80f +m pblendw $49 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f257c7d80f +r pblendw $50 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f293473303 +m pblendw $50 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f293473303 +r pblendw $51 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f29347d80f +m pblendw $51 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd97270f29347d80f +r pblendw $52 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca57c73303 +m pblendw $52 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca57c73303 +r pblendw $53 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca57c7d80f +m pblendw $53 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca57c7d80f +r pblendw $54 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca93473303 +m pblendw $54 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca93473303 +r pblendw $55 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca9347d80f +m pblendw $55 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd9723eca9347d80f +r pblendw $56 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f257c73303 +m pblendw $56 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f257c73303 +r pblendw $57 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f257c7d80f +m pblendw $57 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f257c7d80f +r pblendw $58 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f293473303 +m pblendw $58 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f293473303 +r pblendw $59 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f29347d80f +m pblendw $59 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc70f29347d80f +r pblendw $60 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca57c73303 +m pblendw $60 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca57c73303 +r pblendw $61 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca57c7d80f +m pblendw $61 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca57c7d80f +r pblendw $62 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca93473303 +m pblendw $62 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca93473303 +r pblendw $63 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca9347d80f +m pblendw $63 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d470388441b7dd2cc3eca9347d80f +r pblendw $64 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f257c73303 +m pblendw $64 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f257c73303 +r pblendw $65 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f257c7d80f +m pblendw $65 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f257c7d80f +r pblendw $66 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f293473303 +m pblendw $66 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f293473303 +r pblendw $67 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f29347d80f +m pblendw $67 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd97270f29347d80f +r pblendw $68 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca57c73303 +m pblendw $68 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca57c73303 +r pblendw $69 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca57c7d80f +m pblendw $69 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca57c7d80f +r pblendw $70 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca93473303 +m pblendw $70 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca93473303 +r pblendw $71 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca9347d80f +m pblendw $71 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd9723eca9347d80f +r pblendw $72 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f257c73303 +m pblendw $72 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f257c73303 +r pblendw $73 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f257c7d80f +m pblendw $73 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f257c7d80f +r pblendw $74 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f293473303 +m pblendw $74 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f293473303 +r pblendw $75 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f29347d80f +m pblendw $75 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc70f29347d80f +r pblendw $76 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca57c73303 +m pblendw $76 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca57c73303 +r pblendw $77 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca57c7d80f +m pblendw $77 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca57c7d80f +r pblendw $78 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca93473303 +m pblendw $78 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca93473303 +r pblendw $79 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca9347d80f +m pblendw $79 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5de53fd2cc3eca9347d80f +r pblendw $80 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f257c73303 +m pblendw $80 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f257c73303 +r pblendw $81 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f257c7d80f +m pblendw $81 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f257c7d80f +r pblendw $82 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f293473303 +m pblendw $82 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f293473303 +r pblendw $83 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f29347d80f +m pblendw $83 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd97270f29347d80f +r pblendw $84 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca57c73303 +m pblendw $84 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca57c73303 +r pblendw $85 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca57c7d80f +m pblendw $85 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca57c7d80f +r pblendw $86 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca93473303 +m pblendw $86 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca93473303 +r pblendw $87 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca9347d80f +m pblendw $87 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd9723eca9347d80f +r pblendw $88 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f257c73303 +m pblendw $88 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f257c73303 +r pblendw $89 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f257c7d80f +m pblendw $89 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f257c7d80f +r pblendw $90 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f293473303 +m pblendw $90 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f293473303 +r pblendw $91 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f29347d80f +m pblendw $91 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc70f29347d80f +r pblendw $92 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca57c73303 +m pblendw $92 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca57c73303 +r pblendw $93 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca57c7d80f +m pblendw $93 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca57c7d80f +r pblendw $94 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca93473303 +m pblendw $94 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca93473303 +r pblendw $95 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca9347d80f +m pblendw $95 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecdbf5d1b7dd2cc3eca9347d80f +r pblendw $96 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f257c73303 +m pblendw $96 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f257c73303 +r pblendw $97 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f257c7d80f +m pblendw $97 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f257c7d80f +r pblendw $98 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f293473303 +m pblendw $98 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f293473303 +r pblendw $99 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f29347d80f +m pblendw $99 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd97270f29347d80f +r pblendw $100 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca57c73303 +m pblendw $100 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca57c73303 +r pblendw $101 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca57c7d80f +m pblendw $101 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca57c7d80f +r pblendw $102 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca93473303 +m pblendw $102 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca93473303 +r pblendw $103 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca9347d80f +m pblendw $103 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd9723eca9347d80f +r pblendw $104 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f257c73303 +m pblendw $104 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f257c73303 +r pblendw $105 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f257c7d80f +m pblendw $105 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f257c7d80f +r pblendw $106 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f293473303 +m pblendw $106 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f293473303 +r pblendw $107 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f29347d80f +m pblendw $107 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc70f29347d80f +r pblendw $108 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca57c73303 +m pblendw $108 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca57c73303 +r pblendw $109 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca57c7d80f +m pblendw $109 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca57c7d80f +r pblendw $110 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca93473303 +m pblendw $110 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca93473303 +r pblendw $111 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca9347d80f +m pblendw $111 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd8844e53fd2cc3eca9347d80f +r pblendw $112 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f257c73303 +m pblendw $112 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f257c73303 +r pblendw $113 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f257c7d80f +m pblendw $113 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f257c7d80f +r pblendw $114 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f293473303 +m pblendw $114 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f293473303 +r pblendw $115 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f29347d80f +m pblendw $115 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd97270f29347d80f +r pblendw $116 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca57c73303 +m pblendw $116 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca57c73303 +r pblendw $117 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca57c7d80f +m pblendw $117 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca57c7d80f +r pblendw $118 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca93473303 +m pblendw $118 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca93473303 +r pblendw $119 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca9347d80f +m pblendw $119 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd9723eca9347d80f +r pblendw $120 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f257c73303 +m pblendw $120 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f257c73303 +r pblendw $121 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f257c7d80f +m pblendw $121 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f257c7d80f +r pblendw $122 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f293473303 +m pblendw $122 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f293473303 +r pblendw $123 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f29347d80f +m pblendw $123 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc70f29347d80f +r pblendw $124 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca57c73303 +m pblendw $124 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca57c73303 +r pblendw $125 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca57c7d80f +m pblendw $125 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca57c7d80f +r pblendw $126 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca93473303 +m pblendw $126 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca93473303 +r pblendw $127 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca9347d80f +m pblendw $127 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 6e1d1ecd88441b7dd2cc3eca9347d80f +r pblendw $128 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f257c73303 +m pblendw $128 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f257c73303 +r pblendw $129 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f257c7d80f +m pblendw $129 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f257c7d80f +r pblendw $130 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f293473303 +m pblendw $130 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f293473303 +r pblendw $131 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f29347d80f +m pblendw $131 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd97270f29347d80f +r pblendw $132 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca57c73303 +m pblendw $132 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca57c73303 +r pblendw $133 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca57c7d80f +m pblendw $133 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca57c7d80f +r pblendw $134 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca93473303 +m pblendw $134 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca93473303 +r pblendw $135 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca9347d80f +m pblendw $135 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd9723eca9347d80f +r pblendw $136 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f257c73303 +m pblendw $136 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f257c73303 +r pblendw $137 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f257c7d80f +m pblendw $137 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f257c7d80f +r pblendw $138 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f293473303 +m pblendw $138 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f293473303 +r pblendw $139 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f29347d80f +m pblendw $139 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc70f29347d80f +r pblendw $140 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca57c73303 +m pblendw $140 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca57c73303 +r pblendw $141 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca57c7d80f +m pblendw $141 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca57c7d80f +r pblendw $142 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca93473303 +m pblendw $142 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca93473303 +r pblendw $143 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca9347d80f +m pblendw $143 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5de53fd2cc3eca9347d80f +r pblendw $144 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f257c73303 +m pblendw $144 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f257c73303 +r pblendw $145 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f257c7d80f +m pblendw $145 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f257c7d80f +r pblendw $146 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f293473303 +m pblendw $146 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f293473303 +r pblendw $147 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f29347d80f +m pblendw $147 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd97270f29347d80f +r pblendw $148 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca57c73303 +m pblendw $148 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca57c73303 +r pblendw $149 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca57c7d80f +m pblendw $149 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca57c7d80f +r pblendw $150 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca93473303 +m pblendw $150 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca93473303 +r pblendw $151 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca9347d80f +m pblendw $151 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd9723eca9347d80f +r pblendw $152 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f257c73303 +m pblendw $152 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f257c73303 +r pblendw $153 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f257c7d80f +m pblendw $153 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f257c7d80f +r pblendw $154 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f293473303 +m pblendw $154 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f293473303 +r pblendw $155 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f29347d80f +m pblendw $155 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc70f29347d80f +r pblendw $156 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca57c73303 +m pblendw $156 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca57c73303 +r pblendw $157 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca57c7d80f +m pblendw $157 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca57c7d80f +r pblendw $158 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca93473303 +m pblendw $158 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca93473303 +r pblendw $159 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca9347d80f +m pblendw $159 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07124703bf5d1b7dd2cc3eca9347d80f +r pblendw $160 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f257c73303 +m pblendw $160 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f257c73303 +r pblendw $161 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f257c7d80f +m pblendw $161 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f257c7d80f +r pblendw $162 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f293473303 +m pblendw $162 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f293473303 +r pblendw $163 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f29347d80f +m pblendw $163 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd97270f29347d80f +r pblendw $164 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca57c73303 +m pblendw $164 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca57c73303 +r pblendw $165 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca57c7d80f +m pblendw $165 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca57c7d80f +r pblendw $166 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca93473303 +m pblendw $166 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca93473303 +r pblendw $167 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca9347d80f +m pblendw $167 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd9723eca9347d80f +r pblendw $168 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f257c73303 +m pblendw $168 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f257c73303 +r pblendw $169 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f257c7d80f +m pblendw $169 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f257c7d80f +r pblendw $170 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f293473303 +m pblendw $170 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f293473303 +r pblendw $171 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f29347d80f +m pblendw $171 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc70f29347d80f +r pblendw $172 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca57c73303 +m pblendw $172 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca57c73303 +r pblendw $173 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca57c7d80f +m pblendw $173 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca57c7d80f +r pblendw $174 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca93473303 +m pblendw $174 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca93473303 +r pblendw $175 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca9347d80f +m pblendw $175 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 071247038844e53fd2cc3eca9347d80f +r pblendw $176 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f257c73303 +m pblendw $176 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f257c73303 +r pblendw $177 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f257c7d80f +m pblendw $177 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f257c7d80f +r pblendw $178 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f293473303 +m pblendw $178 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f293473303 +r pblendw $179 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f29347d80f +m pblendw $179 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd97270f29347d80f +r pblendw $180 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca57c73303 +m pblendw $180 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca57c73303 +r pblendw $181 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca57c7d80f +m pblendw $181 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca57c7d80f +r pblendw $182 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca93473303 +m pblendw $182 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca93473303 +r pblendw $183 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca9347d80f +m pblendw $183 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd9723eca9347d80f +r pblendw $184 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f257c73303 +m pblendw $184 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f257c73303 +r pblendw $185 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f257c7d80f +m pblendw $185 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f257c7d80f +r pblendw $186 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f293473303 +m pblendw $186 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f293473303 +r pblendw $187 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f29347d80f +m pblendw $187 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc70f29347d80f +r pblendw $188 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca57c73303 +m pblendw $188 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca57c73303 +r pblendw $189 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca57c7d80f +m pblendw $189 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca57c7d80f +r pblendw $190 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca93473303 +m pblendw $190 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca93473303 +r pblendw $191 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca9347d80f +m pblendw $191 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 0712470388441b7dd2cc3eca9347d80f +r pblendw $192 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f257c73303 +m pblendw $192 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f257c73303 +r pblendw $193 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f257c7d80f +m pblendw $193 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f257c7d80f +r pblendw $194 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f293473303 +m pblendw $194 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f293473303 +r pblendw $195 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f29347d80f +m pblendw $195 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd97270f29347d80f +r pblendw $196 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca57c73303 +m pblendw $196 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca57c73303 +r pblendw $197 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca57c7d80f +m pblendw $197 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca57c7d80f +r pblendw $198 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca93473303 +m pblendw $198 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca93473303 +r pblendw $199 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca9347d80f +m pblendw $199 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd9723eca9347d80f +r pblendw $200 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f257c73303 +m pblendw $200 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f257c73303 +r pblendw $201 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f257c7d80f +m pblendw $201 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f257c7d80f +r pblendw $202 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f293473303 +m pblendw $202 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f293473303 +r pblendw $203 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f29347d80f +m pblendw $203 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc70f29347d80f +r pblendw $204 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca57c73303 +m pblendw $204 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca57c73303 +r pblendw $205 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca57c7d80f +m pblendw $205 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca57c7d80f +r pblendw $206 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca93473303 +m pblendw $206 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca93473303 +r pblendw $207 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca9347d80f +m pblendw $207 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5de53fd2cc3eca9347d80f +r pblendw $208 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f257c73303 +m pblendw $208 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f257c73303 +r pblendw $209 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f257c7d80f +m pblendw $209 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f257c7d80f +r pblendw $210 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f293473303 +m pblendw $210 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f293473303 +r pblendw $211 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f29347d80f +m pblendw $211 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd97270f29347d80f +r pblendw $212 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca57c73303 +m pblendw $212 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca57c73303 +r pblendw $213 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca57c7d80f +m pblendw $213 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca57c7d80f +r pblendw $214 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca93473303 +m pblendw $214 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca93473303 +r pblendw $215 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca9347d80f +m pblendw $215 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd9723eca9347d80f +r pblendw $216 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f257c73303 +m pblendw $216 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f257c73303 +r pblendw $217 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f257c7d80f +m pblendw $217 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f257c7d80f +r pblendw $218 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f293473303 +m pblendw $218 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f293473303 +r pblendw $219 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f29347d80f +m pblendw $219 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc70f29347d80f +r pblendw $220 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca57c73303 +m pblendw $220 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca57c73303 +r pblendw $221 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca57c7d80f +m pblendw $221 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca57c7d80f +r pblendw $222 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca93473303 +m pblendw $222 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca93473303 +r pblendw $223 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca9347d80f +m pblendw $223 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecdbf5d1b7dd2cc3eca9347d80f +r pblendw $224 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f257c73303 +m pblendw $224 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f257c73303 +r pblendw $225 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f257c7d80f +m pblendw $225 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f257c7d80f +r pblendw $226 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f293473303 +m pblendw $226 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f293473303 +r pblendw $227 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f29347d80f +m pblendw $227 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd97270f29347d80f +r pblendw $228 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca57c73303 +m pblendw $228 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca57c73303 +r pblendw $229 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca57c7d80f +m pblendw $229 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca57c7d80f +r pblendw $230 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca93473303 +m pblendw $230 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca93473303 +r pblendw $231 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca9347d80f +m pblendw $231 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd9723eca9347d80f +r pblendw $232 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f257c73303 +m pblendw $232 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f257c73303 +r pblendw $233 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f257c7d80f +m pblendw $233 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f257c7d80f +r pblendw $234 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f293473303 +m pblendw $234 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f293473303 +r pblendw $235 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f29347d80f +m pblendw $235 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc70f29347d80f +r pblendw $236 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca57c73303 +m pblendw $236 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca57c73303 +r pblendw $237 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca57c7d80f +m pblendw $237 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca57c7d80f +r pblendw $238 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca93473303 +m pblendw $238 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca93473303 +r pblendw $239 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca9347d80f +m pblendw $239 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd8844e53fd2cc3eca9347d80f +r pblendw $240 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f257c73303 +m pblendw $240 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f257c73303 +r pblendw $241 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f257c7d80f +m pblendw $241 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f257c7d80f +r pblendw $242 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f293473303 +m pblendw $242 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f293473303 +r pblendw $243 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f29347d80f +m pblendw $243 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd97270f29347d80f +r pblendw $244 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca57c73303 +m pblendw $244 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca57c73303 +r pblendw $245 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca57c7d80f +m pblendw $245 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca57c7d80f +r pblendw $246 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca93473303 +m pblendw $246 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca93473303 +r pblendw $247 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca9347d80f +m pblendw $247 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd9723eca9347d80f +r pblendw $248 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f257c73303 +m pblendw $248 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f257c73303 +r pblendw $249 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f257c7d80f +m pblendw $249 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f257c7d80f +r pblendw $250 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f293473303 +m pblendw $250 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f293473303 +r pblendw $251 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f29347d80f +m pblendw $251 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc70f29347d80f +r pblendw $252 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca57c73303 +m pblendw $252 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca57c73303 +r pblendw $253 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca57c7d80f +m pblendw $253 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca57c7d80f +r pblendw $254 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca93473303 +m pblendw $254 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca93473303 +r pblendw $255 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca9347d80f +m pblendw $255 07121ecd88441b7dd2cc3eca9347d80f 6e1d4703bf5de53fd97270f257c73303 07121ecd88441b7dd2cc3eca9347d80f From 4768afe69f4f38265e041c4ab9c2b08f6fdb16fa Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 4 Feb 2026 19:08:20 +0000 Subject: [PATCH 288/502] s390: Fix s390_irgen_POPCNT The POPCNT insn does not cause a specification exception when reserved bits in m3 are not zero. Found by disasm-test. --- VEX/priv/guest_s390_toIR.c | 2 -- none/tests/s390x/disasm-test/disasm-test.post.exp | 2 +- none/tests/s390x/disasm-test/disasm-test.vgtest | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index ef955d9f2..e44faea9b 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -13019,8 +13019,6 @@ s390_irgen_FLOGR(UChar r1, UChar r2) static void s390_irgen_POPCNT(UChar m3, UChar r1, UChar r2) { - s390_insn_assert((m3 & 7) == 0); - static const ULong masks[] = { 0x5555555555555555, 0x3333333333333333, 0x0F0F0F0F0F0F0F0F, 0x00FF00FF00FF00FF, 0x0000FFFF0000FFFF, 0x00000000FFFFFFFF, diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index 68c0b9adb..51ae053ed 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -2,5 +2,5 @@ Looking for missed specification exceptions Total: 42131 tests generated Total: 42131 specification exceptions Looking for unexpected specification exceptions -Total: 153637 tests generated +Total: 153653 tests generated Total: 0 specification exceptions diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index 807250ba1..5fdf13266 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -12,7 +12,6 @@ # vscef - runs into an assert instead of spec. exc. # vsceg - runs into an assert instead of spec. exc. # vstef - runs into an assert instead of spec. exc. -# popcnt - s390_insn_assert is wrong; just "may not operate correctly" # srnmb - The compile-time checkable constraint cannot be expressed in opcode.c # But the s390_insn_assert is wrong nevertheless because bits [0:55] are ignored. # Need to mask d2 before checking (d2 & 0xff) @@ -20,7 +19,7 @@ prereq: ./disasm-test --check-march=arch14 prog: /bin/true -post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef popcnt srnmb vster --summary +post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef srnmb vster --summary vgopts: -q stderr_filter: stderrB_filter: From 5354aa9035e76e206a3e704549383ac49e1225de Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 4 Feb 2026 19:59:41 +0000 Subject: [PATCH 289/502] s390: Fix s390_irgen_VSTER M3 == 4 is a reserved value and causes a specification exception. However, disasm-test reports: error: Spec. exc. not detected for E660 0000 400F vster %v6,0,4 Now fixed. --- VEX/priv/guest_s390_toIR.c | 2 +- none/tests/s390x/disasm-test/disasm-test.post.exp | 6 +++--- none/tests/s390x/disasm-test/disasm-test.vgtest | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index e44faea9b..12e0553e6 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -17159,7 +17159,7 @@ s390_irgen_VSTER(UChar v1, IRTemp op2addr, UChar m3) return; } - s390_insn_assert(m3 >= 1 && m3 <= 4); + s390_insn_assert(m3 >= 1 && m3 <= 3); store(mkexpr(op2addr), s390_reverse_elements(get_vr_qw(v1), m3)); } diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index 51ae053ed..46f297e60 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,6 +1,6 @@ Looking for missed specification exceptions -Total: 42131 tests generated -Total: 42131 specification exceptions +Total: 42339 tests generated +Total: 42339 specification exceptions Looking for unexpected specification exceptions -Total: 153653 tests generated +Total: 153701 tests generated Total: 0 specification exceptions diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index 5fdf13266..f585700b6 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -15,11 +15,10 @@ # srnmb - The compile-time checkable constraint cannot be expressed in opcode.c # But the s390_insn_assert is wrong nevertheless because bits [0:55] are ignored. # Need to mask d2 before checking (d2 & 0xff) -# vster - should be s390_insn_assert(m3 >= 1 && m3 <= 3); // 3 not 4 prereq: ./disasm-test --check-march=arch14 prog: /bin/true -post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef srnmb vster --summary +post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef srnmb --summary vgopts: -q stderr_filter: stderrB_filter: From f35d5ef26ab220858cd2185d2326644b04e25d42 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 4 Feb 2026 20:16:03 +0000 Subject: [PATCH 290/502] s390: Fix s390_irgen_VMSL The reserved bits in M3, when set, do not cause a specification exception. However, disasm-test reports e.g: error: Unexpected spec. exc. detected for E764 1310 92B8 vmslg %v6,%v4,%v17,%v9,1 Now fixed. --- VEX/priv/guest_s390_toIR.c | 2 +- none/tests/s390x/disasm-test/disasm-test.post.exp | 6 +++--- none/tests/s390x/disasm-test/disasm-test.vgtest | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 12e0553e6..d9d31084c 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -16402,7 +16402,7 @@ s390_irgen_VMSL(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6) return; } - s390_insn_assert(m5 == 3 && (m6 & 3) == 0); + s390_insn_assert(m5 == 3); IRDirty* d; IRTemp cc = newTemp(Ity_I64); diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index 46f297e60..d9714a8dc 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,6 +1,6 @@ Looking for missed specification exceptions -Total: 42339 tests generated -Total: 42339 specification exceptions +Total: 42579 tests generated +Total: 42579 specification exceptions Looking for unexpected specification exceptions -Total: 153701 tests generated +Total: 153717 tests generated Total: 0 specification exceptions diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index f585700b6..b440fadc2 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -6,7 +6,6 @@ # exrl - Offset is expected to denote a decodable insn; no such scaffolding # kma - cannot express constraint that r3 must be different from r1 and r2 # The following need to be fixed -# vmsl - m6 does not cause a spec exc. # vgef - runs into an assert instead of spec. exc. # vgeg - runs into an assert instead of spec. exc. # vscef - runs into an assert instead of spec. exc. @@ -18,7 +17,7 @@ prereq: ./disasm-test --check-march=arch14 prog: /bin/true -post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vmsl vgef vgeg vscef vsceg vstef srnmb --summary +post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vgef vgeg vscef vsceg vstef srnmb --summary vgopts: -q stderr_filter: stderrB_filter: From d94716b45d5af90ebe790715493f73d841f3575f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 4 Feb 2026 20:36:09 +0000 Subject: [PATCH 291/502] s390: Fix s390_irgen_SRNMB When B2 is 0 the least significant 8 bits in D2 must designate a valid rounding mode. Bits D2[0:55] are ignored. Mask D2 accordingly. Found by disasm-test. --- VEX/priv/guest_s390_toIR.c | 1 + none/tests/s390x/disasm-test/disasm-test.vgtest | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index d9d31084c..d9309e522 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -9337,6 +9337,7 @@ s390_irgen_SRNMB(UChar b2, UShort d2) { /* Can only check at IR generation time when b2 == 0 */ if (b2 == 0) { + d2 &= 0xff; // d2[0:55] is ignored s390_insn_assert(d2 <= 3 || d2 == 7); // valid rounding mode } IRTemp op2addr = newTemp(Ity_I64); diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index b440fadc2..a5d9d844c 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -3,17 +3,15 @@ # Therefore the real test here is run in the "post" command. # # Excluded opcodes: -# exrl - Offset is expected to denote a decodable insn; no such scaffolding -# kma - cannot express constraint that r3 must be different from r1 and r2 +# exrl - Offset is expected to denote a decodable insn; no such scaffolding +# kma - Cannot express constraint that r3 must be different from r1 and r2 +# srnmb - The compile-time checkable constraint cannot be expressed in opcode.c # The following need to be fixed # vgef - runs into an assert instead of spec. exc. # vgeg - runs into an assert instead of spec. exc. # vscef - runs into an assert instead of spec. exc. # vsceg - runs into an assert instead of spec. exc. # vstef - runs into an assert instead of spec. exc. -# srnmb - The compile-time checkable constraint cannot be expressed in opcode.c -# But the s390_insn_assert is wrong nevertheless because bits [0:55] are ignored. -# Need to mask d2 before checking (d2 & 0xff) prereq: ./disasm-test --check-march=arch14 prog: /bin/true From ccf0bde962a0ce876e29cef7e1a2ce674cc01ecf Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 4 Feb 2026 20:51:48 +0000 Subject: [PATCH 292/502] s390: Fix s390_irgen_VSTEF Fix the s390_insn_assert. There are 4, not 8, word-sized elements in a vector register. Found by disasm-test. --- VEX/priv/guest_s390_toIR.c | 2 +- none/tests/s390x/disasm-test/disasm-test.post.exp | 6 +++--- none/tests/s390x/disasm-test/disasm-test.vgtest | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index d9309e522..939d9b0cc 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -14424,7 +14424,7 @@ s390_irgen_VSTEH(UChar v1, IRTemp op2addr, UChar m3) static void s390_irgen_VSTEF(UChar v1, IRTemp op2addr, UChar m3) { - s390_insn_assert(m3 < 8); + s390_insn_assert(m3 < 4); store(mkexpr(op2addr), get_vr(v1, Ity_I32, m3)); } diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index d9714a8dc..8742a9b74 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,6 +1,6 @@ Looking for missed specification exceptions -Total: 42579 tests generated -Total: 42579 specification exceptions +Total: 42771 tests generated +Total: 42771 specification exceptions Looking for unexpected specification exceptions -Total: 153717 tests generated +Total: 153781 tests generated Total: 0 specification exceptions diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index a5d9d844c..ba921175a 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -11,11 +11,10 @@ # vgeg - runs into an assert instead of spec. exc. # vscef - runs into an assert instead of spec. exc. # vsceg - runs into an assert instead of spec. exc. -# vstef - runs into an assert instead of spec. exc. prereq: ./disasm-test --check-march=arch14 prog: /bin/true -post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vgef vgeg vscef vsceg vstef srnmb --summary +post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vgef vgeg vscef vsceg srnmb --summary vgopts: -q stderr_filter: stderrB_filter: From 68b344ece023c55042fdd5e17d40547e94ce359b Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Wed, 4 Feb 2026 22:34:30 +0000 Subject: [PATCH 293/502] s390: Fix s390_irgen_VGE[FG] and s390_irgen_VSCE[FG] Instead of creating a specification exception these run into an assertion: VEX: s390_vr_offset_by_index: invalid index for given type There are proper s390_insn_assert in s390_irgen_VGEF etc. However, the vassert happens in s390_format_VRV --> get_vr --> s390_vr_offset_by_index prior to s390_irgen_... being called. Fixed by adding s390_insn_assert to s390_format_VRV. Found by disasm-test. --- VEX/priv/guest_s390_toIR.c | 2 ++ none/tests/s390x/disasm-test/disasm-test.post.exp | 6 +++--- none/tests/s390x/disasm-test/disasm-test.vgtest | 9 ++------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 939d9b0cc..219388eb6 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -3289,8 +3289,10 @@ s390_format_VRV(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), vassert(type == Ity_I32 || type == Ity_I64); IRExpr *x2; if(type == Ity_I32) { + s390_insn_assert(m3 < 4); x2 = unop(Iop_32Uto64, get_vr(v2, type, m3)); } else { + s390_insn_assert(m3 < 2); x2 = get_vr(v2, type, m3); } diff --git a/none/tests/s390x/disasm-test/disasm-test.post.exp b/none/tests/s390x/disasm-test/disasm-test.post.exp index 8742a9b74..fdfd38890 100644 --- a/none/tests/s390x/disasm-test/disasm-test.post.exp +++ b/none/tests/s390x/disasm-test/disasm-test.post.exp @@ -1,6 +1,6 @@ Looking for missed specification exceptions -Total: 42771 tests generated -Total: 42771 specification exceptions +Total: 43187 tests generated +Total: 43187 specification exceptions Looking for unexpected specification exceptions -Total: 153781 tests generated +Total: 153877 tests generated Total: 0 specification exceptions diff --git a/none/tests/s390x/disasm-test/disasm-test.vgtest b/none/tests/s390x/disasm-test/disasm-test.vgtest index ba921175a..79c993c3d 100644 --- a/none/tests/s390x/disasm-test/disasm-test.vgtest +++ b/none/tests/s390x/disasm-test/disasm-test.vgtest @@ -6,15 +6,10 @@ # exrl - Offset is expected to denote a decodable insn; no such scaffolding # kma - Cannot express constraint that r3 must be different from r1 and r2 # srnmb - The compile-time checkable constraint cannot be expressed in opcode.c -# The following need to be fixed -# vgef - runs into an assert instead of spec. exc. -# vgeg - runs into an assert instead of spec. exc. -# vscef - runs into an assert instead of spec. exc. -# vsceg - runs into an assert instead of spec. exc. - +# prereq: ./disasm-test --check-march=arch14 prog: /bin/true -post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma vgef vgeg vscef vsceg srnmb --summary +post: ./disasm-test --gcc-flags=-march=arch14 --all --exclude exrl kma srnmb --summary vgopts: -q stderr_filter: stderrB_filter: From 1f7088d4c53ad80ca157487dc8dda1544377abd4 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 5 Feb 2026 17:39:49 +0000 Subject: [PATCH 294/502] s390: Change s390_disasm and tweak specification exception message s390_disasm now returns a pointer to the disassembled insn string or NULL. A new parameter controls whether the mnemonic should be padded with blanks to the max. insn length. When reporting a specification exception also write out the disassembled insn. --- VEX/priv/guest_s390_toIR.c | 11 +++++++++-- VEX/priv/host_s390_defs.c | 6 ++++-- VEX/priv/objdump/s390-dis.c | 21 ++++++++++++++------- VEX/priv/s390_disasm.h | 2 +- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 219388eb6..7950269e6 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -20800,8 +20800,10 @@ s390_decode_and_irgen(const UChar *bytes, UInt insn_length, DisResult *dres) s390_decode_special_and_irgen(bytes + S390_SPECIAL_OP_PREAMBLE_SIZE); } else { /* Handle normal instructions. */ - if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) - s390_disasm(bytes); + if (UNLIKELY(vex_traceflags & VEX_TRACE_FE)) { + HChar *str = s390_disasm(bytes, /* padmnm */ 1); + vex_printf("%s\n", str ? str : "disassembly failed"); + } switch (insn_length) { case 2: @@ -20871,6 +20873,11 @@ s390_decode_and_irgen(const UChar *bytes, UInt insn_length, DisResult *dres) vex_printf(" "); vex_printf("%02x%02x", bytes[i], bytes[i + 1]); } + if (status == S390_DECODE_UNIMPLEMENTED_INSN || + status == S390_DECODE_SPECIFICATION_EXCEPTION) { + const HChar *str = s390_disasm(bytes, /* padmnm */ 0); + vex_printf(" %s", str == NULL ? "??????" : str); + } vex_printf("\n"); } diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index d0b7de838..71cb6c897 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -1473,8 +1473,10 @@ s390_insn_map_regs(HRegRemap *m, s390_insn *insn) static __inline__ UChar * emit(UChar *p, const UChar *insn, UInt len) { - if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) - s390_disasm(insn); + if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) { + HChar *str = s390_disasm(insn, /* padmnm */ 1); + vex_printf("%s\n", str ? str : "disassembly failed"); + } return (UChar *)__builtin_memcpy(p, insn, len) + len; } diff --git a/VEX/priv/objdump/s390-dis.c b/VEX/priv/objdump/s390-dis.c index eeae533b0..0343b211a 100644 --- a/VEX/priv/objdump/s390-dis.c +++ b/VEX/priv/objdump/s390-dis.c @@ -31,17 +31,21 @@ static int opc_index[256]; static int current_arch_mask = 0; static int option_use_insn_len_bits_p = 0; static int option_print_insn_desc = 0; - +static int pad_mnemonic; static const char * padmnm(const char *mnm) { static char buf[S390_MAX_MNEMONIC_LEN + 1]; - if (vex_strlen(mnm) > S390_MAX_MNEMONIC_LEN) - return "failed: buf too small"; + if (pad_mnemonic) { + if (vex_strlen(mnm) > S390_MAX_MNEMONIC_LEN) + return "failed: buf too small"; - vex_sprintf(buf, "%-*s", S390_MAX_MNEMONIC_LEN, mnm); + vex_sprintf(buf, "%-*s", S390_MAX_MNEMONIC_LEN, mnm); + } else { + vex_sprintf(buf, "%s", mnm); + } return buf; } @@ -677,8 +681,10 @@ s390_disasm_init(SFILE *dis, unsigned (*fp)(char *, const char *, va_list)) } -void -s390_disasm(const unsigned char insn[]) +/* Watch out: returned string is allocated in a static buffer and will + be overwritten in the next invocation. */ +HChar * +s390_disasm(const unsigned char insn[], int pad_mnm) { static int initialised = 0; static SFILE disasm; @@ -688,6 +694,7 @@ s390_disasm(const unsigned char insn[]) s390_disasm_init(&disasm, vex_vsprintf); } + pad_mnemonic = pad_mnm; disasm.pos = 0; /* reset */ disasm.buf[0] = '\0'; @@ -697,5 +704,5 @@ s390_disasm(const unsigned char insn[]) the current address: .+offset of .-offset */ int rc = print_insn_s390(/* address */ 0, insn, disasm.info); - vex_printf("%s\n", (rc == 0) ? "disassemly failed" : disasm.buf); + return rc == 0 ? NULL : disasm.buf; } diff --git a/VEX/priv/s390_disasm.h b/VEX/priv/s390_disasm.h index eec3dbca1..2606b2eec 100644 --- a/VEX/priv/s390_disasm.h +++ b/VEX/priv/s390_disasm.h @@ -31,7 +31,7 @@ #include "libvex_basictypes.h" -void s390_disasm(const UChar *); +HChar *s390_disasm(const UChar *, Int); /*---------------------------------------------------------------*/ /*--- end s390_disasm.h ---*/ From ac1fdea5812d2214087f9045482eafe5f981301f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 5 Feb 2026 18:03:05 +0000 Subject: [PATCH 295/502] s390: disasm-test: use s390_disasm No need to capture the disassembled insn from a tracing side effect. Call s390_disasm directly with mnemonic-padding disabled. --- none/tests/s390x/disasm-test/vex.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/none/tests/s390x/disasm-test/vex.c b/none/tests/s390x/disasm-test/vex.c index 3e98aa3b6..32383e7ac 100644 --- a/none/tests/s390x/disasm-test/vex.c +++ b/none/tests/s390x/disasm-test/vex.c @@ -26,7 +26,8 @@ #include "libvex.h" // LibVEX_Init #include "guest_s390_defs.h" // disInstr_S390 #include "host_s390_defs.h" // s390_host_hwcaps -#include "main_globals.h" // vex_traceflags +#include "main_globals.h" // vex_init_done +#include "s390_disasm.h" /* Some VEX header defines this. Need to get rid of it before including standard headers. */ @@ -98,9 +99,6 @@ vex_init(void) LibVEX_default_VexControl(&vcon); LibVEX_Init(vex_exit, vex_put_string, 0, &vcon); - /* Enable disassembly. */ - vex_traceflags = VEX_TRACE_FE; - /* Pretend all hardware extensions are available to avoid running into an emulation failure */ s390_host_hwcaps = VEX_HWCAPS_S390X_ALL; @@ -147,21 +145,5 @@ vex_disasm(const unsigned char *codebuf, int *spec_exc) *spec_exc = 1; } - if (last_vex_string) { - /* Compress a sequence of spaces with a single blank. */ - int space_seen = 0; - char *p, *q; - for (p = q = last_vex_string; *p; ++p) { - if (isspace(*p)) { - if (space_seen) continue; - space_seen = 1; - } else { - space_seen = 0; - } - *q++ = *p; - } - *q = '\0'; - } - - return last_vex_string; + return s390_disasm(codebuf, /* padmnm */ 0); } From b1bf9a9684aa0298447745ac46b1bdc10f4909cf Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 5 Feb 2026 19:55:34 +0100 Subject: [PATCH 296/502] FreeBSD regtest: incorrect use of = rather then == in asserts --- memcheck/tests/freebsd/memalign.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/memcheck/tests/freebsd/memalign.c b/memcheck/tests/freebsd/memalign.c index ec79eeff9..169c2db23 100644 --- a/memcheck/tests/freebsd/memalign.c +++ b/memcheck/tests/freebsd/memalign.c @@ -38,43 +38,43 @@ int main (void) errno = 0; p = memalign(3, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); p = memalign(4, 100); assert(p && 0 == (long)p % 8); errno = 0; p = memalign(5, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); errno = 0; p = memalign(7, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); p = memalign(8, 100); assert(p && 0 == (long)p % 8); errno = 0; p = memalign(9, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); errno = 0; p = memalign(31, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); p = memalign(32, 100); assert(p && 0 == (long)p % 32); errno = 0; p = memalign(33, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); errno = 0; p = memalign(4095, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); p = memalign(4096, 100); assert(p && 0 == (long)p % 4096); errno = 0; p = memalign(4097, 100); assert(!p); - assert(errno = EINVAL); + assert(errno == EINVAL); p = memalign(4 * 1024 * 1024, 100); assert(p && 0 == (long)p % (4 * 1024 * 1024)); p = memalign(16 * 1024 * 1024, 100); From 25f2d24358a2706afd93c64d95d4a4069180b3cf Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 5 Feb 2026 20:41:07 +0100 Subject: [PATCH 297/502] Bug 515183 - Error occurred while executing the command `valgrind --num-callers=1 ./hello_world` --- NEWS | 5 ++++- coregrind/m_main.c | 2 +- docs/xml/manual-core.xml | 8 ++++++++ memcheck/tests/Makefile.am | 1 + memcheck/tests/num_callers_1.stderr.exp | 3 +++ memcheck/tests/num_callers_1.vgtest | 2 ++ 6 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 memcheck/tests/num_callers_1.stderr.exp create mode 100644 memcheck/tests/num_callers_1.vgtest diff --git a/NEWS b/NEWS index 81f154526..bc42d6443 100644 --- a/NEWS +++ b/NEWS @@ -77,7 +77,10 @@ are not entered into bugzilla tend to get forgotten about or ignored. 514659 ltp 20250930 vs linux 6.18.3 doesn't build 514762 Many "Bad file descriptor" messages when using --track-fds=yes and -d on systems without /proc -515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit +515183 Error occurred while executing the command + `valgrind --num-callers=1 ./hello_world` +515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit + To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 0bd929d0c..0046df384 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -721,7 +721,7 @@ static void process_option (Clo_Mode mode, else if VG_INT_CLO (arg, "--dump-error", VG_(clo_dump_error)) {} else if VG_INT_CLO (arg, "--input-fd", VG_(clo_input_fd)) {} else if VG_INT_CLO (arg, "--sanity-level", VG_(clo_sanity_level)) {} - else if VG_BINT_CLO(arg, "--num-callers", VG_(clo_backtrace_size), 1, + else if VG_BINT_CLO(arg, "--num-callers", VG_(clo_backtrace_size), 2, VG_DEEPEST_BACKTRACE) {} else if VG_BINT_CLO(arg, "--num-transtab-sectors", VG_(clo_num_transtab_sectors), diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml index 9ab09b51b..f132de9a6 100644 --- a/docs/xml/manual-core.xml +++ b/docs/xml/manual-core.xml @@ -1188,6 +1188,14 @@ that can report errors, e.g. Memcheck, but not Cachegrind. will make Valgrind run a bit more slowly and take a bit more memory, but can be useful when working with programs with deeply-nested call chains. + + The minimum value for this is 2. A value of 1 is not allowed + for two reasons. Firstly, some of the default suppressions use + "..." which is forbidden with + --num-callers=1. Secondly, it would + make leak suppressions match all allocations using the allocation + function (e.g., malloc). + diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 88e995cde..30a245776 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -206,6 +206,7 @@ EXTRA_DIST = \ new_delete_mismatch_size_supp.stderr.exp-32 \ new_delete_mismatch_size_supp.vgtest \ new_delete_mismatch_size_supp.supp \ + num_callers_1.stderr.exp num_callers_1.vgtest \ deep-backtrace.vgtest deep-backtrace.stderr.exp \ demangle.stderr.exp demangle.vgtest \ big_debuginfo_symbol.vgtest \ diff --git a/memcheck/tests/num_callers_1.stderr.exp b/memcheck/tests/num_callers_1.stderr.exp new file mode 100644 index 000000000..a130507c0 --- /dev/null +++ b/memcheck/tests/num_callers_1.stderr.exp @@ -0,0 +1,3 @@ +valgrind: Bad option: --num-callers=1 +valgrind: '--num-callers' argument must be between 2 and 500 +valgrind: Use --help for more information or consult the user manual. diff --git a/memcheck/tests/num_callers_1.vgtest b/memcheck/tests/num_callers_1.vgtest new file mode 100644 index 000000000..5ff78cadb --- /dev/null +++ b/memcheck/tests/num_callers_1.vgtest @@ -0,0 +1,2 @@ +prog: ../../tests/true +vgopts: -q --num-callers=1 From ceccfce3cab64f6a35f002871312c0466911230f Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 6 Feb 2026 08:40:47 +0100 Subject: [PATCH 298/502] ilumos regtest: update one test that uses --num-callers=1 --- memcheck/tests/solaris/execx.stderr.exp | 2 ++ memcheck/tests/solaris/execx.vgtest | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/memcheck/tests/solaris/execx.stderr.exp b/memcheck/tests/solaris/execx.stderr.exp index 30c885b72..2815dab6b 100644 --- a/memcheck/tests/solaris/execx.stderr.exp +++ b/memcheck/tests/solaris/execx.stderr.exp @@ -1,8 +1,10 @@ Syscall param execve(filename) points to unaddressable byte(s) ... + by 0x........: test_EFAULT (execx.c:12) Address 0x........ is not stack'd, malloc'd or (recently) free'd Syscall param execve(argv) points to unaddressable byte(s) ... + by 0x........: test_EFAULT (execx.c:12) Address 0x........ is not stack'd, malloc'd or (recently) free'd diff --git a/memcheck/tests/solaris/execx.vgtest b/memcheck/tests/solaris/execx.vgtest index 8d28bece1..dd89c7fb9 100644 --- a/memcheck/tests/solaris/execx.vgtest +++ b/memcheck/tests/solaris/execx.vgtest @@ -1,4 +1,4 @@ prereq: test -e execx env: LC_ALL=C prog: execx -vgopts: -q --trace-children=yes --num-callers=1 +vgopts: -q --trace-children=yes --num-callers=2 From d38a09e13c185f77b0b4745918d40245439ef9bd Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 6 Feb 2026 10:20:01 +0100 Subject: [PATCH 299/502] illumos regtest: another assignment in assert for errno --- none/tests/solaris/readlinkat_self.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/solaris/readlinkat_self.c b/none/tests/solaris/readlinkat_self.c index ca60834ae..20ff87815 100644 --- a/none/tests/solaris/readlinkat_self.c +++ b/none/tests/solaris/readlinkat_self.c @@ -29,6 +29,6 @@ int main(int argc, char** argv) ret = readlinkat(101, "/proc/self/path/a.out", (char*)1, 100); assert(ret == -1); - assert(errno = EFAULT); + assert(errno == EFAULT); } From 32a4f3b2e5079ee3a813149f4f819b81539fb380 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 6 Feb 2026 13:10:19 +0100 Subject: [PATCH 300/502] DRD regtest: one more test case with --num-callers=1 --- drd/tests/std_thread2.stderr.exp | 1 + drd/tests/std_thread2.vgtest | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drd/tests/std_thread2.stderr.exp b/drd/tests/std_thread2.stderr.exp index 818b5cf57..ec6cf60f5 100644 --- a/drd/tests/std_thread2.stderr.exp +++ b/drd/tests/std_thread2.stderr.exp @@ -2,6 +2,7 @@ Thread 2: Conflicting store by thread 2 at 0x........ size 4 at 0x........: main::LAMBDA::operator()() const (std_thread2.cpp:21) + by 0x........: void std::__invoke_impl(std::__invoke_other, main::{lambda()#1}&&) (invoke.h:?) Allocation context: BSS section of std_thread2 Done. diff --git a/drd/tests/std_thread2.vgtest b/drd/tests/std_thread2.vgtest index 74917b289..785eadebc 100644 --- a/drd/tests/std_thread2.vgtest +++ b/drd/tests/std_thread2.vgtest @@ -1,4 +1,4 @@ prereq: test -e std_thread2 && ./supported_libpthread -vgopts: --check-stack-var=yes --show-confl-seg=no --num-callers=1 --default-suppressions=no --suppressions=std_thread2.supp +vgopts: --check-stack-var=yes --show-confl-seg=no --num-callers=2 --default-suppressions=no --suppressions=std_thread2.supp prog: std_thread2 stderr_filter: filter_lambda From 6a0735f3eaf12397814267c6f9a9aada36418f96 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 6 Feb 2026 13:57:24 +0100 Subject: [PATCH 301/502] Sanity check VG_(realpath) and VG_(readlink) return values When VG_(realpath) calls VG_(readlink) it failed to check if VG_(readlink) succeeds, possibly writing to tmp[-1] (on the stack). It also didn't check the getcwd syscall succeeded, which would cause the resolved name to start with undefined bits (from the stack). VG_(data_size) was using too small a (stack) buffer for the VG_(realpath) call and didn't check whether the call actually succeeded. At startup initimg-{darwin,freebsd,linux,solaris} also didn't check VG_(realpath) would resolve before setting VG_(resolved_exename) to possibly random bits on the stack. Fix that by using the (unresolved) exe_name in those cases. https://bugs.kde.org/show_bug.cgi?id=515612 --- NEWS | 1 + coregrind/m_debuginfo/debuginfo.c | 14 ++++++++------ coregrind/m_initimg/initimg-darwin.c | 9 +++++++-- coregrind/m_initimg/initimg-freebsd.c | 6 +++++- coregrind/m_initimg/initimg-linux.c | 9 +++++++-- coregrind/m_initimg/initimg-solaris.c | 9 +++++++-- coregrind/m_libcfile.c | 5 +++++ 7 files changed, 40 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index bc42d6443..93c0a0c7e 100644 --- a/NEWS +++ b/NEWS @@ -80,6 +80,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 515183 Error occurred while executing the command `valgrind --num-callers=1 ./hello_world` 515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit +515612 Sanity check VG_(realpath) and VG_(readlink) return values To see details of a given bug, visit diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 8c63cfc39..6f3c281e1 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -5235,12 +5235,14 @@ void VG_(load_all_debuginfo) (void) SizeT VG_(data_size)(void) { - HChar resolved[1000]; - VG_(realpath)( VG_(args_the_exename), resolved); - - for (DebugInfo* di = debugInfo_list; di; di = di->next) { - if (di->data_size && VG_(strcmp)(di->soname, "NONE") == 0 && VG_(strcmp)(resolved, di->fsm.filename) == 0) { - return VG_PGROUNDUP(di->data_size); + HChar resolved[VKI_PATH_MAX]; + if (VG_(realpath)( VG_(args_the_exename), resolved)) { + for (DebugInfo* di = debugInfo_list; di; di = di->next) { + if (di->data_size + && VG_(strcmp)(di->soname, "NONE") == 0 + && VG_(strcmp)(resolved, di->fsm.filename) == 0) { + return VG_PGROUNDUP(di->data_size); + } } } return 0U; diff --git a/coregrind/m_initimg/initimg-darwin.c b/coregrind/m_initimg/initimg-darwin.c index 869f5ff83..3a00e7ef0 100644 --- a/coregrind/m_initimg/initimg-darwin.c +++ b/coregrind/m_initimg/initimg-darwin.c @@ -504,8 +504,13 @@ Addr setup_client_stack( void* init_sp, exe_name = interp_name; } HChar resolved_name[VKI_PATH_MAX]; - VG_(realpath)(exe_name, resolved_name); - VG_(resolved_exename) = VG_(strdup)("initimg-darwin.scs.2", resolved_name); + if (VG_(realpath)(exe_name, resolved_name)) { + VG_(resolved_exename) = VG_(strdup)("initimg-darwin.scs.2", resolved_name); + } else { + /* This should not really happen. realpath tried and failed. + So lets just continue with the exe_name as is. */ + VG_(resolved_exename) = VG_(strdup)("initimg-darwin.scs.3", exe_name); + } } /* client_SP is pointing at client's argc/argv */ diff --git a/coregrind/m_initimg/initimg-freebsd.c b/coregrind/m_initimg/initimg-freebsd.c index c871f47bb..9e95bbfa0 100644 --- a/coregrind/m_initimg/initimg-freebsd.c +++ b/coregrind/m_initimg/initimg-freebsd.c @@ -421,7 +421,11 @@ static Addr setup_client_stack(const void* init_sp, exe_name = interp_name; } HChar resolved_name[VKI_PATH_MAX]; - VG_(realpath)(exe_name, resolved_name); + if (!VG_(realpath)(exe_name, resolved_name)) { + /* This should not really happen. realpath tried and failed. + So lets just continue with the exe_name as is. */ + VG_(strcpy)(resolved_name, exe_name); + } /* use our own auxv as a prototype */ orig_auxv = find_auxv(init_sp); diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index a33710c39..acda16dda 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -960,8 +960,13 @@ Addr setup_client_stack( void* init_sp, exe_name = interp_name; } HChar resolved_name[VKI_PATH_MAX]; - VG_(realpath)(exe_name, resolved_name); - VG_(resolved_exename) = VG_(strdup)("initimg-linux.scs.1", resolved_name); + if (VG_(realpath)(exe_name, resolved_name)) { + VG_(resolved_exename) = VG_(strdup)("initimg-linux.scs.1", resolved_name); + } else { + /* This should not really happen. realpath tried and failed. + So lets just continue with the exe_name as is. */ + VG_(resolved_exename) = VG_(strdup)("initimg-linux.scs.2", exe_name); + } } /* client_SP is pointing at client's argc/argv */ diff --git a/coregrind/m_initimg/initimg-solaris.c b/coregrind/m_initimg/initimg-solaris.c index bd2d822e5..7c9cf0efc 100644 --- a/coregrind/m_initimg/initimg-solaris.c +++ b/coregrind/m_initimg/initimg-solaris.c @@ -100,8 +100,13 @@ static void load_client(/*OUT*/ExeInfo *info, exe_name = interp_name; } HChar resolved_name[VKI_PATH_MAX]; - VG_(realpath)(exe_name, resolved_name); - VG_(resolved_exename) = VG_(strdup)("initimg-solaris.lc.1", resolved_name); + if (VG_(realpath)(exe_name, resolved_name)) { + VG_(resolved_exename) = VG_(strdup)("initimg-solaris.lc.1", resolved_name); + } else { + /* This should not really happen. realpath tried and failed. + So lets just continue with the exe_name as is. */ + VG_(resolved_exename) = VG_(strdup)("initimg-solaris.lc.2", exe_name); + } } /* Set initial brk values. */ diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index 49abe4c17..ca3ecdc9a 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -1867,6 +1867,8 @@ Bool VG_(realpath)(const HChar *path, HChar *resolved) if (VKI_S_ISLNK(statbuf.mode)) { SizeT link_len = VG_(readlink)(path, tmp, VKI_PATH_MAX); + if (link_len < 0) + return False; tmp[link_len] = '\0'; resolved_name = tmp; } else { @@ -1885,6 +1887,9 @@ Bool VG_(realpath)(const HChar *path, HChar *resolved) #elif defined(VGO_freebsd) res = VG_(do_syscall2)(__NR___getcwd, (UWord)wd, VKI_PATH_MAX); #endif + if (sr_isError(res)) { + return False; + } VG_(snprintf)(resolved, VKI_PATH_MAX, "%s/%s", wd, resolved_name); } else { VG_(snprintf)(resolved, VKI_PATH_MAX, "%s", resolved_name); From e6c20d599d90b3ddf0e2a0575ff4855d4ff90c03 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 6 Feb 2026 17:46:33 +0100 Subject: [PATCH 302/502] illumos warnings: malinfo struct fields are 64bit on illumos --- memcheck/tests/mallinfo.c | 20 ++++++++++---------- memcheck/tests/sbfragment.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/memcheck/tests/mallinfo.c b/memcheck/tests/mallinfo.c index d8e853be7..cab35241d 100644 --- a/memcheck/tests/mallinfo.c +++ b/memcheck/tests/mallinfo.c @@ -18,16 +18,16 @@ static size_t check(size_t min, size_t max) if (! s_quiet) { - printf("arena = %d\n", mi.arena); /* non-mmapped space allocated from system */ - printf("ordblks = %d\n", mi.ordblks); /* number of free chunks */ - printf("smblks = %d\n", mi.smblks); /* number of fastbin blocks */ - printf("hblks = %d\n", mi.hblks); /* number of mmapped regions */ - printf("hblkhd = %d\n", mi.hblkhd); /* space in mmapped regions */ - printf("usmblks = %d\n", mi.usmblks); /* maximum total allocated space */ - printf("fsmblks = %d\n", mi.fsmblks); /* space available in freed fastbin blocks */ - printf("uordblks = %d\n", mi.uordblks); /* total allocated space */ - printf("fordblks = %d\n", mi.fordblks); /* total free space */ - printf("keepcost = %d\n", mi.keepcost); /* top-most, releasable (via malloc_trim) space */ + printf("arena = %lu\n", (unsigned long int)mi.arena); /* non-mmapped space allocated from system */ + printf("ordblks = %lu\n", (unsigned long int)mi.ordblks); /* number of free chunks */ + printf("smblks = %lu\n", (unsigned long int)mi.smblks); /* number of fastbin blocks */ + printf("hblks = %lu\n", (unsigned long int)mi.hblks); /* number of mmapped regions */ + printf("hblkhd = %lu\n", (unsigned long int)mi.hblkhd); /* space in mmapped regions */ + printf("usmblks = %lu\n", (unsigned long int)mi.usmblks); /* maximum total allocated space */ + printf("fsmblks = %lu\n", (unsigned long int)mi.fsmblks); /* space available in freed fastbin blocks */ + printf("uordblks = %lu\n", (unsigned long int)mi.uordblks); /* total allocated space */ + printf("fordblks = %lu\n", (unsigned long int)mi.fordblks); /* total free space */ + printf("keepcost = %lu\n", (unsigned long int)mi.keepcost); /* top-most, releasable (via malloc_trim) space */ printf("(min = %zu, max = %zu)\n", min, max); printf("\n"); } diff --git a/memcheck/tests/sbfragment.c b/memcheck/tests/sbfragment.c index 545fe3d0d..d7c966525 100644 --- a/memcheck/tests/sbfragment.c +++ b/memcheck/tests/sbfragment.c @@ -19,16 +19,16 @@ void stats(char *msg) printf("%s\n", msg); #if defined(HAVE_MALLINFO) - printf("%10d int arena; /* non-mmapped space allocated from system */\n", mallinfo_result.arena); - printf("%10d int ordblks; /* number of free chunks */\n", mallinfo_result.ordblks); - printf("%10d int smblks; /* number of fastbin blocks */\n", mallinfo_result.smblks); - printf("%10d int hblks; /* number of mmapped regions */\n", mallinfo_result.hblks); - printf("%10d int hblkhd; /* space in mmapped regions */\n", mallinfo_result.hblkhd); - printf("%10d int usmblks; /* maximum total allocated space */\n", mallinfo_result.usmblks); - printf("%10d int fsmblks; /* space available in freed fastbin blocks */\n", mallinfo_result.fsmblks); - printf("%10d int uordblks; /* total allocated space */\n", mallinfo_result.uordblks); - printf("%10d int fordblks; /* total free space */\n", mallinfo_result.fordblks); - printf("%10d int keepcost; /* top-most, releasable (via malloc_trim) space */\n", mallinfo_result.keepcost); + printf("%10lu int arena; /* non-mmapped space allocated from system */\n", (unsigned long int)mallinfo_result.arena); + printf("%10lu int ordblks; /* number of free chunks */\n", (unsigned long int)mallinfo_result.ordblks); + printf("%10lu int smblks; /* number of fastbin blocks */\n", (unsigned long int)mallinfo_result.smblks); + printf("%10lu int hblks; /* number of mmapped regions */\n", (unsigned long int)mallinfo_result.hblks); + printf("%10lu int hblkhd; /* space in mmapped regions */\n", (unsigned long int)mallinfo_result.hblkhd); + printf("%10lu int usmblks; /* maximum total allocated space */\n", (unsigned long int)mallinfo_result.usmblks); + printf("%10lu int fsmblks; /* space available in freed fastbin blocks */\n", (unsigned long int)mallinfo_result.fsmblks); + printf("%10lu int uordblks; /* total allocated space */\n", (unsigned long int)mallinfo_result.uordblks); + printf("%10lu int fordblks; /* total free space */\n", (unsigned long int)mallinfo_result.fordblks); + printf("%10lu int keepcost; /* top-most, releasable (via malloc_trim) space */\n", (unsigned long int)mallinfo_result.keepcost); printf("\n"); #endif } From 21915a0918fa7864d936235464212422f861c20a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 7 Feb 2026 10:02:10 +0100 Subject: [PATCH 303/502] regtest: broaden a suppression used in memcheck/tests/leak_cpp_interior The test should now pass on PPC machines. --- memcheck/tests/libstdc++.supp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/memcheck/tests/libstdc++.supp b/memcheck/tests/libstdc++.supp index bcfb4a064..f45a81de9 100644 --- a/memcheck/tests/libstdc++.supp +++ b/memcheck/tests/libstdc++.supp @@ -82,9 +82,7 @@ Memcheck:Leak match-leak-kinds: reachable fun:malloc - obj:* - fun:call_init - fun:_dl_init + ... fun:_dl_start_user } { From 551f7b7639ab347a037063c17f60c67c671d8834 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 7 Feb 2026 11:02:38 +0100 Subject: [PATCH 304/502] DRD regtest: delete second line in callstack of std_thread2 test Older GCCs generate something quite different. No point trying to massage it into something common so just delete it. --- drd/tests/filter_lambda | 3 ++- drd/tests/std_thread2.stderr.exp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drd/tests/filter_lambda b/drd/tests/filter_lambda index 248132dc8..31dcc7593 100755 --- a/drd/tests/filter_lambda +++ b/drd/tests/filter_lambda @@ -3,5 +3,6 @@ ./filter_stderr | sed -e 's/\$_0/LAMBDA/' | -sed -e 's/{lambda()#1}/LAMBDA/' +sed -e 's/{lambda()#1}/LAMBDA/' | +sed -e '/std::_/d' diff --git a/drd/tests/std_thread2.stderr.exp b/drd/tests/std_thread2.stderr.exp index ec6cf60f5..818b5cf57 100644 --- a/drd/tests/std_thread2.stderr.exp +++ b/drd/tests/std_thread2.stderr.exp @@ -2,7 +2,6 @@ Thread 2: Conflicting store by thread 2 at 0x........ size 4 at 0x........: main::LAMBDA::operator()() const (std_thread2.cpp:21) - by 0x........: void std::__invoke_impl(std::__invoke_other, main::{lambda()#1}&&) (invoke.h:?) Allocation context: BSS section of std_thread2 Done. From 4551f3c7503299c14f7cbd8017066bbe237b36a1 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 7 Feb 2026 12:04:12 +0100 Subject: [PATCH 305/502] ppc64le regtest: update a few xml expecteds --- none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le | 3 --- none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le | 8 -------- none/tests/socket_close_xml.stderr.exp-ppc64le | 3 --- 3 files changed, 14 deletions(-) diff --git a/none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le b/none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le index 1ab6c6fe0..93c24450b 100644 --- a/none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le +++ b/none/tests/fdleak_cmsg_xml.stderr.exp-ppc64le @@ -37,7 +37,6 @@ - FINISHED @@ -142,6 +141,4 @@ ... - - diff --git a/none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le b/none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le index 27c304f47..72d7480f1 100644 --- a/none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le +++ b/none/tests/fdleak_ipv4_xml.stderr.exp-ppc64le @@ -90,14 +90,6 @@ fdleak_ipv4.c 68 - - 0x........ - ... - main - ... - fdleak_ipv4.c - 90 - diff --git a/none/tests/socket_close_xml.stderr.exp-ppc64le b/none/tests/socket_close_xml.stderr.exp-ppc64le index 1de993059..ee8c9b974 100644 --- a/none/tests/socket_close_xml.stderr.exp-ppc64le +++ b/none/tests/socket_close_xml.stderr.exp-ppc64le @@ -80,7 +80,6 @@ and close the socket again 3 - FINISHED @@ -93,6 +92,4 @@ and close the socket again 3 - - From e633f72b6436507c31d5042d6b97d7fe40e5e9c6 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 8 Feb 2026 09:55:28 +0100 Subject: [PATCH 306/502] ppc regtest: update expected for none fdleak_ipv4_xml Should now pass on cfarm120 --- none/tests/fdleak_ipv4_xml.stderr.exp-nomain | 8 -------- 1 file changed, 8 deletions(-) diff --git a/none/tests/fdleak_ipv4_xml.stderr.exp-nomain b/none/tests/fdleak_ipv4_xml.stderr.exp-nomain index e55277422..27c304f47 100644 --- a/none/tests/fdleak_ipv4_xml.stderr.exp-nomain +++ b/none/tests/fdleak_ipv4_xml.stderr.exp-nomain @@ -121,14 +121,6 @@ fdleak_ipv4.c 51 - - 0x........ - ... - main - ... - fdleak_ipv4.c - 90 - From 0fa75deac5ea66453a4e12486d5b5edaf1694a7c Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 8 Feb 2026 10:03:21 +0100 Subject: [PATCH 307/502] ppc regtest: add another expected for memcheck/tests/linux/rfcomm This was failing on cfarm120 with diffs like - in frame #1, created by main (rfcomm.c:26) + in frame #0, created by bind (???:) I'm not sure why there is a change for the frame where the socket struct is created. cfarm120 doesn't have the glibc dedbuginfo package installed. --- memcheck/tests/linux/Makefile.am | 1 + .../tests/linux/rfcomm.stderr.exp-ppc64le | 64 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 memcheck/tests/linux/rfcomm.stderr.exp-ppc64le diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index 12b4cd8ef..4b26d747b 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -25,6 +25,7 @@ EXTRA_DIST = \ memfd_create.vgtest memfd_create.stderr.exp \ memfd_create.stderr.exp-fcntl64 \ rfcomm.vgtest rfcomm.stderr.exp \ + rfcomm.stderr.exp-ppc64le \ sigqueue.vgtest sigqueue.stderr.exp \ stack_changes.stdout.exp \ stack_changes.stdout.exp2 stack_changes.vgtest \ diff --git a/memcheck/tests/linux/rfcomm.stderr.exp-ppc64le b/memcheck/tests/linux/rfcomm.stderr.exp-ppc64le new file mode 100644 index 000000000..c70e01c58 --- /dev/null +++ b/memcheck/tests/linux/rfcomm.stderr.exp-ppc64le @@ -0,0 +1,64 @@ +Syscall param socketcall.bind(my_addr.sa_family) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:53) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:45) + +Syscall param socketcall.bind(my_addr.rc_bdaddr) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:53) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:45) + +Syscall param socketcall.bind(my_addr.rc_channel) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:53) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:45) + +Syscall param socketcall.bind(my_addr.sa_family) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:59) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:58) + +Syscall param socketcall.bind(my_addr.sa_data) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:59) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:58) + +Syscall param socketcall.bind(my_addr.rc_bdaddr) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:63) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:58) + +Syscall param socketcall.bind(my_addr.rc_channel) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:63) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:58) + +Syscall param socketcall.bind(my_addr.rc_channel) points to uninitialised byte(s) + ... + by 0x........: main (rfcomm.c:67) + Address 0x........ is on thread 1's stack + in frame #0, created by bind (???:) + Uninitialised value was created by a client request + at 0x........: main (rfcomm.c:58) + From 582c6c7f0ec5fda38c33b734d24d687487e23de3 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 8 Feb 2026 16:03:30 +0100 Subject: [PATCH 308/502] Add --num-callers change to NEWS --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 93c0a0c7e..650a82e99 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,12 @@ for nanoMIPS/Linux. macOS is supported up to version 12 Monterey (amd64 only). back to mprotect PROT_NONE which valgrind is able to track. See also https://bugs.kde.org/show_bug.cgi?id=514297 +* --num-callers now has a minimum value of 2. + + This is a breaking change. See + https://bugs.kde.org/show_bug.cgi?id=515183#c13 + for full details. + * ================== PLATFORM CHANGES ================= s390x: Machine models older than z196 are no longer supported. From b9e64b56cd6069ab0d47325e3353075f72d66215 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 8 Feb 2026 17:57:30 +0100 Subject: [PATCH 309/502] FreeBSD reallocarray: behaves like realloc on allocation failure It was behaving like reallocf which frees the ptr if the allocation fails. That's wrong, it behaves like realloc which does not free ptr. Updated the one regression test. I also noticed that the error message always mentions realloc even for reallocf and reallocarray. --- coregrind/m_replacemalloc/vg_replace_malloc.c | 1 - memcheck/tests/amd64-freebsd/reallocarray.c | 25 ++++++++++++++++--- .../amd64-freebsd/reallocarray.stderr.exp | 23 +++++++++++++---- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 12b01f678..5672eda09 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -1729,7 +1729,6 @@ extern int * __error(void) __attribute__((weak)); MALLOC_TRACE(" = %p\n", v ); \ if (v == NULL) { \ if (!(size*nmemb == 0U && info.clo_realloc_zero_bytes_frees == True)) {\ - VG_REPLACE_FUNCTION_EZU(10050,VG_Z_LIBC_SONAME,free)(ptrV); \ SET_ERRNO_ENOMEM; \ } \ } \ diff --git a/memcheck/tests/amd64-freebsd/reallocarray.c b/memcheck/tests/amd64-freebsd/reallocarray.c index ee3a94d87..24ed47072 100644 --- a/memcheck/tests/amd64-freebsd/reallocarray.c +++ b/memcheck/tests/amd64-freebsd/reallocarray.c @@ -2,29 +2,46 @@ #include #include #include +#include #include "../../memcheck.h" int main(void) { int *pi = NULL; + int *newpi; VALGRIND_DO_LEAK_CHECK; + /* should succeed */ pi = reallocarray(pi, 10U, sizeof(int)); + assert(pi); + fprintf(stderr, "Added leak check, expect 40 bytes still reachable\n"); VALGRIND_DO_ADDED_LEAK_CHECK; + /* on FreeBSD this does not free pi */ pi = reallocarray(pi, 0U, sizeof(int)); + assert(pi); + fprintf(stderr, "Added leak check, expect 1 byte still reachable\n"); VALGRIND_DO_ADDED_LEAK_CHECK; pi = reallocarray(pi, 10U, 0U); + assert(pi); free(pi); + fprintf(stderr, "Added leak check, expect all blocks freed\n"); VALGRIND_DO_CHANGED_LEAK_CHECK; pi = NULL; pi = reallocarray(pi, 10U, sizeof(int)); + assert(pi); + fprintf(stderr, "Added leak check, expect 40 bytes still reachable\n"); VALGRIND_DO_ADDED_LEAK_CHECK; errno = 0; - pi = reallocarray(pi, 1UL << 49, 1U); - assert(!pi); + /* this will fail in the mallloc lib, not enough memory */ + newpi = reallocarray(pi, 1UL << 49, 1U); + assert(!newpi); assert(errno == ENOMEM); + fprintf(stderr, "Added leak check, expect 40 bytes still reachable\n"); VALGRIND_DO_CHANGED_LEAK_CHECK; - pi = reallocarray(pi, SIZE_MAX/1000U, SIZE_MAX/1000U); - assert(!pi); + /* this will fail the reallocarray precondition */ + newpi = reallocarray(pi, SIZE_MAX/1000U, SIZE_MAX/1000U); + assert(!newpi); assert(errno == ENOMEM); + free(pi); + fprintf(stderr, "Added leak check, expect all blocks freed\n"); VALGRIND_DO_CHANGED_LEAK_CHECK; } diff --git a/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp b/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp index 2550709ab..c5dac41c5 100644 --- a/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp +++ b/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp @@ -1,6 +1,7 @@ All heap blocks were freed -- no leaks are possible +Added leak check, expect 40 bytes still reachable LEAK SUMMARY: definitely lost: 0 (+0) bytes in 0 (+0) blocks indirectly lost: 0 (+0) bytes in 0 (+0) blocks @@ -12,11 +13,12 @@ To see them, rerun with: --leak-check=full --show-leak-kinds=all realloc() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:13) + by 0x........: main (reallocarray.c:19) Address 0x........ is 0 bytes inside a block of size 40 alloc'd at 0x........: reallocarray (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:11) + by 0x........: main (reallocarray.c:14) +Added leak check, expect 1 byte still reachable LEAK SUMMARY: definitely lost: 0 (+0) bytes in 0 (+0) blocks indirectly lost: 0 (+0) bytes in 0 (+0) blocks @@ -28,13 +30,15 @@ To see them, rerun with: --leak-check=full --show-leak-kinds=all realloc() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:15) + by 0x........: main (reallocarray.c:23) Address 0x........ is 0 bytes inside a block of size 1 alloc'd at 0x........: reallocarray (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:13) + by 0x........: main (reallocarray.c:19) +Added leak check, expect all blocks freed All heap blocks were freed -- no leaks are possible +Added leak check, expect 40 bytes still reachable LEAK SUMMARY: definitely lost: 0 (+0) bytes in 0 (+0) blocks indirectly lost: 0 (+0) bytes in 0 (+0) blocks @@ -44,8 +48,17 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -All heap blocks were freed -- no leaks are possible +Added leak check, expect 40 bytes still reachable +LEAK SUMMARY: + definitely lost: 0 (+0) bytes in 0 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 0 (+0) bytes in 0 (+0) blocks + still reachable: 40 (+0) bytes in 1 (+0) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +Reachable blocks (those to which a pointer was found) are not shown. +To see them, rerun with: --leak-check=full --show-leak-kinds=all +Added leak check, expect all blocks freed All heap blocks were freed -- no leaks are possible From 4bb5691fc4fc6a9f84d373f55c76b8c1719a8a3e Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 8 Feb 2026 19:09:25 +0100 Subject: [PATCH 310/502] Linux reallocarray: update testcase and expected --- memcheck/tests/amd64-freebsd/reallocarray.c | 2 +- memcheck/tests/amd64-linux/reallocarray.c | 25 ++++++++++++++++--- .../tests/amd64-linux/reallocarray.stderr.exp | 23 +++++++++++++---- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/memcheck/tests/amd64-freebsd/reallocarray.c b/memcheck/tests/amd64-freebsd/reallocarray.c index 24ed47072..5735383a3 100644 --- a/memcheck/tests/amd64-freebsd/reallocarray.c +++ b/memcheck/tests/amd64-freebsd/reallocarray.c @@ -31,7 +31,7 @@ int main(void) fprintf(stderr, "Added leak check, expect 40 bytes still reachable\n"); VALGRIND_DO_ADDED_LEAK_CHECK; errno = 0; - /* this will fail in the mallloc lib, not enough memory */ + /* this will fail in the malloc lib, not enough memory */ newpi = reallocarray(pi, 1UL << 49, 1U); assert(!newpi); assert(errno == ENOMEM); diff --git a/memcheck/tests/amd64-linux/reallocarray.c b/memcheck/tests/amd64-linux/reallocarray.c index ce63b8010..138f1da06 100644 --- a/memcheck/tests/amd64-linux/reallocarray.c +++ b/memcheck/tests/amd64-linux/reallocarray.c @@ -8,24 +8,41 @@ int main(void) { int *pi = NULL; + int *newpi; VALGRIND_DO_LEAK_CHECK; + /* should succeed */ pi = reallocarray(pi, 10U, sizeof(int)); + assert(pi); + fprintf(stderr, "Added leak check, expect 40 bytes still reachable\n"); VALGRIND_DO_ADDED_LEAK_CHECK; + /* on Linux this does free pi */ pi = reallocarray(pi, 0U, sizeof(int)); + assert(!pi); + fprintf(stderr, "Added leak check, expect all blocks freed\n"); VALGRIND_DO_ADDED_LEAK_CHECK; pi = malloc(10U); + assert(pi); pi = reallocarray(pi, 10U, 0U); + assert(!pi); + fprintf(stderr, "Added leak check, expect all blocks freed\n"); VALGRIND_DO_CHANGED_LEAK_CHECK; pi = NULL; pi = reallocarray(pi, 10U, sizeof(int)); + assert(pi); + fprintf(stderr, "Added leak check, expect 40 bytes still reachable\n"); VALGRIND_DO_ADDED_LEAK_CHECK; errno = 0; - pi = reallocarray(pi, 1UL << 49, 1U); - assert(!pi); + /* this will fail in the malloc lib, not enough memory */ + newpi = reallocarray(pi, 1UL << 49, 1U); + assert(!newpi); assert(errno == ENOMEM); + fprintf(stderr, "Added leak check, expect 40 bytes still reachable\n"); VALGRIND_DO_CHANGED_LEAK_CHECK; - pi = reallocarray(pi, SIZE_MAX/1000U, SIZE_MAX/1000U); - assert(!pi); + /* this will fail the reallocarray precondition */ + newpi = reallocarray(pi, SIZE_MAX/1000U, SIZE_MAX/1000U); + assert(!newpi); assert(errno == ENOMEM); + free(pi); + fprintf(stderr, "Added leak check, expect all blocks freed\n"); VALGRIND_DO_CHANGED_LEAK_CHECK; } diff --git a/memcheck/tests/amd64-linux/reallocarray.stderr.exp b/memcheck/tests/amd64-linux/reallocarray.stderr.exp index 20a1c4e8b..934c095be 100644 --- a/memcheck/tests/amd64-linux/reallocarray.stderr.exp +++ b/memcheck/tests/amd64-linux/reallocarray.stderr.exp @@ -1,6 +1,7 @@ All heap blocks were freed -- no leaks are possible +Added leak check, expect 40 bytes still reachable LEAK SUMMARY: definitely lost: 0 (+0) bytes in 0 (+0) blocks indirectly lost: 0 (+0) bytes in 0 (+0) blocks @@ -12,22 +13,25 @@ To see them, rerun with: --leak-check=full --show-leak-kinds=all realloc() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:14) + by 0x........: main (reallocarray.c:19) Address 0x........ is 0 bytes inside a block of size 40 alloc'd at 0x........: reallocarray (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:12) + by 0x........: main (reallocarray.c:14) +Added leak check, expect all blocks freed All heap blocks were freed -- no leaks are possible realloc() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:17) + by 0x........: main (reallocarray.c:25) Address 0x........ is 0 bytes inside a block of size 10 alloc'd at 0x........: malloc (vg_replace_malloc.c:...) - by 0x........: main (reallocarray.c:16) + by 0x........: main (reallocarray.c:23) +Added leak check, expect all blocks freed All heap blocks were freed -- no leaks are possible +Added leak check, expect 40 bytes still reachable LEAK SUMMARY: definitely lost: 0 (+0) bytes in 0 (+0) blocks indirectly lost: 0 (+0) bytes in 0 (+0) blocks @@ -37,8 +41,17 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -All heap blocks were freed -- no leaks are possible +Added leak check, expect 40 bytes still reachable +LEAK SUMMARY: + definitely lost: 0 (+0) bytes in 0 (+0) blocks + indirectly lost: 0 (+0) bytes in 0 (+0) blocks + possibly lost: 0 (+0) bytes in 0 (+0) blocks + still reachable: 40 (+0) bytes in 1 (+0) blocks + suppressed: 0 (+0) bytes in 0 (+0) blocks +Reachable blocks (those to which a pointer was found) are not shown. +To see them, rerun with: --leak-check=full --show-leak-kinds=all +Added leak check, expect all blocks freed All heap blocks were freed -- no leaks are possible From 82e8a8e57c7fec823a91289f732222e11d257d53 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 9 Feb 2026 12:04:25 +0100 Subject: [PATCH 311/502] Darwin: don't print "run:dsymutil" unless VG_(clo_verbosity) > 0 This causes something to end up in stderr.out in regression tests. There is a filter for it, but that does not apply to tests like iropt-test that really expect no output and have no stderr filter. --- coregrind/m_debuginfo/readmacho.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coregrind/m_debuginfo/readmacho.c b/coregrind/m_debuginfo/readmacho.c index 6224feea3..b8f96dfd7 100644 --- a/coregrind/m_debuginfo/readmacho.c +++ b/coregrind/m_debuginfo/readmacho.c @@ -1340,7 +1340,9 @@ Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) VG_(strcat)(cmd, "\""); VG_(strcat)(cmd, di->fsm.filename); VG_(strcat)(cmd, "\""); - VG_(message)(Vg_DebugMsg, "run: %s\n", cmd); + if (VG_(clo_verbosity) > 0) { + VG_(message)(Vg_DebugMsg, "run: %s\n", cmd); + } r = VG_(system)( cmd ); if (r) VG_(message)(Vg_DebugMsg, "run: %s FAILED\n", dsymutil); From 0bf895447dae8fe97f3c9c2b1d7a0dc9348bad89 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Tue, 10 Feb 2026 12:57:48 +0100 Subject: [PATCH 312/502] s390x: Fix handling of KIMD-GHASH The KIMD-GHASH function of the "compute intermediate message digest" instruction is missing from the list returned by KIMD-Query, because the appropriate bit is set in the wrong field of the returned array. Fix this. --- coregrind/m_extension/extension-s390x.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/coregrind/m_extension/extension-s390x.c b/coregrind/m_extension/extension-s390x.c index 9c2df8d79..aa10aacf5 100644 --- a/coregrind/m_extension/extension-s390x.c +++ b/coregrind/m_extension/extension-s390x.c @@ -1171,18 +1171,22 @@ S390_DEFINE_DO_0R_INSN(do_KIMD_insn, 0xb93e) S390_DO_FUNC(34, S390_KIMD_SHA3_384, 200) \ S390_DO_FUNC(35, S390_KIMD_SHA3_512, 200) \ S390_DO_FUNC(36, S390_KIMD_SHAKE_128, 200) \ - S390_DO_FUNC(37, S390_KIMD_SHAKE_256, 200) \ - S390_DO_FUNC(65, S390_KIMD_GHASH, 32) + S390_DO_FUNC(37, S390_KIMD_SHAKE_256, 200) + +#define S390_DO_FUNCTIONS1 S390_DO_FUNC(65, S390_KIMD_GHASH, 32) #define S390_DO_FUNC(fc, name, plen) [fc] = plen, -static const UChar S390_KIMD_parms_len[] = {S390_DO_FUNCTIONS}; +static const UChar S390_KIMD_parms_len[] = { + S390_DO_FUNCTIONS S390_DO_FUNCTIONS1}; #undef S390_DO_FUNC #define S390_DO_FUNC(fc, name, plen) | S390_SETBIT(fc) -static const ULong S390_KIMD_supported_fc[] = {0 S390_DO_FUNCTIONS}; +static const ULong S390_KIMD_supported_fc[] = {0 S390_DO_FUNCTIONS, + 0 S390_DO_FUNCTIONS1}; #undef S390_DO_FUNC #undef S390_DO_FUNCTIONS +#undef S390_DO_FUNCTIONS1 static enum ExtensionError do_extension_KIMD(ThreadState* tst, ULong variant) { From b7c4adc56d615518fee5802598fb8025808f71ec Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Tue, 10 Feb 2026 22:27:40 +0000 Subject: [PATCH 313/502] s390: Fix VG_(machine_get_size_of_largest_guest_register) Return 16 if the machine has vector registers. --- coregrind/m_machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 4c65ec6cb..8ff70aa6a 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -2363,7 +2363,7 @@ Int VG_(machine_get_size_of_largest_guest_register) ( void ) return 8; # elif defined(VGA_s390x) - return 8; + return (vai.hwcaps & VEX_HWCAPS_S390X_VX) ? 16 : 8; # elif defined(VGA_arm) /* Really it depends whether or not we have NEON, but let's just From 8b2fbed3ca306d210c96ce638cce125f406f093d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 9 Feb 2026 07:22:52 +0100 Subject: [PATCH 314/502] Bug 515731 - Distinguish between realloc functions in realloc size 0 error messages --- NEWS | 2 +- coregrind/m_execontext.c | 11 +++++++++++ include/pub_tool_execontext.h | 4 ++++ memcheck/mc_errors.c | 10 +++++++--- memcheck/tests/amd64-freebsd/reallocarray.stderr.exp | 4 ++-- memcheck/tests/amd64-freebsd/reallocf.stderr.exp | 2 +- memcheck/tests/amd64-linux/reallocarray.stderr.exp | 4 ++-- memcheck/tests/freebsd/static_allocs.stderr.exp | 2 +- memcheck/tests/x86-freebsd/reallocarray.stderr.exp | 4 ++-- 9 files changed, 31 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 650a82e99..ca5c0c6a7 100644 --- a/NEWS +++ b/NEWS @@ -87,7 +87,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. `valgrind --num-callers=1 ./hello_world` 515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit 515612 Sanity check VG_(realpath) and VG_(readlink) return values - +515731 Distinguish between realloc functions in realloc size 0 error messages To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_execontext.c b/coregrind/m_execontext.c index cd4b870e2..dbe198814 100644 --- a/coregrind/m_execontext.c +++ b/coregrind/m_execontext.c @@ -611,6 +611,17 @@ ExeContext* VG_(null_ExeContext) (void) return null_ExeContext; } +const HChar* VG_(get_ExeContext_first_fnname)(ExeContext* ec) +{ + const HChar* fn_name; + vg_assert(ec->n_ips > 0); + Bool found_fn = VG_(get_fnname)(VG_(get_ExeContext_epoch)(ec), ec->ips[0], &fn_name); + if (found_fn) { + return fn_name; + } + return NULL; +} + /*--------------------------------------------------------------------*/ /*--- end m_execontext.c ---*/ /*--------------------------------------------------------------------*/ diff --git a/include/pub_tool_execontext.h b/include/pub_tool_execontext.h index 4f5d04ff8..bcb3ce51a 100644 --- a/include/pub_tool_execontext.h +++ b/include/pub_tool_execontext.h @@ -121,6 +121,10 @@ static inline Bool VG_(is_plausible_ECU)( UInt ecu ) { // Make an ExeContext containing exactly the specified stack frames. ExeContext* VG_(make_ExeContext_from_StackTrace)( const Addr* ips, UInt n_ips ); +// Get the name of the topmost function from an ExeContext +const HChar* VG_(get_ExeContext_first_fnname)(ExeContext* ec); + + // Returns the "null" exe context. The null execontext is an artificial // exe context, with a stack trace made of one Addr (the NULL address). extern diff --git a/memcheck/mc_errors.c b/memcheck/mc_errors.c index 8dbeb15ab..e9a8f3f02 100644 --- a/memcheck/mc_errors.c +++ b/memcheck/mc_errors.c @@ -754,20 +754,24 @@ void MC_(pp_Error) ( const Error* err ) } break; - case Err_ReallocSizeZero: + case Err_ReallocSizeZero: { + const HChar* fn_name = VG_(get_ExeContext_first_fnname)(VG_(get_error_where)(err)); + if (fn_name == NULL) + fn_name = "realloc"; // just in case if (xml) { emit( " ReallocSizeZero\n" ); - emit( " realloc() with size 0\n" ); + emit( " %s() with size 0\n", fn_name ); VG_(pp_ExeContext)( VG_(get_error_where)(err) ); VG_(pp_addrinfo_mc)(VG_(get_error_address)(err), &extra->Err.ReallocSizeZero.ai, False); } else { - emit( "realloc() with size 0\n" ); + emit( "%s() with size 0\n", fn_name ); VG_(pp_ExeContext)( VG_(get_error_where)(err) ); VG_(pp_addrinfo_mc)(VG_(get_error_address)(err), &extra->Err.ReallocSizeZero.ai, False); } break; + } case Err_BadAlign: if (extra->Err.BadAlign.size) { diff --git a/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp b/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp index c5dac41c5..f82bb92ad 100644 --- a/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp +++ b/memcheck/tests/amd64-freebsd/reallocarray.stderr.exp @@ -11,7 +11,7 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -realloc() with size 0 +reallocarray() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) by 0x........: main (reallocarray.c:19) Address 0x........ is 0 bytes inside a block of size 40 alloc'd @@ -28,7 +28,7 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -realloc() with size 0 +reallocarray() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) by 0x........: main (reallocarray.c:23) Address 0x........ is 0 bytes inside a block of size 1 alloc'd diff --git a/memcheck/tests/amd64-freebsd/reallocf.stderr.exp b/memcheck/tests/amd64-freebsd/reallocf.stderr.exp index 4ec2f2ef0..b240c7807 100644 --- a/memcheck/tests/amd64-freebsd/reallocf.stderr.exp +++ b/memcheck/tests/amd64-freebsd/reallocf.stderr.exp @@ -10,7 +10,7 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -realloc() with size 0 +reallocf() with size 0 at 0x........: reallocf (vg_replace_malloc.c:...) by 0x........: main (reallocf.c:12) Address 0x........ is 0 bytes inside a block of size 40 alloc'd diff --git a/memcheck/tests/amd64-linux/reallocarray.stderr.exp b/memcheck/tests/amd64-linux/reallocarray.stderr.exp index 934c095be..5805fc7a9 100644 --- a/memcheck/tests/amd64-linux/reallocarray.stderr.exp +++ b/memcheck/tests/amd64-linux/reallocarray.stderr.exp @@ -11,7 +11,7 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -realloc() with size 0 +reallocarray() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) by 0x........: main (reallocarray.c:19) Address 0x........ is 0 bytes inside a block of size 40 alloc'd @@ -21,7 +21,7 @@ realloc() with size 0 Added leak check, expect all blocks freed All heap blocks were freed -- no leaks are possible -realloc() with size 0 +reallocarray() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) by 0x........: main (reallocarray.c:25) Address 0x........ is 0 bytes inside a block of size 10 alloc'd diff --git a/memcheck/tests/freebsd/static_allocs.stderr.exp b/memcheck/tests/freebsd/static_allocs.stderr.exp index b6e6d328d..d42c22eec 100644 --- a/memcheck/tests/freebsd/static_allocs.stderr.exp +++ b/memcheck/tests/freebsd/static_allocs.stderr.exp @@ -1,4 +1,4 @@ -realloc() with size 0 +reallocf() with size 0 at 0x........: reallocf (vg_replace_malloc.c:...) by 0x........: main (static_allocs.c:36) Address 0x........ is 0 bytes inside a block of size 160 alloc'd diff --git a/memcheck/tests/x86-freebsd/reallocarray.stderr.exp b/memcheck/tests/x86-freebsd/reallocarray.stderr.exp index e40310ffb..d009abea1 100644 --- a/memcheck/tests/x86-freebsd/reallocarray.stderr.exp +++ b/memcheck/tests/x86-freebsd/reallocarray.stderr.exp @@ -10,7 +10,7 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -realloc() with size 0 +reallocarray() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) by 0x........: main (reallocarray.c:13) Address 0x........ is 0 bytes inside a block of size 40 alloc'd @@ -26,7 +26,7 @@ LEAK SUMMARY: Reachable blocks (those to which a pointer was found) are not shown. To see them, rerun with: --leak-check=full --show-leak-kinds=all -realloc() with size 0 +reallocarray() with size 0 at 0x........: reallocarray (vg_replace_malloc.c:...) by 0x........: main (reallocarray.c:15) Address 0x........ is 0 bytes inside a block of size 1 alloc'd From 4c2d13fd6cf3969e52f535434238cefc93295b51 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 12 Feb 2026 13:05:03 +0100 Subject: [PATCH 315/502] doc: mention other realloc family functions in realloc size zero error description Also add C23 making realloc size zero UB. --- memcheck/docs/mc-manual.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/memcheck/docs/mc-manual.xml b/memcheck/docs/mc-manual.xml index 4eee0bd33..039940d9e 100644 --- a/memcheck/docs/mc-manual.xml +++ b/memcheck/docs/mc-manual.xml @@ -473,8 +473,10 @@ as "silly arguments" and no back-trace was included. The (ab)use or realloc to also do the job of free has been poorly understood for a long time. In the C17 standard -ISO/IEC 9899:2017] the behaviour of realloc when the size argument -is zero is specified as implementation defined. Memcheck warns about +[ISO/IEC 9899:2017] the behaviour of realloc when the size argument +is zero is specified as implementation defined. The C23 standard +[ISO/IEC 9899:2024] has further tightened the requirement on the size +argument, making it undefined behaviour if it is zero. Memcheck warns about the non-portable use or realloc. For example: @@ -487,6 +489,10 @@ the non-portable use or realloc. ==77609== by 0x201978: main (realloczero.c:7) ]]> +The same check on the size argument is performed for other +realloc-style allocation functions, namely reallocarray, +reallocf and malloc_zone_realloc. + Date: Thu, 12 Feb 2026 20:48:01 +0100 Subject: [PATCH 316/502] Solaris regtest: fix build of one x86 SSE test on OmniOS --- none/tests/x86-solaris/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/x86-solaris/Makefile.am b/none/tests/x86-solaris/Makefile.am index eb5b024c7..6c08f768c 100644 --- a/none/tests/x86-solaris/Makefile.am +++ b/none/tests/x86-solaris/Makefile.am @@ -21,7 +21,7 @@ check_PROGRAMS = \ coredump_single_thread_sse \ syscalls -AM_CFLAGS += @FLAG_M32@ +AM_CFLAGS += @FLAG_M32@ ${FLAG_MSSE} AM_CXXFLAGS += @FLAG_M32@ AM_CCASFLAGS += @FLAG_M32@ From 889ad829b1a5853899a3a000b40ebb8c5ab54d3e Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Fri, 13 Feb 2026 12:26:52 +0100 Subject: [PATCH 317/502] Update the LTP version in valgrind testsuite to v20260130 Update the LTP version in valgrind testsuite to v20260130. All patches from auxprogs/ltp-patches were accepted by LTP upstream and included in the release, so these can now be dropped locally. --- NEWS | 1 + auxprogs/Makefile.am | 9 +- auxprogs/ltp-patches/README | 2 +- auxprogs/ltp-patches/listmount04-1.patch | 60 ------- auxprogs/ltp-patches/listmount04-2.patch | 195 ----------------------- auxprogs/ltp-patches/listmount04-3.patch | 88 ---------- 6 files changed, 5 insertions(+), 350 deletions(-) delete mode 100644 auxprogs/ltp-patches/listmount04-1.patch delete mode 100644 auxprogs/ltp-patches/listmount04-2.patch delete mode 100644 auxprogs/ltp-patches/listmount04-3.patch diff --git a/NEWS b/NEWS index ca5c0c6a7..32751bdb0 100644 --- a/NEWS +++ b/NEWS @@ -88,6 +88,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 515265 Add SSE4.1 BLENDPS and PBLENDW instruction for x86 32 bit 515612 Sanity check VG_(realpath) and VG_(readlink) return values 515731 Distinguish between realloc functions in realloc size 0 error messages +515810 Update the LTP version in valgrind testsuite to 20260130 To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am index 9b422b8a6..8099331cb 100644 --- a/auxprogs/Makefile.am +++ b/auxprogs/Makefile.am @@ -21,10 +21,7 @@ LTP_FILTERS = \ filters/select03 \ filters/munmap01 -LTP_PATCHES = \ - ltp-patches/listmount04-1.patch \ - ltp-patches/listmount04-2.patch \ - ltp-patches/listmount04-3.patch +LTP_PATCHES = EXTRA_DIST = \ docs/valgrind-listener-manpage.xml \ @@ -174,8 +171,8 @@ endif endif # Linux Test Project -LTP_VERSION=20250930 -LTP_SHA256_SUM=048fa4d69ddbe8a94aa15da9bdc85713ab07a0abbc3de2b8bdd9757644aef1e4 +LTP_VERSION=20260130 +LTP_SHA256_SUM=5effc9d3eb3f5cd45d47e8ac3d78f59cb8f3f73c8598a2f182ef5b40ddfff311 LTP_TAR_NAME=ltp-full-$(LTP_VERSION).tar.xz LTP_URL=https://github.com/linux-test-project/ltp/releases/download/$(LTP_VERSION)/$(LTP_TAR_NAME) LTP_TAR=$(AUX_CHECK_DIR)/$(LTP_TAR_NAME) diff --git a/auxprogs/ltp-patches/README b/auxprogs/ltp-patches/README index 89df4bff1..18fb5edd3 100644 --- a/auxprogs/ltp-patches/README +++ b/auxprogs/ltp-patches/README @@ -1,5 +1,5 @@ This directory contains LTP patches that are not included in the official LTP tarball. After a new version of LTP is adopted for Valgrind testing, this patch set should be reviewed and cleaned up. Patch filenames are expected to have the -.patch suffix. +.patch suffix. Patches are also listed in ../Makefile.am. diff --git a/auxprogs/ltp-patches/listmount04-1.patch b/auxprogs/ltp-patches/listmount04-1.patch deleted file mode 100644 index 9f9ff4dfa..000000000 --- a/auxprogs/ltp-patches/listmount04-1.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 36c51649dcc175f28fd500c01ba8cdd596f15aa4 Mon Sep 17 00:00:00 2001 -From: Masahiro Yamada -Date: Wed, 3 Dec 2025 17:12:26 +0900 -Subject: [PATCH] listmount04: require kernel version 6.11 - -On Linux kernel 6.8, the listmount04 test fails as follows: - - Running tests....... - tst_buffers.c:57: TINFO: Test is using guarded buffers - tst_test.c:2025: TINFO: LTP version: 20250930 - tst_test.c:2028: TINFO: Tested kernel: 6.8.0 #71 SMP PREEMPT_DYNAMIC Wed Dec 3 16:00:27 JST 2025 x86_64 - tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz' - tst_kconfig.c:676: TINFO: CONFIG_TRACE_IRQFLAGS kernel option detected which might slow the execution - tst_test.c:1846: TINFO: Overall timeout per run is 0h 02m 00s - listmount04.c:128: TPASS: request points to unaccessible memory : EFAULT (14) - listmount04.c:128: TPASS: mnt_ids points to unaccessible memory : EFAULT (14) - listmount04.c:128: TPASS: invalid flags : EINVAL (22) - listmount04.c:128: TPASS: insufficient mnt_id_req.size : EINVAL (22) - listmount04.c:128: TPASS: invalid mnt_id_req.spare : EINVAL (22) - listmount04.c:128: TFAIL: invalid mnt_id_req.param invalid retval 20: SUCCESS (0) - listmount04.c:128: TFAIL: invalid mnt_id_req.mnt_id expected EINVAL: ENOENT (2) - listmount04.c:128: TPASS: non-existant mnt_id : ENOENT (2) - - Summary: - passed 6 - failed 2 - broken 0 - skipped 0 - warnings 0 - INFO: ltp-pan reported some tests FAIL - LTP Version: 20250930 - INFO: Test end time: Wed Dec 3 07:01:33 UTC 2025 - -This test passes only after kernel commit 4bed843b1000 ("fs: reject -invalid last mount id early"), i.e. kernel version 6.11. - -Link: https://lore.kernel.org/ltp/20251203081226.1148236-1-masahiro.yamada@canonical.com/ -Fixes: 141958ad3e ("Add listmount04 test") -Reviewed-by: Petr Vorel -Signed-off-by: Masahiro Yamada ---- - testcases/kernel/syscalls/listmount/listmount04.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c -index a52bad064c0e..a6921a24975d 100644 ---- a/testcases/kernel/syscalls/listmount/listmount04.c -+++ b/testcases/kernel/syscalls/listmount/listmount04.c -@@ -133,7 +133,7 @@ static void run(unsigned int n) - static struct tst_test test = { - .test = run, - .tcnt = ARRAY_SIZE(tcases), -- .min_kver = "6.8", -+ .min_kver = "6.11", - .bufs = (struct tst_buffers []) { - { &request, .size = MNT_ID_REQ_SIZE_VER0 }, - {}, --- -2.52.0 - diff --git a/auxprogs/ltp-patches/listmount04-2.patch b/auxprogs/ltp-patches/listmount04-2.patch deleted file mode 100644 index d1aab03d9..000000000 --- a/auxprogs/ltp-patches/listmount04-2.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 2d066ead3d6ef504c82551b12306e751d23ddb45 Mon Sep 17 00:00:00 2001 -From: Wei Gao -Date: Sun, 14 Dec 2025 02:15:20 +0000 -Subject: [PATCH] listmount04.c: Update struct mnt_id_req support for kernel >= - 6.18 - -Kernel change from v6.18-rc7 -78f0e33cd6c93 ("fs/namespace: correctly handle errors returned by grab_requested_mnt_ns") -causes the test failure with following error message: -listmount04.c:128: TFAIL: invalid mnt_id_req.spare expected EINVAL: EBADF (9) - -The fix require following changes: - -* struct mnt_id_req got new member mnt_ns_fd in v6.18-rc7. That is -fixed in a fallback defintion in lapi/. If the fallback is used is now -done via typedef (that requires also update in statmount.h). - -* New kernels (>= 6.18) have also different errno. This is fixed by -runtime check. - -Link: https://lore.kernel.org/ltp/20251214021541.3256-1-wegao@suse.com/ -Reviewed-by: Petr Vorel -Reviewed-by: Li Wang -Reviewed-by: Cyril Hrubis -Signed-off-by: Wei Gao -[ pvorel: Shorten TCONF, rewrite commit message ] -Signed-off-by: Petr Vorel ---- - configure.ac | 2 +- - include/lapi/mount.h | 10 +++-- - .../kernel/syscalls/listmount/listmount.h | 2 +- - .../kernel/syscalls/listmount/listmount04.c | 37 +++++++++++++++++-- - .../kernel/syscalls/statmount/statmount.h | 2 +- - 5 files changed, 44 insertions(+), 9 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0480f46ca227..a0ebbb34d835 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -262,7 +262,7 @@ AC_CHECK_TYPES([struct cachestat_range],,,[#include ]) - AC_CHECK_TYPES([struct cachestat],,,[#include ]) - - # Defined in , but include/lapi/mount.h includes */ --AC_CHECK_TYPES([struct mnt_id_req],,,[#include ]) -+AC_CHECK_MEMBERS([struct mnt_id_req.mnt_ns_fd],,,[#include ]) - AC_CHECK_TYPES([struct statmount],,,[#include ]) - AC_CHECK_MEMBERS([struct statmount.mnt_ns_id],,,[#include - #include ]) -diff --git a/include/lapi/mount.h b/include/lapi/mount.h -index 0f7bb5e4327f..3b296fc9c275 100644 ---- a/include/lapi/mount.h -+++ b/include/lapi/mount.h -@@ -45,14 +45,18 @@ - # define MS_NOSYMFOLLOW 256 - #endif - --#ifndef HAVE_STRUCT_MNT_ID_REQ --struct mnt_id_req { -+struct mnt_id_req_fallback { - uint32_t size; -- uint32_t spare; -+ uint32_t mnt_ns_fd; - uint64_t mnt_id; - uint64_t param; - uint64_t mnt_ns_id; - }; -+ -+#ifndef HAVE_STRUCT_MNT_ID_REQ_MNT_NS_FD -+typedef struct mnt_id_req_fallback mnt_id_req; -+#else -+typedef struct mnt_id_req mnt_id_req; - #endif - - #ifndef HAVE_STRUCT_STATMOUNT -diff --git a/testcases/kernel/syscalls/listmount/listmount.h b/testcases/kernel/syscalls/listmount/listmount.h -index aad927f7143d..e7ef375d7f38 100644 ---- a/testcases/kernel/syscalls/listmount/listmount.h -+++ b/testcases/kernel/syscalls/listmount/listmount.h -@@ -15,7 +15,7 @@ - static inline ssize_t listmount(uint64_t mnt_id, uint64_t last_mnt_id, - uint64_t list[], size_t num, unsigned int flags) - { -- struct mnt_id_req req = { -+ mnt_id_req req = { - .size = MNT_ID_REQ_SIZE_VER0, - .mnt_id = mnt_id, - .param = last_mnt_id, -diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c -index a6921a24975d..2b8b49101ccb 100644 ---- a/testcases/kernel/syscalls/listmount/listmount04.c -+++ b/testcases/kernel/syscalls/listmount/listmount04.c -@@ -14,14 +14,18 @@ - - #define _GNU_SOURCE - -+#include "config.h" - #include "tst_test.h" - #include "lapi/mount.h" - #include "lapi/syscalls.h" - - #define MNT_SIZE 32 -+#define BEFORE_6_18 1 -+#define AFTER_6_18 2 - --static struct mnt_id_req *request; -+static mnt_id_req *request; - static uint64_t mnt_ids[MNT_SIZE]; -+static int kver; - - static struct tcase { - int req_usage; -@@ -34,6 +38,7 @@ static struct tcase { - uint64_t flags; - int exp_errno; - char *msg; -+ int kver; - } tcases[] = { - { - .req_usage = 0, -@@ -79,6 +84,18 @@ static struct tcase { - .nr_mnt_ids = MNT_SIZE, - .exp_errno = EINVAL, - .msg = "invalid mnt_id_req.spare", -+ .kver = BEFORE_6_18, -+ }, -+ { -+ .req_usage = 1, -+ .size = MNT_ID_REQ_SIZE_VER0, -+ .spare = -1, -+ .mnt_id = LSMT_ROOT, -+ .mnt_ids = mnt_ids, -+ .nr_mnt_ids = MNT_SIZE, -+ .exp_errno = EBADF, -+ .msg = "invalid mnt_id_req.mnt_ns_fd", -+ .kver = AFTER_6_18, - }, - { - .req_usage = 1, -@@ -113,7 +130,12 @@ static struct tcase { - static void run(unsigned int n) - { - struct tcase *tc = &tcases[n]; -- struct mnt_id_req *req = NULL; -+ mnt_id_req *req = NULL; -+ -+ if (tc->kver && tc->kver != kver) { -+ tst_res(TCONF, "Test not suitable for current kernel version"); -+ return; -+ } - - memset(mnt_ids, 0, sizeof(mnt_ids)); - -@@ -122,7 +144,7 @@ static void run(unsigned int n) - req->mnt_id = tc->mnt_id; - req->param = tc->param; - req->size = tc->size; -- req->spare = tc->spare; -+ req->mnt_ns_fd = tc->spare; - } - - TST_EXP_FAIL(tst_syscall(__NR_listmount, req, tc->mnt_ids, -@@ -130,8 +152,17 @@ static void run(unsigned int n) - "%s", tc->msg); - } - -+static void setup(void) -+{ -+ if (tst_kvercmp(6, 18, 0) >= 0) -+ kver = AFTER_6_18; -+ else -+ kver = BEFORE_6_18; -+} -+ - static struct tst_test test = { - .test = run, -+ .setup = setup, - .tcnt = ARRAY_SIZE(tcases), - .min_kver = "6.11", - .bufs = (struct tst_buffers []) { -diff --git a/testcases/kernel/syscalls/statmount/statmount.h b/testcases/kernel/syscalls/statmount/statmount.h -index d21d7f8da101..4217a82d8f31 100644 ---- a/testcases/kernel/syscalls/statmount/statmount.h -+++ b/testcases/kernel/syscalls/statmount/statmount.h -@@ -16,7 +16,7 @@ - static inline int statmount(uint64_t mnt_id, uint64_t mask, struct statmount *buf, - size_t bufsize, unsigned int flags) - { -- struct mnt_id_req req = { -+ mnt_id_req req = { - .size = MNT_ID_REQ_SIZE_VER0, - .mnt_id = mnt_id, - .param = mask, --- -2.52.0 - diff --git a/auxprogs/ltp-patches/listmount04-3.patch b/auxprogs/ltp-patches/listmount04-3.patch deleted file mode 100644 index 2f188a9a9..000000000 --- a/auxprogs/ltp-patches/listmount04-3.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 262221320c6ddd094ee8059c327748dde1644936 Mon Sep 17 00:00:00 2001 -From: Po-Hsu Lin via ltp -Date: Fri, 9 Jan 2026 00:21:52 +0800 -Subject: [PATCH] listmount04.c: update struct mnt_id_req support to kernel >= - 6.17.9 - -The kernel change 78f0e33cd6c93 ("fs/namespace: correctly handle errors -returned by grab_requested_mnt_ns") from 6.18 has been ported to upstream -6.17.9 [1][2]. - -Therefore change the expectation from >= 6.18 to >= 6.17 accodingly. - -[1] https://lwn.net/Articles/1047684/ -[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.17.9&id=8ff97ade - -v2: add comments for this change into the code. -v3: correct the RST syntax and move comment as suggested by Petr Vorel. -v4: correct the patch title. - -Signed-off-by: Po-Hsu Lin -Reviewed-by: Petr Vorel -Acked-by: Andrea Cervesato ---- - .../kernel/syscalls/listmount/listmount04.c | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) - -diff --git a/testcases/kernel/syscalls/listmount/listmount04.c b/testcases/kernel/syscalls/listmount/listmount04.c -index 2b8b49101ccb..919f4c85421c 100644 ---- a/testcases/kernel/syscalls/listmount/listmount04.c -+++ b/testcases/kernel/syscalls/listmount/listmount04.c -@@ -7,6 +7,7 @@ - * Verify that listmount() raises the correct errors according with - * invalid data: - * -+ * - EBADF: invalid mnt_ns_fd - * - EFAULT: req or mnt_id are unaccessible memories - * - EINVAL: invalid flags or mnt_id request - * - ENOENT: non-existent mount point -@@ -20,8 +21,12 @@ - #include "lapi/syscalls.h" - - #define MNT_SIZE 32 --#define BEFORE_6_18 1 --#define AFTER_6_18 2 -+/* -+ * For commit 78f0e33cd6c9 ("fs/namespace: correctly handle errors returned -+ * by grab_requested_mnt_ns") from v6.18-rc7 backported to v6.17.9. -+ */ -+#define BEFORE_6_17_9 1 -+#define AFTER_6_17_9 2 - - static mnt_id_req *request; - static uint64_t mnt_ids[MNT_SIZE]; -@@ -84,7 +89,7 @@ static struct tcase { - .nr_mnt_ids = MNT_SIZE, - .exp_errno = EINVAL, - .msg = "invalid mnt_id_req.spare", -- .kver = BEFORE_6_18, -+ .kver = BEFORE_6_17_9, - }, - { - .req_usage = 1, -@@ -95,7 +100,7 @@ static struct tcase { - .nr_mnt_ids = MNT_SIZE, - .exp_errno = EBADF, - .msg = "invalid mnt_id_req.mnt_ns_fd", -- .kver = AFTER_6_18, -+ .kver = AFTER_6_17_9, - }, - { - .req_usage = 1, -@@ -154,10 +159,10 @@ static void run(unsigned int n) - - static void setup(void) - { -- if (tst_kvercmp(6, 18, 0) >= 0) -- kver = AFTER_6_18; -+ if (tst_kvercmp(6, 17, 9) >= 0) -+ kver = AFTER_6_17_9; - else -- kver = BEFORE_6_18; -+ kver = BEFORE_6_17_9; - } - - static struct tst_test test = { --- -2.52.0 - From c376f22a1c5377d8caeda2f2624ae83fd75a0138 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Fri, 13 Feb 2026 12:38:52 +0100 Subject: [PATCH 318/502] s390x: Simplify interface of non-vector insn format functions Each of the format functions in the translator provides common logic for handling a specific instruction format. So far a format function's interface is defined such that it receives instruction operands as individual arguments. This means that the extraction of operands from the opcode -- despite being common for all invocations of the same format function -- is duplicated every time. This is error-prone, results in longer code overall, and makes the invocations more difficult to read. The code duplication can be avoided by moving the operand extraction to the format functions themselves. Do this for all non-vector instruction formats. --- VEX/priv/guest_s390_toIR.c | 1333 ++++++++++++------------------------ 1 file changed, 440 insertions(+), 893 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 7950269e6..28ee23745 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -8,7 +8,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright IBM Corp. 2010-2024 + Copyright IBM Corp. 2010-2026 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -132,19 +132,8 @@ typedef enum { #define RSI_r1(insn) (((insn) >> 20) & 0xf) #define RSI_r3(insn) (((insn) >> 16) & 0xf) #define RSI_i2(insn) ((insn) & 0xffff) -#define RX_r1(insn) (((insn) >> 20) & 0xf) -#define RX_x2(insn) (((insn) >> 16) & 0xf) -#define RX_b2(insn) (((insn) >> 12) & 0xf) -#define RX_d2(insn) ((insn) & 0xfff) #define S_b2(insn) (((insn) >> 12) & 0xf) #define S_d2(insn) ((insn) & 0xfff) -#define SI_i2(insn) (((insn) >> 16) & 0xff) -#define SI_b1(insn) (((insn) >> 12) & 0xf) -#define SI_d1(insn) ((insn) & 0xfff) -#define SMI_m1(insn) (((insn) >> 52) & 0xf) -#define SMI_b3(insn) (((insn) >> 44) & 0xf) -#define SMI_d3(insn) (((insn) >> 32) & 0xfff) -#define SMI_i2(insn) (((insn) >> 16) & 0xffff) #define RIEd_r1(insn) (((insn) >> 52) & 0xf) #define RIEd_r3(insn) (((insn) >> 48) & 0xf) #define RIEd_i2(insn) (((insn) >> 32) & 0xffff) @@ -172,16 +161,6 @@ typedef enum { #define RIEg_i2(insn) (((insn) >> 32) & 0xffff) #define RIL_r1(insn) (((insn) >> 52) & 0xf) #define RIL_i2(insn) (((insn) >> 16) & 0xffffffff) -#define RIS_r1(insn) (((insn) >> 52) & 0xf) -#define RIS_m3(insn) (((insn) >> 48) & 0xf) -#define RIS_b4(insn) (((insn) >> 44) & 0xf) -#define RIS_d4(insn) (((insn) >> 32) & 0xfff) -#define RIS_i2(insn) (((insn) >> 24) & 0xff) -#define RRS_r1(insn) (((insn) >> 52) & 0xf) -#define RRS_r2(insn) (((insn) >> 48) & 0xf) -#define RRS_b4(insn) (((insn) >> 44) & 0xf) -#define RRS_d4(insn) (((insn) >> 32) & 0xfff) -#define RRS_m3(insn) (((insn) >> 28) & 0xf) #define RSY_r1(insn) (((insn) >> 52) & 0xf) #define RSY_r3(insn) (((insn) >> 48) & 0xf) #define RSY_m3(insn) (((insn) >> 48) & 0xf) @@ -193,28 +172,16 @@ typedef enum { #define RXE_b2(insn) (((insn) >> 44) & 0xf) #define RXE_d2(insn) (((insn) >> 32) & 0xfff) #define RXE_m3(insn) (((insn) >> 28) & 0xf) -#define RXF_r3(insn) (((insn) >> 52) & 0xf) -#define RXF_x2(insn) (((insn) >> 48) & 0xf) -#define RXF_b2(insn) (((insn) >> 44) & 0xf) -#define RXF_d2(insn) (((insn) >> 32) & 0xfff) -#define RXF_r1(insn) (((insn) >> 28) & 0xf) #define RXY_r1(insn) (((insn) >> 52) & 0xf) #define RXY_x2(insn) (((insn) >> 48) & 0xf) #define RXY_b2(insn) (((insn) >> 44) & 0xf) #define RXY_dl2(insn) (((insn) >> 32) & 0xfff) #define RXY_dh2(insn) (((insn) >> 24) & 0xff) -#define SIY_i2(insn) (((insn) >> 48) & 0xff) -#define SIY_b1(insn) (((insn) >> 44) & 0xf) -#define SIY_dl1(insn) (((insn) >> 32) & 0xfff) -#define SIY_dh1(insn) (((insn) >> 24) & 0xff) #define SSa_l(insn) (((insn) >> 48) & 0xff) #define SSa_b1(insn) (((insn) >> 44) & 0xf) #define SSa_d1(insn) (((insn) >> 32) & 0xfff) #define SSa_b2(insn) (((insn) >> 28) & 0xf) #define SSa_d2(insn) (((insn) >> 16) & 0xfff) -#define SIL_b1(insn) (((insn) >> 44) & 0xf) -#define SIL_d1(insn) (((insn) >> 32) & 0xfff) -#define SIL_i2(insn) (((insn) >> 16) & 0xffff) #define VRX_v1(insn) (((insn) >> 52) & 0xf) #define VRX_x2(insn) (((insn) >> 48) & 0xf) #define VRX_b2(insn) (((insn) >> 44) & 0xf) @@ -2724,22 +2691,31 @@ convert_vex_dfpcc_to_s390(IRTemp vex_cc) /*--- Build IR for formats ---*/ /*------------------------------------------------------------*/ static void -s390_format_RIS(void (*irgen)(UChar r1, UChar m3, UChar i2, - IRTemp op4addr), - UChar r1, UChar m3, UChar b4, UShort d4, UChar i2) +s390_format_RIS(void (*irgen)(UChar r1, UChar m3, UChar i2, IRTemp op4addr), + ULong ovl) { + UChar r1 = (ovl >> 52) & 0xf; + UChar m3 = (ovl >> 48) & 0xf; + UChar b4 = (ovl >> 44) & 0xf; + UShort d4 = (ovl >> 32) & 0xfff; + UChar i2 = (ovl >> 24) & 0xff; IRTemp op4addr = newTemp(Ity_I64); - assign(op4addr, binop(Iop_Add64, mkU64(d4), b4 != 0 ? get_gpr_dw0(b4) : - mkU64(0))); + assign(op4addr, + binop(Iop_Add64, mkU64(d4), b4 != 0 ? get_gpr_dw0(b4) : mkU64(0))); irgen(r1, m3, i2, op4addr); } static void s390_format_RRS(void (*irgen)(UChar r1, UChar r2, UChar m3, IRTemp op4addr), - UChar r1, UChar r2, UChar b4, UShort d4, UChar m3) + ULong ovl) { + UChar r1 = (ovl >> 52) & 0xf; + UChar r2 = (ovl >> 48) & 0xf; + UChar b4 = (ovl >> 44) & 0xf; + UShort d4 = (ovl >> 32) & 0xfff; + UChar m3 = (ovl >> 28) & 0xf; IRTemp op4addr = newTemp(Ity_I64); assign(op4addr, binop(Iop_Add64, mkU64(d4), b4 != 0 ? get_gpr_dw0(b4) : @@ -2749,9 +2725,11 @@ s390_format_RRS(void (*irgen)(UChar r1, UChar r2, UChar m3, IRTemp op4addr), } static void -s390_format_RS0(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar b2, UShort d2) +s390_format_RS0(void (*irgen)(UChar r1, IRTemp op2addr), ULong ovl) { + UChar r1 = RS_r1(ovl); + UChar b2 = RS_b2(ovl); + UShort d2 = RS_d2(ovl); IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : @@ -2761,9 +2739,12 @@ s390_format_RS0(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RS(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), - UChar r1, UChar r3, UChar b2, UShort d2) +s390_format_RS(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), ULong ovl) { + UChar r1 = RS_r1(ovl); + UChar r3 = RS_r3(ovl); + UChar b2 = RS_b2(ovl); + UShort d2 = RS_d2(ovl); IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : @@ -2773,11 +2754,15 @@ s390_format_RS(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), } static void -s390_format_RSY(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), - UChar r1, UChar r3, UChar b2, UShort dl2, UChar dh2) +s390_format_RSY(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), ULong ovl) { + UChar r1 = RSY_r1(ovl); + UChar r3 = RSY_r3(ovl); + UChar b2 = RSY_b2(ovl); + UShort dl2 = RSY_dl2(ovl); + UChar dh2 = RSY_dh2(ovl); IRTemp op2addr = newTemp(Ity_I64); - IRTemp d2 = newTemp(Ity_I64); + IRTemp d2 = newTemp(Ity_I64); assign(d2, mkU64(((ULong)(Long)(Char)dh2 << 12) | ((ULong)dl2))); assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : @@ -2787,23 +2772,13 @@ s390_format_RSY(void (*irgen)(UChar r1, UChar r3, IRTemp op2addr), } static void -s390_format_RSYb(void (*irgen)(UChar r1, UChar m3, IRTemp op2addr), - UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) -{ - IRTemp op2addr = newTemp(Ity_I64); - IRTemp d2 = newTemp(Ity_I64); - - assign(d2, mkU64(((ULong)(Long)(Char)dh2 << 12) | ((ULong)dl2))); - assign(op2addr, binop(Iop_Add64, mkexpr(d2), b2 != 0 ? get_gpr_dw0(b2) : - mkU64(0))); - - irgen(r1, m3, op2addr); -} - -static void -s390_format_RSYcond(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar m3, UChar b2, UShort dl2, UChar dh2) +s390_format_RSYcond(void (*irgen)(UChar r1, IRTemp op2addr), ULong ovl) { + UChar r1 = RSY_r1(ovl); + UChar m3 = RSY_m3(ovl); + UChar b2 = RSY_b2(ovl); + UShort dl2 = RSY_dl2(ovl); + UChar dh2 = RSY_dh2(ovl); IRTemp op2addr = newTemp(Ity_I64); IRTemp d2 = newTemp(Ity_I64); @@ -2819,9 +2794,12 @@ s390_format_RSYcond(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RX(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort d2) +s390_format_RX(void (*irgen)(UChar r1, IRTemp op2addr), ULong ovl) { + UChar r1 = (ovl >> 20) & 0xf; + UChar x2 = (ovl >> 16) & 0xf; + UChar b2 = (ovl >> 12) & 0xf; + UShort d2 = ovl & 0xfff; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), @@ -2832,9 +2810,12 @@ s390_format_RX(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RXE0(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort d2) +s390_format_RXE0(void (*irgen)(UChar r1, IRTemp op2addr), ULong ovl) { + UChar r1 = RXE_r1(ovl); + UChar x2 = RXE_x2(ovl); + UChar b2 = RXE_b2(ovl); + UShort d2 = RXE_d2(ovl); IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), @@ -2845,9 +2826,13 @@ s390_format_RXE0(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_RXE(void (*irgen)(UChar r1, IRTemp op2addr, UChar m3), - UChar r1, UChar x2, UChar b2, UShort d2, UChar m3) +s390_format_RXE(void (*irgen)(UChar r1, IRTemp op2addr, UChar m3), ULong ovl) { + UChar r1 = RXE_r1(ovl); + UChar x2 = RXE_x2(ovl); + UChar b2 = RXE_b2(ovl); + UShort d2 = RXE_d2(ovl); + UChar m3 = RXE_m3(ovl); IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), @@ -2858,9 +2843,13 @@ s390_format_RXE(void (*irgen)(UChar r1, IRTemp op2addr, UChar m3), } static void -s390_format_RXF(void (*irgen)(UChar, IRTemp, UChar), - UChar r3, UChar x2, UChar b2, UShort d2, UChar r1) +s390_format_RXF(void (*irgen)(UChar, IRTemp, UChar), ULong ovl) { + UChar r3 = (ovl >> 52) & 0xf; + UChar x2 = (ovl >> 48) & 0xf; + UChar b2 = (ovl >> 44) & 0xf; + UShort d2 = (ovl >> 32) & 0xfff; + UChar r1 = (ovl >> 28) & 0xf; IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkU64(d2), @@ -2871,11 +2860,15 @@ s390_format_RXF(void (*irgen)(UChar, IRTemp, UChar), } static void -s390_format_RXY(void (*irgen)(UChar r1, IRTemp op2addr), - UChar r1, UChar x2, UChar b2, UShort dl2, UChar dh2) +s390_format_RXY(void (*irgen)(UChar r1, IRTemp op2addr), ULong ovl) { + UChar r1 = (ovl >> 52) & 0xf; + UChar x2 = (ovl >> 48) & 0xf; + UChar b2 = (ovl >> 44) & 0xf; + UShort dl2 = (ovl >> 32) & 0xfff; + UChar dh2 = (ovl >> 24) & 0xff; IRTemp op2addr = newTemp(Ity_I64); - IRTemp d2 = newTemp(Ity_I64); + IRTemp d2 = newTemp(Ity_I64); assign(d2, mkU64(((ULong)(Long)(Char)dh2 << 12) | ((ULong)dl2))); assign(op2addr, binop(Iop_Add64, binop(Iop_Add64, mkexpr(d2), @@ -2886,9 +2879,10 @@ s390_format_RXY(void (*irgen)(UChar r1, IRTemp op2addr), } static void -s390_format_S(void (*irgen)(IRTemp op2addr), - UChar b2, UShort d2) +s390_format_S(void (*irgen)(IRTemp op2addr), ULong ovl) { + UChar b2 = S_b2(ovl); + UShort d2 = S_d2(ovl); IRTemp op2addr = newTemp(Ity_I64); assign(op2addr, binop(Iop_Add64, mkU64(d2), b2 != 0 ? get_gpr_dw0(b2) : @@ -2898,9 +2892,11 @@ s390_format_S(void (*irgen)(IRTemp op2addr), } static void -s390_format_SI(void (*irgen)(UChar i2, IRTemp op1addr), - UChar i2, UChar b1, UShort d1) +s390_format_SI(void (*irgen)(UChar i2, IRTemp op1addr), ULong ovl) { + UChar i2 = (ovl >> 16) & 0xff; + UChar b1 = (ovl >> 12) & 0xf; + UShort d1 = ovl & 0xfff; IRTemp op1addr = newTemp(Ity_I64); assign(op1addr, binop(Iop_Add64, mkU64(d1), b1 != 0 ? get_gpr_dw0(b1) : @@ -2910,11 +2906,14 @@ s390_format_SI(void (*irgen)(UChar i2, IRTemp op1addr), } static void -s390_format_SIY(void (*irgen)(UChar i2, IRTemp op1addr), - UChar i2, UChar b1, UShort dl1, UChar dh1) +s390_format_SIY(void (*irgen)(UChar i2, IRTemp op1addr), ULong ovl) { + UChar i2 = (ovl >> 48) & 0xff; + UChar b1 = (ovl >> 44) & 0xf; + UShort dl1 = (ovl >> 32) & 0xfff; + UChar dh1 = (ovl >> 24) & 0xff; IRTemp op1addr = newTemp(Ity_I64); - IRTemp d1 = newTemp(Ity_I64); + IRTemp d1 = newTemp(Ity_I64); assign(d1, mkU64(((ULong)(Long)(Char)dh1 << 12) | ((ULong)dl1))); assign(op1addr, binop(Iop_Add64, mkexpr(d1), b1 != 0 ? get_gpr_dw0(b1) : @@ -2924,9 +2923,12 @@ s390_format_SIY(void (*irgen)(UChar i2, IRTemp op1addr), } static void -s390_format_SMI(void (*irgen)(UChar m1, UShort i2, IRTemp op3addr), - UChar m1, UShort i2, UChar b3, UShort d3) +s390_format_SMI(void (*irgen)(UChar m1, UShort i2, IRTemp op3addr), ULong ovl) { + UChar m1 = (ovl >> 52) & 0xf; + UChar b3 = (ovl >> 44) & 0xf; + UShort d3 = (ovl >> 32) & 0xfff; + UShort i2 = (ovl >> 16) & 0xffff; IRTemp op3addr = newTemp(Ity_I64); assign(op3addr, @@ -2936,9 +2938,13 @@ s390_format_SMI(void (*irgen)(UChar m1, UShort i2, IRTemp op3addr), } static void -s390_format_SSa(void (*irgen)(UChar, IRTemp, IRTemp), - UChar l, UChar b1, UShort d1, UChar b2, UShort d2) +s390_format_SSa(void (*irgen)(UChar, IRTemp, IRTemp), ULong ovl) { + UChar l = SSa_l(ovl); + UChar b1 = SSa_b1(ovl); + UShort d1 = SSa_d1(ovl); + UChar b2 = SSa_b2(ovl); + UShort d2 = SSa_d2(ovl); IRTemp op1addr = newTemp(Ity_I64); IRTemp op2addr = newTemp(Ity_I64); @@ -2951,9 +2957,12 @@ s390_format_SSa(void (*irgen)(UChar, IRTemp, IRTemp), } static void -s390_format_SSE(void (*irgen)(IRTemp, IRTemp), - UChar b1, UShort d1, UChar b2, UShort d2) +s390_format_SSE(void (*irgen)(IRTemp, IRTemp), ULong ovl) { + UChar b1 = SSa_b1(ovl); + UShort d1 = SSa_d1(ovl); + UChar b2 = SSa_b2(ovl); + UShort d2 = SSa_d2(ovl); IRTemp op1addr = newTemp(Ity_I64); IRTemp op2addr = newTemp(Ity_I64); @@ -2966,9 +2975,11 @@ s390_format_SSE(void (*irgen)(IRTemp, IRTemp), } static void -s390_format_SIL(void (*irgen)(UShort i2, IRTemp op1addr), - UChar b1, UShort d1, UShort i2) +s390_format_SIL(void (*irgen)(UShort i2, IRTemp op1addr), ULong ovl) { + UChar b1 = (ovl >> 44) & 0xf; + UShort d1 = (ovl >> 32) & 0xfff; + UShort i2 = (ovl >> 16) & 0xffff; IRTemp op1addr = newTemp(Ity_I64); assign(op1addr, binop(Iop_Add64, mkU64(d1), b1 != 0 ? get_gpr_dw0(b1) : @@ -17854,7 +17865,7 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb201: /* STBEAR */ goto unimplemented; case 0xb202: /* STIDP */ goto unimplemented; case 0xb204: /* SCK */ goto unimplemented; - case 0xb205: s390_format_S(s390_irgen_STCK, S_b2(ovl), S_d2(ovl)); + case 0xb205: s390_format_S(s390_irgen_STCK, ovl); goto ok; case 0xb206: /* SCKC */ goto unimplemented; case 0xb207: /* STCKC */ goto unimplemented; @@ -17934,10 +17945,10 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb274: /* SIGA */ goto unimplemented; case 0xb276: /* XSCH */ goto unimplemented; case 0xb277: /* RP */ goto unimplemented; - case 0xb278: s390_format_S(s390_irgen_STCKE, S_b2(ovl), S_d2(ovl)); + case 0xb278: s390_format_S(s390_irgen_STCKE, ovl); goto ok; case 0xb279: /* SACF */ goto unimplemented; - case 0xb27c: s390_format_S(s390_irgen_STCKF, S_b2(ovl), S_d2(ovl)); + case 0xb27c: s390_format_S(s390_irgen_STCKF, ovl); goto ok; case 0xb27d: /* STSI */ goto unimplemented; case 0xb280: /* LPP */ goto unimplemented; @@ -17947,11 +17958,11 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb287: /* LSCTL */ goto unimplemented; case 0xb28e: /* QCTRI */ goto unimplemented; case 0xb28f: /* QPACI */ goto unimplemented; - case 0xb299: s390_format_S(s390_irgen_SRNM, S_b2(ovl), S_d2(ovl)); + case 0xb299: s390_format_S(s390_irgen_SRNM, ovl); goto ok; - case 0xb29c: s390_format_S(s390_irgen_STFPC, S_b2(ovl), S_d2(ovl)); + case 0xb29c: s390_format_S(s390_irgen_STFPC, ovl); goto ok; - case 0xb29d: s390_format_S(s390_irgen_LFPC, S_b2(ovl), S_d2(ovl)); + case 0xb29d: s390_format_S(s390_irgen_LFPC, ovl); goto ok; case 0xb2a5: s390_irgen_TRE(RRE_r1(ovl), RRE_r2(ovl)); goto ok; @@ -17965,7 +17976,7 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb2b2: /* LPSWE */ goto unimplemented; case 0xb2b8: s390_irgen_SRNMB(S_b2(ovl), S_d2(ovl)); goto ok; - case 0xb2b9: s390_format_S(s390_irgen_SRNMT, S_b2(ovl), S_d2(ovl)); + case 0xb2b9: s390_format_S(s390_irgen_SRNMT, ovl); goto ok; case 0xb2bd: /* LFAS */ goto unimplemented; case 0xb2e0: /* SCCTR */ goto unimplemented; @@ -18631,70 +18642,70 @@ s390_decode_4byte_and_irgen(const UChar *bytes) } switch ((ovl & 0xff000000) >> 24) { - case 0x40: s390_format_RX(s390_irgen_STH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x41: s390_format_RX(s390_irgen_LA, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x42: s390_format_RX(s390_irgen_STC, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x43: s390_format_RX(s390_irgen_IC, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x44: s390_format_RX(s390_irgen_EX, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x40: s390_format_RX(s390_irgen_STH, ovl); + goto ok; + case 0x41: s390_format_RX(s390_irgen_LA, ovl); + goto ok; + case 0x42: s390_format_RX(s390_irgen_STC, ovl); + goto ok; + case 0x43: s390_format_RX(s390_irgen_IC, ovl); + goto ok; + case 0x44: s390_format_RX(s390_irgen_EX, ovl); + goto ok; case 0x45: /* BAL */ goto unimplemented; - case 0x46: s390_format_RX(s390_irgen_BCT, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x47: s390_format_RX(s390_irgen_BC, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x48: s390_format_RX(s390_irgen_LH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x49: s390_format_RX(s390_irgen_CH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4a: s390_format_RX(s390_irgen_AH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4b: s390_format_RX(s390_irgen_SH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4c: s390_format_RX(s390_irgen_MH, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4d: s390_format_RX(s390_irgen_BAS, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4e: s390_format_RX(s390_irgen_CVD, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x4f: s390_format_RX(s390_irgen_CVB, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x50: s390_format_RX(s390_irgen_ST, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x51: s390_format_RX(s390_irgen_LAE, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x54: s390_format_RX(s390_irgen_N, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x55: s390_format_RX(s390_irgen_CL, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x56: s390_format_RX(s390_irgen_O, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x57: s390_format_RX(s390_irgen_X, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x58: s390_format_RX(s390_irgen_L, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x59: s390_format_RX(s390_irgen_C, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5a: s390_format_RX(s390_irgen_A, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5b: s390_format_RX(s390_irgen_S, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5c: s390_format_RX(s390_irgen_M, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5d: s390_format_RX(s390_irgen_D, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5e: s390_format_RX(s390_irgen_AL, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x5f: s390_format_RX(s390_irgen_SL, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x60: s390_format_RX(s390_irgen_STD, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x46: s390_format_RX(s390_irgen_BCT, ovl); + goto ok; + case 0x47: s390_format_RX(s390_irgen_BC, ovl); + goto ok; + case 0x48: s390_format_RX(s390_irgen_LH, ovl); + goto ok; + case 0x49: s390_format_RX(s390_irgen_CH, ovl); + goto ok; + case 0x4a: s390_format_RX(s390_irgen_AH, ovl); + goto ok; + case 0x4b: s390_format_RX(s390_irgen_SH, ovl); + goto ok; + case 0x4c: s390_format_RX(s390_irgen_MH, ovl); + goto ok; + case 0x4d: s390_format_RX(s390_irgen_BAS, ovl); + goto ok; + case 0x4e: s390_format_RX(s390_irgen_CVD, ovl); + goto ok; + case 0x4f: s390_format_RX(s390_irgen_CVB, ovl); + goto ok; + case 0x50: s390_format_RX(s390_irgen_ST, ovl); + goto ok; + case 0x51: s390_format_RX(s390_irgen_LAE, ovl); + goto ok; + case 0x54: s390_format_RX(s390_irgen_N, ovl); + goto ok; + case 0x55: s390_format_RX(s390_irgen_CL, ovl); + goto ok; + case 0x56: s390_format_RX(s390_irgen_O, ovl); + goto ok; + case 0x57: s390_format_RX(s390_irgen_X, ovl); + goto ok; + case 0x58: s390_format_RX(s390_irgen_L, ovl); + goto ok; + case 0x59: s390_format_RX(s390_irgen_C, ovl); + goto ok; + case 0x5a: s390_format_RX(s390_irgen_A, ovl); + goto ok; + case 0x5b: s390_format_RX(s390_irgen_S, ovl); + goto ok; + case 0x5c: s390_format_RX(s390_irgen_M, ovl); + goto ok; + case 0x5d: s390_format_RX(s390_irgen_D, ovl); + goto ok; + case 0x5e: s390_format_RX(s390_irgen_AL, ovl); + goto ok; + case 0x5f: s390_format_RX(s390_irgen_SL, ovl); + goto ok; + case 0x60: s390_format_RX(s390_irgen_STD, ovl); + goto ok; case 0x67: /* MXD */ goto unimplemented; - case 0x68: s390_format_RX(s390_irgen_LD, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x68: s390_format_RX(s390_irgen_LD, ovl); + goto ok; case 0x69: /* CD */ goto unimplemented; case 0x6a: /* AD */ goto unimplemented; case 0x6b: /* SD */ goto unimplemented; @@ -18702,12 +18713,12 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0x6d: /* DD */ goto unimplemented; case 0x6e: /* AW */ goto unimplemented; case 0x6f: /* SW */ goto unimplemented; - case 0x70: s390_format_RX(s390_irgen_STE, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x71: s390_format_RX(s390_irgen_MS, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; - case 0x78: s390_format_RX(s390_irgen_LE, RX_r1(ovl), RX_x2(ovl), - RX_b2(ovl), RX_d2(ovl)); goto ok; + case 0x70: s390_format_RX(s390_irgen_STE, ovl); + goto ok; + case 0x71: s390_format_RX(s390_irgen_MS, ovl); + goto ok; + case 0x78: s390_format_RX(s390_irgen_LE, ovl); + goto ok; case 0x79: /* CE */ goto unimplemented; case 0x7a: /* AE */ goto unimplemented; case 0x7b: /* SE */ goto unimplemented; @@ -18720,72 +18731,50 @@ s390_decode_4byte_and_irgen(const UChar *bytes) goto ok; case 0x85: s390_irgen_BRXLE(RSI_r1(ovl), RSI_r3(ovl), RSI_i2(ovl)); goto ok; - case 0x86: s390_format_RS(s390_irgen_BXH, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0x86: s390_format_RS(s390_irgen_BXH, ovl); goto ok; - case 0x87: s390_format_RS(s390_irgen_BXLE, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0x87: s390_format_RS(s390_irgen_BXLE, ovl); goto ok; - case 0x88: s390_format_RS0(s390_irgen_SRL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x88: s390_format_RS0(s390_irgen_SRL, ovl); goto ok; - case 0x89: s390_format_RS0(s390_irgen_SLL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x89: s390_format_RS0(s390_irgen_SLL, ovl); goto ok; - case 0x8a: s390_format_RS0(s390_irgen_SRA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x8a: s390_format_RS0(s390_irgen_SRA, ovl); goto ok; - case 0x8b: s390_format_RS0(s390_irgen_SLA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x8b: s390_format_RS0(s390_irgen_SLA, ovl); goto ok; - case 0x8c: s390_format_RS0(s390_irgen_SRDL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x8c: s390_format_RS0(s390_irgen_SRDL, ovl); goto ok; - case 0x8d: s390_format_RS0(s390_irgen_SLDL, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x8d: s390_format_RS0(s390_irgen_SLDL, ovl); goto ok; - case 0x8e: s390_format_RS0(s390_irgen_SRDA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x8e: s390_format_RS0(s390_irgen_SRDA, ovl); goto ok; - case 0x8f: s390_format_RS0(s390_irgen_SLDA, RS_r1(ovl), RS_b2(ovl), - RS_d2(ovl)); + case 0x8f: s390_format_RS0(s390_irgen_SLDA, ovl); goto ok; - case 0x90: s390_format_RS(s390_irgen_STM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0x90: s390_format_RS(s390_irgen_STM, ovl); goto ok; - case 0x91: s390_format_SI(s390_irgen_TM, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); + case 0x91: s390_format_SI(s390_irgen_TM, ovl); goto ok; - case 0x92: s390_format_SI(s390_irgen_MVI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); + case 0x92: s390_format_SI(s390_irgen_MVI, ovl); goto ok; - case 0x94: s390_format_SI(s390_irgen_NI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); + case 0x94: s390_format_SI(s390_irgen_NI, ovl); goto ok; - case 0x95: s390_format_SI(s390_irgen_CLI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); + case 0x95: s390_format_SI(s390_irgen_CLI, ovl); goto ok; - case 0x96: s390_format_SI(s390_irgen_OI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); + case 0x96: s390_format_SI(s390_irgen_OI, ovl); goto ok; - case 0x97: s390_format_SI(s390_irgen_XI, SI_i2(ovl), SI_b1(ovl), - SI_d1(ovl)); + case 0x97: s390_format_SI(s390_irgen_XI, ovl); goto ok; - case 0x98: s390_format_RS(s390_irgen_LM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0x98: s390_format_RS(s390_irgen_LM, ovl); goto ok; case 0x99: /* TRACE */ goto unimplemented; - case 0x9a: s390_format_RS(s390_irgen_LAM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0x9a: s390_format_RS(s390_irgen_LAM, ovl); goto ok; - case 0x9b: s390_format_RS(s390_irgen_STAM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0x9b: s390_format_RS(s390_irgen_STAM, ovl); goto ok; - case 0xa8: s390_format_RS(s390_irgen_MVCLE, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0xa8: s390_format_RS(s390_irgen_MVCLE, ovl); goto ok; - case 0xa9: s390_format_RS(s390_irgen_CLCLE, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0xa9: s390_format_RS(s390_irgen_CLCLE, ovl); goto ok; case 0xac: /* STNSM */ goto unimplemented; case 0xad: /* STOSM */ goto unimplemented; @@ -18794,20 +18783,15 @@ s390_decode_4byte_and_irgen(const UChar *bytes) case 0xb1: /* LRA */ goto unimplemented; case 0xb6: /* STCTL */ goto unimplemented; case 0xb7: /* LCTL */ goto unimplemented; - case 0xba: s390_format_RS(s390_irgen_CS, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0xba: s390_format_RS(s390_irgen_CS, ovl); goto ok; - case 0xbb: s390_format_RS(s390_irgen_CDS, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0xbb: s390_format_RS(s390_irgen_CDS, ovl); goto ok; - case 0xbd: s390_format_RS(s390_irgen_CLM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0xbd: s390_format_RS(s390_irgen_CLM, ovl); goto ok; - case 0xbe: s390_format_RS(s390_irgen_STCM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0xbe: s390_format_RS(s390_irgen_STCM, ovl); goto ok; - case 0xbf: s390_format_RS(s390_irgen_ICM, RS_r1(ovl), RS_r3(ovl), - RS_b2(ovl), RS_d2(ovl)); + case 0xbf: s390_format_RS(s390_irgen_ICM, ovl); goto ok; } @@ -18828,242 +18812,128 @@ s390_decode_6byte_and_irgen(const UChar *bytes) ((ULong)bytes[4] << 24) | ((ULong)bytes[5] << 16); switch ((ovl >> 16) & 0xff00000000ffULL) { - case 0xe30000000002ULL: s390_format_RXY(s390_irgen_LTG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000002ULL: s390_format_RXY(s390_irgen_LTG, ovl); goto ok; case 0xe30000000003ULL: /* LRAG */ goto unimplemented; - case 0xe30000000004ULL: s390_format_RXY(s390_irgen_LG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000004ULL: s390_format_RXY(s390_irgen_LG, ovl); goto ok; - case 0xe30000000006ULL: s390_format_RXY(s390_irgen_CVBY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000006ULL: s390_format_RXY(s390_irgen_CVBY, ovl); goto ok; - case 0xe30000000008ULL: s390_format_RXY(s390_irgen_AG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000008ULL: s390_format_RXY(s390_irgen_AG, ovl); goto ok; - case 0xe30000000009ULL: s390_format_RXY(s390_irgen_SG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000009ULL: s390_format_RXY(s390_irgen_SG, ovl); goto ok; - case 0xe3000000000aULL: s390_format_RXY(s390_irgen_ALG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000000aULL: s390_format_RXY(s390_irgen_ALG, ovl); goto ok; - case 0xe3000000000bULL: s390_format_RXY(s390_irgen_SLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000000bULL: s390_format_RXY(s390_irgen_SLG, ovl); goto ok; - case 0xe3000000000cULL: s390_format_RXY(s390_irgen_MSG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000000cULL: s390_format_RXY(s390_irgen_MSG, ovl); goto ok; - case 0xe3000000000dULL: s390_format_RXY(s390_irgen_DSG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000000dULL: s390_format_RXY(s390_irgen_DSG, ovl); goto ok; case 0xe3000000000eULL: /* CVBG */ goto unimplemented; - case 0xe3000000000fULL: s390_format_RXY(s390_irgen_LRVG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000000fULL: s390_format_RXY(s390_irgen_LRVG, ovl); goto ok; - case 0xe30000000012ULL: s390_format_RXY(s390_irgen_LT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000012ULL: s390_format_RXY(s390_irgen_LT, ovl); goto ok; case 0xe30000000013ULL: /* LRAY */ goto unimplemented; - case 0xe30000000014ULL: s390_format_RXY(s390_irgen_LGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000014ULL: s390_format_RXY(s390_irgen_LGF, ovl); goto ok; - case 0xe30000000015ULL: s390_format_RXY(s390_irgen_LGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); + case 0xe30000000015ULL: s390_format_RXY(s390_irgen_LGH, ovl); goto ok; - case 0xe30000000016ULL: s390_format_RXY(s390_irgen_LLGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000016ULL: s390_format_RXY(s390_irgen_LLGF, ovl); goto ok; - case 0xe30000000017ULL: s390_format_RXY(s390_irgen_LLGT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000017ULL: s390_format_RXY(s390_irgen_LLGT, ovl); goto ok; - case 0xe30000000018ULL: s390_format_RXY(s390_irgen_AGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000018ULL: s390_format_RXY(s390_irgen_AGF, ovl); goto ok; - case 0xe30000000019ULL: s390_format_RXY(s390_irgen_SGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), - RXY_dh2(ovl)); + case 0xe30000000019ULL: s390_format_RXY(s390_irgen_SGF, ovl); goto ok; - case 0xe3000000001aULL: s390_format_RXY(s390_irgen_ALGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000001aULL: s390_format_RXY(s390_irgen_ALGF, ovl); goto ok; - case 0xe3000000001bULL: s390_format_RXY(s390_irgen_SLGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000001bULL: s390_format_RXY(s390_irgen_SLGF, ovl); goto ok; - case 0xe3000000001cULL: s390_format_RXY(s390_irgen_MSGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000001cULL: s390_format_RXY(s390_irgen_MSGF, ovl); goto ok; - case 0xe3000000001dULL: s390_format_RXY(s390_irgen_DSGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000001dULL: s390_format_RXY(s390_irgen_DSGF, ovl); goto ok; - case 0xe3000000001eULL: s390_format_RXY(s390_irgen_LRV, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000001eULL: s390_format_RXY(s390_irgen_LRV, ovl); goto ok; - case 0xe3000000001fULL: s390_format_RXY(s390_irgen_LRVH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000001fULL: s390_format_RXY(s390_irgen_LRVH, ovl); goto ok; - case 0xe30000000020ULL: s390_format_RXY(s390_irgen_CG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000020ULL: s390_format_RXY(s390_irgen_CG, ovl); goto ok; - case 0xe30000000021ULL: s390_format_RXY(s390_irgen_CLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000021ULL: s390_format_RXY(s390_irgen_CLG, ovl); goto ok; - case 0xe30000000024ULL: s390_format_RXY(s390_irgen_STG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000024ULL: s390_format_RXY(s390_irgen_STG, ovl); goto ok; case 0xe30000000025ULL: /* NTSTG */ goto unimplemented; - case 0xe30000000026ULL: s390_format_RXY(s390_irgen_CVDY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000026ULL: s390_format_RXY(s390_irgen_CVDY, ovl); goto ok; - case 0xe3000000002aULL: s390_format_RXY(s390_irgen_LZRG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000002aULL: s390_format_RXY(s390_irgen_LZRG, ovl); goto ok; case 0xe3000000002eULL: /* CVDG */ goto unimplemented; - case 0xe3000000002fULL: s390_format_RXY(s390_irgen_STRVG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000002fULL: s390_format_RXY(s390_irgen_STRVG, ovl); goto ok; - case 0xe30000000030ULL: s390_format_RXY(s390_irgen_CGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000030ULL: s390_format_RXY(s390_irgen_CGF, ovl); goto ok; - case 0xe30000000031ULL: s390_format_RXY(s390_irgen_CLGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000031ULL: s390_format_RXY(s390_irgen_CLGF, ovl); goto ok; - case 0xe30000000032ULL: s390_format_RXY(s390_irgen_LTGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000032ULL: s390_format_RXY(s390_irgen_LTGF, ovl); goto ok; - case 0xe30000000034ULL: s390_format_RXY(s390_irgen_CGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000034ULL: s390_format_RXY(s390_irgen_CGH, ovl); goto ok; case 0xe30000000036ULL: s390_irgen_PFD(); goto ok; - case 0xe30000000038ULL: s390_format_RXY(s390_irgen_AGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000038ULL: s390_format_RXY(s390_irgen_AGH, ovl); goto ok; - case 0xe30000000039ULL: s390_format_RXY(s390_irgen_SGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000039ULL: s390_format_RXY(s390_irgen_SGH, ovl); goto ok; - case 0xe3000000003aULL: s390_format_RXY(s390_irgen_LLZRGF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000003aULL: s390_format_RXY(s390_irgen_LLZRGF, ovl); goto ok; - case 0xe3000000003bULL: s390_format_RXY(s390_irgen_LZRF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000003bULL: s390_format_RXY(s390_irgen_LZRF, ovl); goto ok; - case 0xe3000000003cULL: s390_format_RXY(s390_irgen_MGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000003cULL: s390_format_RXY(s390_irgen_MGH, ovl); goto ok; - case 0xe3000000003eULL: s390_format_RXY(s390_irgen_STRV, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000003eULL: s390_format_RXY(s390_irgen_STRV, ovl); goto ok; - case 0xe3000000003fULL: s390_format_RXY(s390_irgen_STRVH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000003fULL: s390_format_RXY(s390_irgen_STRVH, ovl); goto ok; - case 0xe30000000046ULL: s390_format_RXY(s390_irgen_BCTG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000046ULL: s390_format_RXY(s390_irgen_BCTG, ovl); goto ok; - case 0xe30000000047ULL: s390_format_RXY(s390_irgen_BIC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000047ULL: s390_format_RXY(s390_irgen_BIC, ovl); goto ok; case 0xe30000000048ULL: /* LLGFSG */ goto unimplemented; case 0xe30000000049ULL: /* STGSC */ goto unimplemented; case 0xe3000000004cULL: /* LGG */ goto unimplemented; case 0xe3000000004dULL: /* LGSC */ goto unimplemented; - case 0xe30000000050ULL: s390_format_RXY(s390_irgen_STY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000050ULL: s390_format_RXY(s390_irgen_STY, ovl); goto ok; - case 0xe30000000051ULL: s390_format_RXY(s390_irgen_MSY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000051ULL: s390_format_RXY(s390_irgen_MSY, ovl); goto ok; - case 0xe30000000053ULL: s390_format_RXY(s390_irgen_MSC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000053ULL: s390_format_RXY(s390_irgen_MSC, ovl); goto ok; - case 0xe30000000054ULL: s390_format_RXY(s390_irgen_NY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000054ULL: s390_format_RXY(s390_irgen_NY, ovl); goto ok; - case 0xe30000000055ULL: s390_format_RXY(s390_irgen_CLY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000055ULL: s390_format_RXY(s390_irgen_CLY, ovl); goto ok; - case 0xe30000000056ULL: s390_format_RXY(s390_irgen_OY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000056ULL: s390_format_RXY(s390_irgen_OY, ovl); goto ok; - case 0xe30000000057ULL: s390_format_RXY(s390_irgen_XY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000057ULL: s390_format_RXY(s390_irgen_XY, ovl); goto ok; - case 0xe30000000058ULL: s390_format_RXY(s390_irgen_LY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000058ULL: s390_format_RXY(s390_irgen_LY, ovl); goto ok; - case 0xe30000000059ULL: s390_format_RXY(s390_irgen_CY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000059ULL: s390_format_RXY(s390_irgen_CY, ovl); goto ok; - case 0xe3000000005aULL: s390_format_RXY(s390_irgen_AY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000005aULL: s390_format_RXY(s390_irgen_AY, ovl); goto ok; - case 0xe3000000005bULL: s390_format_RXY(s390_irgen_SY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000005bULL: s390_format_RXY(s390_irgen_SY, ovl); goto ok; - case 0xe3000000005cULL: s390_format_RXY(s390_irgen_MFY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000005cULL: s390_format_RXY(s390_irgen_MFY, ovl); goto ok; - case 0xe3000000005eULL: s390_format_RXY(s390_irgen_ALY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000005eULL: s390_format_RXY(s390_irgen_ALY, ovl); goto ok; - case 0xe3000000005fULL: s390_format_RXY(s390_irgen_SLY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000005fULL: s390_format_RXY(s390_irgen_SLY, ovl); goto ok; case 0xe30000000060ULL: /* LXAB */ goto unimplemented; case 0xe30000000061ULL: /* LLXAB */ goto unimplemented; @@ -19075,190 +18945,99 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe30000000067ULL: /* LLXAG */ goto unimplemented; case 0xe30000000068ULL: /* LXAQ */ goto unimplemented; case 0xe30000000069ULL: /* LLXAQ */ goto unimplemented; - case 0xe30000000070ULL: s390_format_RXY(s390_irgen_STHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000070ULL: s390_format_RXY(s390_irgen_STHY, ovl); goto ok; - case 0xe30000000071ULL: s390_format_RXY(s390_irgen_LAY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000071ULL: s390_format_RXY(s390_irgen_LAY, ovl); goto ok; - case 0xe30000000072ULL: s390_format_RXY(s390_irgen_STCY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000072ULL: s390_format_RXY(s390_irgen_STCY, ovl); goto ok; - case 0xe30000000073ULL: s390_format_RXY(s390_irgen_ICY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000073ULL: s390_format_RXY(s390_irgen_ICY, ovl); goto ok; - case 0xe30000000075ULL: s390_format_RXY(s390_irgen_LAEY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000075ULL: s390_format_RXY(s390_irgen_LAEY, ovl); goto ok; - case 0xe30000000076ULL: s390_format_RXY(s390_irgen_LB, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000076ULL: s390_format_RXY(s390_irgen_LB, ovl); goto ok; - case 0xe30000000077ULL: s390_format_RXY(s390_irgen_LGB, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000077ULL: s390_format_RXY(s390_irgen_LGB, ovl); goto ok; - case 0xe30000000078ULL: s390_format_RXY(s390_irgen_LHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000078ULL: s390_format_RXY(s390_irgen_LHY, ovl); goto ok; - case 0xe30000000079ULL: s390_format_RXY(s390_irgen_CHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000079ULL: s390_format_RXY(s390_irgen_CHY, ovl); goto ok; - case 0xe3000000007aULL: s390_format_RXY(s390_irgen_AHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000007aULL: s390_format_RXY(s390_irgen_AHY, ovl); goto ok; - case 0xe3000000007bULL: s390_format_RXY(s390_irgen_SHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000007bULL: s390_format_RXY(s390_irgen_SHY, ovl); goto ok; - case 0xe3000000007cULL: s390_format_RXY(s390_irgen_MHY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000007cULL: s390_format_RXY(s390_irgen_MHY, ovl); goto ok; - case 0xe30000000080ULL: s390_format_RXY(s390_irgen_NG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000080ULL: s390_format_RXY(s390_irgen_NG, ovl); goto ok; - case 0xe30000000081ULL: s390_format_RXY(s390_irgen_OG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000081ULL: s390_format_RXY(s390_irgen_OG, ovl); goto ok; - case 0xe30000000082ULL: s390_format_RXY(s390_irgen_XG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000082ULL: s390_format_RXY(s390_irgen_XG, ovl); goto ok; - case 0xe30000000083ULL: s390_format_RXY(s390_irgen_MSGC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000083ULL: s390_format_RXY(s390_irgen_MSGC, ovl); goto ok; - case 0xe30000000084ULL: s390_format_RXY(s390_irgen_MG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000084ULL: s390_format_RXY(s390_irgen_MG, ovl); goto ok; - case 0xe30000000085ULL: s390_format_RXY(s390_irgen_LGAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000085ULL: s390_format_RXY(s390_irgen_LGAT, ovl); goto ok; - case 0xe30000000086ULL: s390_format_RXY(s390_irgen_MLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000086ULL: s390_format_RXY(s390_irgen_MLG, ovl); goto ok; - case 0xe30000000087ULL: s390_format_RXY(s390_irgen_DLG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000087ULL: s390_format_RXY(s390_irgen_DLG, ovl); goto ok; - case 0xe30000000088ULL: s390_format_RXY(s390_irgen_ALCG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000088ULL: s390_format_RXY(s390_irgen_ALCG, ovl); goto ok; - case 0xe30000000089ULL: s390_format_RXY(s390_irgen_SLBG, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000089ULL: s390_format_RXY(s390_irgen_SLBG, ovl); goto ok; - case 0xe3000000008eULL: s390_format_RXY(s390_irgen_STPQ, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000008eULL: s390_format_RXY(s390_irgen_STPQ, ovl); goto ok; - case 0xe3000000008fULL: s390_format_RXY(s390_irgen_LPQ, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000008fULL: s390_format_RXY(s390_irgen_LPQ, ovl); goto ok; - case 0xe30000000090ULL: s390_format_RXY(s390_irgen_LLGC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000090ULL: s390_format_RXY(s390_irgen_LLGC, ovl); goto ok; - case 0xe30000000091ULL: s390_format_RXY(s390_irgen_LLGH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000091ULL: s390_format_RXY(s390_irgen_LLGH, ovl); goto ok; - case 0xe30000000094ULL: s390_format_RXY(s390_irgen_LLC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000094ULL: s390_format_RXY(s390_irgen_LLC, ovl); goto ok; - case 0xe30000000095ULL: s390_format_RXY(s390_irgen_LLH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000095ULL: s390_format_RXY(s390_irgen_LLH, ovl); goto ok; - case 0xe30000000096ULL: s390_format_RXY(s390_irgen_ML, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000096ULL: s390_format_RXY(s390_irgen_ML, ovl); goto ok; - case 0xe30000000097ULL: s390_format_RXY(s390_irgen_DL, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000097ULL: s390_format_RXY(s390_irgen_DL, ovl); goto ok; - case 0xe30000000098ULL: s390_format_RXY(s390_irgen_ALC, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000098ULL: s390_format_RXY(s390_irgen_ALC, ovl); goto ok; - case 0xe30000000099ULL: s390_format_RXY(s390_irgen_SLB, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe30000000099ULL: s390_format_RXY(s390_irgen_SLB, ovl); goto ok; - case 0xe3000000009cULL: s390_format_RXY(s390_irgen_LLGTAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000009cULL: s390_format_RXY(s390_irgen_LLGTAT, ovl); goto ok; - case 0xe3000000009dULL: s390_format_RXY(s390_irgen_LLGFAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000009dULL: s390_format_RXY(s390_irgen_LLGFAT, ovl); goto ok; - case 0xe3000000009fULL: s390_format_RXY(s390_irgen_LAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe3000000009fULL: s390_format_RXY(s390_irgen_LAT, ovl); goto ok; - case 0xe300000000c0ULL: s390_format_RXY(s390_irgen_LBH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000c0ULL: s390_format_RXY(s390_irgen_LBH, ovl); goto ok; - case 0xe300000000c2ULL: s390_format_RXY(s390_irgen_LLCH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000c2ULL: s390_format_RXY(s390_irgen_LLCH, ovl); goto ok; - case 0xe300000000c3ULL: s390_format_RXY(s390_irgen_STCH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000c3ULL: s390_format_RXY(s390_irgen_STCH, ovl); goto ok; - case 0xe300000000c4ULL: s390_format_RXY(s390_irgen_LHH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000c4ULL: s390_format_RXY(s390_irgen_LHH, ovl); goto ok; - case 0xe300000000c6ULL: s390_format_RXY(s390_irgen_LLHH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000c6ULL: s390_format_RXY(s390_irgen_LLHH, ovl); goto ok; - case 0xe300000000c7ULL: s390_format_RXY(s390_irgen_STHH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000c7ULL: s390_format_RXY(s390_irgen_STHH, ovl); goto ok; - case 0xe300000000c8ULL: s390_format_RXY(s390_irgen_LFHAT, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000c8ULL: s390_format_RXY(s390_irgen_LFHAT, ovl); goto ok; - case 0xe300000000caULL: s390_format_RXY(s390_irgen_LFH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000caULL: s390_format_RXY(s390_irgen_LFH, ovl); goto ok; - case 0xe300000000cbULL: s390_format_RXY(s390_irgen_STFH, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000cbULL: s390_format_RXY(s390_irgen_STFH, ovl); goto ok; - case 0xe300000000cdULL: s390_format_RXY(s390_irgen_CHF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xe300000000cdULL: s390_format_RXY(s390_irgen_CHF, ovl); + goto ok; + case 0xe300000000cfULL: s390_format_RXY(s390_irgen_CLHF, ovl); goto ok; - case 0xe300000000cfULL: s390_format_RXY(s390_irgen_CLHF, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); goto ok; case 0xe60000000001ULL: s390_format_VRX(s390_irgen_VLEBRH, VRX_v1(ovl), VRX_x2(ovl), VRX_b2(ovl), @@ -19481,9 +19260,7 @@ s390_decode_6byte_and_irgen(const UChar *bytes) VRSb_r3(ovl), VRSb_m4(ovl), VRSb_rxb(ovl)); goto ok; - case 0xe70000000027ULL: s390_format_RXE(s390_irgen_LCBB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl), RXE_m3(ovl)); + case 0xe70000000027ULL: s390_format_RXE(s390_irgen_LCBB, ovl); goto ok; case 0xe70000000030ULL: s390_format_VRSa(s390_irgen_VESL, VRSa_v1(ovl), VRSa_b2(ovl), VRSa_d2(ovl), @@ -19970,249 +19747,131 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe700000000ffULL: s390_format_VRR_VVVM(s390_irgen_VMX, VRR_v1(ovl), VRR_v2(ovl), VRR_v3(ovl), VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xeb0000000004ULL: s390_format_RSY(s390_irgen_LMG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000004ULL: s390_format_RSY(s390_irgen_LMG, ovl); goto ok; - case 0xeb000000000aULL: s390_format_RSY(s390_irgen_SRAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000000aULL: s390_format_RSY(s390_irgen_SRAG, ovl); goto ok; - case 0xeb000000000bULL: s390_format_RSY(s390_irgen_SLAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000000bULL: s390_format_RSY(s390_irgen_SLAG, ovl); goto ok; - case 0xeb000000000cULL: s390_format_RSY(s390_irgen_SRLG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000000cULL: s390_format_RSY(s390_irgen_SRLG, ovl); goto ok; - case 0xeb000000000dULL: s390_format_RSY(s390_irgen_SLLG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000000dULL: s390_format_RSY(s390_irgen_SLLG, ovl); goto ok; case 0xeb000000000fULL: /* TRACG */ goto unimplemented; - case 0xeb0000000014ULL: s390_format_RSY(s390_irgen_CSY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000014ULL: s390_format_RSY(s390_irgen_CSY, ovl); goto ok; case 0xeb0000000016ULL: /* PFCR */ goto unimplemented; - case 0xeb000000001cULL: s390_format_RSY(s390_irgen_RLLG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000001cULL: s390_format_RSY(s390_irgen_RLLG, ovl); goto ok; - case 0xeb000000001dULL: s390_format_RSY(s390_irgen_RLL, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000001dULL: s390_format_RSY(s390_irgen_RLL, ovl); goto ok; - case 0xeb0000000020ULL: s390_format_RSYb(s390_irgen_CLMH, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000020ULL: s390_format_RSY(s390_irgen_CLMH, ovl); goto ok; - case 0xeb0000000021ULL: s390_format_RSYb(s390_irgen_CLMY, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000021ULL: s390_format_RSY(s390_irgen_CLMY, ovl); goto ok; - case 0xeb0000000023ULL: s390_format_RSYb(s390_irgen_CLT, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000023ULL: s390_format_RSY(s390_irgen_CLT, ovl); goto ok; - case 0xeb0000000024ULL: s390_format_RSY(s390_irgen_STMG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000024ULL: s390_format_RSY(s390_irgen_STMG, ovl); goto ok; case 0xeb0000000025ULL: /* STCTG */ goto unimplemented; - case 0xeb0000000026ULL: s390_format_RSY(s390_irgen_STMH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000026ULL: s390_format_RSY(s390_irgen_STMH, ovl); goto ok; - case 0xeb000000002bULL: s390_format_RSYb(s390_irgen_CLGT, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000002bULL: s390_format_RSY(s390_irgen_CLGT, ovl); goto ok; - case 0xeb000000002cULL: s390_format_RSYb(s390_irgen_STCMH, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000002cULL: s390_format_RSY(s390_irgen_STCMH, ovl); goto ok; - case 0xeb000000002dULL: s390_format_RSYb(s390_irgen_STCMY, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000002dULL: s390_format_RSY(s390_irgen_STCMY, ovl); goto ok; case 0xeb000000002fULL: /* LCTLG */ goto unimplemented; - case 0xeb0000000030ULL: s390_format_RSY(s390_irgen_CSG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000030ULL: s390_format_RSY(s390_irgen_CSG, ovl); goto ok; - case 0xeb0000000031ULL: s390_format_RSY(s390_irgen_CDSY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000031ULL: s390_format_RSY(s390_irgen_CDSY, ovl); goto ok; - case 0xeb000000003eULL: s390_format_RSY(s390_irgen_CDSG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000003eULL: s390_format_RSY(s390_irgen_CDSG, ovl); goto ok; - case 0xeb0000000044ULL: s390_format_RSY(s390_irgen_BXHG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000044ULL: s390_format_RSY(s390_irgen_BXHG, ovl); goto ok; - case 0xeb0000000045ULL: s390_format_RSY(s390_irgen_BXLEG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000045ULL: s390_format_RSY(s390_irgen_BXLEG, ovl); goto ok; - case 0xeb000000004cULL: s390_format_RSY(s390_irgen_ECAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000004cULL: s390_format_RSY(s390_irgen_ECAG, ovl); goto ok; - case 0xeb0000000051ULL: s390_format_SIY(s390_irgen_TMY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb0000000051ULL: s390_format_SIY(s390_irgen_TMY, ovl); goto ok; - case 0xeb0000000052ULL: s390_format_SIY(s390_irgen_MVIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb0000000052ULL: s390_format_SIY(s390_irgen_MVIY, ovl); goto ok; - case 0xeb0000000054ULL: s390_format_SIY(s390_irgen_NIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb0000000054ULL: s390_format_SIY(s390_irgen_NIY, ovl); goto ok; - case 0xeb0000000055ULL: s390_format_SIY(s390_irgen_CLIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb0000000055ULL: s390_format_SIY(s390_irgen_CLIY, ovl); goto ok; - case 0xeb0000000056ULL: s390_format_SIY(s390_irgen_OIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb0000000056ULL: s390_format_SIY(s390_irgen_OIY, ovl); goto ok; - case 0xeb0000000057ULL: s390_format_SIY(s390_irgen_XIY, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb0000000057ULL: s390_format_SIY(s390_irgen_XIY, ovl); goto ok; - case 0xeb000000006aULL: s390_format_SIY(s390_irgen_ASI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb000000006aULL: s390_format_SIY(s390_irgen_ASI, ovl); goto ok; - case 0xeb000000006eULL: s390_format_SIY(s390_irgen_ALSI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb000000006eULL: s390_format_SIY(s390_irgen_ALSI, ovl); goto ok; case 0xeb0000000071ULL: /* LPSWEY */ goto unimplemented; - case 0xeb000000007aULL: s390_format_SIY(s390_irgen_AGSI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb000000007aULL: s390_format_SIY(s390_irgen_AGSI, ovl); goto ok; - case 0xeb000000007eULL: s390_format_SIY(s390_irgen_ALGSI, SIY_i2(ovl), - SIY_b1(ovl), SIY_dl1(ovl), - SIY_dh1(ovl)); + case 0xeb000000007eULL: s390_format_SIY(s390_irgen_ALGSI, ovl); goto ok; - case 0xeb0000000080ULL: s390_format_RSYb(s390_irgen_ICMH, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000080ULL: s390_format_RSY(s390_irgen_ICMH, ovl); goto ok; - case 0xeb0000000081ULL: s390_format_RSYb(s390_irgen_ICMY, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000081ULL: s390_format_RSY(s390_irgen_ICMY, ovl); goto ok; case 0xeb000000008eULL: /* MVCLU */ goto unimplemented; case 0xeb000000008fULL: /* CLCLU */ goto unimplemented; - case 0xeb0000000090ULL: s390_format_RSY(s390_irgen_STMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000090ULL: s390_format_RSY(s390_irgen_STMY, ovl); goto ok; - case 0xeb0000000096ULL: s390_format_RSY(s390_irgen_LMH, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000096ULL: s390_format_RSY(s390_irgen_LMH, ovl); goto ok; - case 0xeb0000000098ULL: s390_format_RSY(s390_irgen_LMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb0000000098ULL: s390_format_RSY(s390_irgen_LMY, ovl); goto ok; - case 0xeb000000009aULL: s390_format_RSY(s390_irgen_LAMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000009aULL: s390_format_RSY(s390_irgen_LAMY, ovl); goto ok; - case 0xeb000000009bULL: s390_format_RSY(s390_irgen_STAMY, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb000000009bULL: s390_format_RSY(s390_irgen_STAMY, ovl); goto ok; case 0xeb00000000c0ULL: /* TP */ goto unimplemented; - case 0xeb00000000dcULL: s390_format_RSY(s390_irgen_SRAK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000dcULL: s390_format_RSY(s390_irgen_SRAK, ovl); goto ok; - case 0xeb00000000ddULL: s390_format_RSY(s390_irgen_SLAK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000ddULL: s390_format_RSY(s390_irgen_SLAK, ovl); goto ok; - case 0xeb00000000deULL: s390_format_RSY(s390_irgen_SRLK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000deULL: s390_format_RSY(s390_irgen_SRLK, ovl); goto ok; - case 0xeb00000000dfULL: s390_format_RSY(s390_irgen_SLLK, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000dfULL: s390_format_RSY(s390_irgen_SLLK, ovl); goto ok; - case 0xeb00000000e0ULL: s390_format_RSYcond(s390_irgen_LOCFH, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e0ULL: s390_format_RSYcond(s390_irgen_LOCFH, ovl); goto ok; - case 0xeb00000000e1ULL: s390_format_RSYcond(s390_irgen_STOCFH, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e1ULL: s390_format_RSYcond(s390_irgen_STOCFH, ovl); goto ok; - case 0xeb00000000e2ULL: s390_format_RSYcond(s390_irgen_LOCG, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e2ULL: s390_format_RSYcond(s390_irgen_LOCG, ovl); goto ok; - case 0xeb00000000e3ULL: s390_format_RSYcond(s390_irgen_STOCG, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e3ULL: s390_format_RSYcond(s390_irgen_STOCG, ovl); goto ok; - case 0xeb00000000e4ULL: s390_format_RSY(s390_irgen_LANG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e4ULL: s390_format_RSY(s390_irgen_LANG, ovl); goto ok; - case 0xeb00000000e6ULL: s390_format_RSY(s390_irgen_LAOG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e6ULL: s390_format_RSY(s390_irgen_LAOG, ovl); goto ok; - case 0xeb00000000e7ULL: s390_format_RSY(s390_irgen_LAXG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e7ULL: s390_format_RSY(s390_irgen_LAXG, ovl); goto ok; - case 0xeb00000000e8ULL: s390_format_RSY(s390_irgen_LAAG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000e8ULL: s390_format_RSY(s390_irgen_LAAG, ovl); goto ok; - case 0xeb00000000eaULL: s390_format_RSY(s390_irgen_LAALG, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000eaULL: s390_format_RSY(s390_irgen_LAALG, ovl); goto ok; - case 0xeb00000000f2ULL: s390_format_RSYcond(s390_irgen_LOC, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000f2ULL: s390_format_RSYcond(s390_irgen_LOC, ovl); goto ok; - case 0xeb00000000f3ULL: s390_format_RSYcond(s390_irgen_STOC, RSY_r1(ovl), - RSY_m3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000f3ULL: s390_format_RSYcond(s390_irgen_STOC, ovl); goto ok; - case 0xeb00000000f4ULL: s390_format_RSY(s390_irgen_LAN, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000f4ULL: s390_format_RSY(s390_irgen_LAN, ovl); goto ok; - case 0xeb00000000f6ULL: s390_format_RSY(s390_irgen_LAO, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000f6ULL: s390_format_RSY(s390_irgen_LAO, ovl); goto ok; - case 0xeb00000000f7ULL: s390_format_RSY(s390_irgen_LAX, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000f7ULL: s390_format_RSY(s390_irgen_LAX, ovl); goto ok; - case 0xeb00000000f8ULL: s390_format_RSY(s390_irgen_LAA, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000f8ULL: s390_format_RSY(s390_irgen_LAA, ovl); goto ok; - case 0xeb00000000faULL: s390_format_RSY(s390_irgen_LAAL, RSY_r1(ovl), - RSY_r3(ovl), RSY_b2(ovl), - RSY_dl2(ovl), RSY_dh2(ovl)); + case 0xeb00000000faULL: s390_format_RSY(s390_irgen_LAAL, ovl); goto ok; case 0xec0000000042ULL: s390_irgen_LOCHI(RIEg_r1(ovl), RIEg_m3(ovl), RIEg_i2(ovl)); @@ -20305,139 +19964,73 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xec00000000dbULL: s390_irgen_ALGHSIK(RIEd_r1(ovl), RIEd_r3(ovl), RIEd_i2(ovl)); goto ok; - case 0xec00000000e4ULL: s390_format_RRS(s390_irgen_CGRB, RRS_r1(ovl), - RRS_r2(ovl), RRS_b4(ovl), - RRS_d4(ovl), RRS_m3(ovl)); - goto ok; - case 0xec00000000e5ULL: s390_format_RRS(s390_irgen_CLGRB, RRS_r1(ovl), - RRS_r2(ovl), RRS_b4(ovl), - RRS_d4(ovl), RRS_m3(ovl)); - goto ok; - case 0xec00000000f6ULL: s390_format_RRS(s390_irgen_CRB, RRS_r1(ovl), - RRS_r2(ovl), RRS_b4(ovl), - RRS_d4(ovl), RRS_m3(ovl)); - goto ok; - case 0xec00000000f7ULL: s390_format_RRS(s390_irgen_CLRB, RRS_r1(ovl), - RRS_r2(ovl), RRS_b4(ovl), - RRS_d4(ovl), RRS_m3(ovl)); - goto ok; - case 0xec00000000fcULL: s390_format_RIS(s390_irgen_CGIB, - RIS_r1(ovl), RIS_m3(ovl), - RIS_b4(ovl), RIS_d4(ovl), - RIS_i2(ovl)); goto ok; - case 0xec00000000fdULL: s390_format_RIS(s390_irgen_CLGIB, - RIS_r1(ovl), RIS_m3(ovl), - RIS_b4(ovl), RIS_d4(ovl), - RIS_i2(ovl)); goto ok; - case 0xec00000000feULL: s390_format_RIS(s390_irgen_CIB, RIS_r1(ovl), - RIS_m3(ovl), RIS_b4(ovl), - RIS_d4(ovl), - RIS_i2(ovl)); goto ok; - case 0xec00000000ffULL: s390_format_RIS(s390_irgen_CLIB, - RIS_r1(ovl), RIS_m3(ovl), - RIS_b4(ovl), RIS_d4(ovl), - RIS_i2(ovl)); goto ok; - case 0xed0000000004ULL: s390_format_RXE0(s390_irgen_LDEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); - goto ok; - case 0xed0000000005ULL: s390_format_RXE0(s390_irgen_LXDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); - goto ok; - case 0xed0000000006ULL: s390_format_RXE0(s390_irgen_LXEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xec00000000e4ULL: s390_format_RRS(s390_irgen_CGRB, ovl); + goto ok; + case 0xec00000000e5ULL: s390_format_RRS(s390_irgen_CLGRB, ovl); + goto ok; + case 0xec00000000f6ULL: s390_format_RRS(s390_irgen_CRB, ovl); + goto ok; + case 0xec00000000f7ULL: s390_format_RRS(s390_irgen_CLRB, ovl); + goto ok; + case 0xec00000000fcULL: s390_format_RIS(s390_irgen_CGIB, ovl); + goto ok; + case 0xec00000000fdULL: s390_format_RIS(s390_irgen_CLGIB, ovl); + goto ok; + case 0xec00000000feULL: s390_format_RIS(s390_irgen_CIB, ovl); + goto ok; + case 0xec00000000ffULL: s390_format_RIS(s390_irgen_CLIB, ovl); + goto ok; + case 0xed0000000004ULL: s390_format_RXE0(s390_irgen_LDEB, ovl); + goto ok; + case 0xed0000000005ULL: s390_format_RXE0(s390_irgen_LXDB, ovl); + goto ok; + case 0xed0000000006ULL: s390_format_RXE0(s390_irgen_LXEB, ovl); goto ok; case 0xed0000000007ULL: /* MXDB */ goto unimplemented; - case 0xed0000000008ULL: s390_format_RXE0(s390_irgen_KEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000008ULL: s390_format_RXE0(s390_irgen_KEB, ovl); goto ok; - case 0xed0000000009ULL: s390_format_RXE0(s390_irgen_CEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000009ULL: s390_format_RXE0(s390_irgen_CEB, ovl); goto ok; - case 0xed000000000aULL: s390_format_RXE0(s390_irgen_AEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed000000000aULL: s390_format_RXE0(s390_irgen_AEB, ovl); goto ok; - case 0xed000000000bULL: s390_format_RXE0(s390_irgen_SEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed000000000bULL: s390_format_RXE0(s390_irgen_SEB, ovl); goto ok; case 0xed000000000cULL: /* MDEB */ goto unimplemented; - case 0xed000000000dULL: s390_format_RXE0(s390_irgen_DEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed000000000dULL: s390_format_RXE0(s390_irgen_DEB, ovl); goto ok; - case 0xed000000000eULL: s390_format_RXF(s390_irgen_MAEB, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed000000000eULL: s390_format_RXF(s390_irgen_MAEB, ovl); goto ok; - case 0xed000000000fULL: s390_format_RXF(s390_irgen_MSEB, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed000000000fULL: s390_format_RXF(s390_irgen_MSEB, ovl); goto ok; - case 0xed0000000010ULL: s390_format_RXE0(s390_irgen_TCEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000010ULL: s390_format_RXE0(s390_irgen_TCEB, ovl); goto ok; - case 0xed0000000011ULL: s390_format_RXE0(s390_irgen_TCDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000011ULL: s390_format_RXE0(s390_irgen_TCDB, ovl); goto ok; - case 0xed0000000012ULL: s390_format_RXE0(s390_irgen_TCXB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000012ULL: s390_format_RXE0(s390_irgen_TCXB, ovl); goto ok; - case 0xed0000000014ULL: s390_format_RXE0(s390_irgen_SQEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000014ULL: s390_format_RXE0(s390_irgen_SQEB, ovl); goto ok; - case 0xed0000000015ULL: s390_format_RXE0(s390_irgen_SQDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000015ULL: s390_format_RXE0(s390_irgen_SQDB, ovl); goto ok; - case 0xed0000000017ULL: s390_format_RXE0(s390_irgen_MEEB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000017ULL: s390_format_RXE0(s390_irgen_MEEB, ovl); goto ok; - case 0xed0000000018ULL: s390_format_RXE0(s390_irgen_KDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000018ULL: s390_format_RXE0(s390_irgen_KDB, ovl); goto ok; - case 0xed0000000019ULL: s390_format_RXE0(s390_irgen_CDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000019ULL: s390_format_RXE0(s390_irgen_CDB, ovl); goto ok; - case 0xed000000001aULL: s390_format_RXE0(s390_irgen_ADB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed000000001aULL: s390_format_RXE0(s390_irgen_ADB, ovl); goto ok; - case 0xed000000001bULL: s390_format_RXE0(s390_irgen_SDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed000000001bULL: s390_format_RXE0(s390_irgen_SDB, ovl); goto ok; - case 0xed000000001cULL: s390_format_RXE0(s390_irgen_MDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed000000001cULL: s390_format_RXE0(s390_irgen_MDB, ovl); goto ok; - case 0xed000000001dULL: s390_format_RXE0(s390_irgen_DDB, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed000000001dULL: s390_format_RXE0(s390_irgen_DDB, ovl); goto ok; - case 0xed000000001eULL: s390_format_RXF(s390_irgen_MADB, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed000000001eULL: s390_format_RXF(s390_irgen_MADB, ovl); goto ok; - case 0xed000000001fULL: s390_format_RXF(s390_irgen_MSDB, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed000000001fULL: s390_format_RXF(s390_irgen_MSDB, ovl); goto ok; - case 0xed0000000024ULL: s390_format_RXE0(s390_irgen_LDE, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000024ULL: s390_format_RXE0(s390_irgen_LDE, ovl); goto ok; case 0xed0000000025ULL: /* LXD */ goto unimplemented; case 0xed0000000026ULL: /* LXE */ goto unimplemented; @@ -20454,61 +20047,33 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xed000000003dULL: /* MYH */ goto unimplemented; case 0xed000000003eULL: /* MAD */ goto unimplemented; case 0xed000000003fULL: /* MSD */ goto unimplemented; - case 0xed0000000040ULL: s390_format_RXF(s390_irgen_SLDT, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed0000000040ULL: s390_format_RXF(s390_irgen_SLDT, ovl); goto ok; - case 0xed0000000041ULL: s390_format_RXF(s390_irgen_SRDT, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed0000000041ULL: s390_format_RXF(s390_irgen_SRDT, ovl); goto ok; - case 0xed0000000048ULL: s390_format_RXF(s390_irgen_SLXT, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed0000000048ULL: s390_format_RXF(s390_irgen_SLXT, ovl); goto ok; - case 0xed0000000049ULL: s390_format_RXF(s390_irgen_SRXT, RXF_r3(ovl), - RXF_x2(ovl), RXF_b2(ovl), - RXF_d2(ovl), RXF_r1(ovl)); + case 0xed0000000049ULL: s390_format_RXF(s390_irgen_SRXT, ovl); goto ok; - case 0xed0000000050ULL: s390_format_RXE0(s390_irgen_TDCET, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000050ULL: s390_format_RXE0(s390_irgen_TDCET, ovl); goto ok; - case 0xed0000000051ULL: s390_format_RXE0(s390_irgen_TDGET, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000051ULL: s390_format_RXE0(s390_irgen_TDGET, ovl); goto ok; - case 0xed0000000054ULL: s390_format_RXE0(s390_irgen_TDCDT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000054ULL: s390_format_RXE0(s390_irgen_TDCDT, ovl); goto ok; - case 0xed0000000055ULL: s390_format_RXE0(s390_irgen_TDGDT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000055ULL: s390_format_RXE0(s390_irgen_TDGDT, ovl); goto ok; - case 0xed0000000058ULL: s390_format_RXE0(s390_irgen_TDCXT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000058ULL: s390_format_RXE0(s390_irgen_TDCXT, ovl); goto ok; - case 0xed0000000059ULL: s390_format_RXE0(s390_irgen_TDGXT, RXE_r1(ovl), - RXE_x2(ovl), RXE_b2(ovl), - RXE_d2(ovl)); + case 0xed0000000059ULL: s390_format_RXE0(s390_irgen_TDGXT, ovl); goto ok; - case 0xed0000000064ULL: s390_format_RXY(s390_irgen_LEY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xed0000000064ULL: s390_format_RXY(s390_irgen_LEY, ovl); goto ok; - case 0xed0000000065ULL: s390_format_RXY(s390_irgen_LDY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xed0000000065ULL: s390_format_RXY(s390_irgen_LDY, ovl); goto ok; - case 0xed0000000066ULL: s390_format_RXY(s390_irgen_STEY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xed0000000066ULL: s390_format_RXY(s390_irgen_STEY, ovl); goto ok; - case 0xed0000000067ULL: s390_format_RXY(s390_irgen_STDY, RXY_r1(ovl), - RXY_x2(ovl), RXY_b2(ovl), - RXY_dl2(ovl), RXY_dh2(ovl)); + case 0xed0000000067ULL: s390_format_RXY(s390_irgen_STDY, ovl); goto ok; case 0xed00000000a8ULL: /* CZDT */ goto unimplemented; case 0xed00000000a9ULL: /* CZXT */ goto unimplemented; @@ -20644,44 +20209,36 @@ s390_decode_6byte_and_irgen(const UChar *bytes) switch (((ovl >> 16) & 0xff0000000000ULL) >> 40) { case 0xc5ULL: s390_irgen_BPRP(MII_m1(ovl), MII_i2(ovl), MII_i3(ovl)); goto ok; - case 0xc7ULL: s390_format_SMI(s390_irgen_BPP, SMI_m1(ovl), SMI_i2(ovl), - SMI_b3(ovl), SMI_d3(ovl)); + case 0xc7ULL: s390_format_SMI(s390_irgen_BPP, ovl); goto ok; case 0xd0ULL: /* TRTR */ goto unimplemented; case 0xd1ULL: /* MVN */ goto unimplemented; - case 0xd2ULL: s390_format_SSa(s390_irgen_MVC, SSa_l(ovl), SSa_b1(ovl), - SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + case 0xd2ULL: s390_format_SSa(s390_irgen_MVC, ovl); goto ok; case 0xd3ULL: /* MVZ */ goto unimplemented; - case 0xd4ULL: s390_format_SSa(s390_irgen_NC, SSa_l(ovl), SSa_b1(ovl), - SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + case 0xd4ULL: s390_format_SSa(s390_irgen_NC, ovl); goto ok; - case 0xd5ULL: s390_format_SSa(s390_irgen_CLC, SSa_l(ovl), SSa_b1(ovl), - SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + case 0xd5ULL: s390_format_SSa(s390_irgen_CLC, ovl); goto ok; - case 0xd6ULL: s390_format_SSa(s390_irgen_OC, SSa_l(ovl), SSa_b1(ovl), - SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + case 0xd6ULL: s390_format_SSa(s390_irgen_OC, ovl); goto ok; case 0xd7ULL: if (SSa_b1(ovl) == SSa_b2(ovl) && SSa_d1(ovl) == SSa_d2(ovl)) s390_irgen_XC_sameloc(SSa_l(ovl), SSa_b1(ovl), SSa_d1(ovl)); else - s390_format_SSa(s390_irgen_XC, SSa_l(ovl), SSa_b1(ovl), SSa_d1(ovl), - SSa_b2(ovl), SSa_d2(ovl)); + s390_format_SSa(s390_irgen_XC, ovl); goto ok; case 0xd9ULL: /* MVCK */ goto unimplemented; case 0xdaULL: /* MVCP */ goto unimplemented; case 0xdbULL: /* MVCS */ goto unimplemented; - case 0xdcULL: s390_format_SSa(s390_irgen_TR, SSa_l(ovl), SSa_b1(ovl), - SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + case 0xdcULL: s390_format_SSa(s390_irgen_TR, ovl); goto ok; case 0xddULL: /* TRT */ goto unimplemented; case 0xdeULL: /* ED */ goto unimplemented; case 0xdfULL: /* EDMK */ goto unimplemented; case 0xe1ULL: /* PKU */ goto unimplemented; case 0xe2ULL: /* UNPKU */ goto unimplemented; - case 0xe8ULL: s390_format_SSa(s390_irgen_MVCIN, SSa_l(ovl), SSa_b1(ovl), - SSa_d1(ovl), SSa_b2(ovl), SSa_d2(ovl)); + case 0xe8ULL: s390_format_SSa(s390_irgen_MVCIN, ovl); goto ok; case 0xe9ULL: /* PKA */ goto unimplemented; case 0xeaULL: /* UNPKA */ goto unimplemented; @@ -20703,37 +20260,27 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe500ULL: /* LASP */ goto unimplemented; case 0xe501ULL: /* TPROT */ goto unimplemented; case 0xe502ULL: /* STRAG */ goto unimplemented; - case 0xe50aULL: s390_format_SSE(s390_irgen_MVCRL, SSa_b1(ovl), SSa_d1(ovl), - SSa_b2(ovl), SSa_d2(ovl)); + case 0xe50aULL: s390_format_SSE(s390_irgen_MVCRL, ovl); goto ok; case 0xe50eULL: /* MVCSK */ goto unimplemented; case 0xe50fULL: /* MVCDK */ goto unimplemented; - case 0xe544ULL: s390_format_SIL(s390_irgen_MVHHI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe544ULL: s390_format_SIL(s390_irgen_MVHHI, ovl); goto ok; - case 0xe548ULL: s390_format_SIL(s390_irgen_MVGHI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe548ULL: s390_format_SIL(s390_irgen_MVGHI, ovl); goto ok; - case 0xe54cULL: s390_format_SIL(s390_irgen_MVHI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe54cULL: s390_format_SIL(s390_irgen_MVHI, ovl); goto ok; - case 0xe554ULL: s390_format_SIL(s390_irgen_CHHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe554ULL: s390_format_SIL(s390_irgen_CHHSI, ovl); goto ok; - case 0xe555ULL: s390_format_SIL(s390_irgen_CLHHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe555ULL: s390_format_SIL(s390_irgen_CLHHSI, ovl); goto ok; - case 0xe558ULL: s390_format_SIL(s390_irgen_CGHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe558ULL: s390_format_SIL(s390_irgen_CGHSI, ovl); goto ok; - case 0xe559ULL: s390_format_SIL(s390_irgen_CLGHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe559ULL: s390_format_SIL(s390_irgen_CLGHSI, ovl); goto ok; - case 0xe55cULL: s390_format_SIL(s390_irgen_CHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe55cULL: s390_format_SIL(s390_irgen_CHSI, ovl); goto ok; - case 0xe55dULL: s390_format_SIL(s390_irgen_CLFHSI, SIL_b1(ovl), - SIL_d1(ovl), SIL_i2(ovl)); + case 0xe55dULL: s390_format_SIL(s390_irgen_CLFHSI, ovl); goto ok; case 0xe560ULL: /* TBEGIN */ goto unimplemented; case 0xe561ULL: /* TBEGINC */ goto unimplemented; From ae1c6df59a89e5a75bdec919e235e2a41547ca73 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Fri, 13 Feb 2026 12:38:52 +0100 Subject: [PATCH 319/502] s390x: Simplify interface of vector format functions Same as with the non-vector instructions, simplify the interface of the vector format functions. --- VEX/priv/guest_s390_toIR.c | 1387 +++++++++++++++--------------------- 1 file changed, 573 insertions(+), 814 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 28ee23745..c66c31336 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -182,12 +182,7 @@ typedef enum { #define SSa_d1(insn) (((insn) >> 32) & 0xfff) #define SSa_b2(insn) (((insn) >> 28) & 0xf) #define SSa_d2(insn) (((insn) >> 16) & 0xfff) -#define VRX_v1(insn) (((insn) >> 52) & 0xf) -#define VRX_x2(insn) (((insn) >> 48) & 0xf) -#define VRX_b2(insn) (((insn) >> 44) & 0xf) -#define VRX_d2(insn) (((insn) >> 32) & 0xfff) -#define VRX_m3(insn) (((insn) >> 28) & 0xf) -#define VRX_rxb(insn) (((insn) >> 24) & 0xf) +#define V_rxb(insn) (((insn) >> 24) & 0xf) #define VRR_v1(insn) (((insn) >> 52) & 0xf) #define VRR_v2(insn) (((insn) >> 48) & 0xf) #define VRR_r2(insn) (((insn) >> 48) & 0xf) @@ -196,89 +191,32 @@ typedef enum { #define VRR_m5(insn) (((insn) >> 36) & 0xf) #define VRR_m4(insn) (((insn) >> 28) & 0xf) #define VRR_v4(insn) (((insn) >> 28) & 0xf) -#define VRR_rxb(insn) (((insn) >> 24) & 0xf) #define VRRa_v1(insn) (((insn) >> 52) & 0xf) #define VRRa_v2(insn) (((insn) >> 48) & 0xf) #define VRRa_v3(insn) (((insn) >> 44) & 0xf) #define VRRa_m5(insn) (((insn) >> 36) & 0xf) #define VRRa_m4(insn) (((insn) >> 32) & 0xf) #define VRRa_m3(insn) (((insn) >> 28) & 0xf) -#define VRRa_rxb(insn) (((insn) >> 24) & 0xf) #define VRRd_v1(insn) (((insn) >> 52) & 0xf) #define VRRd_v2(insn) (((insn) >> 48) & 0xf) #define VRRd_v3(insn) (((insn) >> 44) & 0xf) #define VRRd_m5(insn) (((insn) >> 40) & 0xf) #define VRRd_m6(insn) (((insn) >> 36) & 0xf) #define VRRd_v4(insn) (((insn) >> 28) & 0xf) -#define VRRd_rxb(insn) (((insn) >> 24) & 0xf) -#define VRRe_v1(insn) (((insn) >> 52) & 0xf) -#define VRRe_v2(insn) (((insn) >> 48) & 0xf) -#define VRRe_v3(insn) (((insn) >> 44) & 0xf) -#define VRRe_m6(insn) (((insn) >> 40) & 0xf) -#define VRRe_m5(insn) (((insn) >> 32) & 0xf) -#define VRRe_v4(insn) (((insn) >> 28) & 0xf) -#define VRRe_rxb(insn) (((insn) >> 24) & 0xf) #define VRIa_v1(insn) (((insn) >> 52) & 0xf) #define VRIa_v3(insn) (((insn) >> 48) & 0xf) #define VRIa_i2(insn) (((insn) >> 32) & 0xffff) #define VRIa_m3(insn) (((insn) >> 28) & 0xf) -#define VRIa_rxb(insn) (((insn) >> 24) & 0xf) -#define VRIb_v1(insn) (((insn) >> 52) & 0xf) -#define VRIb_i2(insn) (((insn) >> 40) & 0xff) -#define VRIb_i3(insn) (((insn) >> 32) & 0xff) -#define VRIb_m4(insn) (((insn) >> 28) & 0xf) -#define VRIb_rxb(insn) (((insn) >> 24) & 0xf) -#define VRIc_v1(insn) (((insn) >> 52) & 0xf) -#define VRIc_v3(insn) (((insn) >> 48) & 0xf) -#define VRIc_i2(insn) (((insn) >> 32) & 0xffff) -#define VRIc_m4(insn) (((insn) >> 28) & 0xf) -#define VRIc_rxb(insn) (((insn) >> 24) & 0xf) #define VRId_v1(insn) (((insn) >> 52) & 0xf) #define VRId_v2(insn) (((insn) >> 48) & 0xf) #define VRId_v3(insn) (((insn) >> 44) & 0xf) #define VRId_i4(insn) (((insn) >> 32) & 0xff) #define VRId_m5(insn) (((insn) >> 28) & 0xf) -#define VRId_rxb(insn) (((insn) >> 24) & 0xf) -#define VRIe_v1(insn) (((insn) >> 52) & 0xf) -#define VRIe_v2(insn) (((insn) >> 48) & 0xf) -#define VRIe_i3(insn) (((insn) >> 36) & 0xfff) -#define VRIe_m5(insn) (((insn) >> 32) & 0xf) -#define VRIe_m4(insn) (((insn) >> 28) & 0xf) -#define VRIe_rxb(insn) (((insn) >> 24) & 0xf) -#define VRSa_v1(insn) (((insn) >> 52) & 0xf) -#define VRSa_v3(insn) (((insn) >> 48) & 0xf) -#define VRSa_b2(insn) (((insn) >> 44) & 0xf) -#define VRSa_d2(insn) (((insn) >> 32) & 0xfff) -#define VRSa_m4(insn) (((insn) >> 28) & 0xf) -#define VRSa_rxb(insn) (((insn) >> 24) & 0xf) #define VRSb_v1(insn) (((insn) >> 52) & 0xf) #define VRSb_r3(insn) (((insn) >> 48) & 0xf) #define VRSb_b2(insn) (((insn) >> 44) & 0xf) #define VRSb_d2(insn) (((insn) >> 32) & 0xfff) #define VRSb_m4(insn) (((insn) >> 28) & 0xf) -#define VRSb_rxb(insn) (((insn) >> 24) & 0xf) -#define VRSc_r1(insn) (((insn) >> 52) & 0xf) -#define VRSc_v3(insn) (((insn) >> 48) & 0xf) -#define VRSc_b2(insn) (((insn) >> 44) & 0xf) -#define VRSc_d2(insn) (((insn) >> 32) & 0xfff) -#define VRSc_m4(insn) (((insn) >> 28) & 0xf) -#define VRSc_rxb(insn) (((insn) >> 24) & 0xf) -#define VRSd_r3(insn) (((insn) >> 48) & 0xf) -#define VRSd_b2(insn) (((insn) >> 44) & 0xf) -#define VRSd_d2(insn) (((insn) >> 32) & 0xfff) -#define VRSd_v1(insn) (((insn) >> 28) & 0xf) -#define VRSd_rxb(insn) (((insn) >> 24) & 0xf) -#define VSI_i3(insn) (((insn) >> 48) & 0xff) -#define VSI_b2(insn) (((insn) >> 44) & 0xf) -#define VSI_d2(insn) (((insn) >> 32) & 0xfff) -#define VSI_v1(insn) (((insn) >> 28) & 0xf) -#define VSI_rxb(insn) (((insn) >> 24) & 0xf) -#define VRV_v1(insn) (((insn) >> 52) & 0xf) -#define VRV_x2(insn) (((insn) >> 48) & 0xf) -#define VRV_b2(insn) (((insn) >> 44) & 0xf) -#define VRV_d2(insn) (((insn) >> 32) & 0xfff) -#define VRV_m3(insn) (((insn) >> 28) & 0xf) -#define VRV_rxb(insn) (((insn) >> 24) & 0xf) /*------------------------------------------------------------*/ @@ -2989,9 +2927,14 @@ s390_format_SIL(void (*irgen)(UShort i2, IRTemp op1addr), ULong ovl) } static void -s390_format_VRX(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), - UChar v1, UChar x2, UChar b2, UShort d2, UChar m3, UChar rxb) +s390_format_VRX(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), ULong ovl) { + UChar v1 = (ovl >> 52) & 0xf; + UChar x2 = (ovl >> 48) & 0xf; + UChar b2 = (ovl >> 44) & 0xf; + UShort d2 = (ovl >> 32) & 0xfff; + UChar m3 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3009,9 +2952,12 @@ s390_format_VRX(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), static void -s390_format_VRR_VV(void (*irgen)(UChar v1, UChar v2), - UChar v1, UChar v2, UChar rxb) +s390_format_VRR_VV(void (*irgen)(UChar v1, UChar v2), ULong ovl) { + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3024,9 +2970,13 @@ s390_format_VRR_VV(void (*irgen)(UChar v1, UChar v2), static void -s390_format_VRR_VVV(void (*irgen)(UChar v1, UChar v2, UChar v3), - UChar v1, UChar v2, UChar v3, UChar rxb) +s390_format_VRR_VVV(void (*irgen)(UChar v1, UChar v2, UChar v3), ULong ovl) { + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3038,11 +2988,16 @@ s390_format_VRR_VVV(void (*irgen)(UChar v1, UChar v2, UChar v3), irgen(v1, v2, v3); } - static void s390_format_VRR_VVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4), - UChar v1, UChar v2, UChar v3, UChar m4, UChar rxb) + ULong ovl) { + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar m4 = VRR_m4(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3054,11 +3009,17 @@ s390_format_VRR_VVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4), irgen(v1, v2, v3, m4); } - static void -s390_format_VRR_VVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5), - UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar rxb) +s390_format_VRR_VVVMM( + void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5), ULong ovl) { + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar m4 = VRR_m4(ovl); + UChar m5 = VRR_m5(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3070,11 +3031,16 @@ s390_format_VRR_VVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UCha irgen(v1, v2, v3, m4, m5); } - static void s390_format_VRR_VVVV(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4), - UChar v1, UChar v2, UChar v3, UChar v4, UChar rxb) + ULong ovl) { + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar v4 = VRR_v4(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3087,11 +3053,14 @@ s390_format_VRR_VVVV(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4), irgen(v1, v2, v3, v4); } - static void -s390_format_VRR_VRR(void (*irgen)(UChar v1, UChar r2, UChar r3), - UChar v1, UChar r2, UChar r3, UChar rxb) +s390_format_VRR_VRR(void (*irgen)(UChar v1, UChar r2, UChar r3), ULong ovl) { + UChar v1 = VRR_v1(ovl); + UChar r2 = VRR_r2(ovl); + UChar r3 = VRR_r3(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3103,9 +3072,13 @@ s390_format_VRR_VRR(void (*irgen)(UChar v1, UChar r2, UChar r3), static void -s390_format_VRR_VVM(void (*irgen)(UChar v1, UChar v2, UChar m3), - UChar v1, UChar v2, UChar m3, UChar rxb) +s390_format_VRR_VVM(void (*irgen)(UChar v1, UChar v2, UChar m3), ULong ovl) { + UChar v1 = VRRa_v1(ovl); + UChar v2 = VRRa_v2(ovl); + UChar m3 = VRRa_m3(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3118,9 +3091,12 @@ s390_format_VRR_VVM(void (*irgen)(UChar v1, UChar v2, UChar m3), static void -s390_format_VRIa0(void (*irgen)(UChar v1, UShort i2), - UChar v1, UShort i2, UChar rxb) +s390_format_VRIa0(void (*irgen)(UChar v1, UShort i2), ULong ovl) { + UChar v1 = VRIa_v1(ovl); + UShort i2 = VRIa_i2(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3133,8 +3109,14 @@ s390_format_VRIa0(void (*irgen)(UChar v1, UShort i2), static void s390_format_VRIb(void (*irgen)(UChar v1, UChar i2, UChar i3, UChar m4), - UChar v1, UChar i2, UChar i3, UChar m4, UChar rxb) + ULong ovl) { + UChar v1 = (ovl >> 52) & 0xf; + UShort i2 = (ovl >> 40) & 0xff; + UChar i3 = (ovl >> 32) & 0xff; + UChar m4 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3146,9 +3128,13 @@ s390_format_VRIb(void (*irgen)(UChar v1, UChar i2, UChar i3, UChar m4), static void -s390_format_VRIa(void (*irgen)(UChar v1, UShort i2, UChar m3), - UChar v1, UShort i2, UChar m3, UChar rxb) +s390_format_VRIa(void (*irgen)(UChar v1, UShort i2, UChar m3), ULong ovl) { + UChar v1 = VRIa_v1(ovl); + UShort i2 = VRIa_i2(ovl); + UChar m3 = VRIa_m3(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3161,8 +3147,14 @@ s390_format_VRIa(void (*irgen)(UChar v1, UShort i2, UChar m3), static void s390_format_VRIc(void (*irgen)(UChar v1, UChar v3, UShort i2, UChar m4), - UChar v1, UChar v3, UShort i2, UChar m4, UChar rxb) + ULong ovl) { + UChar v1 = (ovl >> 52) & 0xf; + UChar v3 = (ovl >> 48) & 0xf; + UShort i2 = (ovl >> 32) & 0xffff; + UChar m4 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3174,9 +3166,16 @@ s390_format_VRIc(void (*irgen)(UChar v1, UChar v3, UShort i2, UChar m4), } static void -s390_format_VRIe(void (*irgen)(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5), - UChar v1, UChar v2, UShort i3, UChar m4, UChar m5, UChar rxb) +s390_format_VRIe( + void (*irgen)(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5), ULong ovl) { + UChar v1 = (ovl >> 52) & 0xf; + UChar v2 = (ovl >> 48) & 0xf; + UShort i3 = (ovl >> 36) & 0xfff; + UChar m4 = (ovl >> 28) & 0xf; + UChar m5 = (ovl >> 32) & 0xf; + UChar rxb = V_rxb(ovl); + if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3189,8 +3188,14 @@ s390_format_VRIe(void (*irgen)(UChar v1, UChar v2, UShort i3, UChar m4, UChar m5 static void s390_format_VRSc(void (*irgen)(UChar r1, IRTemp op2addr, UChar v3, UChar m4), - UChar r1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) + ULong ovl) { + UChar r1 = (ovl >> 52) & 0xf; + UChar b2 = (ovl >> 44) & 0xf; + UShort d2 = (ovl >> 32) & 0xfff; + UChar v3 = (ovl >> 48) & 0xf; + UChar m4 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3206,9 +3211,13 @@ s390_format_VRSc(void (*irgen)(UChar r1, IRTemp op2addr, UChar v3, UChar m4), } static void -s390_format_VRSd(void (*irgen)(UChar v1, UChar r3, IRTemp op2addr), - UChar v1, UChar r3, UChar b2, UShort d2, UChar rxb) +s390_format_VRSd(void (*irgen)(UChar v1, UChar r3, IRTemp op2addr), ULong ovl) { + UChar r3 = (ovl >> 48) & 0xf; + UChar b2 = (ovl >> 44) & 0xf; + UShort d2 = (ovl >> 32) & 0xfff; + UChar v1 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3226,8 +3235,14 @@ s390_format_VRSd(void (*irgen)(UChar v1, UChar r3, IRTemp op2addr), static void s390_format_VRSa(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3, UChar m4), - UChar v1, UChar b2, UShort d2, UChar v3, UChar m4, UChar rxb) + ULong ovl) { + UChar v1 = (ovl >> 52) & 0xf; + UChar b2 = (ovl >> 44) & 0xf; + UShort d2 = (ovl >> 32) & 0xfff; + UChar v3 = (ovl >> 48) & 0xf; + UChar m4 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3246,8 +3261,14 @@ s390_format_VRSa(void (*irgen)(UChar v1, IRTemp op2addr, UChar v3, UChar m4), static void s390_format_VRSbm(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3, UChar m4), - UChar v1, UChar b2, UShort d2, UChar r3, UChar m4, UChar rxb) -{ + ULong ovl) +{ + UChar v1 = VRSb_v1(ovl); + UChar b2 = VRSb_b2(ovl); + UShort d2 = VRSb_d2(ovl); + UChar r3 = VRSb_r3(ovl); + UChar m4 = VRSb_m4(ovl); + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3264,9 +3285,13 @@ s390_format_VRSbm(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3, UChar m4), static void -s390_format_VRSb(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3), - UChar v1, UChar b2, UShort d2, UChar r3, UChar rxb) +s390_format_VRSb(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3), ULong ovl) { + UChar v1 = VRSb_v1(ovl); + UChar b2 = VRSb_b2(ovl); + UShort d2 = VRSb_d2(ovl); + UChar r3 = VRSb_r3(ovl); + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3283,10 +3308,15 @@ s390_format_VRSb(void (*irgen)(UChar v1, IRTemp op2addr, UChar r3), static void -s390_format_VRV(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), - UChar v1, UChar v2, UChar b2, UShort d2, UChar m3, UChar rxb, +s390_format_VRV(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), ULong ovl, IRType type) { + UChar v1 = (ovl >> 52) & 0xf; + UChar v2 = (ovl >> 48) & 0xf; + UChar b2 = (ovl >> 44) & 0xf; + UShort d2 = (ovl >> 32) & 0xfff; + UChar m3 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (! s390_host_has_vx) { @@ -3313,13 +3343,44 @@ s390_format_VRV(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), irgen(v1, op2addr, m3); } +static void +s390_format_VRRd_VVVVMM( + void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6), + ULong ovl) +{ + UChar v1 = VRRd_v1(ovl); + UChar v2 = VRRd_v2(ovl); + UChar v3 = VRRd_v3(ovl); + UChar v4 = VRRd_v4(ovl); + UChar m5 = VRRd_m5(ovl); + UChar m6 = VRRd_m6(ovl); + UChar rxb = V_rxb(ovl); + + if (! s390_host_has_vx) { + emulation_failure(EmFail_S390X_vx); + return; + } + + v1 = s390_vr_getVRindex(v1, 1, rxb); + v2 = s390_vr_getVRindex(v2, 2, rxb); + v3 = s390_vr_getVRindex(v3, 3, rxb); + v4 = s390_vr_getVRindex(v4, 4, rxb); + irgen(v1, v2, v3, v4, m5, m6); +} static void -s390_format_VRR_VVVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, - UChar v4, UChar m5, UChar m6), - UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, - UChar m6, UChar rxb) +s390_format_VRRe_VVVVMM( + void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6), + ULong ovl) { + UChar v1 = (ovl >> 52) & 0xf; + UChar v2 = (ovl >> 48) & 0xf; + UChar v3 = (ovl >> 44) & 0xf; + UChar m6 = (ovl >> 40) & 0xf; + UChar m5 = (ovl >> 32) & 0xf; + UChar v4 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3334,10 +3395,15 @@ s390_format_VRR_VVVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, static void -s390_format_VRR_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, - UChar m5), - UChar v1, UChar v2, UChar m3, UChar m5, UChar rxb) +s390_format_VRR_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m5), + ULong ovl) { + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar m3 = VRR_m4(ovl); + UChar m5 = VRR_m5(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3348,11 +3414,17 @@ s390_format_VRR_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, irgen(v1, v2, m3, m5); } - static void -s390_format_VRIdm(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4, UChar m5), - UChar v1, UChar v2, UChar v3, UChar i4, UChar m5, UChar rxb) +s390_format_VRIdm( + void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4, UChar m5), ULong ovl) { + UChar v1 = VRId_v1(ovl); + UChar v2 = VRId_v2(ovl); + UChar v3 = VRId_v3(ovl); + UChar i4 = VRId_i4(ovl); + UChar m5 = VRId_m5(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3364,11 +3436,16 @@ s390_format_VRIdm(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4, UChar m5 irgen(v1, v2, v3, i4, m5); } - static void s390_format_VRId(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4), - UChar v1, UChar v2, UChar v3, UChar i4, UChar rxb) + ULong ovl) { + UChar v1 = VRId_v1(ovl); + UChar v2 = VRId_v2(ovl); + UChar v3 = VRId_v3(ovl); + UChar i4 = VRId_i4(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3380,13 +3457,17 @@ s390_format_VRId(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4), irgen(v1, v2, v3, i4); } - static void -s390_format_VRRd_VVVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, - UChar v4, UChar m5), - UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, - UChar rxb) +s390_format_VRRd_VVVVM( + void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5), ULong ovl) { + UChar v1 = VRRd_v1(ovl); + UChar v2 = VRRd_v2(ovl); + UChar v3 = VRRd_v3(ovl); + UChar v4 = VRRd_v4(ovl); + UChar m5 = VRRd_m5(ovl); + UChar rxb = V_rxb(ovl); + if (! s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3399,13 +3480,17 @@ s390_format_VRRd_VVVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, irgen(v1, v2, v3, v4, m5); } - static void -s390_format_VRRa_VVMMM(void (*irgen)(UChar v1, UChar v2, UChar m3, - UChar m4, UChar m5), - UChar v1, UChar v2, UChar m3, UChar m4, UChar m5, - UChar rxb) +s390_format_VRRa_VVMMM( + void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5), ULong ovl) { + UChar v1 = VRRa_v1(ovl); + UChar v2 = VRRa_v2(ovl); + UChar m3 = VRRa_m3(ovl); + UChar m4 = VRRa_m4(ovl); + UChar m5 = VRRa_m5(ovl); + UChar rxb = V_rxb(ovl); + if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3417,11 +3502,16 @@ s390_format_VRRa_VVMMM(void (*irgen)(UChar v1, UChar v2, UChar m3, } static void -s390_format_VRRa_VVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, - UChar m4, UChar m5), - UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, - UChar rxb) +s390_format_VRRa_VVVMM( + void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5), ULong ovl) { + UChar v1 = VRRa_v1(ovl); + UChar v2 = VRRa_v2(ovl); + UChar v3 = VRRa_v3(ovl); + UChar m4 = VRRa_m3(ovl); + UChar m5 = VRRa_m4(ovl); + UChar rxb = V_rxb(ovl); + if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3434,10 +3524,15 @@ s390_format_VRRa_VVVMM(void (*irgen)(UChar v1, UChar v2, UChar v3, } static void -s390_format_VRRa_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, - UChar m4), - UChar v1, UChar v2, UChar m3, UChar m4, UChar rxb) +s390_format_VRRa_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m4), + ULong ovl) { + UChar v1 = VRRa_v1(ovl); + UChar v2 = VRRa_v2(ovl); + UChar m3 = VRRa_m3(ovl); + UChar m4 = VRRa_m4(ovl); + UChar rxb = V_rxb(ovl); + if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3449,29 +3544,18 @@ s390_format_VRRa_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, } static void -s390_format_VRRa_VVVMMM(void (*irgen)(UChar v1, UChar v2, UChar v3, - UChar m4, UChar m5, UChar m6), - UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, - UChar m6, UChar rxb) +s390_format_VRRa_VVVMMM( + void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6), + ULong ovl) { - if (!s390_host_has_vx) { - emulation_failure(EmFail_S390X_vx); - return; - } - - v1 = s390_vr_getVRindex(v1, 1, rxb); - v2 = s390_vr_getVRindex(v2, 2, rxb); - v3 = s390_vr_getVRindex(v3, 3, rxb); - irgen(v1, v2, v3, m4, m5, m6); -} + UChar v1 = VRRa_v1(ovl); + UChar v2 = VRRa_v2(ovl); + UChar v3 = VRRa_v3(ovl); + UChar m4 = VRRa_m3(ovl); + UChar m5 = VRRa_m4(ovl); + UChar m6 = VRRa_m5(ovl); + UChar rxb = V_rxb(ovl); - -static void -s390_format_VRRa_VVVMMM2(void (*irgen)(UChar v1, UChar v2, UChar v3, - UChar m4, UChar m5, UChar m6), - UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, - UChar m6, UChar rxb) -{ if (!s390_host_has_vx) { emulation_failure(EmFail_S390X_vx); return; @@ -3484,9 +3568,13 @@ s390_format_VRRa_VVVMMM2(void (*irgen)(UChar v1, UChar v2, UChar v3, } static void -s390_format_VSI(void (*irgen)(UChar v1, IRTemp op2addr, UChar i3), - UChar i3, UChar b2, UShort d2, UChar v1, UChar rxb) +s390_format_VSI(void (*irgen)(UChar v1, IRTemp op2addr, UChar i3), ULong ovl) { + UChar i3 = (ovl >> 48) & 0xff; + UChar b2 = (ovl >> 44) & 0xf; + UShort d2 = (ovl >> 32) & 0xfff; + UChar v1 = (ovl >> 28) & 0xf; + UChar rxb = V_rxb(ovl); IRTemp op2addr = newTemp(Ity_I64); if (!s390_host_has_vx) { @@ -19038,84 +19126,39 @@ s390_decode_6byte_and_irgen(const UChar *bytes) goto ok; case 0xe300000000cfULL: s390_format_RXY(s390_irgen_CLHF, ovl); goto ok; + case 0xe60000000001ULL: s390_format_VRX(s390_irgen_VLEBRH, ovl); + goto ok; + case 0xe60000000002ULL: s390_format_VRX(s390_irgen_VLEBRG, ovl); + goto ok; + case 0xe60000000003ULL: s390_format_VRX(s390_irgen_VLEBRF, ovl); goto ok; - case 0xe60000000001ULL: s390_format_VRX(s390_irgen_VLEBRH, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe60000000002ULL: s390_format_VRX(s390_irgen_VLEBRG, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe60000000003ULL: s390_format_VRX(s390_irgen_VLEBRF, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe60000000004ULL: s390_format_VRX(s390_irgen_VLLEBRZ, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe60000000005ULL: s390_format_VRX(s390_irgen_VLBRREP, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe60000000006ULL: s390_format_VRX(s390_irgen_VLBR, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe60000000007ULL: s390_format_VRX(s390_irgen_VLER, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe60000000009ULL: s390_format_VRX(s390_irgen_VSTEBRH, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe6000000000aULL: s390_format_VRX(s390_irgen_VSTEBRG, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe6000000000bULL: s390_format_VRX(s390_irgen_VSTEBRF, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe6000000000eULL: s390_format_VRX(s390_irgen_VSTBR, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe6000000000fULL: s390_format_VRX(s390_irgen_VSTER, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); + case 0xe60000000004ULL: s390_format_VRX(s390_irgen_VLLEBRZ, ovl); + goto ok; + case 0xe60000000005ULL: s390_format_VRX(s390_irgen_VLBRREP, ovl); + goto ok; + case 0xe60000000006ULL: s390_format_VRX(s390_irgen_VLBR, ovl); + goto ok; + case 0xe60000000007ULL: s390_format_VRX(s390_irgen_VLER, ovl); + goto ok; + case 0xe60000000009ULL: s390_format_VRX(s390_irgen_VSTEBRH, ovl); + goto ok; + case 0xe6000000000aULL: s390_format_VRX(s390_irgen_VSTEBRG, ovl); + goto ok; + case 0xe6000000000bULL: s390_format_VRX(s390_irgen_VSTEBRF, ovl); + goto ok; + case 0xe6000000000eULL: s390_format_VRX(s390_irgen_VSTBR, ovl); + goto ok; + case 0xe6000000000fULL: s390_format_VRX(s390_irgen_VSTER, ovl); goto ok; case 0xe60000000034ULL: /* VPKZ */ goto unimplemented; - case 0xe60000000035ULL: s390_format_VSI(s390_irgen_VLRL, VSI_i3(ovl), - VSI_b2(ovl), VSI_d2(ovl), - VSI_v1(ovl), VSI_rxb(ovl)); + case 0xe60000000035ULL: s390_format_VSI(s390_irgen_VLRL, ovl); goto ok; - case 0xe60000000037ULL: s390_format_VRSd(s390_irgen_VLRLR, VRSd_v1(ovl), - VRSd_r3(ovl), VRSd_b2(ovl), - VRSd_d2(ovl), VRSd_rxb(ovl)); + case 0xe60000000037ULL: s390_format_VRSd(s390_irgen_VLRLR, ovl); goto ok; case 0xe6000000003cULL: /* VUPKZ */ goto unimplemented; - case 0xe6000000003dULL: s390_format_VSI(s390_irgen_VSTRL, VSI_i3(ovl), - VSI_b2(ovl), VSI_d2(ovl), - VSI_v1(ovl), VSI_rxb(ovl)); + case 0xe6000000003dULL: s390_format_VSI(s390_irgen_VSTRL, ovl); goto ok; - case 0xe6000000003fULL: s390_format_VRSd(s390_irgen_VSTRLR, VRSd_v1(ovl), - VRSd_r3(ovl), VRSd_b2(ovl), - VRSd_d2(ovl), VRSd_rxb(ovl)); + case 0xe6000000003fULL: s390_format_VRSd(s390_irgen_VSTRLR, ovl); goto ok; case 0xe60000000049ULL: /* VLIP */ goto unimplemented; case 0xe6000000004aULL: /* VCVDQ */ goto unimplemented; @@ -19124,22 +19167,14 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe60000000051ULL: /* VCLZDP */ goto unimplemented; case 0xe60000000052ULL: /* VCVBG */ goto unimplemented; case 0xe60000000054ULL: /* VUPKZH */ goto unimplemented; - case 0xe60000000055ULL: s390_format_VRRa_VVMM(s390_irgen_VCNF, - VRRa_v1(ovl), VRRa_v2(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe60000000056ULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNH, - VRRa_v1(ovl), VRRa_v2(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe6000000005dULL: s390_format_VRRa_VVMM(s390_irgen_VCFN, - VRRa_v1(ovl), VRRa_v2(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe6000000005eULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNL, - VRRa_v1(ovl), VRRa_v2(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; + case 0xe60000000055ULL: s390_format_VRRa_VVMM(s390_irgen_VCNF, ovl); + goto ok; + case 0xe60000000056ULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNH, ovl); + goto ok; + case 0xe6000000005dULL: s390_format_VRRa_VVMM(s390_irgen_VCFN, ovl); + goto ok; + case 0xe6000000005eULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNL, ovl); + goto ok; case 0xe60000000058ULL: /* VCVD */ goto unimplemented; case 0xe60000000059ULL: /* VSRP */ goto unimplemented; case 0xe6000000005aULL: /* VCVDG */ goto unimplemented; @@ -19150,11 +19185,8 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe60000000071ULL: /* VAP */ goto unimplemented; case 0xe60000000072ULL: /* VSRPR */ goto unimplemented; case 0xe60000000073ULL: /* VSP */ goto unimplemented; - case 0xe60000000075ULL: s390_format_VRRa_VVVMM(s390_irgen_VCRNF, - VRRa_v1(ovl), VRRa_v2(ovl), - VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; + case 0xe60000000075ULL: s390_format_VRRa_VVVMM(s390_irgen_VCRNF, ovl); + goto ok; case 0xe60000000077ULL: /* VCP */ goto unimplemented; case 0xe60000000078ULL: /* VMP */ goto unimplemented; case 0xe60000000079ULL: /* VMSP */ goto unimplemented; @@ -19165,588 +19197,315 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe6000000007dULL: /* VCSPH */ goto unimplemented; case 0xe6000000007eULL: /* VSDP */ goto unimplemented; case 0xe6000000007fULL: /* VTZ */ goto unimplemented; - case 0xe70000000000ULL: s390_format_VRX(s390_irgen_VLEB, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000001ULL: s390_format_VRX(s390_irgen_VLEH, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000002ULL: s390_format_VRX(s390_irgen_VLEG, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000003ULL: s390_format_VRX(s390_irgen_VLEF, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000004ULL: s390_format_VRX(s390_irgen_VLLEZ, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000005ULL: s390_format_VRX(s390_irgen_VLREP, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000006ULL: s390_format_VRX(s390_irgen_VL, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000007ULL: s390_format_VRX(s390_irgen_VLBB, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000008ULL: s390_format_VRX(s390_irgen_VSTEB, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000009ULL: s390_format_VRX(s390_irgen_VSTEH, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe7000000000aULL: s390_format_VRX(s390_irgen_VSTEG, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe7000000000bULL: s390_format_VRX(s390_irgen_VSTEF, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe7000000000eULL: s390_format_VRX(s390_irgen_VST, VRX_v1(ovl), - VRX_x2(ovl), VRX_b2(ovl), - VRX_d2(ovl), VRX_m3(ovl), - VRX_rxb(ovl)); - goto ok; - case 0xe70000000012ULL: s390_format_VRV(s390_irgen_VGEG, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I64); - goto ok; - case 0xe70000000013ULL: s390_format_VRV(s390_irgen_VGEF, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I32); - goto ok; - case 0xe7000000001aULL: s390_format_VRV(s390_irgen_VSCEG, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I64); - goto ok; - case 0xe7000000001bULL: s390_format_VRV(s390_irgen_VSCEF, VRV_v1(ovl), - VRV_x2(ovl), VRV_b2(ovl), - VRV_d2(ovl), VRV_m3(ovl), - VRV_rxb(ovl), Ity_I32); - goto ok; - case 0xe70000000021ULL: s390_format_VRSc(s390_irgen_VLGV, VRSc_r1(ovl), - VRSc_b2(ovl), VRSc_d2(ovl), - VRSc_v3(ovl), VRSc_m4(ovl), - VRSc_rxb(ovl)); - goto ok; - case 0xe70000000022ULL: s390_format_VRSbm(s390_irgen_VLVG, VRSb_v1(ovl), - VRSb_b2(ovl), VRSb_d2(ovl), - VRSb_r3(ovl), VRSb_m4(ovl), - VRSb_rxb(ovl)); + case 0xe70000000000ULL: s390_format_VRX(s390_irgen_VLEB, ovl); + goto ok; + case 0xe70000000001ULL: s390_format_VRX(s390_irgen_VLEH, ovl); + goto ok; + case 0xe70000000002ULL: s390_format_VRX(s390_irgen_VLEG, ovl); + goto ok; + case 0xe70000000003ULL: s390_format_VRX(s390_irgen_VLEF, ovl); + goto ok; + case 0xe70000000004ULL: s390_format_VRX(s390_irgen_VLLEZ, ovl); + goto ok; + case 0xe70000000005ULL: s390_format_VRX(s390_irgen_VLREP, ovl); + goto ok; + case 0xe70000000006ULL: s390_format_VRX(s390_irgen_VL, ovl); + goto ok; + case 0xe70000000007ULL: s390_format_VRX(s390_irgen_VLBB, ovl); + goto ok; + case 0xe70000000008ULL: s390_format_VRX(s390_irgen_VSTEB, ovl); + goto ok; + case 0xe70000000009ULL: s390_format_VRX(s390_irgen_VSTEH, ovl); + goto ok; + case 0xe7000000000aULL: s390_format_VRX(s390_irgen_VSTEG, ovl); + goto ok; + case 0xe7000000000bULL: s390_format_VRX(s390_irgen_VSTEF, ovl); + goto ok; + case 0xe7000000000eULL: s390_format_VRX(s390_irgen_VST, ovl); + goto ok; + case 0xe70000000012ULL: s390_format_VRV(s390_irgen_VGEG, ovl, Ity_I64); + goto ok; + case 0xe70000000013ULL: s390_format_VRV(s390_irgen_VGEF, ovl, Ity_I32); + goto ok; + case 0xe7000000001aULL: s390_format_VRV(s390_irgen_VSCEG, ovl, Ity_I64); + goto ok; + case 0xe7000000001bULL: s390_format_VRV(s390_irgen_VSCEF, ovl, Ity_I32); + goto ok; + case 0xe70000000021ULL: s390_format_VRSc(s390_irgen_VLGV, ovl); + goto ok; + case 0xe70000000022ULL: s390_format_VRSbm(s390_irgen_VLVG, ovl); goto ok; case 0xe70000000027ULL: s390_format_RXE(s390_irgen_LCBB, ovl); goto ok; - case 0xe70000000030ULL: s390_format_VRSa(s390_irgen_VESL, VRSa_v1(ovl), - VRSa_b2(ovl), VRSa_d2(ovl), - VRSa_v3(ovl), VRSa_m4(ovl), - VRSa_rxb(ovl)); - goto ok; - case 0xe70000000033ULL: s390_format_VRSa(s390_irgen_VERLL, VRSa_v1(ovl), - VRSa_b2(ovl), VRSa_d2(ovl), - VRSa_v3(ovl), VRSa_m4(ovl), - VRSa_rxb(ovl)); - goto ok; - case 0xe70000000036ULL: s390_format_VRSa(s390_irgen_VLM, VRSa_v1(ovl), - VRSa_b2(ovl), VRSa_d2(ovl), - VRSa_v3(ovl), VRSa_m4(ovl), - VRSa_rxb(ovl)); - goto ok; - case 0xe70000000037ULL: s390_format_VRSb(s390_irgen_VLL, VRSb_v1(ovl), - VRSb_b2(ovl), VRSb_d2(ovl), - VRSb_r3(ovl), VRSb_rxb(ovl)); - goto ok; - case 0xe70000000038ULL: s390_format_VRSa(s390_irgen_VESRL, VRSa_v1(ovl), - VRSa_b2(ovl), VRSa_d2(ovl), - VRSa_v3(ovl), VRSa_m4(ovl), - VRSa_rxb(ovl)); - goto ok; - case 0xe7000000003aULL: s390_format_VRSa(s390_irgen_VESRA, VRSa_v1(ovl), - VRSa_b2(ovl), VRSa_d2(ovl), - VRSa_v3(ovl), VRSa_m4(ovl), - VRSa_rxb(ovl)); - goto ok; - case 0xe7000000003eULL: s390_format_VRSa(s390_irgen_VSTM, VRSa_v1(ovl), - VRSa_b2(ovl), VRSa_d2(ovl), - VRSa_v3(ovl), VRSa_m4(ovl), - VRSa_rxb(ovl)); - goto ok; - case 0xe7000000003fULL: s390_format_VRSb(s390_irgen_VSTL, VRSb_v1(ovl), - VRSb_b2(ovl), VRSb_d2(ovl), - VRSb_r3(ovl), VRSb_rxb(ovl)); - goto ok; - case 0xe70000000040ULL: s390_format_VRIa(s390_irgen_VLEIB, VRIa_v1(ovl), - VRIa_i2(ovl), VRIa_m3(ovl), - VRIa_rxb(ovl)); - goto ok; - case 0xe70000000041ULL: s390_format_VRIa(s390_irgen_VLEIH, VRIa_v1(ovl), - VRIa_i2(ovl), VRIa_m3(ovl), - VRIa_rxb(ovl)); - goto ok; - case 0xe70000000042ULL: s390_format_VRIa(s390_irgen_VLEIG, VRIa_v1(ovl), - VRIa_i2(ovl), VRIa_m3(ovl), - VRIa_rxb(ovl)); - goto ok; - case 0xe70000000043ULL: s390_format_VRIa(s390_irgen_VLEIF, VRIa_v1(ovl), - VRIa_i2(ovl), VRIa_m3(ovl), - VRIa_rxb(ovl)); - goto ok; - case 0xe70000000044ULL: s390_format_VRIa0(s390_irgen_VGBM, VRIa_v1(ovl), - VRIa_i2(ovl), VRIa_rxb(ovl)); - goto ok; - case 0xe70000000045ULL: s390_format_VRIa(s390_irgen_VREPI, VRIa_v1(ovl), - VRIa_i2(ovl), VRIa_m3(ovl), - VRIa_rxb(ovl)); - goto ok; - case 0xe70000000046ULL: s390_format_VRIb(s390_irgen_VGM, VRIb_v1(ovl), - VRIb_i2(ovl), VRIb_i3(ovl), - VRIb_m4(ovl), VRIb_rxb(ovl)); - goto ok; - case 0xe7000000004aULL: s390_format_VRIe(s390_irgen_VFTCI, VRIe_v1(ovl), - VRIe_v2(ovl), VRIe_i3(ovl), - VRIe_m4(ovl), VRIe_m5(ovl), - VRIe_rxb(ovl)); - goto ok; - case 0xe7000000004dULL: s390_format_VRIc(s390_irgen_VREP, VRIc_v1(ovl), - VRIc_v3(ovl), VRIc_i2(ovl), - VRIc_m4(ovl), VRIc_rxb(ovl)); - goto ok; - case 0xe70000000050ULL: s390_format_VRR_VVM(s390_irgen_VPOPCT, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000052ULL: s390_format_VRR_VVM(s390_irgen_VCTZ, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe70000000053ULL: s390_format_VRR_VVM(s390_irgen_VCLZ, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; + case 0xe70000000030ULL: s390_format_VRSa(s390_irgen_VESL, ovl); + goto ok; + case 0xe70000000033ULL: s390_format_VRSa(s390_irgen_VERLL, ovl); + goto ok; + case 0xe70000000036ULL: s390_format_VRSa(s390_irgen_VLM, ovl); + goto ok; + case 0xe70000000037ULL: s390_format_VRSb(s390_irgen_VLL, ovl); + goto ok; + case 0xe70000000038ULL: s390_format_VRSa(s390_irgen_VESRL, ovl); + goto ok; + case 0xe7000000003aULL: s390_format_VRSa(s390_irgen_VESRA, ovl); + goto ok; + case 0xe7000000003eULL: s390_format_VRSa(s390_irgen_VSTM, ovl); + goto ok; + case 0xe7000000003fULL: s390_format_VRSb(s390_irgen_VSTL, ovl); + goto ok; + case 0xe70000000040ULL: s390_format_VRIa(s390_irgen_VLEIB, ovl); + goto ok; + case 0xe70000000041ULL: s390_format_VRIa(s390_irgen_VLEIH, ovl); + goto ok; + case 0xe70000000042ULL: s390_format_VRIa(s390_irgen_VLEIG, ovl); + goto ok; + case 0xe70000000043ULL: s390_format_VRIa(s390_irgen_VLEIF, ovl); + goto ok; + case 0xe70000000044ULL: s390_format_VRIa0(s390_irgen_VGBM, ovl); + goto ok; + case 0xe70000000045ULL: s390_format_VRIa(s390_irgen_VREPI, ovl); + goto ok; + case 0xe70000000046ULL: s390_format_VRIb(s390_irgen_VGM, ovl); + goto ok; + case 0xe7000000004aULL: s390_format_VRIe(s390_irgen_VFTCI, ovl); + goto ok; + case 0xe7000000004dULL: s390_format_VRIc(s390_irgen_VREP, ovl); + goto ok; + case 0xe70000000050ULL: s390_format_VRR_VVM(s390_irgen_VPOPCT, ovl); + goto ok; + case 0xe70000000052ULL: s390_format_VRR_VVM(s390_irgen_VCTZ, ovl); + goto ok; + case 0xe70000000053ULL: s390_format_VRR_VVM(s390_irgen_VCLZ, ovl); + goto ok; case 0xe70000000054ULL: /* VGEM */ goto unimplemented; - case 0xe70000000056ULL: s390_format_VRR_VV(s390_irgen_VLR, VRR_v1(ovl), - VRR_v2(ovl), VRR_rxb(ovl)); goto ok; - case 0xe7000000005cULL: s390_format_VRR_VVMM(s390_irgen_VISTR, VRR_v1(ovl), - VRR_v2(ovl), VRR_m4(ovl), - VRR_m5(ovl), VRR_rxb(ovl)); goto ok; - case 0xe7000000005fULL: s390_format_VRR_VVM(s390_irgen_VSEG, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe70000000060ULL: s390_format_VRR_VVVM(s390_irgen_VMRL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000061ULL: s390_format_VRR_VVVM(s390_irgen_VMRH, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000062ULL: s390_format_VRR_VRR(s390_irgen_VLVGP, VRR_v1(ovl), - VRR_r2(ovl), VRR_r3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000064ULL: s390_format_VRR_VVVM(s390_irgen_VSUM, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000065ULL: s390_format_VRR_VVVM(s390_irgen_VSUMG, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000066ULL: s390_format_VRR_VVV(s390_irgen_VCKSM, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000067ULL: s390_format_VRR_VVVM(s390_irgen_VSUMQ, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000068ULL: s390_format_VRR_VVV(s390_irgen_VN, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000069ULL: s390_format_VRR_VVV(s390_irgen_VNC, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000006aULL: s390_format_VRR_VVV(s390_irgen_VO, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000006bULL: s390_format_VRR_VVV(s390_irgen_VNO, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000006cULL: s390_format_VRR_VVV(s390_irgen_VNX, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000006dULL: s390_format_VRR_VVV(s390_irgen_VX, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000006eULL: s390_format_VRR_VVV(s390_irgen_VNN, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000006fULL: s390_format_VRR_VVV(s390_irgen_VOC, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000070ULL: s390_format_VRR_VVVM(s390_irgen_VESLV, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000072ULL: s390_format_VRIdm(s390_irgen_VERIM, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), VRId_m5(ovl), - VRId_rxb(ovl)); - goto ok; - case 0xe70000000073ULL: s390_format_VRR_VVVM(s390_irgen_VERLLV, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000074ULL: s390_format_VRR_VVV(s390_irgen_VSL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000075ULL: s390_format_VRR_VVV(s390_irgen_VSLB, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000077ULL: s390_format_VRId(s390_irgen_VSLDB, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), VRId_rxb(ovl)); - goto ok; - case 0xe70000000078ULL: s390_format_VRR_VVVM(s390_irgen_VESRLV, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe7000000007aULL: s390_format_VRR_VVVM(s390_irgen_VESRAV, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe7000000007cULL: s390_format_VRR_VVV(s390_irgen_VSRL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000007dULL: s390_format_VRR_VVV(s390_irgen_VSRLB, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000007eULL: s390_format_VRR_VVV(s390_irgen_VSRA, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe7000000007fULL: s390_format_VRR_VVV(s390_irgen_VSRAB, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000080ULL: s390_format_VRR_VVVMM(s390_irgen_VFEE, VRR_v1(ovl), - VRR_v2(ovl), VRR_r3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe70000000081ULL: s390_format_VRR_VVVMM(s390_irgen_VFENE, VRR_v1(ovl), - VRR_v2(ovl), VRR_r3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe70000000082ULL: s390_format_VRR_VVVMM(s390_irgen_VFAE, VRR_v1(ovl), - VRR_v2(ovl), VRR_r3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe70000000084ULL: s390_format_VRR_VVVM(s390_irgen_VPDI, VRR_v1(ovl), - VRR_v2(ovl), VRR_r3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000085ULL: s390_format_VRR_VVV(s390_irgen_VBPERM, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_rxb(ovl)); goto ok; - case 0xe70000000086ULL: s390_format_VRId(s390_irgen_VSLD, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), VRId_rxb(ovl)); - goto ok; - case 0xe70000000087ULL: s390_format_VRId(s390_irgen_VSRD, VRId_v1(ovl), - VRId_v2(ovl), VRId_v3(ovl), - VRId_i4(ovl), VRId_rxb(ovl)); + case 0xe70000000056ULL: s390_format_VRR_VV(s390_irgen_VLR, ovl); + goto ok; + case 0xe7000000005cULL: s390_format_VRR_VVMM(s390_irgen_VISTR, ovl); + goto ok; + case 0xe7000000005fULL: s390_format_VRR_VVM(s390_irgen_VSEG, ovl); + goto ok; + case 0xe70000000060ULL: s390_format_VRR_VVVM(s390_irgen_VMRL, ovl); + goto ok; + case 0xe70000000061ULL: s390_format_VRR_VVVM(s390_irgen_VMRH, ovl); + goto ok; + case 0xe70000000062ULL: s390_format_VRR_VRR(s390_irgen_VLVGP, ovl); + goto ok; + case 0xe70000000064ULL: s390_format_VRR_VVVM(s390_irgen_VSUM, ovl); + goto ok; + case 0xe70000000065ULL: s390_format_VRR_VVVM(s390_irgen_VSUMG, ovl); + goto ok; + case 0xe70000000066ULL: s390_format_VRR_VVV(s390_irgen_VCKSM, ovl); + goto ok; + case 0xe70000000067ULL: s390_format_VRR_VVVM(s390_irgen_VSUMQ, ovl); + goto ok; + case 0xe70000000068ULL: s390_format_VRR_VVV(s390_irgen_VN, ovl); + goto ok; + case 0xe70000000069ULL: s390_format_VRR_VVV(s390_irgen_VNC, ovl); + goto ok; + case 0xe7000000006aULL: s390_format_VRR_VVV(s390_irgen_VO, ovl); + goto ok; + case 0xe7000000006bULL: s390_format_VRR_VVV(s390_irgen_VNO, ovl); + goto ok; + case 0xe7000000006cULL: s390_format_VRR_VVV(s390_irgen_VNX, ovl); + goto ok; + case 0xe7000000006dULL: s390_format_VRR_VVV(s390_irgen_VX, ovl); + goto ok; + case 0xe7000000006eULL: s390_format_VRR_VVV(s390_irgen_VNN, ovl); + goto ok; + case 0xe7000000006fULL: s390_format_VRR_VVV(s390_irgen_VOC, ovl); + goto ok; + case 0xe70000000070ULL: s390_format_VRR_VVVM(s390_irgen_VESLV, ovl); + goto ok; + case 0xe70000000072ULL: s390_format_VRIdm(s390_irgen_VERIM, ovl); + goto ok; + case 0xe70000000073ULL: s390_format_VRR_VVVM(s390_irgen_VERLLV, ovl); + goto ok; + case 0xe70000000074ULL: s390_format_VRR_VVV(s390_irgen_VSL, ovl); + goto ok; + case 0xe70000000075ULL: s390_format_VRR_VVV(s390_irgen_VSLB, ovl); + goto ok; + case 0xe70000000077ULL: s390_format_VRId(s390_irgen_VSLDB, ovl); + goto ok; + case 0xe70000000078ULL: s390_format_VRR_VVVM(s390_irgen_VESRLV, ovl); + goto ok; + case 0xe7000000007aULL: s390_format_VRR_VVVM(s390_irgen_VESRAV, ovl); + goto ok; + case 0xe7000000007cULL: s390_format_VRR_VVV(s390_irgen_VSRL, ovl); + goto ok; + case 0xe7000000007dULL: s390_format_VRR_VVV(s390_irgen_VSRLB, ovl); + goto ok; + case 0xe7000000007eULL: s390_format_VRR_VVV(s390_irgen_VSRA, ovl); + goto ok; + case 0xe7000000007fULL: s390_format_VRR_VVV(s390_irgen_VSRAB, ovl); + goto ok; + case 0xe70000000080ULL: s390_format_VRR_VVVMM(s390_irgen_VFEE, ovl); + goto ok; + case 0xe70000000081ULL: s390_format_VRR_VVVMM(s390_irgen_VFENE, ovl); + goto ok; + case 0xe70000000082ULL: s390_format_VRR_VVVMM(s390_irgen_VFAE, ovl); + goto ok; + case 0xe70000000084ULL: s390_format_VRR_VVVM(s390_irgen_VPDI, ovl); + goto ok; + case 0xe70000000085ULL: s390_format_VRR_VVV(s390_irgen_VBPERM, ovl); + goto ok; + case 0xe70000000086ULL: s390_format_VRId(s390_irgen_VSLD, ovl); + goto ok; + case 0xe70000000087ULL: s390_format_VRId(s390_irgen_VSRD, ovl); goto ok; case 0xe70000000088ULL: /* VEVAL */ goto unimplemented; case 0xe70000000089ULL: /* VBLEND */ goto unimplemented; - case 0xe7000000008aULL: s390_format_VRR_VVVVMM(s390_irgen_VSTRC, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_m6(ovl), VRRd_rxb(ovl) - ); goto ok; - case 0xe7000000008bULL: s390_format_VRR_VVVVMM(s390_irgen_VSTRS, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_m6(ovl), VRRd_rxb(ovl) - ); goto ok; - case 0xe7000000008cULL: s390_format_VRR_VVVV(s390_irgen_VPERM, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_v4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe7000000008dULL: s390_format_VRR_VVVV(s390_irgen_VSEL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_v4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe7000000008eULL: s390_format_VRR_VVVVMM(s390_irgen_VFMS, VRRe_v1(ovl), - VRRe_v2(ovl), VRRe_v3(ovl), - VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl) - ); goto ok; - case 0xe7000000008fULL: s390_format_VRR_VVVVMM(s390_irgen_VFMA, VRRe_v1(ovl), - VRRe_v2(ovl), VRRe_v3(ovl), - VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl) - ); goto ok; - case 0xe70000000094ULL: s390_format_VRR_VVVM(s390_irgen_VPK, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe70000000095ULL: s390_format_VRR_VVVMM(s390_irgen_VPKLS, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe70000000097ULL: s390_format_VRR_VVVMM(s390_irgen_VPKS, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe7000000009eULL: s390_format_VRR_VVVVMM(s390_irgen_VFNMS, VRRe_v1(ovl), - VRRe_v2(ovl), VRRe_v3(ovl), - VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl) - ); goto ok; - case 0xe7000000009fULL: s390_format_VRR_VVVVMM(s390_irgen_VFNMA, VRRe_v1(ovl), - VRRe_v2(ovl), VRRe_v3(ovl), - VRRe_v4(ovl), VRRe_m5(ovl), - VRRe_m6(ovl), VRRe_rxb(ovl) - ); goto ok; - case 0xe700000000a1ULL: s390_format_VRR_VVVM(s390_irgen_VMLH, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000a2ULL: s390_format_VRR_VVVM(s390_irgen_VML, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000a3ULL: s390_format_VRR_VVVM(s390_irgen_VMH, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000a4ULL: s390_format_VRR_VVVM(s390_irgen_VMLE, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000a5ULL: s390_format_VRR_VVVM(s390_irgen_VMLO, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000a6ULL: s390_format_VRR_VVVM(s390_irgen_VME, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000a7ULL: s390_format_VRR_VVVM(s390_irgen_VMO, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000a9ULL: s390_format_VRRd_VVVVM(s390_irgen_VMALH, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000aaULL: s390_format_VRRd_VVVVM(s390_irgen_VMAL, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000abULL: s390_format_VRRd_VVVVM(s390_irgen_VMAH, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000acULL: s390_format_VRRd_VVVVM(s390_irgen_VMALE, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000adULL: s390_format_VRRd_VVVVM(s390_irgen_VMALO, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000aeULL: s390_format_VRRd_VVVVM(s390_irgen_VMAE, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000afULL: s390_format_VRRd_VVVVM(s390_irgen_VMAO, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; + case 0xe7000000008aULL: s390_format_VRRd_VVVVMM(s390_irgen_VSTRC, ovl); + goto ok; + case 0xe7000000008bULL: s390_format_VRRd_VVVVMM(s390_irgen_VSTRS, ovl); + goto ok; + case 0xe7000000008cULL: s390_format_VRR_VVVV(s390_irgen_VPERM, ovl); + goto ok; + case 0xe7000000008dULL: s390_format_VRR_VVVV(s390_irgen_VSEL, ovl); + goto ok; + case 0xe7000000008eULL: s390_format_VRRe_VVVVMM(s390_irgen_VFMS, ovl); + goto ok; + case 0xe7000000008fULL: s390_format_VRRe_VVVVMM(s390_irgen_VFMA, ovl); + goto ok; + case 0xe70000000094ULL: s390_format_VRR_VVVM(s390_irgen_VPK, ovl); + goto ok; + case 0xe70000000095ULL: s390_format_VRR_VVVMM(s390_irgen_VPKLS, ovl); + goto ok; + case 0xe70000000097ULL: s390_format_VRR_VVVMM(s390_irgen_VPKS, ovl); + goto ok; + case 0xe7000000009eULL: s390_format_VRRe_VVVVMM(s390_irgen_VFNMS, ovl); + goto ok; + case 0xe7000000009fULL: s390_format_VRRe_VVVVMM(s390_irgen_VFNMA, ovl); + goto ok; + case 0xe700000000a1ULL: s390_format_VRR_VVVM(s390_irgen_VMLH, ovl); + goto ok; + case 0xe700000000a2ULL: s390_format_VRR_VVVM(s390_irgen_VML, ovl); + goto ok; + case 0xe700000000a3ULL: s390_format_VRR_VVVM(s390_irgen_VMH, ovl); + goto ok; + case 0xe700000000a4ULL: s390_format_VRR_VVVM(s390_irgen_VMLE, ovl); + goto ok; + case 0xe700000000a5ULL: s390_format_VRR_VVVM(s390_irgen_VMLO, ovl); + goto ok; + case 0xe700000000a6ULL: s390_format_VRR_VVVM(s390_irgen_VME, ovl); + goto ok; + case 0xe700000000a7ULL: s390_format_VRR_VVVM(s390_irgen_VMO, ovl); + goto ok; + case 0xe700000000a9ULL: s390_format_VRRd_VVVVM(s390_irgen_VMALH, ovl); + goto ok; + case 0xe700000000aaULL: s390_format_VRRd_VVVVM(s390_irgen_VMAL, ovl); + goto ok; + case 0xe700000000abULL: s390_format_VRRd_VVVVM(s390_irgen_VMAH, ovl); + goto ok; + case 0xe700000000acULL: s390_format_VRRd_VVVVM(s390_irgen_VMALE, ovl); + goto ok; + case 0xe700000000adULL: s390_format_VRRd_VVVVM(s390_irgen_VMALO, ovl); + goto ok; + case 0xe700000000aeULL: s390_format_VRRd_VVVVM(s390_irgen_VMAE, ovl); + goto ok; + case 0xe700000000afULL: s390_format_VRRd_VVVVM(s390_irgen_VMAO, ovl); + goto ok; case 0xe700000000b0ULL: /* VDL */ goto unimplemented; case 0xe700000000b1ULL: /* VRL */ goto unimplemented; case 0xe700000000b2ULL: /* VD */ goto unimplemented; case 0xe700000000b3ULL: /* VR */ goto unimplemented; - case 0xe700000000b4ULL: s390_format_VRR_VVVM(s390_irgen_VGFM, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000b8ULL: s390_format_VRR_VVVVMM(s390_irgen_VMSL, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_m6(ovl), VRRd_rxb(ovl) - ); goto ok; - case 0xe700000000b9ULL: s390_format_VRRd_VVVVM(s390_irgen_VACCC, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000bbULL: s390_format_VRRd_VVVVM(s390_irgen_VAC, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000bcULL: s390_format_VRRd_VVVVM(s390_irgen_VGFMA, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000bdULL: s390_format_VRRd_VVVVM(s390_irgen_VSBCBI, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000bfULL: s390_format_VRRd_VVVVM(s390_irgen_VSBI, VRRd_v1(ovl), - VRRd_v2(ovl), VRRd_v3(ovl), - VRRd_v4(ovl), VRRd_m5(ovl), - VRRd_rxb(ovl)); goto ok; - case 0xe700000000c0ULL: s390_format_VRRa_VVMMM(s390_irgen_VCLGD, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000c1ULL: s390_format_VRRa_VVMMM(s390_irgen_VCDLG, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000c2ULL: s390_format_VRRa_VVMMM(s390_irgen_VCGD, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000c3ULL: s390_format_VRRa_VVMMM(s390_irgen_VCDG, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000c4ULL: s390_format_VRRa_VVMM(s390_irgen_VFLL, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_rxb(ovl) - ); goto ok; - case 0xe700000000c5ULL: s390_format_VRRa_VVMMM(s390_irgen_VFLR, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000c7ULL: s390_format_VRRa_VVMMM(s390_irgen_VFI, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000caULL: s390_format_VRRa_VVMM(s390_irgen_WFK, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_rxb(ovl) - ); goto ok; - case 0xe700000000cbULL: s390_format_VRRa_VVMM(s390_irgen_WFC, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_rxb(ovl) - ); goto ok; - case 0xe700000000ccULL: s390_format_VRRa_VVMMM(s390_irgen_VFPSO, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000ceULL: s390_format_VRRa_VVMM(s390_irgen_VFSQ, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000d4ULL: s390_format_VRR_VVM(s390_irgen_VUPLL, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000d5ULL: s390_format_VRR_VVM(s390_irgen_VUPLH, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000d6ULL: s390_format_VRR_VVM(s390_irgen_VUPL, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000d7ULL: s390_format_VRR_VVM(s390_irgen_VUPH, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000d8ULL: s390_format_VRR_VV(s390_irgen_VTM, VRR_v1(ovl), - VRR_v2(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000d9ULL: s390_format_VRR_VVM(s390_irgen_VECL, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000dbULL: s390_format_VRR_VVM(s390_irgen_VEC, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000deULL: s390_format_VRR_VVM(s390_irgen_VLC, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000dfULL: s390_format_VRR_VVM(s390_irgen_VLP, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_m3(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000e2ULL: s390_format_VRRa_VVVMM(s390_irgen_VFS, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000e3ULL: s390_format_VRRa_VVVMM(s390_irgen_VFA, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000e5ULL: s390_format_VRRa_VVVMM(s390_irgen_VFD, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000e7ULL: s390_format_VRRa_VVVMM(s390_irgen_VFM, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000e8ULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCE, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000eaULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCHE, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000ebULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCH, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000eeULL: s390_format_VRRa_VVVMMM2(s390_irgen_VFMIN, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000efULL: s390_format_VRRa_VVVMMM2(s390_irgen_VFMAX, VRRa_v1(ovl), - VRRa_v2(ovl), VRRa_v3(ovl), - VRRa_m3(ovl), VRRa_m4(ovl), - VRRa_m5(ovl), - VRRa_rxb(ovl)); goto ok; - case 0xe700000000f0ULL: s390_format_VRR_VVVM(s390_irgen_VAVGL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000f1ULL: s390_format_VRR_VVVM(s390_irgen_VACC, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000f2ULL: s390_format_VRR_VVVM(s390_irgen_VAVG, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000f3ULL: s390_format_VRR_VVVM(s390_irgen_VA, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000f5ULL: s390_format_VRR_VVVM(s390_irgen_VSCBI, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000f7ULL: s390_format_VRR_VVVM(s390_irgen_VS, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000f8ULL: s390_format_VRR_VVVMM(s390_irgen_VCEQ, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe700000000f9ULL: s390_format_VRR_VVVMM(s390_irgen_VCHL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe700000000fbULL: s390_format_VRR_VVVMM(s390_irgen_VCH, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_m5(ovl), VRR_rxb(ovl) - ); goto ok; - case 0xe700000000fcULL: s390_format_VRR_VVVM(s390_irgen_VMNL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000fdULL: s390_format_VRR_VVVM(s390_irgen_VMXL, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000feULL: s390_format_VRR_VVVM(s390_irgen_VMN, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; - case 0xe700000000ffULL: s390_format_VRR_VVVM(s390_irgen_VMX, VRR_v1(ovl), - VRR_v2(ovl), VRR_v3(ovl), - VRR_m4(ovl), VRR_rxb(ovl)); goto ok; + case 0xe700000000b4ULL: s390_format_VRR_VVVM(s390_irgen_VGFM, ovl); + goto ok; + case 0xe700000000b8ULL: s390_format_VRRd_VVVVMM(s390_irgen_VMSL, ovl); + goto ok; + case 0xe700000000b9ULL: s390_format_VRRd_VVVVM(s390_irgen_VACCC, ovl); + goto ok; + case 0xe700000000bbULL: s390_format_VRRd_VVVVM(s390_irgen_VAC, ovl); + goto ok; + case 0xe700000000bcULL: s390_format_VRRd_VVVVM(s390_irgen_VGFMA, ovl); + goto ok; + case 0xe700000000bdULL: s390_format_VRRd_VVVVM(s390_irgen_VSBCBI, ovl); + goto ok; + case 0xe700000000bfULL: s390_format_VRRd_VVVVM(s390_irgen_VSBI, ovl); + goto ok; + case 0xe700000000c0ULL: s390_format_VRRa_VVMMM(s390_irgen_VCLGD, ovl); + goto ok; + case 0xe700000000c1ULL: s390_format_VRRa_VVMMM(s390_irgen_VCDLG, ovl); + goto ok; + case 0xe700000000c2ULL: s390_format_VRRa_VVMMM(s390_irgen_VCGD, ovl); + goto ok; + case 0xe700000000c3ULL: s390_format_VRRa_VVMMM(s390_irgen_VCDG, ovl); + goto ok; + case 0xe700000000c4ULL: s390_format_VRRa_VVMM(s390_irgen_VFLL, ovl); + goto ok; + case 0xe700000000c5ULL: s390_format_VRRa_VVMMM(s390_irgen_VFLR, ovl); + goto ok; + case 0xe700000000c7ULL: s390_format_VRRa_VVMMM(s390_irgen_VFI, ovl); + goto ok; + case 0xe700000000caULL: s390_format_VRRa_VVMM(s390_irgen_WFK, ovl); + goto ok; + case 0xe700000000cbULL: s390_format_VRRa_VVMM(s390_irgen_WFC, ovl); + goto ok; + case 0xe700000000ccULL: s390_format_VRRa_VVMMM(s390_irgen_VFPSO, ovl); + goto ok; + case 0xe700000000ceULL: s390_format_VRRa_VVMM(s390_irgen_VFSQ, ovl); + goto ok; + case 0xe700000000d4ULL: s390_format_VRR_VVM(s390_irgen_VUPLL, ovl); + goto ok; + case 0xe700000000d5ULL: s390_format_VRR_VVM(s390_irgen_VUPLH, ovl); + goto ok; + case 0xe700000000d6ULL: s390_format_VRR_VVM(s390_irgen_VUPL, ovl); + goto ok; + case 0xe700000000d7ULL: s390_format_VRR_VVM(s390_irgen_VUPH, ovl); + goto ok; + case 0xe700000000d8ULL: s390_format_VRR_VV(s390_irgen_VTM, ovl); + goto ok; + case 0xe700000000d9ULL: s390_format_VRR_VVM(s390_irgen_VECL, ovl); + goto ok; + case 0xe700000000dbULL: s390_format_VRR_VVM(s390_irgen_VEC, ovl); + goto ok; + case 0xe700000000deULL: s390_format_VRR_VVM(s390_irgen_VLC, ovl); + goto ok; + case 0xe700000000dfULL: s390_format_VRR_VVM(s390_irgen_VLP, ovl); + goto ok; + case 0xe700000000e2ULL: s390_format_VRRa_VVVMM(s390_irgen_VFS, ovl); + goto ok; + case 0xe700000000e3ULL: s390_format_VRRa_VVVMM(s390_irgen_VFA, ovl); + goto ok; + case 0xe700000000e5ULL: s390_format_VRRa_VVVMM(s390_irgen_VFD, ovl); + goto ok; + case 0xe700000000e7ULL: s390_format_VRRa_VVVMM(s390_irgen_VFM, ovl); + goto ok; + case 0xe700000000e8ULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCE, ovl); + goto ok; + case 0xe700000000eaULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCHE, ovl); + goto ok; + case 0xe700000000ebULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCH, ovl); + goto ok; + case 0xe700000000eeULL: s390_format_VRRa_VVVMMM(s390_irgen_VFMIN, ovl); + goto ok; + case 0xe700000000efULL: s390_format_VRRa_VVVMMM(s390_irgen_VFMAX, ovl); + goto ok; + case 0xe700000000f0ULL: s390_format_VRR_VVVM(s390_irgen_VAVGL, ovl); + goto ok; + case 0xe700000000f1ULL: s390_format_VRR_VVVM(s390_irgen_VACC, ovl); + goto ok; + case 0xe700000000f2ULL: s390_format_VRR_VVVM(s390_irgen_VAVG, ovl); + goto ok; + case 0xe700000000f3ULL: s390_format_VRR_VVVM(s390_irgen_VA, ovl); + goto ok; + case 0xe700000000f5ULL: s390_format_VRR_VVVM(s390_irgen_VSCBI, ovl); + goto ok; + case 0xe700000000f7ULL: s390_format_VRR_VVVM(s390_irgen_VS, ovl); + goto ok; + case 0xe700000000f8ULL: s390_format_VRR_VVVMM(s390_irgen_VCEQ, ovl); + goto ok; + case 0xe700000000f9ULL: s390_format_VRR_VVVMM(s390_irgen_VCHL, ovl); + goto ok; + case 0xe700000000fbULL: s390_format_VRR_VVVMM(s390_irgen_VCH, ovl); + goto ok; + case 0xe700000000fcULL: s390_format_VRR_VVVM(s390_irgen_VMNL, ovl); + goto ok; + case 0xe700000000fdULL: s390_format_VRR_VVVM(s390_irgen_VMXL, ovl); + goto ok; + case 0xe700000000feULL: s390_format_VRR_VVVM(s390_irgen_VMN, ovl); + goto ok; + case 0xe700000000ffULL: s390_format_VRR_VVVM(s390_irgen_VMX, ovl); + goto ok; case 0xeb0000000004ULL: s390_format_RSY(s390_irgen_LMG, ovl); goto ok; case 0xeb000000000aULL: s390_format_RSY(s390_irgen_SRAG, ovl); From 4bd3e1c2d981721e13f198d1e622e51e42e9b398 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Fri, 13 Feb 2026 17:12:00 +0100 Subject: [PATCH 320/502] s390x: Rename s390_format_VRR*() functions After having renamed most of the s390_format_*() functions to match the names in the z/Architecture Principles of Operation, the last remaining format functions yet to be renamed are the ones dealing with variants of the VRR format. Rename the functions accordingly: current new sample insn ------------ ----- ----------- VRR_VV VRRa0 vlr VRR_VVM VRRa1 vclz VRRa_VVMM VRRa2 vfsq VRRa_VVMMM VRRa vcdg VRR_VVVMM VRRb vceq VRR_VVV VRRc0 vn VRR_VVVM VRRc1 va VRRa_VVVMM VRRc2 vfa VRRa_VVVMMM VRRc vfmin VRRd_VVVVM VRRd1 vac VRRd_VVVVMM VRRd vmsl VRR_VVVV VRRe0 vperm VRRe_VVVVMM VRRe vfma VRR_VRR VRRf vlvgp Note that none of these directly cover the VISTR instruction. But that can be treated as the VRRa format, where m4 is left unused. So do that and remove s390_VRR_VVMM(), which previously existed just for this purpose. Also, adjust the names of the VRR*() macros to match the format names. Drop VRRa_v*() and VRRd_v*() and use VRR_v*() instead, since the vector fields' positions don't depend on the VRR format variant. --- VEX/priv/guest_s390_toIR.c | 354 +++++++++++++++++-------------------- 1 file changed, 164 insertions(+), 190 deletions(-) diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index c66c31336..6964627e1 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -188,21 +188,15 @@ typedef enum { #define VRR_r2(insn) (((insn) >> 48) & 0xf) #define VRR_r3(insn) (((insn) >> 44) & 0xf) #define VRR_v3(insn) (((insn) >> 44) & 0xf) -#define VRR_m5(insn) (((insn) >> 36) & 0xf) -#define VRR_m4(insn) (((insn) >> 28) & 0xf) #define VRR_v4(insn) (((insn) >> 28) & 0xf) -#define VRRa_v1(insn) (((insn) >> 52) & 0xf) -#define VRRa_v2(insn) (((insn) >> 48) & 0xf) -#define VRRa_v3(insn) (((insn) >> 44) & 0xf) #define VRRa_m5(insn) (((insn) >> 36) & 0xf) #define VRRa_m4(insn) (((insn) >> 32) & 0xf) #define VRRa_m3(insn) (((insn) >> 28) & 0xf) -#define VRRd_v1(insn) (((insn) >> 52) & 0xf) -#define VRRd_v2(insn) (((insn) >> 48) & 0xf) -#define VRRd_v3(insn) (((insn) >> 44) & 0xf) +#define VRRc_m6(insn) (((insn) >> 36) & 0xf) +#define VRRc_m5(insn) (((insn) >> 32) & 0xf) +#define VRRc_m4(insn) (((insn) >> 28) & 0xf) #define VRRd_m5(insn) (((insn) >> 40) & 0xf) #define VRRd_m6(insn) (((insn) >> 36) & 0xf) -#define VRRd_v4(insn) (((insn) >> 28) & 0xf) #define VRIa_v1(insn) (((insn) >> 52) & 0xf) #define VRIa_v3(insn) (((insn) >> 48) & 0xf) #define VRIa_i2(insn) (((insn) >> 32) & 0xffff) @@ -2952,7 +2946,7 @@ s390_format_VRX(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), ULong ovl) static void -s390_format_VRR_VV(void (*irgen)(UChar v1, UChar v2), ULong ovl) +s390_format_VRRa0(void (*irgen)(UChar v1, UChar v2), ULong ovl) { UChar v1 = VRR_v1(ovl); UChar v2 = VRR_v2(ovl); @@ -2970,7 +2964,7 @@ s390_format_VRR_VV(void (*irgen)(UChar v1, UChar v2), ULong ovl) static void -s390_format_VRR_VVV(void (*irgen)(UChar v1, UChar v2, UChar v3), ULong ovl) +s390_format_VRRc0(void (*irgen)(UChar v1, UChar v2, UChar v3), ULong ovl) { UChar v1 = VRR_v1(ovl); UChar v2 = VRR_v2(ovl); @@ -2989,13 +2983,13 @@ s390_format_VRR_VVV(void (*irgen)(UChar v1, UChar v2, UChar v3), ULong ovl) } static void -s390_format_VRR_VVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4), - ULong ovl) +s390_format_VRRc1(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4), + ULong ovl) { UChar v1 = VRR_v1(ovl); UChar v2 = VRR_v2(ovl); UChar v3 = VRR_v3(ovl); - UChar m4 = VRR_m4(ovl); + UChar m4 = VRRc_m4(ovl); UChar rxb = V_rxb(ovl); if (! s390_host_has_vx) { @@ -3010,14 +3004,14 @@ s390_format_VRR_VVVM(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4), } static void -s390_format_VRR_VVVMM( +s390_format_VRRb( void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5), ULong ovl) { UChar v1 = VRR_v1(ovl); UChar v2 = VRR_v2(ovl); UChar v3 = VRR_v3(ovl); - UChar m4 = VRR_m4(ovl); - UChar m5 = VRR_m5(ovl); + UChar m4 = (ovl >> 28) & 0xf; + UChar m5 = (ovl >> 36) & 0xf; UChar rxb = V_rxb(ovl); if (! s390_host_has_vx) { @@ -3032,8 +3026,8 @@ s390_format_VRR_VVVMM( } static void -s390_format_VRR_VVVV(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4), - ULong ovl) +s390_format_VRRe0(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4), + ULong ovl) { UChar v1 = VRR_v1(ovl); UChar v2 = VRR_v2(ovl); @@ -3054,7 +3048,7 @@ s390_format_VRR_VVVV(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4), } static void -s390_format_VRR_VRR(void (*irgen)(UChar v1, UChar r2, UChar r3), ULong ovl) +s390_format_VRRf(void (*irgen)(UChar v1, UChar r2, UChar r3), ULong ovl) { UChar v1 = VRR_v1(ovl); UChar r2 = VRR_r2(ovl); @@ -3072,10 +3066,10 @@ s390_format_VRR_VRR(void (*irgen)(UChar v1, UChar r2, UChar r3), ULong ovl) static void -s390_format_VRR_VVM(void (*irgen)(UChar v1, UChar v2, UChar m3), ULong ovl) +s390_format_VRRa1(void (*irgen)(UChar v1, UChar v2, UChar m3), ULong ovl) { - UChar v1 = VRRa_v1(ovl); - UChar v2 = VRRa_v2(ovl); + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); UChar m3 = VRRa_m3(ovl); UChar rxb = V_rxb(ovl); @@ -3344,14 +3338,14 @@ s390_format_VRV(void (*irgen)(UChar v1, IRTemp op2addr, UChar m3), ULong ovl, } static void -s390_format_VRRd_VVVVMM( +s390_format_VRRd( void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6), ULong ovl) { - UChar v1 = VRRd_v1(ovl); - UChar v2 = VRRd_v2(ovl); - UChar v3 = VRRd_v3(ovl); - UChar v4 = VRRd_v4(ovl); + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar v4 = VRR_v4(ovl); UChar m5 = VRRd_m5(ovl); UChar m6 = VRRd_m6(ovl); UChar rxb = V_rxb(ovl); @@ -3369,7 +3363,7 @@ s390_format_VRRd_VVVVMM( } static void -s390_format_VRRe_VVVVMM( +s390_format_VRRe( void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5, UChar m6), ULong ovl) { @@ -3393,27 +3387,6 @@ s390_format_VRRe_VVVVMM( irgen(v1, v2, v3, v4, m5, m6); } - -static void -s390_format_VRR_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m5), - ULong ovl) -{ - UChar v1 = VRR_v1(ovl); - UChar v2 = VRR_v2(ovl); - UChar m3 = VRR_m4(ovl); - UChar m5 = VRR_m5(ovl); - UChar rxb = V_rxb(ovl); - - if (! s390_host_has_vx) { - emulation_failure(EmFail_S390X_vx); - return; - } - - v1 = s390_vr_getVRindex(v1, 1, rxb); - v2 = s390_vr_getVRindex(v2, 2, rxb); - irgen(v1, v2, m3, m5); -} - static void s390_format_VRIdm( void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4, UChar m5), ULong ovl) @@ -3458,13 +3431,13 @@ s390_format_VRId(void (*irgen)(UChar v1, UChar v2, UChar v3, UChar i4), } static void -s390_format_VRRd_VVVVM( +s390_format_VRRd1( void (*irgen)(UChar v1, UChar v2, UChar v3, UChar v4, UChar m5), ULong ovl) { - UChar v1 = VRRd_v1(ovl); - UChar v2 = VRRd_v2(ovl); - UChar v3 = VRRd_v3(ovl); - UChar v4 = VRRd_v4(ovl); + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar v4 = VRR_v4(ovl); UChar m5 = VRRd_m5(ovl); UChar rxb = V_rxb(ovl); @@ -3481,11 +3454,11 @@ s390_format_VRRd_VVVVM( } static void -s390_format_VRRa_VVMMM( +s390_format_VRRa( void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m4, UChar m5), ULong ovl) { - UChar v1 = VRRa_v1(ovl); - UChar v2 = VRRa_v2(ovl); + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); UChar m3 = VRRa_m3(ovl); UChar m4 = VRRa_m4(ovl); UChar m5 = VRRa_m5(ovl); @@ -3502,14 +3475,14 @@ s390_format_VRRa_VVMMM( } static void -s390_format_VRRa_VVVMM( +s390_format_VRRc2( void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5), ULong ovl) { - UChar v1 = VRRa_v1(ovl); - UChar v2 = VRRa_v2(ovl); - UChar v3 = VRRa_v3(ovl); - UChar m4 = VRRa_m3(ovl); - UChar m5 = VRRa_m4(ovl); + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar m4 = VRRc_m4(ovl); + UChar m5 = VRRc_m5(ovl); UChar rxb = V_rxb(ovl); if (!s390_host_has_vx) { @@ -3524,11 +3497,11 @@ s390_format_VRRa_VVVMM( } static void -s390_format_VRRa_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m4), +s390_format_VRRa2(void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m4), ULong ovl) { - UChar v1 = VRRa_v1(ovl); - UChar v2 = VRRa_v2(ovl); + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); UChar m3 = VRRa_m3(ovl); UChar m4 = VRRa_m4(ovl); UChar rxb = V_rxb(ovl); @@ -3544,16 +3517,16 @@ s390_format_VRRa_VVMM(void (*irgen)(UChar v1, UChar v2, UChar m3, UChar m4), } static void -s390_format_VRRa_VVVMMM( +s390_format_VRRc( void (*irgen)(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5, UChar m6), ULong ovl) { - UChar v1 = VRRa_v1(ovl); - UChar v2 = VRRa_v2(ovl); - UChar v3 = VRRa_v3(ovl); - UChar m4 = VRRa_m3(ovl); - UChar m5 = VRRa_m4(ovl); - UChar m6 = VRRa_m5(ovl); + UChar v1 = VRR_v1(ovl); + UChar v2 = VRR_v2(ovl); + UChar v3 = VRR_v3(ovl); + UChar m4 = VRRc_m4(ovl); + UChar m5 = VRRc_m5(ovl); + UChar m6 = VRRc_m6(ovl); UChar rxb = V_rxb(ovl); if (!s390_host_has_vx) { @@ -15260,7 +15233,8 @@ s390_irgen_VFENE(UChar v1, UChar v2, UChar v3, UChar m4, UChar m5) } static void -s390_irgen_VISTR(UChar v1, UChar v2, UChar m3, UChar m5) +s390_irgen_VISTR( + UChar v1, UChar v2, UChar m3, UChar m4 __attribute__((unused)), UChar m5) { s390_insn_assert(m3 < 3 && m5 == (m5 & 1)); @@ -19167,13 +19141,13 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe60000000051ULL: /* VCLZDP */ goto unimplemented; case 0xe60000000052ULL: /* VCVBG */ goto unimplemented; case 0xe60000000054ULL: /* VUPKZH */ goto unimplemented; - case 0xe60000000055ULL: s390_format_VRRa_VVMM(s390_irgen_VCNF, ovl); + case 0xe60000000055ULL: s390_format_VRRa2(s390_irgen_VCNF, ovl); goto ok; - case 0xe60000000056ULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNH, ovl); + case 0xe60000000056ULL: s390_format_VRRa2(s390_irgen_VCLFNH, ovl); goto ok; - case 0xe6000000005dULL: s390_format_VRRa_VVMM(s390_irgen_VCFN, ovl); + case 0xe6000000005dULL: s390_format_VRRa2(s390_irgen_VCFN, ovl); goto ok; - case 0xe6000000005eULL: s390_format_VRRa_VVMM(s390_irgen_VCLFNL, ovl); + case 0xe6000000005eULL: s390_format_VRRa2(s390_irgen_VCLFNL, ovl); goto ok; case 0xe60000000058ULL: /* VCVD */ goto unimplemented; case 0xe60000000059ULL: /* VSRP */ goto unimplemented; @@ -19185,7 +19159,7 @@ s390_decode_6byte_and_irgen(const UChar *bytes) case 0xe60000000071ULL: /* VAP */ goto unimplemented; case 0xe60000000072ULL: /* VSRPR */ goto unimplemented; case 0xe60000000073ULL: /* VSP */ goto unimplemented; - case 0xe60000000075ULL: s390_format_VRRa_VVVMM(s390_irgen_VCRNF, ovl); + case 0xe60000000075ULL: s390_format_VRRc2(s390_irgen_VCRNF, ovl); goto ok; case 0xe60000000077ULL: /* VCP */ goto unimplemented; case 0xe60000000078ULL: /* VMP */ goto unimplemented; @@ -19271,82 +19245,82 @@ s390_decode_6byte_and_irgen(const UChar *bytes) goto ok; case 0xe7000000004dULL: s390_format_VRIc(s390_irgen_VREP, ovl); goto ok; - case 0xe70000000050ULL: s390_format_VRR_VVM(s390_irgen_VPOPCT, ovl); + case 0xe70000000050ULL: s390_format_VRRa1(s390_irgen_VPOPCT, ovl); goto ok; - case 0xe70000000052ULL: s390_format_VRR_VVM(s390_irgen_VCTZ, ovl); + case 0xe70000000052ULL: s390_format_VRRa1(s390_irgen_VCTZ, ovl); goto ok; - case 0xe70000000053ULL: s390_format_VRR_VVM(s390_irgen_VCLZ, ovl); + case 0xe70000000053ULL: s390_format_VRRa1(s390_irgen_VCLZ, ovl); goto ok; case 0xe70000000054ULL: /* VGEM */ goto unimplemented; - case 0xe70000000056ULL: s390_format_VRR_VV(s390_irgen_VLR, ovl); + case 0xe70000000056ULL: s390_format_VRRa0(s390_irgen_VLR, ovl); goto ok; - case 0xe7000000005cULL: s390_format_VRR_VVMM(s390_irgen_VISTR, ovl); + case 0xe7000000005cULL: s390_format_VRRa(s390_irgen_VISTR, ovl); goto ok; - case 0xe7000000005fULL: s390_format_VRR_VVM(s390_irgen_VSEG, ovl); + case 0xe7000000005fULL: s390_format_VRRa1(s390_irgen_VSEG, ovl); goto ok; - case 0xe70000000060ULL: s390_format_VRR_VVVM(s390_irgen_VMRL, ovl); + case 0xe70000000060ULL: s390_format_VRRc1(s390_irgen_VMRL, ovl); goto ok; - case 0xe70000000061ULL: s390_format_VRR_VVVM(s390_irgen_VMRH, ovl); + case 0xe70000000061ULL: s390_format_VRRc1(s390_irgen_VMRH, ovl); goto ok; - case 0xe70000000062ULL: s390_format_VRR_VRR(s390_irgen_VLVGP, ovl); + case 0xe70000000062ULL: s390_format_VRRf(s390_irgen_VLVGP, ovl); goto ok; - case 0xe70000000064ULL: s390_format_VRR_VVVM(s390_irgen_VSUM, ovl); + case 0xe70000000064ULL: s390_format_VRRc1(s390_irgen_VSUM, ovl); goto ok; - case 0xe70000000065ULL: s390_format_VRR_VVVM(s390_irgen_VSUMG, ovl); + case 0xe70000000065ULL: s390_format_VRRc1(s390_irgen_VSUMG, ovl); goto ok; - case 0xe70000000066ULL: s390_format_VRR_VVV(s390_irgen_VCKSM, ovl); + case 0xe70000000066ULL: s390_format_VRRc0(s390_irgen_VCKSM, ovl); goto ok; - case 0xe70000000067ULL: s390_format_VRR_VVVM(s390_irgen_VSUMQ, ovl); + case 0xe70000000067ULL: s390_format_VRRc1(s390_irgen_VSUMQ, ovl); goto ok; - case 0xe70000000068ULL: s390_format_VRR_VVV(s390_irgen_VN, ovl); + case 0xe70000000068ULL: s390_format_VRRc0(s390_irgen_VN, ovl); goto ok; - case 0xe70000000069ULL: s390_format_VRR_VVV(s390_irgen_VNC, ovl); + case 0xe70000000069ULL: s390_format_VRRc0(s390_irgen_VNC, ovl); goto ok; - case 0xe7000000006aULL: s390_format_VRR_VVV(s390_irgen_VO, ovl); + case 0xe7000000006aULL: s390_format_VRRc0(s390_irgen_VO, ovl); goto ok; - case 0xe7000000006bULL: s390_format_VRR_VVV(s390_irgen_VNO, ovl); + case 0xe7000000006bULL: s390_format_VRRc0(s390_irgen_VNO, ovl); goto ok; - case 0xe7000000006cULL: s390_format_VRR_VVV(s390_irgen_VNX, ovl); + case 0xe7000000006cULL: s390_format_VRRc0(s390_irgen_VNX, ovl); goto ok; - case 0xe7000000006dULL: s390_format_VRR_VVV(s390_irgen_VX, ovl); + case 0xe7000000006dULL: s390_format_VRRc0(s390_irgen_VX, ovl); goto ok; - case 0xe7000000006eULL: s390_format_VRR_VVV(s390_irgen_VNN, ovl); + case 0xe7000000006eULL: s390_format_VRRc0(s390_irgen_VNN, ovl); goto ok; - case 0xe7000000006fULL: s390_format_VRR_VVV(s390_irgen_VOC, ovl); + case 0xe7000000006fULL: s390_format_VRRc0(s390_irgen_VOC, ovl); goto ok; - case 0xe70000000070ULL: s390_format_VRR_VVVM(s390_irgen_VESLV, ovl); + case 0xe70000000070ULL: s390_format_VRRc1(s390_irgen_VESLV, ovl); goto ok; case 0xe70000000072ULL: s390_format_VRIdm(s390_irgen_VERIM, ovl); goto ok; - case 0xe70000000073ULL: s390_format_VRR_VVVM(s390_irgen_VERLLV, ovl); + case 0xe70000000073ULL: s390_format_VRRc1(s390_irgen_VERLLV, ovl); goto ok; - case 0xe70000000074ULL: s390_format_VRR_VVV(s390_irgen_VSL, ovl); + case 0xe70000000074ULL: s390_format_VRRc0(s390_irgen_VSL, ovl); goto ok; - case 0xe70000000075ULL: s390_format_VRR_VVV(s390_irgen_VSLB, ovl); + case 0xe70000000075ULL: s390_format_VRRc0(s390_irgen_VSLB, ovl); goto ok; case 0xe70000000077ULL: s390_format_VRId(s390_irgen_VSLDB, ovl); goto ok; - case 0xe70000000078ULL: s390_format_VRR_VVVM(s390_irgen_VESRLV, ovl); + case 0xe70000000078ULL: s390_format_VRRc1(s390_irgen_VESRLV, ovl); goto ok; - case 0xe7000000007aULL: s390_format_VRR_VVVM(s390_irgen_VESRAV, ovl); + case 0xe7000000007aULL: s390_format_VRRc1(s390_irgen_VESRAV, ovl); goto ok; - case 0xe7000000007cULL: s390_format_VRR_VVV(s390_irgen_VSRL, ovl); + case 0xe7000000007cULL: s390_format_VRRc0(s390_irgen_VSRL, ovl); goto ok; - case 0xe7000000007dULL: s390_format_VRR_VVV(s390_irgen_VSRLB, ovl); + case 0xe7000000007dULL: s390_format_VRRc0(s390_irgen_VSRLB, ovl); goto ok; - case 0xe7000000007eULL: s390_format_VRR_VVV(s390_irgen_VSRA, ovl); + case 0xe7000000007eULL: s390_format_VRRc0(s390_irgen_VSRA, ovl); goto ok; - case 0xe7000000007fULL: s390_format_VRR_VVV(s390_irgen_VSRAB, ovl); + case 0xe7000000007fULL: s390_format_VRRc0(s390_irgen_VSRAB, ovl); goto ok; - case 0xe70000000080ULL: s390_format_VRR_VVVMM(s390_irgen_VFEE, ovl); + case 0xe70000000080ULL: s390_format_VRRb(s390_irgen_VFEE, ovl); goto ok; - case 0xe70000000081ULL: s390_format_VRR_VVVMM(s390_irgen_VFENE, ovl); + case 0xe70000000081ULL: s390_format_VRRb(s390_irgen_VFENE, ovl); goto ok; - case 0xe70000000082ULL: s390_format_VRR_VVVMM(s390_irgen_VFAE, ovl); + case 0xe70000000082ULL: s390_format_VRRb(s390_irgen_VFAE, ovl); goto ok; - case 0xe70000000084ULL: s390_format_VRR_VVVM(s390_irgen_VPDI, ovl); + case 0xe70000000084ULL: s390_format_VRRc1(s390_irgen_VPDI, ovl); goto ok; - case 0xe70000000085ULL: s390_format_VRR_VVV(s390_irgen_VBPERM, ovl); + case 0xe70000000085ULL: s390_format_VRRc0(s390_irgen_VBPERM, ovl); goto ok; case 0xe70000000086ULL: s390_format_VRId(s390_irgen_VSLD, ovl); goto ok; @@ -19354,157 +19328,157 @@ s390_decode_6byte_and_irgen(const UChar *bytes) goto ok; case 0xe70000000088ULL: /* VEVAL */ goto unimplemented; case 0xe70000000089ULL: /* VBLEND */ goto unimplemented; - case 0xe7000000008aULL: s390_format_VRRd_VVVVMM(s390_irgen_VSTRC, ovl); + case 0xe7000000008aULL: s390_format_VRRd(s390_irgen_VSTRC, ovl); goto ok; - case 0xe7000000008bULL: s390_format_VRRd_VVVVMM(s390_irgen_VSTRS, ovl); + case 0xe7000000008bULL: s390_format_VRRd(s390_irgen_VSTRS, ovl); goto ok; - case 0xe7000000008cULL: s390_format_VRR_VVVV(s390_irgen_VPERM, ovl); + case 0xe7000000008cULL: s390_format_VRRe0(s390_irgen_VPERM, ovl); goto ok; - case 0xe7000000008dULL: s390_format_VRR_VVVV(s390_irgen_VSEL, ovl); + case 0xe7000000008dULL: s390_format_VRRe0(s390_irgen_VSEL, ovl); goto ok; - case 0xe7000000008eULL: s390_format_VRRe_VVVVMM(s390_irgen_VFMS, ovl); + case 0xe7000000008eULL: s390_format_VRRe(s390_irgen_VFMS, ovl); goto ok; - case 0xe7000000008fULL: s390_format_VRRe_VVVVMM(s390_irgen_VFMA, ovl); + case 0xe7000000008fULL: s390_format_VRRe(s390_irgen_VFMA, ovl); goto ok; - case 0xe70000000094ULL: s390_format_VRR_VVVM(s390_irgen_VPK, ovl); + case 0xe70000000094ULL: s390_format_VRRc1(s390_irgen_VPK, ovl); goto ok; - case 0xe70000000095ULL: s390_format_VRR_VVVMM(s390_irgen_VPKLS, ovl); + case 0xe70000000095ULL: s390_format_VRRb(s390_irgen_VPKLS, ovl); goto ok; - case 0xe70000000097ULL: s390_format_VRR_VVVMM(s390_irgen_VPKS, ovl); + case 0xe70000000097ULL: s390_format_VRRb(s390_irgen_VPKS, ovl); goto ok; - case 0xe7000000009eULL: s390_format_VRRe_VVVVMM(s390_irgen_VFNMS, ovl); + case 0xe7000000009eULL: s390_format_VRRe(s390_irgen_VFNMS, ovl); goto ok; - case 0xe7000000009fULL: s390_format_VRRe_VVVVMM(s390_irgen_VFNMA, ovl); + case 0xe7000000009fULL: s390_format_VRRe(s390_irgen_VFNMA, ovl); goto ok; - case 0xe700000000a1ULL: s390_format_VRR_VVVM(s390_irgen_VMLH, ovl); + case 0xe700000000a1ULL: s390_format_VRRc1(s390_irgen_VMLH, ovl); goto ok; - case 0xe700000000a2ULL: s390_format_VRR_VVVM(s390_irgen_VML, ovl); + case 0xe700000000a2ULL: s390_format_VRRc1(s390_irgen_VML, ovl); goto ok; - case 0xe700000000a3ULL: s390_format_VRR_VVVM(s390_irgen_VMH, ovl); + case 0xe700000000a3ULL: s390_format_VRRc1(s390_irgen_VMH, ovl); goto ok; - case 0xe700000000a4ULL: s390_format_VRR_VVVM(s390_irgen_VMLE, ovl); + case 0xe700000000a4ULL: s390_format_VRRc1(s390_irgen_VMLE, ovl); goto ok; - case 0xe700000000a5ULL: s390_format_VRR_VVVM(s390_irgen_VMLO, ovl); + case 0xe700000000a5ULL: s390_format_VRRc1(s390_irgen_VMLO, ovl); goto ok; - case 0xe700000000a6ULL: s390_format_VRR_VVVM(s390_irgen_VME, ovl); + case 0xe700000000a6ULL: s390_format_VRRc1(s390_irgen_VME, ovl); goto ok; - case 0xe700000000a7ULL: s390_format_VRR_VVVM(s390_irgen_VMO, ovl); + case 0xe700000000a7ULL: s390_format_VRRc1(s390_irgen_VMO, ovl); goto ok; - case 0xe700000000a9ULL: s390_format_VRRd_VVVVM(s390_irgen_VMALH, ovl); + case 0xe700000000a9ULL: s390_format_VRRd1(s390_irgen_VMALH, ovl); goto ok; - case 0xe700000000aaULL: s390_format_VRRd_VVVVM(s390_irgen_VMAL, ovl); + case 0xe700000000aaULL: s390_format_VRRd1(s390_irgen_VMAL, ovl); goto ok; - case 0xe700000000abULL: s390_format_VRRd_VVVVM(s390_irgen_VMAH, ovl); + case 0xe700000000abULL: s390_format_VRRd1(s390_irgen_VMAH, ovl); goto ok; - case 0xe700000000acULL: s390_format_VRRd_VVVVM(s390_irgen_VMALE, ovl); + case 0xe700000000acULL: s390_format_VRRd1(s390_irgen_VMALE, ovl); goto ok; - case 0xe700000000adULL: s390_format_VRRd_VVVVM(s390_irgen_VMALO, ovl); + case 0xe700000000adULL: s390_format_VRRd1(s390_irgen_VMALO, ovl); goto ok; - case 0xe700000000aeULL: s390_format_VRRd_VVVVM(s390_irgen_VMAE, ovl); + case 0xe700000000aeULL: s390_format_VRRd1(s390_irgen_VMAE, ovl); goto ok; - case 0xe700000000afULL: s390_format_VRRd_VVVVM(s390_irgen_VMAO, ovl); + case 0xe700000000afULL: s390_format_VRRd1(s390_irgen_VMAO, ovl); goto ok; case 0xe700000000b0ULL: /* VDL */ goto unimplemented; case 0xe700000000b1ULL: /* VRL */ goto unimplemented; case 0xe700000000b2ULL: /* VD */ goto unimplemented; case 0xe700000000b3ULL: /* VR */ goto unimplemented; - case 0xe700000000b4ULL: s390_format_VRR_VVVM(s390_irgen_VGFM, ovl); + case 0xe700000000b4ULL: s390_format_VRRc1(s390_irgen_VGFM, ovl); goto ok; - case 0xe700000000b8ULL: s390_format_VRRd_VVVVMM(s390_irgen_VMSL, ovl); + case 0xe700000000b8ULL: s390_format_VRRd(s390_irgen_VMSL, ovl); goto ok; - case 0xe700000000b9ULL: s390_format_VRRd_VVVVM(s390_irgen_VACCC, ovl); + case 0xe700000000b9ULL: s390_format_VRRd1(s390_irgen_VACCC, ovl); goto ok; - case 0xe700000000bbULL: s390_format_VRRd_VVVVM(s390_irgen_VAC, ovl); + case 0xe700000000bbULL: s390_format_VRRd1(s390_irgen_VAC, ovl); goto ok; - case 0xe700000000bcULL: s390_format_VRRd_VVVVM(s390_irgen_VGFMA, ovl); + case 0xe700000000bcULL: s390_format_VRRd1(s390_irgen_VGFMA, ovl); goto ok; - case 0xe700000000bdULL: s390_format_VRRd_VVVVM(s390_irgen_VSBCBI, ovl); + case 0xe700000000bdULL: s390_format_VRRd1(s390_irgen_VSBCBI, ovl); goto ok; - case 0xe700000000bfULL: s390_format_VRRd_VVVVM(s390_irgen_VSBI, ovl); + case 0xe700000000bfULL: s390_format_VRRd1(s390_irgen_VSBI, ovl); goto ok; - case 0xe700000000c0ULL: s390_format_VRRa_VVMMM(s390_irgen_VCLGD, ovl); + case 0xe700000000c0ULL: s390_format_VRRa(s390_irgen_VCLGD, ovl); goto ok; - case 0xe700000000c1ULL: s390_format_VRRa_VVMMM(s390_irgen_VCDLG, ovl); + case 0xe700000000c1ULL: s390_format_VRRa(s390_irgen_VCDLG, ovl); goto ok; - case 0xe700000000c2ULL: s390_format_VRRa_VVMMM(s390_irgen_VCGD, ovl); + case 0xe700000000c2ULL: s390_format_VRRa(s390_irgen_VCGD, ovl); goto ok; - case 0xe700000000c3ULL: s390_format_VRRa_VVMMM(s390_irgen_VCDG, ovl); + case 0xe700000000c3ULL: s390_format_VRRa(s390_irgen_VCDG, ovl); goto ok; - case 0xe700000000c4ULL: s390_format_VRRa_VVMM(s390_irgen_VFLL, ovl); + case 0xe700000000c4ULL: s390_format_VRRa2(s390_irgen_VFLL, ovl); goto ok; - case 0xe700000000c5ULL: s390_format_VRRa_VVMMM(s390_irgen_VFLR, ovl); + case 0xe700000000c5ULL: s390_format_VRRa(s390_irgen_VFLR, ovl); goto ok; - case 0xe700000000c7ULL: s390_format_VRRa_VVMMM(s390_irgen_VFI, ovl); + case 0xe700000000c7ULL: s390_format_VRRa(s390_irgen_VFI, ovl); goto ok; - case 0xe700000000caULL: s390_format_VRRa_VVMM(s390_irgen_WFK, ovl); + case 0xe700000000caULL: s390_format_VRRa2(s390_irgen_WFK, ovl); goto ok; - case 0xe700000000cbULL: s390_format_VRRa_VVMM(s390_irgen_WFC, ovl); + case 0xe700000000cbULL: s390_format_VRRa2(s390_irgen_WFC, ovl); goto ok; - case 0xe700000000ccULL: s390_format_VRRa_VVMMM(s390_irgen_VFPSO, ovl); + case 0xe700000000ccULL: s390_format_VRRa(s390_irgen_VFPSO, ovl); goto ok; - case 0xe700000000ceULL: s390_format_VRRa_VVMM(s390_irgen_VFSQ, ovl); + case 0xe700000000ceULL: s390_format_VRRa2(s390_irgen_VFSQ, ovl); goto ok; - case 0xe700000000d4ULL: s390_format_VRR_VVM(s390_irgen_VUPLL, ovl); + case 0xe700000000d4ULL: s390_format_VRRa1(s390_irgen_VUPLL, ovl); goto ok; - case 0xe700000000d5ULL: s390_format_VRR_VVM(s390_irgen_VUPLH, ovl); + case 0xe700000000d5ULL: s390_format_VRRa1(s390_irgen_VUPLH, ovl); goto ok; - case 0xe700000000d6ULL: s390_format_VRR_VVM(s390_irgen_VUPL, ovl); + case 0xe700000000d6ULL: s390_format_VRRa1(s390_irgen_VUPL, ovl); goto ok; - case 0xe700000000d7ULL: s390_format_VRR_VVM(s390_irgen_VUPH, ovl); + case 0xe700000000d7ULL: s390_format_VRRa1(s390_irgen_VUPH, ovl); goto ok; - case 0xe700000000d8ULL: s390_format_VRR_VV(s390_irgen_VTM, ovl); + case 0xe700000000d8ULL: s390_format_VRRa0(s390_irgen_VTM, ovl); goto ok; - case 0xe700000000d9ULL: s390_format_VRR_VVM(s390_irgen_VECL, ovl); + case 0xe700000000d9ULL: s390_format_VRRa1(s390_irgen_VECL, ovl); goto ok; - case 0xe700000000dbULL: s390_format_VRR_VVM(s390_irgen_VEC, ovl); + case 0xe700000000dbULL: s390_format_VRRa1(s390_irgen_VEC, ovl); goto ok; - case 0xe700000000deULL: s390_format_VRR_VVM(s390_irgen_VLC, ovl); + case 0xe700000000deULL: s390_format_VRRa1(s390_irgen_VLC, ovl); goto ok; - case 0xe700000000dfULL: s390_format_VRR_VVM(s390_irgen_VLP, ovl); + case 0xe700000000dfULL: s390_format_VRRa1(s390_irgen_VLP, ovl); goto ok; - case 0xe700000000e2ULL: s390_format_VRRa_VVVMM(s390_irgen_VFS, ovl); + case 0xe700000000e2ULL: s390_format_VRRc2(s390_irgen_VFS, ovl); goto ok; - case 0xe700000000e3ULL: s390_format_VRRa_VVVMM(s390_irgen_VFA, ovl); + case 0xe700000000e3ULL: s390_format_VRRc2(s390_irgen_VFA, ovl); goto ok; - case 0xe700000000e5ULL: s390_format_VRRa_VVVMM(s390_irgen_VFD, ovl); + case 0xe700000000e5ULL: s390_format_VRRc2(s390_irgen_VFD, ovl); goto ok; - case 0xe700000000e7ULL: s390_format_VRRa_VVVMM(s390_irgen_VFM, ovl); + case 0xe700000000e7ULL: s390_format_VRRc2(s390_irgen_VFM, ovl); goto ok; - case 0xe700000000e8ULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCE, ovl); + case 0xe700000000e8ULL: s390_format_VRRc(s390_irgen_VFCE, ovl); goto ok; - case 0xe700000000eaULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCHE, ovl); + case 0xe700000000eaULL: s390_format_VRRc(s390_irgen_VFCHE, ovl); goto ok; - case 0xe700000000ebULL: s390_format_VRRa_VVVMMM(s390_irgen_VFCH, ovl); + case 0xe700000000ebULL: s390_format_VRRc(s390_irgen_VFCH, ovl); goto ok; - case 0xe700000000eeULL: s390_format_VRRa_VVVMMM(s390_irgen_VFMIN, ovl); + case 0xe700000000eeULL: s390_format_VRRc(s390_irgen_VFMIN, ovl); goto ok; - case 0xe700000000efULL: s390_format_VRRa_VVVMMM(s390_irgen_VFMAX, ovl); + case 0xe700000000efULL: s390_format_VRRc(s390_irgen_VFMAX, ovl); goto ok; - case 0xe700000000f0ULL: s390_format_VRR_VVVM(s390_irgen_VAVGL, ovl); + case 0xe700000000f0ULL: s390_format_VRRc1(s390_irgen_VAVGL, ovl); goto ok; - case 0xe700000000f1ULL: s390_format_VRR_VVVM(s390_irgen_VACC, ovl); + case 0xe700000000f1ULL: s390_format_VRRc1(s390_irgen_VACC, ovl); goto ok; - case 0xe700000000f2ULL: s390_format_VRR_VVVM(s390_irgen_VAVG, ovl); + case 0xe700000000f2ULL: s390_format_VRRc1(s390_irgen_VAVG, ovl); goto ok; - case 0xe700000000f3ULL: s390_format_VRR_VVVM(s390_irgen_VA, ovl); + case 0xe700000000f3ULL: s390_format_VRRc1(s390_irgen_VA, ovl); goto ok; - case 0xe700000000f5ULL: s390_format_VRR_VVVM(s390_irgen_VSCBI, ovl); + case 0xe700000000f5ULL: s390_format_VRRc1(s390_irgen_VSCBI, ovl); goto ok; - case 0xe700000000f7ULL: s390_format_VRR_VVVM(s390_irgen_VS, ovl); + case 0xe700000000f7ULL: s390_format_VRRc1(s390_irgen_VS, ovl); goto ok; - case 0xe700000000f8ULL: s390_format_VRR_VVVMM(s390_irgen_VCEQ, ovl); + case 0xe700000000f8ULL: s390_format_VRRb(s390_irgen_VCEQ, ovl); goto ok; - case 0xe700000000f9ULL: s390_format_VRR_VVVMM(s390_irgen_VCHL, ovl); + case 0xe700000000f9ULL: s390_format_VRRb(s390_irgen_VCHL, ovl); goto ok; - case 0xe700000000fbULL: s390_format_VRR_VVVMM(s390_irgen_VCH, ovl); + case 0xe700000000fbULL: s390_format_VRRb(s390_irgen_VCH, ovl); goto ok; - case 0xe700000000fcULL: s390_format_VRR_VVVM(s390_irgen_VMNL, ovl); + case 0xe700000000fcULL: s390_format_VRRc1(s390_irgen_VMNL, ovl); goto ok; - case 0xe700000000fdULL: s390_format_VRR_VVVM(s390_irgen_VMXL, ovl); + case 0xe700000000fdULL: s390_format_VRRc1(s390_irgen_VMXL, ovl); goto ok; - case 0xe700000000feULL: s390_format_VRR_VVVM(s390_irgen_VMN, ovl); + case 0xe700000000feULL: s390_format_VRRc1(s390_irgen_VMN, ovl); goto ok; - case 0xe700000000ffULL: s390_format_VRR_VVVM(s390_irgen_VMX, ovl); + case 0xe700000000ffULL: s390_format_VRRc1(s390_irgen_VMX, ovl); goto ok; case 0xeb0000000004ULL: s390_format_RSY(s390_irgen_LMG, ovl); goto ok; From f5358d8fee2e2a386218573768213e5c3b5a2220 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 14:22:18 +0100 Subject: [PATCH 321/502] Solaris syscall wrapper: add procfs cmdline sp[ecial handling to sys_open Generally it seems that older Solaris (11.3) and OpenIndiana use 'old' sys_open and do not have procfs cmdline. Newer Solaris (11.4) uses sys_openat and has procfs cmdline. OmniOS mixes both, it uses old sys_open and has procfs cmdline. --- coregrind/m_syswrap/syswrap-solaris.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 57af54fdc..2a904212e 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -1770,6 +1770,11 @@ PRE(sys_open) ARG2, ARG3)) return; +#if defined(SOLARIS_PROC_CMDLINE) + if (handle_cmdline_open(status, (const HChar*)ARG1)) + return; +#endif + *flags |= SfMayBlock; } From d17342f65e6aab747dbdb92f50a305449ce6df31 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 13:36:02 +0100 Subject: [PATCH 322/502] syswrap cleanup: remove Solaris references in generic sys_open On Solaris sys_open is handled in syswrap-solaris.c --- coregrind/m_syswrap/syswrap-generic.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index d8910fdba..592a12766 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -4773,7 +4773,7 @@ POST(sys_nanosleep) POST_MEM_WRITE( ARG2, sizeof(struct vki_timespec) ); } -#if defined(VGO_linux) || defined(VGO_solaris) +#if defined(VGO_linux) /* Handles the case where the open is of /proc/self/auxv or /proc//auxv, and just gives out a copy of the fd for the fake file we cooked up at startup (in m_main). Also, seeks the @@ -4798,11 +4798,6 @@ Bool ML_(handle_auxv_open)(SyscallStatus *status, const HChar *filename, return True; } -# if defined(VGO_solaris) - VG_(sprintf)(name, "/proc/self/fd/%d", VG_(cl_auxv_fd)); - SysRes sres = VG_(open)(name, flags, 0); - SET_STATUS_from_SysRes(sres); -# else SysRes sres = VG_(dup)(VG_(cl_auxv_fd)); SET_STATUS_from_SysRes(sres); if (!sr_isError(sres)) { @@ -4810,13 +4805,10 @@ Bool ML_(handle_auxv_open)(SyscallStatus *status, const HChar *filename, if (off < 0) SET_STATUS_Failure(VKI_EMFILE); } -# endif return True; } -#endif // defined(VGO_linux) || defined(VGO_solaris) -#if defined(VGO_linux) Bool ML_(handle_self_exe_open)(SyscallStatus *status, const HChar *filename, int flags) { From 21cc9b2490f9b565d5aab7ab83c2c68887ab24ae Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 16:12:21 +0100 Subject: [PATCH 323/502] Solaris syswrap: make handle_auxx_open a static function handle_psinfo_open and handle_cmdline_open are Solaris statics but ML_(handle_auxv_open) was shared between Linux and Solaris. There is some common code but I find it less confusing to have all 3 statics in the same place for Solaris. This makes handle_auxv_open static for both. --- coregrind/m_syswrap/priv_syswrap-generic.h | 4 --- coregrind/m_syswrap/syswrap-generic.c | 8 ++--- coregrind/m_syswrap/syswrap-solaris.c | 35 ++++++++++++++++++++-- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-generic.h b/coregrind/m_syswrap/priv_syswrap-generic.h index a59cdf5ef..199ef10d7 100644 --- a/coregrind/m_syswrap/priv_syswrap-generic.h +++ b/coregrind/m_syswrap/priv_syswrap-generic.h @@ -120,10 +120,6 @@ void ML_(POST_unknown_ioctl)(ThreadId tid, UInt res, UWord request, UWord arg); extern void ML_(pre_argv_envp)(Addr a, ThreadId tid, const HChar *s1, const HChar *s2); -extern Bool -ML_(handle_auxv_open)(SyscallStatus *status, const HChar *filename, - int flags); - extern Bool ML_(handle_self_exe_open)(SyscallStatus *status, const HChar *filename, int flags); diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 592a12766..ddef26481 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -4779,8 +4779,8 @@ POST(sys_nanosleep) fake file we cooked up at startup (in m_main). Also, seeks the cloned fd back to the start. Returns True if auxv open was handled (status is set). */ -Bool ML_(handle_auxv_open)(SyscallStatus *status, const HChar *filename, - int flags) +static Bool handle_auxv_open(SyscallStatus *status, const HChar *filename, + int flags) { HChar name[30]; // large enough @@ -4924,8 +4924,8 @@ PRE(sys_open) /* Handle also the case of /proc/self/auxv or /proc//auxv or /proc/self/exe or /proc//exe. */ - if (ML_(handle_auxv_open)(status, (const HChar *)(Addr)ARG1, ARG2) - || ML_(handle_self_exe_open)(status, (const HChar *)(Addr)ARG1, ARG2)) + if (handle_auxv_open(status, (const HChar *)(Addr)ARG1, ARG2) + || handle_self_exe_open(status, (const HChar *)(Addr)ARG1, ARG2)) return; if (proc_self_exe) { diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 2a904212e..a77adf91f 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -1635,6 +1635,37 @@ PRE(sys_spawn) } #endif /* SOLARIS_SPAWN_SYSCALL */ +static Bool handle_auxv_open(SyscallStatus *status, const HChar *filename, + int flags) +{ + HChar name[30]; // large enough + + if (!ML_(safe_to_deref)((const void *) filename, 1)) + return False; + + /* Opening /proc//auxv or /proc/self/auxv? */ + VG_(sprintf)(name, "/proc/%d/auxv", VG_(getpid)()); + if (!VG_STREQ(filename, name) && !VG_STREQ(filename, "/proc/self/auxv")) + return False; + + /* Allow to open the file only for reading. */ + if (flags & (VKI_O_WRONLY | VKI_O_RDWR)) { + SET_STATUS_Failure(VKI_EACCES); + return True; + } + + VG_(sprintf)(name, "/proc/self/fd/%d", VG_(cl_auxv_fd)); + SysRes sres = VG_(open)(name, flags, 0); + SET_STATUS_from_SysRes(sres); + if (!sr_isError(sres)) { + OffT off = VG_(lseek)(sr_Res(sres), 0, VKI_SEEK_SET); + if (off < 0) + SET_STATUS_Failure(VKI_EMFILE); + } + + return True; +} + /* Handles the case where the open is of /proc/self/psinfo or /proc//psinfo. Fetch fresh contents into psinfo_t, fake fname, psargs, argc and argv. Write the structure to the fake @@ -1763,7 +1794,7 @@ PRE(sys_open) PRE_MEM_RASCIIZ("open(filename)", ARG1); - if (ML_(handle_auxv_open)(status, (const HChar*)ARG1, ARG2)) + if (handle_auxv_open(status, (const HChar*)ARG1, ARG2)) return; if (handle_psinfo_open(status, False /*use_openat*/, (const HChar*)ARG1, 0, @@ -4207,7 +4238,7 @@ PRE(sys_openat) return; } - if (ML_(handle_auxv_open)(status, (const HChar *) ARG2, ARG3)) + if (handle_auxv_open(status, (const HChar *) ARG2, ARG3)) return; if (handle_psinfo_open(status, True /*use_openat*/, (const HChar *) ARG2, From 12d07fef564ee63f364e9241c5161552048a8fe9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 15:23:06 +0100 Subject: [PATCH 324/502] Linux syswrap: handle_self_exe_open is also now static and Linux only. --- coregrind/m_syswrap/priv_syswrap-generic.h | 4 ---- coregrind/m_syswrap/syswrap-generic.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-generic.h b/coregrind/m_syswrap/priv_syswrap-generic.h index 199ef10d7..ec38236ea 100644 --- a/coregrind/m_syswrap/priv_syswrap-generic.h +++ b/coregrind/m_syswrap/priv_syswrap-generic.h @@ -120,10 +120,6 @@ void ML_(POST_unknown_ioctl)(ThreadId tid, UInt res, UWord request, UWord arg); extern void ML_(pre_argv_envp)(Addr a, ThreadId tid, const HChar *s1, const HChar *s2); -extern Bool -ML_(handle_self_exe_open)(SyscallStatus *status, const HChar *filename, - int flags); - /* Helper function for generic mprotect and linux pkey_mprotect. */ extern void handle_sys_mprotect (ThreadId tid, SyscallStatus *status, Addr *addr, SizeT *len, Int *prot); diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index ddef26481..660d5cf0e 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -4809,8 +4809,8 @@ static Bool handle_auxv_open(SyscallStatus *status, const HChar *filename, return True; } -Bool ML_(handle_self_exe_open)(SyscallStatus *status, const HChar *filename, - int flags) +static handle_self_exe_open(SyscallStatus *status, const HChar *filename, + int flags) { HChar name[30]; // large enough for /proc//exe From fa32cbb9a7433845d7c0947ff58b581be64c2305 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 15:25:44 +0100 Subject: [PATCH 325/502] Add bacck the return type for handle_self_exe_open --- coregrind/m_syswrap/syswrap-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 660d5cf0e..1cd592196 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -4809,8 +4809,8 @@ static Bool handle_auxv_open(SyscallStatus *status, const HChar *filename, return True; } -static handle_self_exe_open(SyscallStatus *status, const HChar *filename, - int flags) +static Bool handle_self_exe_open(SyscallStatus *status, const HChar *filename, + int flags) { HChar name[30]; // large enough for /proc//exe From d3cd82219be2deb28f0ab7c5120176a5606f884a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 16:57:45 +0100 Subject: [PATCH 326/502] Solaris regtest: make Solaris specific procfs-cmdline-exe.c Use /proc/pid_or_self/path/a.out rather than /proc/pid_or_self/exe as in the parent directory. I'm going to split this test into versions for each platform, Darwin (with no /proc) can use the Linux one. FreeBSD optionally has /proc but uses currproc instead of self. --- .gitignore | 1 + none/tests/solaris/Makefile.am | 1 + .../proc-cmdline-exe.stderr.exp-with-cmdline | 12 +- ...roc-cmdline-exe.stderr.exp-without-cmdline | 8 +- none/tests/solaris/proc-cmdline-exe.vgtest | 2 +- none/tests/solaris/procfs-cmdline-exe.c | 115 ++++++++++++++++++ 6 files changed, 128 insertions(+), 11 deletions(-) create mode 100644 none/tests/solaris/procfs-cmdline-exe.c diff --git a/.gitignore b/.gitignore index 3276d8c66..2357d8ee3 100644 --- a/.gitignore +++ b/.gitignore @@ -2325,6 +2325,7 @@ /none/tests/solaris/proc_auxv /none/tests/solaris/proc_auxv_multiple /none/tests/solaris/proc_psinfo +/none/tests/solaris/procfs-cmdline-exe /none/tests/solaris/pthread-stack /none/tests/solaris/readlinkat_self /none/tests/solaris/reserve_sysstat_addr diff --git a/none/tests/solaris/Makefile.am b/none/tests/solaris/Makefile.am index 612de2b91..b3a2cf569 100644 --- a/none/tests/solaris/Makefile.am +++ b/none/tests/solaris/Makefile.am @@ -46,6 +46,7 @@ check_PROGRAMS = \ proc_auxv \ proc_auxv_multiple \ proc_psinfo \ + procfs-cmdline-exe \ posix_spawn \ pthread-stack \ readlinkat_self \ diff --git a/none/tests/solaris/proc-cmdline-exe.stderr.exp-with-cmdline b/none/tests/solaris/proc-cmdline-exe.stderr.exp-with-cmdline index 6fd6f1301..4827ed7b5 100644 --- a/none/tests/solaris/proc-cmdline-exe.stderr.exp-with-cmdline +++ b/none/tests/solaris/proc-cmdline-exe.stderr.exp-with-cmdline @@ -1,10 +1,10 @@ /proc/self/cmdline: -./../procfs-cmdline-exe\0arg1\0arg 2\0arg3\0 +./procfs-cmdline-exe\0arg1\0arg 2\0arg3\0 /proc//cmdline: -./../procfs-cmdline-exe\0arg1\0arg 2\0arg3\0 -readlink: No such file or directory -readlink: No such file or directory -readlinkat: No such file or directory -readlinkat: No such file or directory +./procfs-cmdline-exe\0arg1\0arg 2\0arg3\0 +Result of readlink("/proc/self/path/a.out"): procfs-cmdline-exe +Result of readlink("/proc//path/a.out"): procfs-cmdline-exe +Result of readlinkat("/proc/self/path/a.out"): procfs-cmdline-exe +Result of readlinkat("/proc//path/a.out"): procfs-cmdline-exe diff --git a/none/tests/solaris/proc-cmdline-exe.stderr.exp-without-cmdline b/none/tests/solaris/proc-cmdline-exe.stderr.exp-without-cmdline index 9d656f733..acb551a37 100644 --- a/none/tests/solaris/proc-cmdline-exe.stderr.exp-without-cmdline +++ b/none/tests/solaris/proc-cmdline-exe.stderr.exp-without-cmdline @@ -3,8 +3,8 @@ open(): No such file or directory /proc//cmdline: open(): No such file or directory -readlink: No such file or directory -readlink: No such file or directory -readlinkat: No such file or directory -readlinkat: No such file or directory +Result of readlink("/proc/self/path/a.out"): procfs-cmdline-exe +Result of readlink("/proc//path/a.out"): procfs-cmdline-exe +Result of readlinkat("/proc/self/path/a.out"): procfs-cmdline-exe +Result of readlinkat("/proc//path/a.out"): procfs-cmdline-exe diff --git a/none/tests/solaris/proc-cmdline-exe.vgtest b/none/tests/solaris/proc-cmdline-exe.vgtest index 117dd9fb3..4d33c26c4 100644 --- a/none/tests/solaris/proc-cmdline-exe.vgtest +++ b/none/tests/solaris/proc-cmdline-exe.vgtest @@ -1,3 +1,3 @@ -prog: ../procfs-cmdline-exe +prog: procfs-cmdline-exe args: arg1 "arg 2" arg3 stderr_filter: filter_stderr diff --git a/none/tests/solaris/procfs-cmdline-exe.c b/none/tests/solaris/procfs-cmdline-exe.c new file mode 100644 index 000000000..2e1d3b5cd --- /dev/null +++ b/none/tests/solaris/procfs-cmdline-exe.c @@ -0,0 +1,115 @@ +/* + * Read /proc/self/cmdline and /proc/self/path/a.out such that it can be tested + * whether Valgrind intercepts the system calls that access these pseudo-files + * properly on Linux and whether Valgrind does not modify the behavior of + * accessing these files on other operating systems. + */ + +#define _ATFILE_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../../config.h" + +static void test_cmdline(const char* const cwd, const char* const label, + const char* const path) +{ + int fd, n; + char ch; + + fprintf(stderr, "%s:\n", label); + fd = open(path, 0); + if (fd >= 0) + { + while ((n = read(fd, &ch, 1)) > 0) + { + if (ch == '\\') + fprintf(stderr, "\\\\"); + else if (ch == 0) + fprintf(stderr, "\\0"); + else if (isprint((unsigned)ch)) + fprintf(stderr, "%c", ch); + else + fprintf(stderr, "\\0%o", ch); + } + fprintf(stderr, "\n"); + close(fd); + } + else + perror("open()"); +} + +static void test_readlink(const char* const cwd, const char* const label, + const char* const path) +{ + char buf[512]; + const char* p; + int n; + + if ((n = readlink(path, buf, sizeof(buf) - 1)) >= 0) + { + buf[n] = 0; + p = buf; + if (strncmp(buf, cwd, strlen(cwd)) == 0) + p += strlen(cwd); + fprintf(stderr, "Result of readlink(\"%s\"): %s\n", label, p); + } + else + perror("readlink"); +} + +static void test_readlinkat(const char* const cwd, const char* const label, + const char* const path) +{ +#if HAVE_READLINKAT + char buf[512]; + const char* p; + int n; + + if ((n = readlinkat(AT_FDCWD, path, buf, sizeof(buf) - 1)) >= 0) + { + buf[n] = 0; + p = buf; + if (strncmp(buf, cwd, strlen(cwd)) == 0) + p += strlen(cwd); + fprintf(stderr, "Result of readlinkat(\"%s\"): %s\n", label, p); + } + else + perror("readlinkat"); +#else + errno = ENOSYS; + perror("readlinkat"); +#endif +} + +int main(int argc, char** argv) +{ + char cwd[512]; + char path[512]; + + cwd[0] = 0; + if (! getcwd(cwd, sizeof(cwd))) + perror("getcwd"); + strcat(cwd, "/"); + + snprintf(path, sizeof(path), "/proc/%ld/cmdline", (long) getpid()); + + test_cmdline(cwd, "/proc/self/cmdline", "/proc/self/cmdline"); + test_cmdline(cwd, "/proc//cmdline", path); + + snprintf(path, sizeof(path), "/proc/%ld/path/a.out", (long) getpid()); + + test_readlink(cwd, "/proc/self/path/a.out", "/proc/self/path/a.out"); + test_readlink(cwd, "/proc//path/a.out", path); + + test_readlinkat(cwd, "/proc/self/path/a.out", "/proc/self/path/a.out"); + test_readlinkat(cwd, "/proc//path/a.out", path); + + return 0; +} From 2b2302c9cb81e01d2432fb441b71f6527436b112 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 16:37:42 +0100 Subject: [PATCH 327/502] Regtest: split none procfs-cmdline-exe into one version per platform This was linux and non-linux where non-linux really meant non-linux non-solaris non-freebsd i.e., darwin only. I need to add a FreeBSD version (and /proc support for cmdline). --- .gitignore | 3 ++- none/tests/Makefile.am | 1 - none/tests/darwin/Makefile.am | 4 ++++ none/tests/darwin/procfs-cmdline-exe.c | 1 + .../procfs-cmdline-exe.stderr.exp-with-readlinkat} | 0 .../procfs-cmdline-exe.stderr.exp-without-readlinkat} | 0 .../procfs-cmdline-exe.vgtest} | 2 -- none/tests/linux/Makefile.am | 4 ++++ none/tests/{ => linux}/procfs-cmdline-exe.c | 2 +- .../procfs-cmdline-exe.stderr.exp-with-readlinkat} | 0 .../procfs-cmdline-exe.stderr.exp-without-readlinkat} | 0 none/tests/linux/procfs-cmdline-exe.vgtest | 3 +++ none/tests/procfs-non-linux.vgtest | 6 ------ 13 files changed, 15 insertions(+), 11 deletions(-) create mode 120000 none/tests/darwin/procfs-cmdline-exe.c rename none/tests/{procfs-non-linux.stderr.exp-with-readlinkat => darwin/procfs-cmdline-exe.stderr.exp-with-readlinkat} (100%) rename none/tests/{procfs-non-linux.stderr.exp-without-readlinkat => darwin/procfs-cmdline-exe.stderr.exp-without-readlinkat} (100%) rename none/tests/{procfs-linux.vgtest => darwin/procfs-cmdline-exe.vgtest} (50%) rename none/tests/{ => linux}/procfs-cmdline-exe.c (98%) rename none/tests/{procfs-linux.stderr.exp-with-readlinkat => linux/procfs-cmdline-exe.stderr.exp-with-readlinkat} (100%) rename none/tests/{procfs-linux.stderr.exp-without-readlinkat => linux/procfs-cmdline-exe.stderr.exp-without-readlinkat} (100%) create mode 100644 none/tests/linux/procfs-cmdline-exe.vgtest delete mode 100644 none/tests/procfs-non-linux.vgtest diff --git a/.gitignore b/.gitignore index 2357d8ee3..b94eb1d75 100644 --- a/.gitignore +++ b/.gitignore @@ -1645,7 +1645,6 @@ /none/tests/pluto /none/tests/ppoll_alarm /none/tests/process_vm_readv_writev -/none/tests/procfs-cmdline-exe /none/tests/pselect_alarm /none/tests/pselect_sigmask_null /none/tests/pth_2sig @@ -1902,6 +1901,7 @@ /none/tests/darwin/bug254164 /none/tests/darwin/bug390269 /none/tests/darwin/bug411369 +/none/tests/darwin/procfs-cmdline-exe /none/tests/darwin/rlimit # /none/tests/linux/ @@ -1924,6 +1924,7 @@ /none/tests/linux/mremap5 /none/tests/linux/mremap6 /none/tests/linux/open_client +/none/tests/linux/procfs-cmdline-exe /none/tests/linux/pthread-stack /none/tests/linux/readlinkat_self /none/tests/linux/stack-overflow diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 963f3456d..0368a83c4 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -300,7 +300,6 @@ check_PROGRAMS = \ munmap_exe map_unaligned map_unmap mq \ nocwd \ pending \ - procfs-cmdline-exe \ pselect_alarm \ pselect_sigmask_null \ pth_atfork1 pth_blockedsig pth_cancel1 pth_cancel2 pth_cvsimple \ diff --git a/none/tests/darwin/Makefile.am b/none/tests/darwin/Makefile.am index 4bdb55695..3d79d0e6a 100644 --- a/none/tests/darwin/Makefile.am +++ b/none/tests/darwin/Makefile.am @@ -10,6 +10,9 @@ EXTRA_DIST = \ bug254164.vgtest \ bug390269.vgtest \ bug411369.vgtest \ + procfs-cmdline-exe.stderr.exp-without-readlinkat \ + procfs-cmdline-exe.stderr.exp-with-readlinkat \ + procfs-cmdline-exe.vgtest \ rlimit.stderr.exp rlimit.vgtest check_PROGRAMS = \ @@ -19,6 +22,7 @@ check_PROGRAMS = \ bug254164 \ bug390269 \ bug411369 \ + procfs-cmdline-exe \ rlimit diff --git a/none/tests/darwin/procfs-cmdline-exe.c b/none/tests/darwin/procfs-cmdline-exe.c new file mode 120000 index 000000000..ea006108a --- /dev/null +++ b/none/tests/darwin/procfs-cmdline-exe.c @@ -0,0 +1 @@ +../linux/procfs-cmdline-exe.c \ No newline at end of file diff --git a/none/tests/procfs-non-linux.stderr.exp-with-readlinkat b/none/tests/darwin/procfs-cmdline-exe.stderr.exp-with-readlinkat similarity index 100% rename from none/tests/procfs-non-linux.stderr.exp-with-readlinkat rename to none/tests/darwin/procfs-cmdline-exe.stderr.exp-with-readlinkat diff --git a/none/tests/procfs-non-linux.stderr.exp-without-readlinkat b/none/tests/darwin/procfs-cmdline-exe.stderr.exp-without-readlinkat similarity index 100% rename from none/tests/procfs-non-linux.stderr.exp-without-readlinkat rename to none/tests/darwin/procfs-cmdline-exe.stderr.exp-without-readlinkat diff --git a/none/tests/procfs-linux.vgtest b/none/tests/darwin/procfs-cmdline-exe.vgtest similarity index 50% rename from none/tests/procfs-linux.vgtest rename to none/tests/darwin/procfs-cmdline-exe.vgtest index ea8a8e951..a09863bd8 100644 --- a/none/tests/procfs-linux.vgtest +++ b/none/tests/darwin/procfs-cmdline-exe.vgtest @@ -1,4 +1,2 @@ -prereq: [ $(uname) = Linux ] prog: procfs-cmdline-exe -args: arg1 "arg 2" arg3 stderr_filter: filter_stderr diff --git a/none/tests/linux/Makefile.am b/none/tests/linux/Makefile.am index 15400e264..f7a875e7e 100644 --- a/none/tests/linux/Makefile.am +++ b/none/tests/linux/Makefile.am @@ -20,6 +20,9 @@ EXTRA_DIST = \ mremap6.vgtest \ open_client.vgtest \ pthread-stack.stderr.exp pthread-stack.vgtest \ + procfs-cmdline-exe.stderr.exp-without-readlinkat \ + procfs-cmdline-exe.stderr.exp-with-readlinkat \ + procfs-cmdline-exe.vgtest \ readlinkat_self.stderr.exp readlinkat_self.vgtest \ stack-overflow.stderr.exp stack-overflow.vgtest @@ -37,6 +40,7 @@ check_PROGRAMS = \ mremap5 \ mremap6 \ pthread-stack \ + procfs-cmdline-exe \ readlinkat_self \ stack-overflow diff --git a/none/tests/procfs-cmdline-exe.c b/none/tests/linux/procfs-cmdline-exe.c similarity index 98% rename from none/tests/procfs-cmdline-exe.c rename to none/tests/linux/procfs-cmdline-exe.c index cfb78d698..e00c20407 100644 --- a/none/tests/procfs-cmdline-exe.c +++ b/none/tests/linux/procfs-cmdline-exe.c @@ -15,7 +15,7 @@ #include #include #include -#include "../../config.h" +#include "../../../config.h" static void test_cmdline(const char* const cwd, const char* const label, const char* const path) diff --git a/none/tests/procfs-linux.stderr.exp-with-readlinkat b/none/tests/linux/procfs-cmdline-exe.stderr.exp-with-readlinkat similarity index 100% rename from none/tests/procfs-linux.stderr.exp-with-readlinkat rename to none/tests/linux/procfs-cmdline-exe.stderr.exp-with-readlinkat diff --git a/none/tests/procfs-linux.stderr.exp-without-readlinkat b/none/tests/linux/procfs-cmdline-exe.stderr.exp-without-readlinkat similarity index 100% rename from none/tests/procfs-linux.stderr.exp-without-readlinkat rename to none/tests/linux/procfs-cmdline-exe.stderr.exp-without-readlinkat diff --git a/none/tests/linux/procfs-cmdline-exe.vgtest b/none/tests/linux/procfs-cmdline-exe.vgtest new file mode 100644 index 000000000..c18cf1457 --- /dev/null +++ b/none/tests/linux/procfs-cmdline-exe.vgtest @@ -0,0 +1,3 @@ +args:arg1 "arg 2" arg3 +prog: procfs-cmdline-exe +stderr_filter: filter_stderr diff --git a/none/tests/procfs-non-linux.vgtest b/none/tests/procfs-non-linux.vgtest deleted file mode 100644 index 9f33f310a..000000000 --- a/none/tests/procfs-non-linux.vgtest +++ /dev/null @@ -1,6 +0,0 @@ -# For Linux, there is 'procfs-linux'. -# For Solaris, there is Solaris-specific 'solaris/proc-cmdline-exe'. -# -prereq: ! ../../tests/os_test linux && ! ../../tests/os_test solaris && ! ../../tests/os_test freebsd -prog: procfs-cmdline-exe -stderr_filter: filter_stderr From f5b1a96b69dd1d506a2abdd7ddd43115676f4f63 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 16:58:44 +0100 Subject: [PATCH 328/502] regtest: clean out procfs-cmldline-exe vgtest and exp files from Makefile.am --- none/tests/Makefile.am | 6 ------ 1 file changed, 6 deletions(-) diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 0368a83c4..cd41a5e6c 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -194,12 +194,6 @@ EXTRA_DIST = \ nodir.stderr.exp-freebsd \ pending.stdout.exp pending.stderr.exp pending.vgtest \ ppoll_alarm.vgtest \ - procfs-linux.stderr.exp-with-readlinkat \ - procfs-linux.stderr.exp-without-readlinkat \ - procfs-linux.vgtest \ - procfs-non-linux.vgtest \ - procfs-non-linux.stderr.exp-with-readlinkat \ - procfs-non-linux.stderr.exp-without-readlinkat \ pselect_alarm.vgtest \ pselect_sigmask_null.vgtest \ pth_atfork1.stderr.exp pth_atfork1.stdout.exp pth_atfork1.vgtest \ From 80e805753b9098d419c6a09c1481a89c89ab32ce Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 18:52:12 +0100 Subject: [PATCH 329/502] Bug 515992 - Add FreeBSD /proc virtualisation for cmdline and file --- .gitignore | 1 + NEWS | 1 + coregrind/m_main.c | 10 +- coregrind/m_syswrap/priv_syswrap-freebsd.h | 2 +- coregrind/m_syswrap/syswrap-freebsd.c | 193 +++++++++++++++--- none/tests/freebsd/Makefile.am | 4 +- none/tests/freebsd/open_client.cpp | 49 +++-- none/tests/freebsd/proc_pid_file.cpp | 6 + none/tests/freebsd/procfs-cmdline-exe.c | 115 +++++++++++ .../freebsd/procfs-cmdline-exe.stderr.exp | 10 + none/tests/freebsd/procfs-cmdline-exe.vgtest | 3 + none/tests/linux/procfs-cmdline-exe.vgtest | 2 + 12 files changed, 343 insertions(+), 53 deletions(-) create mode 100644 none/tests/freebsd/procfs-cmdline-exe.c create mode 100644 none/tests/freebsd/procfs-cmdline-exe.stderr.exp create mode 100644 none/tests/freebsd/procfs-cmdline-exe.vgtest diff --git a/.gitignore b/.gitignore index b94eb1d75..50e62ed6b 100644 --- a/.gitignore +++ b/.gitignore @@ -2357,6 +2357,7 @@ none/tests/freebsd/bug499212 /none/tests/freebsd/hello_world /none/tests/freebsd/open_client /none/tests/freebsd/proc_pid_file +/none/tests/freebsd/procfs-cmdline-exe /none/tests/freebsd/sanity_level_thread /none/tests/freebsd/usrstack /none/tests/freebsd/umtx_shm_creat diff --git a/NEWS b/NEWS index 32751bdb0..24a34af19 100644 --- a/NEWS +++ b/NEWS @@ -89,6 +89,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 515612 Sanity check VG_(realpath) and VG_(readlink) return values 515731 Distinguish between realloc functions in realloc size 0 error messages 515810 Update the LTP version in valgrind testsuite to 20260130 +515992 Add FreeBSD /proc virtualisation for cmdline and file To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 0046df384..cb4f97f2a 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -1678,13 +1678,13 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) VG_(cl_psinfo_fd) = -1; #endif -#if defined(VGO_linux) || defined(VGO_solaris) +#if defined(VGO_linux) || defined(VGO_solaris) || defined(VGO_freebsd) if (!need_help) { HChar buf[50]; // large enough HChar buf2[VG_(mkstemp_fullname_bufsz)(sizeof buf - 1)]; Int fd, r; -#if defined(VGO_linux) || defined(SOLARIS_PROC_CMDLINE) +#if defined(VGO_linux) || defined(SOLARIS_PROC_CMDLINE) || defined(VGO_freebsd) /* Fake /proc//cmdline only on Linux and Solaris if supported. */ HChar nul[1]; const HChar* exename; @@ -1717,7 +1717,9 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) VG_(err_config_error)("Can't delete client cmdline file in %s\n", buf2); VG_(cl_cmdline_fd) = fd; -#endif // defined(VGO_linux) || defined(SOLARIS_PROC_CMDLINE) +#endif // defined(VGO_linux) || defined(SOLARIS_PROC_CMDLINE) || defined(VGO_freebsd) + +#if !defined(VGO_freebsd) /* Fake /proc//auxv on both Linux and Solaris. */ VG_(debugLog)(1, "main", "Create fake /proc//auxv\n"); @@ -1749,6 +1751,8 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) VG_(cl_auxv_fd) = fd; +#endif + #if defined(VGO_solaris) /* Fake /proc//psinfo on Solaris. * Contents will be fetched and partially faked later on the fly. */ diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h index 6aaa36aba..c44d7d76a 100644 --- a/coregrind/m_syswrap/priv_syswrap-freebsd.h +++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h @@ -50,7 +50,7 @@ DECL_TEMPLATE(freebsd, sys_exit) // 1 DECL_TEMPLATE(freebsd, sys_fork) // 2 // generic read 3 // generic write 4 -// generic open 5 +DECL_TEMPLATE(freebsd, sys_open) // 5 // generic close 6 // generic wait4 7 // generic link 9 diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 20e46fb5e..81e6f361a 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -526,6 +526,102 @@ PRE(sys_fork) // SYS_open 5 // generic +// int open(const char *path, int flags, mode_t mode); +PRE(sys_open) +{ + HChar name[30]; // large enough + Bool proc_curproc_file = False; + + /* Check for /proc/curproc/file or /proc//file case + * first so that we can then use the later checks. */ + VG_(sprintf)(name, "/proc/%d/file", VG_(getpid)()); + if (ML_(safe_to_deref)( (void*)(Addr)ARG1, 1 ) + && (VG_(strcmp)((HChar *)(Addr)ARG1, name) == 0 + || VG_(strcmp)((HChar *)(Addr)ARG1, "/proc/curproc/file") == 0)) { + proc_curproc_file = True; + } + + if (ARG2 & VKI_O_CREAT) { + // 3-arg version + PRINT("sys_open ( %#" FMT_REGWORD "x(%s), %ld, %ld )",ARG1, + (HChar*)(Addr)ARG1, SARG2, SARG3); + PRE_REG_READ3(long, "open", + const char *, filename, int, flags, int, mode); + } else { + // 2-arg version + PRINT("sys_open ( %#" FMT_REGWORD "x(%s), %ld )",ARG1, + (HChar*)(Addr)ARG1, SARG2); + PRE_REG_READ2(long, "open", + const char *, filename, int, flags); + } + PRE_MEM_RASCIIZ( "open(filename)", ARG1 ); + + // check that we are not trying to open the client exe for writing + if ((ARG2 & VKI_O_WRONLY) || + (ARG2 & VKI_O_RDWR)) { + if (proc_curproc_file) { + SET_STATUS_Failure( VKI_ETXTBSY ); + return; + } else { + vg_assert(VG_(resolved_exename)); + const HChar* path = (const HChar*)ARG1; + if (ML_(safe_to_deref)(path, 1)) { + // we need something like a "ML_(safe_to_deref_path)" that does a binary search for the addressable length, and maybe nul + HChar tmp[VKI_PATH_MAX]; + if (VG_(realpath)(path, tmp)) { + if (!VG_(strcmp)(tmp, VG_(resolved_exename))) { + SET_STATUS_Failure( VKI_ETXTBSY ); + return; + } + } + } + } + } + + /* Handle the case where the open is of /proc/self/cmdline or + /proc//cmdline, and just give it a copy of the fd for the + fake file we cooked up at startup (in m_main). Also, seek the + cloned fd back to the start. */ + { + HChar* arg1s = (HChar*) (Addr)ARG1; + SysRes sres; + + VG_(sprintf)(name, "/proc/%d/cmdline", VG_(getpid)()); + if (ML_(safe_to_deref)( arg1s, 1 ) + && (VG_STREQ(arg1s, name) || VG_STREQ(arg1s, "/proc/curproc/cmdline"))) { + sres = VG_(dup)( VG_(cl_cmdline_fd) ); + SET_STATUS_from_SysRes( sres ); + if (!sr_isError(sres)) { + OffT off = VG_(lseek)( sr_Res(sres), 0, VKI_SEEK_SET ); + if (off < 0) + SET_STATUS_Failure( VKI_EMFILE ); + } + return; + } + } + + if (proc_curproc_file) { + // do the syscall with VG_(resolved_exename) + ARG1 = (Word)VG_(resolved_exename); + } + + /* Otherwise handle normally */ + *flags |= SfMayBlock; +} + +POST(sys_open) +{ + vg_assert(SUCCESS); + POST_newFd_RES; + if (!ML_(fd_allowed)(RES, "open", tid, True)) { + VG_(close)(RES); + SET_STATUS_Failure( VKI_EMFILE ); + } else { + if (VG_(clo_track_fds)) + ML_(record_fd_open_with_given_name)(tid, RES, (HChar*)(Addr)ARG1); + } +} + // SYS_close 6 // generic @@ -2736,7 +2832,7 @@ PRE(sys_lutimes) // int fhopen(const fhandle_t *fhp, int flags); PRE(sys_fhopen) { - PRINT("sys_open ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u )",ARG1,ARG2); + PRINT("sys_fhopen ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u )",ARG1,ARG2); PRE_REG_READ2(int, "fhopen", struct fhandle_t *, fhp, int, flags); PRE_MEM_READ( "fhopen(fhp)", ARG1, sizeof(struct vki_fhandle) ); @@ -5373,9 +5469,39 @@ PRE(sys_freebsd11_mknodat) // int openat(int fd, const char *path, int flags, ...); PRE(sys_openat) { + HChar name[30]; // large enough + Bool proc_curproc_file = False; + + if (ARG3 & VKI_O_CREAT) { + // 4-arg version + PRINT("sys_openat ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u, %" FMT_REGWORD "u )",ARG1,ARG2,(char*)ARG2,ARG3,ARG4); + PRE_REG_READ4(int, "openat", + int, fd, const char *, path, int, flags, vki_mode_t, mode); + } else { + // 3-arg version + PRINT("sys_openat ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u )",ARG1,ARG2,(char*)ARG2,ARG3); + PRE_REG_READ3(int, "openat", + int, fd, const char *, path, int, flags); + } + ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "openat", tid, status); + PRE_MEM_RASCIIZ("openat(path)", ARG2); + + /* Check for /proc/curproc/file or /proc//file case + * first so that we can then use the later checks. */ + VG_(sprintf)(name, "/proc/%d/file", VG_(getpid)()); + if (ML_(safe_to_deref)( (void*)(Addr)ARG1, 1 ) + && (VG_(strcmp)((HChar *)(Addr)ARG1, name) == 0 + || VG_(strcmp)((HChar *)(Addr)ARG1, "/proc/curproc/file") == 0)) { + proc_curproc_file = True; + } + // check that we are not trying to open the client exe for writing if ((ARG3 & VKI_O_WRONLY) || (ARG3 & VKI_O_RDWR)) { + if (proc_curproc_file) { + SET_STATUS_Failure( VKI_ETXTBSY ); + return; + } vg_assert(VG_(resolved_exename) && VG_(resolved_exename)[0] == '/'); Int fd = ARG1; const HChar* path = (const HChar*)ARG2; @@ -5384,41 +5510,56 @@ PRE(sys_openat) HChar tmp[VKI_PATH_MAX]; if (VG_(realpath)(path, tmp)) { if (!VG_(strcmp)(tmp, VG_(resolved_exename))) { - SET_STATUS_Failure( VKI_ETXTBSY ); + SET_STATUS_Failure( VKI_ETXTBSY ); + return; } } } else { const HChar* dirname; - if (VG_(resolve_filename)(fd, &dirname) == False) { - goto no_client_write; // let the OS do the error handling - } - HChar tmp1[VKI_PATH_MAX]; - VG_(snprintf)(tmp1, VKI_PATH_MAX, "%s/%s", dirname, path); - tmp1[VKI_PATH_MAX - 1] = '\0'; - //VG_(free)((void*)dirname); - HChar tmp2[VKI_PATH_MAX]; - if (VG_(realpath)(tmp1, tmp2)) { - if (!VG_(strcmp)(tmp2, VG_(resolved_exename))) { + if (VG_(resolve_filename)(fd, &dirname) == True) { + HChar tmp1[VKI_PATH_MAX]; + VG_(snprintf)(tmp1, VKI_PATH_MAX, "%s/%s", dirname, path); + tmp1[VKI_PATH_MAX - 1] = '\0'; + //VG_(free)((void*)dirname); + HChar tmp2[VKI_PATH_MAX]; + if (VG_(realpath)(tmp1, tmp2)) { + if (!VG_(strcmp)(tmp2, VG_(resolved_exename))) { SET_STATUS_Failure( VKI_ETXTBSY ); + return; + } } } } } } -no_client_write: - if (ARG3 & VKI_O_CREAT) { - // 4-arg version - PRINT("sys_openat ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u, %" FMT_REGWORD "u )",ARG1,ARG2,(char*)ARG2,ARG3,ARG4); - PRE_REG_READ4(int, "openat", - int, fd, const char *, path, int, flags, vki_mode_t, mode); - } else { - // 3-arg version - PRINT("sys_openat ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u )",ARG1,ARG2,(char*)ARG2,ARG3); - PRE_REG_READ3(int, "openat", - int, fd, const char *, path, int, flags); + + /* Handle the case where the open is of /proc/curproc/cmdline or + /proc//cmdline, and just give it a copy of the fd for the + fake file we cooked up at startup (in m_main). Also, seek the + cloned fd back to the start. */ + { + HChar* arg2s = (HChar*) (Addr)ARG2; + SysRes sres; + + VG_(sprintf)(name, "/proc/%d/cmdline", VG_(getpid)()); + if (ML_(safe_to_deref)( arg2s, 1 ) + && (VG_STREQ(arg2s, name) || VG_STREQ(arg2s, "/proc/curproc/cmdline"))) { + + sres = VG_(dup)( VG_(cl_cmdline_fd) ); + SET_STATUS_from_SysRes( sres ); + if (!sr_isError(sres)) { + OffT off = VG_(lseek)( sr_Res(sres), 0, VKI_SEEK_SET ); + if (off < 0) + SET_STATUS_Failure( VKI_EMFILE ); + } + return; + } + } + + if (proc_curproc_file) { + // do the syscall with VG_(resolved_exename) + ARG2 = (Word)VG_(resolved_exename); } - ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "openat", tid, status); - PRE_MEM_RASCIIZ("openat(path)", ARG2); /* Otherwise handle normally */ *flags |= SfMayBlock; @@ -7229,7 +7370,7 @@ const SyscallTableEntry ML_(syscall_table)[] = { GENXY(__NR_read, sys_read), // 3 GENX_(__NR_write, sys_write), // 4 - GENXY(__NR_open, sys_open), // 5 + BSDXY(__NR_open, sys_open), // 5 GENX_(__NR_close, sys_close), // 6 GENXY(__NR_wait4, sys_wait4), // 7 diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index c705fe231..41226c8f7 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -36,6 +36,8 @@ EXTRA_DIST = \ ksh_test.ksh \ ksh_test.stdout.exp \ open_client.vgtest \ + procfs-cmdline-exe.vgtest \ + procfs-cmdline-exe..stderr.exp \ readlinkat.vgtest \ readlinkat2.vgtest \ sanity_level_thread.vgtest \ @@ -52,7 +54,7 @@ EXTRA_DIST = \ check_PROGRAMS = \ auxv bug452274 bug498317 bug499212 fexecve hello_world open_client \ - osrel proc_pid_file readlinkat readlinkat2 sanity_level_thread swapcontext \ + osrel proc_pid_file procfs-cmdline-exe readlinkat readlinkat2 sanity_level_thread swapcontext \ umtx_shm_creat usrstack AM_CFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/none/tests/freebsd/open_client.cpp b/none/tests/freebsd/open_client.cpp index 54fb63b0e..59b92a721 100644 --- a/none/tests/freebsd/open_client.cpp +++ b/none/tests/freebsd/open_client.cpp @@ -11,37 +11,42 @@ int main(int argc, char** argv) { std::vector flags{O_WRONLY|O_CREAT|O_TRUNC, O_WRONLY, O_RDWR}; + std::string ppf = std::string("/proc/") + std::to_string(getpid()) + "/file"; + std::vector paths{argv[0], ppf, "/proc/curproc/file"}; - // On FreeBSD libc open uses syscall openat (at least on 14.2) - for (auto f : flags) + for (const auto& p : paths) { - int res = open(argv[0], f, 0666); - if (-1 != res) - { - throw std::runtime_error("open should have failed"); - } - else + // On FreeBSD libc open uses syscall openat (at least on 14.2) + for (auto f : flags) { - if (errno != ETXTBSY) + int res = open(p.c_str(), f, 0666); + if (-1 != res) { - throw std::runtime_error("errno should be ETXTBSY"); + throw std::runtime_error("open should have failed"); + } + else + { + if (errno != ETXTBSY) + { + throw std::runtime_error("errno should be ETXTBSY"); + } } } - } - // repeat the above, but with syscall SYS_open - for (auto f : flags) - { - int res = syscall(SYS_open, argv[0], f, 0666); - if (-1 != res) - { - throw std::runtime_error("open should have failed"); - } - else + // repeat the above, but with syscall SYS_open + for (auto f : flags) { - if (errno != ETXTBSY) + int res = syscall(SYS_open, p.c_str(), f, 0666); + if (-1 != res) { - throw std::runtime_error("errno should be ETXTBSY"); + throw std::runtime_error("open should have failed"); + } + else + { + if (errno != ETXTBSY) + { + throw std::runtime_error("errno should be ETXTBSY"); + } } } } diff --git a/none/tests/freebsd/proc_pid_file.cpp b/none/tests/freebsd/proc_pid_file.cpp index 89c8428d1..bd44c7866 100644 --- a/none/tests/freebsd/proc_pid_file.cpp +++ b/none/tests/freebsd/proc_pid_file.cpp @@ -18,6 +18,12 @@ int main() //std::cout << "resolvedPath2: " << resolvedPath2 << '\n'; std::string rp(resolvedPath); assert(rp == resolvedPath2); + + std::string ppf = std::string("/proc/") + std::to_string(getpid()) + "/file"; + count = readlink(ppf.c_str(), resolvedPath, PATH_MAX); + resolvedPath[count] = '\0'; + rp = resolvedPath; + assert(rp == resolvedPath2); auto n = rp.rfind("proc_pid_file"); diff --git a/none/tests/freebsd/procfs-cmdline-exe.c b/none/tests/freebsd/procfs-cmdline-exe.c new file mode 100644 index 000000000..d246937ed --- /dev/null +++ b/none/tests/freebsd/procfs-cmdline-exe.c @@ -0,0 +1,115 @@ +/* + * Read /proc/curproc/cmdline and /proc/curproc/file such that it can be tested + * whether Valgrind intercepts the system calls that access these pseudo-files + * properly and whether Valgrind does not modify the behavior of + * accessing these files on other operating systems. + */ + +#define _ATFILE_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../../config.h" + +static void test_cmdline(const char* const cwd, const char* const label, + const char* const path) +{ + int fd, n; + char ch; + + fprintf(stderr, "%s:\n", label); + fd = open(path, 0); + if (fd >= 0) + { + while ((n = read(fd, &ch, 1)) > 0) + { + if (ch == '\\') + fprintf(stderr, "\\\\"); + else if (ch == 0) + fprintf(stderr, "\\0"); + else if (isprint((unsigned)ch)) + fprintf(stderr, "%c", ch); + else + fprintf(stderr, "\\0%o", ch); + } + fprintf(stderr, "\n"); + close(fd); + } + else + perror("open()"); +} + +static void test_readlink(const char* const cwd, const char* const label, + const char* const path) +{ + char buf[512]; + const char* p; + int n; + + if ((n = readlink(path, buf, sizeof(buf) - 1)) >= 0) + { + buf[n] = 0; + p = buf; + if (strncmp(buf, cwd, strlen(cwd)) == 0) + p += strlen(cwd); + fprintf(stderr, "Result of readlink(\"%s\"): %s\n", label, p); + } + else + perror("readlink"); +} + +static void test_readlinkat(const char* const cwd, const char* const label, + const char* const path) +{ +#if HAVE_READLINKAT + char buf[512]; + const char* p; + int n; + + if ((n = readlinkat(AT_FDCWD, path, buf, sizeof(buf) - 1)) >= 0) + { + buf[n] = 0; + p = buf; + if (strncmp(buf, cwd, strlen(cwd)) == 0) + p += strlen(cwd); + fprintf(stderr, "Result of readlinkat(\"%s\"): %s\n", label, p); + } + else + perror("readlinkat"); +#else + errno = ENOSYS; + perror("readlinkat"); +#endif +} + +int main(int argc, char** argv) +{ + char cwd[512]; + char path[512]; + + cwd[0] = 0; + if (! getcwd(cwd, sizeof(cwd))) + perror("getcwd"); + strcat(cwd, "/"); + + snprintf(path, sizeof(path), "/proc/%ld/cmdline", (long) getpid()); + + test_cmdline(cwd, "/proc/curproc/cmdline", "/proc/curproc/cmdline"); + test_cmdline(cwd, "/proc//cmdline", path); + + snprintf(path, sizeof(path), "/proc/%ld/file", (long) getpid()); + + test_readlink(cwd, "/proc/curproc/file", "/proc/curproc/file"); + test_readlink(cwd, "/proc//file", path); + + test_readlinkat(cwd, "/proc/curproc/file", "/proc/curproc/file"); + test_readlinkat(cwd, "/proc//file", path); + + return 0; +} diff --git a/none/tests/freebsd/procfs-cmdline-exe.stderr.exp b/none/tests/freebsd/procfs-cmdline-exe.stderr.exp new file mode 100644 index 000000000..f22c9deb8 --- /dev/null +++ b/none/tests/freebsd/procfs-cmdline-exe.stderr.exp @@ -0,0 +1,10 @@ + +/proc/curproc/cmdline: +./procfs-cmdline-exe\0arg1\0arg 2\0arg3\0 +/proc//cmdline: +./procfs-cmdline-exe\0arg1\0arg 2\0arg3\0 +Result of readlink("/proc/curproc/file"): procfs-cmdline-exe +Result of readlink("/proc//file"): procfs-cmdline-exe +Result of readlinkat("/proc/curproc/file"): procfs-cmdline-exe +Result of readlinkat("/proc//file"): procfs-cmdline-exe + diff --git a/none/tests/freebsd/procfs-cmdline-exe.vgtest b/none/tests/freebsd/procfs-cmdline-exe.vgtest new file mode 100644 index 000000000..c18cf1457 --- /dev/null +++ b/none/tests/freebsd/procfs-cmdline-exe.vgtest @@ -0,0 +1,3 @@ +args:arg1 "arg 2" arg3 +prog: procfs-cmdline-exe +stderr_filter: filter_stderr diff --git a/none/tests/linux/procfs-cmdline-exe.vgtest b/none/tests/linux/procfs-cmdline-exe.vgtest index c18cf1457..910a4c541 100644 --- a/none/tests/linux/procfs-cmdline-exe.vgtest +++ b/none/tests/linux/procfs-cmdline-exe.vgtest @@ -1,3 +1,5 @@ +# On FreeBSD, /proc is optional and often not present +prereq: [ -d /proc] args:arg1 "arg 2" arg3 prog: procfs-cmdline-exe stderr_filter: filter_stderr From 0d26f97e091d0f9fb209e224cd73939cfbf3e4b8 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 14 Feb 2026 20:43:47 +0100 Subject: [PATCH 330/502] Fix none/tests/freebsd/Makefile.am: procfs-cmdline-exe..stderr.exp typo Should have just one dot ('.'). --- none/tests/freebsd/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index 41226c8f7..474032843 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -37,7 +37,7 @@ EXTRA_DIST = \ ksh_test.stdout.exp \ open_client.vgtest \ procfs-cmdline-exe.vgtest \ - procfs-cmdline-exe..stderr.exp \ + procfs-cmdline-exe.stderr.exp \ readlinkat.vgtest \ readlinkat2.vgtest \ sanity_level_thread.vgtest \ From aa1e3b4ec6fbb5d60a2fe8312924a30d2c3f9144 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 21:15:52 +0100 Subject: [PATCH 331/502] regtest: move /proc test to freebsd for none procfs-cmdline-exe --- none/tests/freebsd/procfs-cmdline-exe.vgtest | 1 + none/tests/linux/procfs-cmdline-exe.vgtest | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/none/tests/freebsd/procfs-cmdline-exe.vgtest b/none/tests/freebsd/procfs-cmdline-exe.vgtest index c18cf1457..b7596d82f 100644 --- a/none/tests/freebsd/procfs-cmdline-exe.vgtest +++ b/none/tests/freebsd/procfs-cmdline-exe.vgtest @@ -1,3 +1,4 @@ +prereq: test -d /proc args:arg1 "arg 2" arg3 prog: procfs-cmdline-exe stderr_filter: filter_stderr diff --git a/none/tests/linux/procfs-cmdline-exe.vgtest b/none/tests/linux/procfs-cmdline-exe.vgtest index 910a4c541..c18cf1457 100644 --- a/none/tests/linux/procfs-cmdline-exe.vgtest +++ b/none/tests/linux/procfs-cmdline-exe.vgtest @@ -1,5 +1,3 @@ -# On FreeBSD, /proc is optional and often not present -prereq: [ -d /proc] args:arg1 "arg 2" arg3 prog: procfs-cmdline-exe stderr_filter: filter_stderr From c245f954ed34a5c8dc2a70293ad6fb28f0961b9e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 14 Feb 2026 21:36:47 +0100 Subject: [PATCH 332/502] Replace which and type with command -v which is an external (csh) command which might not be available. type is a bourn shell builtin, but not necessarily available outside bash. Use command -v which is POSIX and should work everywhere. --- docs/Makefile.am | 4 ++-- memcheck/tests/nothing_xml.vgtest | 2 +- memcheck/tests/simple_leak_xml.vgtest | 2 +- memcheck/tests/simple_reachable_xml.vgtest | 2 +- memcheck/tests/xmas_tree_xml.vgtest | 2 +- nightly/bin/nightly | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index b8a15e27f..6eefe186f 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -207,7 +207,7 @@ MANPAGES_XML_FILES = $(myxmldir)/manpages-index.xml \ all-docs: FAQ.txt man-pages html-docs print-docs valid-manual: $(MANUAL_XML_FILES) - if type $(XMLLINT) 2>/dev/null; then \ + if command -v $(XMLLINT) >/dev/null; then \ if [ -f $(XML_CATALOG_FILES) ]; then \ export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \ $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/index.xml && \ @@ -216,7 +216,7 @@ valid-manual: $(MANUAL_XML_FILES) fi valid-manpages: $(MANPAGES_XML_FILES) - if type $(XMLLINT) 2>/dev/null; then \ + if command -v $(XMLLINT) >/dev/null; then \ if [ -f $(XML_CATALOG_FILES) ]; then \ export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \ $(XMLLINT) $(XMLLINT_FLAGS) $(myxmldir)/manpages-index.xml && \ diff --git a/memcheck/tests/nothing_xml.vgtest b/memcheck/tests/nothing_xml.vgtest index db2eca402..a7145b765 100644 --- a/memcheck/tests/nothing_xml.vgtest +++ b/memcheck/tests/nothing_xml.vgtest @@ -1,4 +1,4 @@ -prereq: which xmllint > /dev/null +prereq: command -v xmllint > /dev/null prog: nothing args: | xmllint --noout - vgopts: --xml=yes --xml-fd=1 diff --git a/memcheck/tests/simple_leak_xml.vgtest b/memcheck/tests/simple_leak_xml.vgtest index 9652b3276..ad8f41e09 100644 --- a/memcheck/tests/simple_leak_xml.vgtest +++ b/memcheck/tests/simple_leak_xml.vgtest @@ -1,4 +1,4 @@ -prereq: which xmllint > /dev/null +prereq: command -v xmllint > /dev/null prog: simple_leak args: | xmllint --noout - vgopts: --xml=yes --xml-fd=1 diff --git a/memcheck/tests/simple_reachable_xml.vgtest b/memcheck/tests/simple_reachable_xml.vgtest index a64cb2ac5..5dfbe9d1c 100644 --- a/memcheck/tests/simple_reachable_xml.vgtest +++ b/memcheck/tests/simple_reachable_xml.vgtest @@ -1,4 +1,4 @@ -prereq: which xmllint > /dev/null +prereq: command -v xmllint > /dev/null prog: simple_reachable args: | xmllint --noout - vgopts: --xml=yes --xml-fd=1 diff --git a/memcheck/tests/xmas_tree_xml.vgtest b/memcheck/tests/xmas_tree_xml.vgtest index 673eae3a1..1e20e8e2d 100644 --- a/memcheck/tests/xmas_tree_xml.vgtest +++ b/memcheck/tests/xmas_tree_xml.vgtest @@ -1,4 +1,4 @@ -prereq: test -e xmas_tree && which xmllint > /dev/null +prereq: test -e xmas_tree && command -v xmllint > /dev/null prog: xmas_tree args: | xmllint --noout - vgopts: --xml=yes --xml-fd=1 --leak-check=full --suppressions=xmas_tree_xml.supp --leak-check-heuristics=multipleinheritance diff --git a/nightly/bin/nightly b/nightly/bin/nightly index 92931e86f..39cc99a2f 100755 --- a/nightly/bin/nightly +++ b/nightly/bin/nightly @@ -215,7 +215,7 @@ fi uname_stuff="`uname -mrs`" if [ -r /etc/os-release ]; then vendor_stuff="`. /etc/os-release; echo ${NAME} ${VERSION}`" -elif which lsb_release >/dev/null 2>&1; then +elif command -v lsb_release >/dev/null 2>&1; then vendor_stuff="`lsb_release -sicr | xargs echo`" elif [ -e "/etc/issue.net" -a -r "/etc/issue.net" ]; then vendor_stuff="`cat /etc/issue.net | head -1`" From 478f05e6aa0c48adad81aba810ed933581a08d1a Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 14 Feb 2026 22:07:03 +0100 Subject: [PATCH 333/502] FreeBSD resgtest: make sure that /proc is mounted as procfs for open_client test --- none/tests/freebsd/open_client.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/none/tests/freebsd/open_client.cpp b/none/tests/freebsd/open_client.cpp index 59b92a721..c3bebdbf3 100644 --- a/none/tests/freebsd/open_client.cpp +++ b/none/tests/freebsd/open_client.cpp @@ -7,12 +7,22 @@ #include #include #include +#include +#include int main(int argc, char** argv) { std::vector flags{O_WRONLY|O_CREAT|O_TRUNC, O_WRONLY, O_RDWR}; std::string ppf = std::string("/proc/") + std::to_string(getpid()) + "/file"; - std::vector paths{argv[0], ppf, "/proc/curproc/file"}; + std::vector paths{argv[0]}; + struct statfs sfs; + + if (statfs("/proc", &sfs) == 0) { + if (std::string(sfs.f_fstypename) == "procfs") { + paths.emplace_back(ppf); + paths.emplace_back("/proc/curproc/file"); + } + } for (const auto& p : paths) { From f31d2dbe3fffad8501fd1ae44d3224535b29ad2d Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sat, 11 Jan 2025 17:39:44 +0100 Subject: [PATCH 334/502] Bug 233298 - Reflect MEMPOOL_FREE in heap summary There was one missing free increment for autoref pools. Also added testcases based on memcheck mempool2 and leak-autorefpool. Original patch contributed by 8dcc <8dcc.git@gmail.com> This is an update on a patch from 2010: https://bugsfiles.kde.org/attachment.cgi?id=42491 --- NEWS | 1 + memcheck/mc_malloc_wrappers.c | 7 ++- memcheck/tests/freebsd/Makefile.am | 6 ++- memcheck/tests/freebsd/bug233298.stderr.exp | 1 + memcheck/tests/freebsd/bug233298.vgtest | 3 ++ memcheck/tests/freebsd/filter_heap_usage | 9 ++++ .../freebsd/leak-autofreepool-7.stderr.exp | 1 + .../tests/freebsd/leak-autofreepool-7.vgtest | 4 ++ memcheck/tests/leak-autofreepool.c | 20 +++++++- memcheck/tests/mempool2.c | 2 + memcheck/tests/mempool2.stderr.exp | 48 +++++++++---------- 11 files changed, 74 insertions(+), 28 deletions(-) create mode 100644 memcheck/tests/freebsd/bug233298.stderr.exp create mode 100644 memcheck/tests/freebsd/bug233298.vgtest create mode 100755 memcheck/tests/freebsd/filter_heap_usage create mode 100644 memcheck/tests/freebsd/leak-autofreepool-7.stderr.exp create mode 100644 memcheck/tests/freebsd/leak-autofreepool-7.vgtest diff --git a/NEWS b/NEWS index 24a34af19..de11c3c0f 100644 --- a/NEWS +++ b/NEWS @@ -51,6 +51,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 126256 (fnop) vex x86->IR: unhandled instruction bytes: 0xD9 0xD0 0x31 0xC0 228343 none/tests/darwin/bug228343 fails on OS X +233298 MEMPOOL_FREE not reflected in heap summary 253436 vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps) 258140 Valgrind on OS X always reports some memory "still reachable" 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) diff --git a/memcheck/mc_malloc_wrappers.c b/memcheck/mc_malloc_wrappers.c index ae50923c4..737837dbb 100644 --- a/memcheck/mc_malloc_wrappers.c +++ b/memcheck/mc_malloc_wrappers.c @@ -782,6 +782,7 @@ static void free_mallocs_in_mempool_block (MC_Mempool* mp, VG_(HT_remove_at_Iter)(MC_(malloc_list)); die_and_free_mem(tid, mc, mp->rzB); + cmalloc_n_frees++; } } } @@ -1014,6 +1015,7 @@ void MC_(mempool_free)(Addr pool, Addr addr) die_and_free_mem ( tid, mc, mp->rzB ); if (MP_DETAILED_SANITY_CHECKS) check_mempool_sane(mp); + cmalloc_n_frees++; } @@ -1073,10 +1075,11 @@ void MC_(mempool_trim)(Addr pool, Addr addr, SizeT szB) MC_(record_free_error)(tid, (Addr)mc->data); VG_(free)(chunks); if (MP_DETAILED_SANITY_CHECKS) check_mempool_sane(mp); + cmalloc_n_frees++; return; } die_and_free_mem ( tid, mc, mp->rzB ); - + cmalloc_n_frees++; } else { /* The current chunk intersects the trim extent: remove, @@ -1088,6 +1091,7 @@ void MC_(mempool_trim)(Addr pool, Addr addr, SizeT szB) MC_(record_free_error)(tid, (Addr)mc->data); VG_(free)(chunks); if (MP_DETAILED_SANITY_CHECKS) check_mempool_sane(mp); + cmalloc_n_frees++; return; } @@ -1122,6 +1126,7 @@ void MC_(mempool_trim)(Addr pool, Addr addr, SizeT szB) mc->data = lo; mc->szB = (UInt) (hi - lo); VG_(HT_add_node)( mp->chunks, mc ); + cmalloc_n_frees++; } #undef EXTENT_CONTAINS diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index 96c57e21e..9b67fb299 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -4,7 +4,7 @@ include $(top_srcdir)/Makefile.tool-tests.am dist_noinst_SCRIPTS = filter_stderr filter_pts dump_stdout filter_sigwait \ filter_scalar filter_realpathat filter_fstat filter_eventfd2 \ toucher1 toucher2 filter_getfsstat filter_context filter_frame \ - filter_supp filter_kenv + filter_supp filter_kenv filter_heap_usage EXTRA_DIST = \ access.vgtest \ @@ -18,6 +18,8 @@ EXTRA_DIST = \ aligned_allocs_supp.vgtest \ aligned_allocs_supp.stderr.exp \ aligned_allocs_supp.supp \ + bug233298.vgtest \ + bug233298.stderr.exp \ bug464476.vgtest \ bug464476.stdout.exp \ bug464476_abs_symlink.vgtest \ @@ -73,6 +75,8 @@ EXTRA_DIST = \ kqueue.stdout.exp \ kqueuex.vgtest \ kqueuex.stdout.exp \ + leak-autofreepool-7.vgtest \ + leak-autofreepool-7.stderr.exp \ linkat.vgtest \ linkat.stderr.exp \ memalign.vgtest memalign.stderr.exp \ diff --git a/memcheck/tests/freebsd/bug233298.stderr.exp b/memcheck/tests/freebsd/bug233298.stderr.exp new file mode 100644 index 000000000..8b6098f15 --- /dev/null +++ b/memcheck/tests/freebsd/bug233298.stderr.exp @@ -0,0 +1 @@ + total heap usage: 6 allocs, 6 frees, XXX bytes allocated diff --git a/memcheck/tests/freebsd/bug233298.vgtest b/memcheck/tests/freebsd/bug233298.vgtest new file mode 100644 index 000000000..8de1581f2 --- /dev/null +++ b/memcheck/tests/freebsd/bug233298.vgtest @@ -0,0 +1,3 @@ +prog: ../mempool2 +vgopts: --leak-check=yes +stderr_filter: filter_heap_usage diff --git a/memcheck/tests/freebsd/filter_heap_usage b/memcheck/tests/freebsd/filter_heap_usage new file mode 100755 index 000000000..6a624e564 --- /dev/null +++ b/memcheck/tests/freebsd/filter_heap_usage @@ -0,0 +1,9 @@ +#! /bin/sh + +../filter_stderr "$@" | +grep "total heap usage:" | +gsed 's/ [^ ]* bytes allocated/ XXX bytes allocated/' + + + + diff --git a/memcheck/tests/freebsd/leak-autofreepool-7.stderr.exp b/memcheck/tests/freebsd/leak-autofreepool-7.stderr.exp new file mode 100644 index 000000000..7c0815330 --- /dev/null +++ b/memcheck/tests/freebsd/leak-autofreepool-7.stderr.exp @@ -0,0 +1 @@ + total heap usage: 31 allocs, 31 frees, XXX bytes allocated diff --git a/memcheck/tests/freebsd/leak-autofreepool-7.vgtest b/memcheck/tests/freebsd/leak-autofreepool-7.vgtest new file mode 100644 index 000000000..be624dccd --- /dev/null +++ b/memcheck/tests/freebsd/leak-autofreepool-7.vgtest @@ -0,0 +1,4 @@ +prog: ../leak-autofreepool +vgopts: --leak-check=full +args: 7 +stderr_filter: filter_heap_usage diff --git a/memcheck/tests/leak-autofreepool.c b/memcheck/tests/leak-autofreepool.c index 3bd6e50dc..057a6573b 100644 --- a/memcheck/tests/leak-autofreepool.c +++ b/memcheck/tests/leak-autofreepool.c @@ -53,6 +53,7 @@ static int MetaPoolFlags = 0; static int CleanupBeforeExit = 0; static int GenerateNoise = 0; static int NoiseCounter = 0; +static int CleanupMoreBeforeExit = 0; static struct cell *cells_plain[2 * N]; static struct cell *cells_meta[2 * N]; @@ -192,6 +193,14 @@ static void set_flags ( int n ) GenerateNoise = 1; break; + // Same as case 2, but enable freeing blocks from PlainPool so that + // we can check that malloc count == free count + case 7: + MetaPoolFlags = VALGRIND_MEMPOOL_METAPOOL | VALGRIND_MEMPOOL_AUTO_FREE; + CleanupBeforeExit = 1; + CleanupMoreBeforeExit = 1; + break; + default: assert(0); } @@ -255,8 +264,10 @@ int main( int argc, char** argv ) } // Leak the memory from the pools by losing the pointers. - for (i = 0; i < N; ++i) { - cells_plain[i] = NULL; + if (!CleanupMoreBeforeExit) { + for (i = 0; i < N; ++i) { + cells_plain[i] = NULL; + } } for (i = 0; i < 2 * N; ++i) { @@ -284,6 +295,11 @@ int main( int argc, char** argv ) } // Cleanup. + if (CleanupMoreBeforeExit) { + for (i = 0; i < N; ++i) { + VALGRIND_MEMPOOL_FREE(PlainPool, cells_plain[i]); + } + } VALGRIND_DESTROY_MEMPOOL(PlainPool); if (GenerateNoise) diff --git a/memcheck/tests/mempool2.c b/memcheck/tests/mempool2.c index 4c8683c22..7408d122a 100644 --- a/memcheck/tests/mempool2.c +++ b/memcheck/tests/mempool2.c @@ -182,6 +182,8 @@ void test(void) res += superblock[29]; // invalid res += superblock[40]; // invalid + VALGRIND_MEMPOOL_FREE(superblock, superblock+30); + VALGRIND_DESTROY_MEMPOOL(superblock); } // claim res is used, so gcc can't nuke this all diff --git a/memcheck/tests/mempool2.stderr.exp b/memcheck/tests/mempool2.stderr.exp index 8dda2cecb..6c6cc7233 100644 --- a/memcheck/tests/mempool2.stderr.exp +++ b/memcheck/tests/mempool2.stderr.exp @@ -3,119 +3,119 @@ Invalid read of size 1 at 0x........: test (mempool2.c:135) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 1 bytes before a block of size 10 client-defined at 0x........: allocate (mempool2.c:108) by 0x........: test (mempool2.c:130) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Invalid read of size 1 at 0x........: test (mempool2.c:136) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 0 bytes after a block of size 10 client-defined at 0x........: allocate (mempool2.c:108) by 0x........: test (mempool2.c:130) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ out of range reads in mmap-backed pool ------ Invalid read of size 1 at 0x........: test (mempool2.c:140) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 1 bytes before a block of size 20 client-defined at 0x........: allocate (mempool2.c:108) by 0x........: test (mempool2.c:131) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Invalid read of size 1 at 0x........: test (mempool2.c:141) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 0 bytes after a block of size 20 client-defined at 0x........: allocate (mempool2.c:108) by 0x........: test (mempool2.c:131) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ Illegal memory pool address ------ Illegal memory pool address at 0x........: test (mempool2.c:145) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 0 bytes inside a block of size 32 alloc'd at 0x........: malloc (vg_replace_malloc.c:...) by 0x........: make_pool (mempool2.c:46) by 0x........: test (mempool2.c:122) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ read free in malloc-backed pool ------ Invalid read of size 1 at 0x........: test (mempool2.c:150) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 13 bytes inside a recently re-allocated block of size 100,000 alloc'd at 0x........: malloc (vg_replace_malloc.c:...) by 0x........: make_pool (mempool2.c:47) by 0x........: test (mempool2.c:122) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ read free in mmap-backed pool ------ Invalid read of size 1 at 0x........: test (mempool2.c:155) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 11 bytes inside a block of size 20 free'd at 0x........: test (mempool2.c:154) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Block was alloc'd at at 0x........: allocate (mempool2.c:108) by 0x........: test (mempool2.c:131) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ double free in malloc-backed pool ------ Invalid free() / delete / delete[] / realloc() at 0x........: test (mempool2.c:159) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 8 bytes inside a recently re-allocated block of size 100,000 alloc'd at 0x........: malloc (vg_replace_malloc.c:...) by 0x........: make_pool (mempool2.c:47) by 0x........: test (mempool2.c:122) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ double free in mmap-backed pool ------ Invalid free() / delete / delete[] / realloc() at 0x........: test (mempool2.c:163) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 0 bytes inside a block of size 20 free'd at 0x........: test (mempool2.c:154) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Block was alloc'd at at 0x........: allocate (mempool2.c:108) by 0x........: test (mempool2.c:131) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ 2 invalid access in 'no no-access superblock' --- Invalid read of size 1 at 0x........: test (mempool2.c:182) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 1 bytes before a block of size 10 client-defined at 0x........: test (mempool2.c:175) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Invalid read of size 1 at 0x........: test (mempool2.c:183) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) Address 0x........ is 0 bytes after a block of size 10 client-defined at 0x........: test (mempool2.c:175) - by 0x........: main (mempool2.c:200) + by 0x........: main (mempool2.c:202) ------ done ------ From f4fd8b5a1b6a6327ba860d019df5a9d94ee4d092 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 6 Feb 2026 08:47:12 +0100 Subject: [PATCH 335/502] Bug 514343 - Add a valgrind.h macro VALGRIND_REPLACES_MALLOC Also a macro VALGRIND_GET_TOOLNAME --- .gitignore | 1 + NEWS | 1 + cachegrind/tests/Makefile.am | 1 + .../replaces_malloc_client_req.stdout.exp | 4 +++ .../tests/replaces_malloc_client_req.vgtest | 2 ++ coregrind/m_scheduler/scheduler.c | 22 ++++++++++++ include/valgrind.h.in | 30 ++++++++++++++-- memcheck/tests/Makefile.am | 2 ++ memcheck/tests/replaces_malloc_client_req.c | 36 +++++++++++++++++++ .../replaces_malloc_client_req.stdout.exp | 4 +++ .../tests/replaces_malloc_client_req.vgtest | 2 ++ none/tests/Makefile.am | 1 + .../replaces_malloc_client_req.stdout.exp | 4 +++ none/tests/replaces_malloc_client_req.vgtest | 2 ++ 14 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 cachegrind/tests/replaces_malloc_client_req.stdout.exp create mode 100644 cachegrind/tests/replaces_malloc_client_req.vgtest create mode 100644 memcheck/tests/replaces_malloc_client_req.c create mode 100644 memcheck/tests/replaces_malloc_client_req.stdout.exp create mode 100644 memcheck/tests/replaces_malloc_client_req.vgtest create mode 100644 none/tests/replaces_malloc_client_req.stdout.exp create mode 100644 none/tests/replaces_malloc_client_req.vgtest diff --git a/.gitignore b/.gitignore index 50e62ed6b..bd34c0ce3 100644 --- a/.gitignore +++ b/.gitignore @@ -999,6 +999,7 @@ /memcheck/tests/realloc1 /memcheck/tests/realloc2 /memcheck/tests/realloc3 +/memcheck/tests/replaces_malloc_client_req /memcheck/tests/recursive-merge /memcheck/tests/resvn_stack /memcheck/tests/sbfragment diff --git a/NEWS b/NEWS index de11c3c0f..e0dcfce77 100644 --- a/NEWS +++ b/NEWS @@ -79,6 +79,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 514094 readlink("/proc/self/exe") overwrites buffer beyond its return value 514206 Assertion '!sr_isError(sr)' failed - mmap fd points to an open descriptor to a PCI device +514343 Add a valgrind.h macro VALGRIND_REPLACES_MALLOC 514596 Add SSE4.1 BLENDPD instruction for x86 32 bit 514613 Unclosed leak_summary/still_reachable tag in xml output 514659 ltp 20250930 vs linux 6.18.3 doesn't build diff --git a/cachegrind/tests/Makefile.am b/cachegrind/tests/Makefile.am index 0ea0be07e..443a346ba 100644 --- a/cachegrind/tests/Makefile.am +++ b/cachegrind/tests/Makefile.am @@ -42,6 +42,7 @@ EXTRA_DIST = \ clreq3.vgtest clreq3.stderr.exp \ dlclose.vgtest dlclose.stderr.exp dlclose.stdout.exp \ notpower2.vgtest notpower2.stderr.exp \ + replaces_malloc_client_req.vgtest replaces_malloc_client_req.stdout.exp \ test.c a.c \ wrap5.vgtest wrap5.stderr.exp wrap5.stdout.exp diff --git a/cachegrind/tests/replaces_malloc_client_req.stdout.exp b/cachegrind/tests/replaces_malloc_client_req.stdout.exp new file mode 100644 index 000000000..cc0cd1170 --- /dev/null +++ b/cachegrind/tests/replaces_malloc_client_req.stdout.exp @@ -0,0 +1,4 @@ +Tool replaces malloc? 0 +The name of the tool is cachegrind actual length 11 +Queried tool len 11 +The name of the tool [truncated] is cach actual length 11 diff --git a/cachegrind/tests/replaces_malloc_client_req.vgtest b/cachegrind/tests/replaces_malloc_client_req.vgtest new file mode 100644 index 000000000..5f7299dd2 --- /dev/null +++ b/cachegrind/tests/replaces_malloc_client_req.vgtest @@ -0,0 +1,2 @@ +prog: ../../memcheck/tests/replaces_malloc_client_req +vgopts: -q diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c index 59c8f8287..88f0c5847 100644 --- a/coregrind/m_scheduler/scheduler.c +++ b/coregrind/m_scheduler/scheduler.c @@ -2041,6 +2041,28 @@ void do_client_request ( ThreadId tid ) SET_CLREQ_RETVAL(tid, RUNNING_ON_VALGRIND+1); break; + case VG_USERREQ__VALGRIND_REPLACES_MALLOC: + SET_CLREQ_RETVAL(tid, VG_(needs).malloc_replacement); + break; + + case VG_USERREQ__VALGRIND_GET_TOOLNAME: { + HChar* buf = (HChar *)arg[1]; + SizeT len_needed = VG_(strlen)(VG_(clo_toolname)) + 1; + SizeT buflen = (SizeT)arg[2]; + if (buflen > 0) { + if (buf != NULL) { + VG_(strncpy)(buf, VG_(clo_toolname), buflen); + if (len_needed > buflen) { + buf[buflen-1] = '\0'; + } + VG_TRACK( post_mem_write, Vg_CoreClientReq, tid, + (Addr)buf, VG_MIN(len_needed, buflen)); + } + } + SET_CLREQ_RETVAL(tid, len_needed); + break; + } + case VG_USERREQ__PRINTF: { const HChar* format = (HChar *)arg[1]; /* JRS 2010-Jan-28: this is DEPRECATED; use the diff --git a/include/valgrind.h.in b/include/valgrind.h.in index c49be6b3c..ed7d8c68e 100644 --- a/include/valgrind.h.in +++ b/include/valgrind.h.in @@ -7169,8 +7169,10 @@ typedef ENTRIES, NOR DELETE ANY -- add new ones at the end of the most relevant group. */ typedef - enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001, - VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002, + enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001, + VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002, + VG_USERREQ__VALGRIND_REPLACES_MALLOC = 0x1003, + VG_USERREQ__VALGRIND_GET_TOOLNAME = 0x1004, /* These allow any function to be called from the simulated CPU but run on the real CPU. Nb: the first arg passed to @@ -7273,6 +7275,30 @@ typedef VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS, \ _qzz_addr, _qzz_len, 0, 0, 0) +/* Returns 1 if the tool replaces malloc (e.g., memcheck). Returns 0 + if the tool does not replace malloc (e.g., cachegrind and callgrind) + or if the executable is not running under VALGRIND. */ +#define VALGRIND_REPLACES_MALLOC \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* if not */, \ + VG_USERREQ__VALGRIND_REPLACES_MALLOC, \ + 0, 0, 0, 0, 0) + +/* Get the running tool name as a string. + Returns the required length (including terminating nul) for the input + zzbuf. Returns 0 and the contents of zzbuf are not modified + if not running under Valgrind. + zzbuf may be NULL, which can be used to query the required buffer + length before making a real request for the tool name. + zzbuflen should be the length of zzbuf. + The returned string in zzbuf will be nul terminated. If zzbuf is too + small to contain the tool name then the name will be truncated */ +#define VALGRIND_GET_TOOLNAME(zzbuf,zzbuflen) \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \ + VG_USERREQ__VALGRIND_GET_TOOLNAME, \ + (char*)(zzbuf), \ + (zzbuflen), \ + 0, 0, 0) + #define VALGRIND_INNER_THREADS(_qzz_addr) \ VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__INNER_THREADS, \ _qzz_addr, 0, 0, 0, 0) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 30a245776..a4844a056 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -389,6 +389,7 @@ EXTRA_DIST = \ realloc2.vgtest \ realloc3.stderr.exp realloc3.vgtest \ recursive-merge.stderr.exp recursive-merge.vgtest \ + replaces_malloc_client_req.stdout.exp replaces_malloc_client_req.vgtest \ resvn_stack.stderr.exp resvn_stack.vgtest \ demangle-rust.vgtest demangle-rust.stderr.exp \ sbfragment.stdout.exp sbfragment.stderr.exp sbfragment.vgtest \ @@ -554,6 +555,7 @@ check_PROGRAMS = \ realloc_size_zero_again \ realloc1 realloc2 realloc3 \ recursive-merge \ + replaces_malloc_client_req \ resvn_stack \ sbfragment \ sendmsg \ diff --git a/memcheck/tests/replaces_malloc_client_req.c b/memcheck/tests/replaces_malloc_client_req.c new file mode 100644 index 000000000..4fb6117f1 --- /dev/null +++ b/memcheck/tests/replaces_malloc_client_req.c @@ -0,0 +1,36 @@ +#include "../memcheck.h" +#include + +int main(void) +{ + printf("Tool replaces malloc? %d\n", VALGRIND_REPLACES_MALLOC); + const size_t buflen = 100; + char buf[buflen]; + size_t actual_len = VALGRIND_GET_TOOLNAME(buf, buflen); + + if (actual_len) + printf("The name of the tool is %s actual length %zu\n", buf, actual_len); + else + printf("Not running under valgrind\n"); + + size_t query_len = VALGRIND_GET_TOOLNAME(NULL, 42); + + printf("Queried tool len %zu\n", query_len); + + const size_t small_buflen = 5; + char small_buf[small_buflen]; + actual_len = VALGRIND_GET_TOOLNAME(small_buf, small_buflen); + if (actual_len) { + if (actual_len > small_buflen) { + printf("The name of the tool [truncated] is %s actual length %zu\n", small_buf, actual_len); + } else { + printf("The name of the tool [not truncated] is %s actual length %zu\n", small_buf, actual_len); + } + } + else + printf("Still not running under valgrind\n"); + + // "bad" cases + actual_len = VALGRIND_GET_TOOLNAME(buf, 0); + actual_len = VALGRIND_GET_TOOLNAME(NULL, buflen); +} diff --git a/memcheck/tests/replaces_malloc_client_req.stdout.exp b/memcheck/tests/replaces_malloc_client_req.stdout.exp new file mode 100644 index 000000000..98635875c --- /dev/null +++ b/memcheck/tests/replaces_malloc_client_req.stdout.exp @@ -0,0 +1,4 @@ +Tool replaces malloc? 1 +The name of the tool is memcheck actual length 9 +Queried tool len 9 +The name of the tool [truncated] is memc actual length 9 diff --git a/memcheck/tests/replaces_malloc_client_req.vgtest b/memcheck/tests/replaces_malloc_client_req.vgtest new file mode 100644 index 000000000..a0d8fc86c --- /dev/null +++ b/memcheck/tests/replaces_malloc_client_req.vgtest @@ -0,0 +1,2 @@ +prog: replaces_malloc_client_req +vgopts: -q diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index cd41a5e6c..59af8ba1f 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -219,6 +219,7 @@ EXTRA_DIST = \ rcrl.stderr.exp rcrl.stdout.exp rcrl.vgtest \ readline1.stderr.exp readline1.stdout.exp \ readline1.vgtest \ + replaces_malloc_client_req.stdout.exp replaces_malloc_client_req.vgtest \ require-text-symbol-1.vgtest \ require-text-symbol-2.vgtest \ require-text-symbol-2.stderr.exp-libcso1 \ diff --git a/none/tests/replaces_malloc_client_req.stdout.exp b/none/tests/replaces_malloc_client_req.stdout.exp new file mode 100644 index 000000000..eee169e01 --- /dev/null +++ b/none/tests/replaces_malloc_client_req.stdout.exp @@ -0,0 +1,4 @@ +Tool replaces malloc? 0 +The name of the tool is none actual length 5 +Queried tool len 5 +The name of the tool [not truncated] is none actual length 5 diff --git a/none/tests/replaces_malloc_client_req.vgtest b/none/tests/replaces_malloc_client_req.vgtest new file mode 100644 index 000000000..5f7299dd2 --- /dev/null +++ b/none/tests/replaces_malloc_client_req.vgtest @@ -0,0 +1,2 @@ +prog: ../../memcheck/tests/replaces_malloc_client_req +vgopts: -q From bc26530dcf7d961caec3bf6c4969c21ea55144f9 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Mon, 16 Feb 2026 19:49:02 +0100 Subject: [PATCH 336/502] Bug 516090 - Regression : Linux FreeBSD and Darwin: refactor *at syscall dirfd check --- NEWS | 1 + coregrind/m_syswrap/syswrap-arm-linux.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e0dcfce77..0fee784c3 100644 --- a/NEWS +++ b/NEWS @@ -92,6 +92,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 515731 Distinguish between realloc functions in realloc size 0 error messages 515810 Update the LTP version in valgrind testsuite to 20260130 515992 Add FreeBSD /proc virtualisation for cmdline and file +516090 Regression : Linux FreeBSD and Darwin: refactor *at syscall dirfd checks To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index 73e5ef1a7..1bc2bdf29 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -285,7 +285,6 @@ PRE(sys_fstatat64) PRE_REG_READ3(long, "fstatat64", int, dfd, char *, file_name, struct stat64 *, buf); ML_(fd_at_check_allowed)(SARG1, (const HChar*)ARG2, "fstatat64", tid, status); - SET_STATUS_Failure( VKI_EBADF ); PRE_MEM_RASCIIZ( "fstatat64(file_name)", ARG2 ); PRE_MEM_WRITE( "fstatat64(buf)", ARG3, sizeof(struct vki_stat64) ); } From 19661d8c662e63d3e5ebffb27ae70246cd7c0520 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Tue, 17 Feb 2026 19:32:53 +0000 Subject: [PATCH 337/502] s390: Use Iop_PopCount64 and emit "popcnt" insn when possible This requires the miscellaneous-instruction-extensions facility 3. Detect it in m_machine.c, test for it in s390x_features.c. Add VEX_HWCAPS_S390X_MI3, s390_host_has_mi3 and S390_INSN_POPCNT. New functions s390_insn_popcnt and s390_insn_popcnt_emit and s390_emit_POPCNT. New testcase popcnt-mi3.c carved out of misc3.c --- .gitignore | 1 + VEX/priv/guest_s390_toIR.c | 9 +++ VEX/priv/host_s390_defs.c | 85 ++++++++++++++++++++++++++ VEX/priv/host_s390_defs.h | 8 +++ VEX/priv/host_s390_isel.c | 5 ++ VEX/pub/libvex.h | 4 +- coregrind/m_machine.c | 1 + none/tests/s390x/Makefile.am | 2 +- none/tests/s390x/misc3.c | 29 --------- none/tests/s390x/misc3.stdout.exp | 6 -- none/tests/s390x/popcnt-mi3.c | 28 +++++++++ none/tests/s390x/popcnt-mi3.stderr.exp | 2 + none/tests/s390x/popcnt-mi3.stdout.exp | 5 ++ none/tests/s390x/popcnt-mi3.vgtest | 2 + tests/s390x_features.c | 2 + 15 files changed, 152 insertions(+), 37 deletions(-) create mode 100644 none/tests/s390x/popcnt-mi3.c create mode 100644 none/tests/s390x/popcnt-mi3.stderr.exp create mode 100644 none/tests/s390x/popcnt-mi3.stdout.exp create mode 100644 none/tests/s390x/popcnt-mi3.vgtest diff --git a/.gitignore b/.gitignore index bd34c0ce3..e1990dfbd 100644 --- a/.gitignore +++ b/.gitignore @@ -2240,6 +2240,7 @@ /none/tests/s390x/pfpo /none/tests/s390x/rxsbg /none/tests/s390x/popcnt +/none/tests/s390x/popcnt-mi3 /none/tests/s390x/vector /none/tests/s390x/lsc2 /none/tests/s390x/ppno diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 6964627e1..1ef49016a 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -13094,6 +13094,15 @@ s390_irgen_FLOGR(UChar r1, UChar r2) static void s390_irgen_POPCNT(UChar m3, UChar r1, UChar r2) { + if (s390_host_has_mi3 && m3 == 8) { + IRTemp val = newTemp(Ity_I64); + + assign(val, unop(Iop_PopCount64, get_gpr_dw0(r2))); + s390_cc_thunk_putZ(S390_CC_OP_BITWISE, val); + put_gpr_dw0(r1, mkexpr(val)); + return; + } + static const ULong masks[] = { 0x5555555555555555, 0x3333333333333333, 0x0F0F0F0F0F0F0F0F, 0x00FF00FF00FF00FF, 0x0000FFFF0000FFFF, 0x00000000FFFFFFFF, diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 71cb6c897..b4e8470a0 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -806,6 +806,11 @@ s390_insn_get_reg_usage(HRegUsage *u, const s390_insn *insn) s390_opnd_RMI_get_reg_usage(u, insn->variant.clz.src); break; + case S390_INSN_POPCNT: + addHRegUse(u, HRmWrite, insn->variant.popcnt.dst); + s390_opnd_RMI_get_reg_usage(u, insn->variant.popcnt.src); + break; + case S390_INSN_UNOP: addHRegUse(u, HRmWrite, insn->variant.unop.dst); s390_opnd_RMI_get_reg_usage(u, insn->variant.unop.src); @@ -1162,6 +1167,11 @@ s390_insn_map_regs(HRegRemap *m, s390_insn *insn) s390_opnd_RMI_map_regs(m, &insn->variant.clz.src); break; + case S390_INSN_POPCNT: + insn->variant.popcnt.dst = lookupHRegRemap(m, insn->variant.popcnt.dst); + s390_opnd_RMI_map_regs(m, &insn->variant.popcnt.src); + break; + case S390_INSN_UNOP: insn->variant.unop.dst = lookupHRegRemap(m, insn->variant.unop.dst); s390_opnd_RMI_map_regs(m, &insn->variant.unop.src); @@ -2470,6 +2480,13 @@ s390_emit_FLOGR(UChar *p, UChar r1, UChar r2) } +static UChar * +s390_emit_POPCNT(UChar *p, UChar r1, UChar r2) +{ + return emit_RRF3(p, 0xb9e10000, 8, r1, r2); +} + + static UChar * s390_emit_IC(UChar *p, UChar r1, UChar x2, UChar b2, UShort d2) { @@ -4852,6 +4869,22 @@ s390_insn_clz(UChar size, HReg num_bits, HReg clobber, s390_opnd_RMI src) } +s390_insn * +s390_insn_popcnt(UChar size, HReg dst, s390_opnd_RMI src) +{ + s390_insn *insn = LibVEX_Alloc_inline(sizeof(s390_insn)); + + vassert(size == 8); + + insn->tag = S390_INSN_POPCNT; + insn->size = size; + insn->variant.popcnt.dst = dst; + insn->variant.popcnt.src = src; + + return insn; +} + + s390_insn * s390_insn_unop(UChar size, s390_unop_t tag, HReg dst, s390_opnd_RMI opnd) { @@ -6085,6 +6118,11 @@ s390_insn_as_string(const s390_insn *insn) &insn->variant.clz.src); break; + case S390_INSN_POPCNT: + s390_sprintf(buf, "%M %R,%O", "v-popcnt", insn->variant.popcnt.dst, + &insn->variant.popcnt.src); + break; + case S390_INSN_UNOP: switch (insn->variant.unop.tag) { case S390_ZERO_EXTEND_8: @@ -8428,6 +8466,49 @@ s390_insn_clz_emit(UChar *buf, const s390_insn *insn) } +static UChar * +s390_insn_popcnt_emit(UChar *buf, const s390_insn *insn) +{ + s390_opnd_RMI src; + UChar r1, r2, *p; + + p = buf; + r1 = hregNumber(insn->variant.popcnt.dst); + src = insn->variant.clz.src; + + /* Get operand and move it to r2 */ + switch (src.tag) { + case S390_OPND_REG: + r2 = hregNumber(src.variant.reg); + break; + + case S390_OPND_AMODE: { + const s390_amode *am = src.variant.am; + UChar b = hregNumber(am->b); + UChar x = hregNumber(am->x); + Int d = am->d; + + p = s390_emit_LG(p, R0, x, b, DISP20(d)); + r2 = R0; + break; + } + + case S390_OPND_IMMEDIATE: { + ULong value = src.variant.imm; + + p = s390_emit_load_64imm(p, R0, value); + r2 = R0; + break; + } + + default: + vpanic("s390_insn_popcnt_emit"); + } + + return s390_emit_POPCNT(p, r1, r2); +} + + /* Returns a value == BUF to denote failure, != BUF to denote success. */ static UChar * s390_insn_helper_call_emit(UChar *buf, const s390_insn *insn) @@ -9872,6 +9953,10 @@ emit_S390Instr(Bool *is_profinc, UChar *buf, Int nbuf, const s390_insn *insn, end = s390_insn_clz_emit(buf, insn); break; + case S390_INSN_POPCNT: + end = s390_insn_popcnt_emit(buf, insn); + break; + case S390_INSN_UNOP: end = s390_insn_unop_emit(buf, insn); break; diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index a743abb50..3ea4f93cc 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -129,6 +129,7 @@ typedef enum { S390_INSN_UDIV, /* unsigned division; 2n-bit / n-bit -> n-bit quot/rem */ S390_INSN_DIVS, /* n-bit dividend; n-bit divisor; n-bit quot/rem */ S390_INSN_CLZ, /* count left-most zeroes */ + S390_INSN_POPCNT, /* count bits whose value is 1 */ S390_INSN_UNOP, S390_INSN_TEST, /* test operand and set cc */ S390_INSN_CC2BOOL,/* convert condition code to 0/1 */ @@ -526,6 +527,10 @@ typedef struct { HReg clobber; /* unspecified r11 */ s390_opnd_RMI src; } clz; + struct { + HReg dst; /* number of '1' bits */ + s390_opnd_RMI src; + } popcnt; struct { s390_unop_t tag; HReg dst; @@ -772,6 +777,7 @@ s390_insn *s390_insn_div(UChar size, HReg op1_hi, HReg op1_lo, s390_insn *s390_insn_divs(UChar size, HReg rem, HReg op1, s390_opnd_RMI op2); s390_insn *s390_insn_clz(UChar size, HReg num_bits, HReg clobber, s390_opnd_RMI op); +s390_insn *s390_insn_popcnt(UChar size, HReg dst, s390_opnd_RMI op); s390_insn *s390_insn_cas(UChar size, HReg op1, s390_amode *op2, HReg op3, HReg old); s390_insn *s390_insn_cdas(UChar size, HReg op1_high, HReg op1_low, @@ -940,6 +946,8 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA8)) #define s390_host_has_msa9 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA9)) +#define s390_host_has_mi3 \ + (s390_host_hwcaps & (VEX_HWCAPS_S390X_MI3)) #endif /* ndef __VEX_HOST_S390_DEFS_H */ /*---------------------------------------------------------------*/ diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c index d128f6eeb..d0a28d90c 100644 --- a/VEX/priv/host_s390_isel.c +++ b/VEX/priv/host_s390_isel.c @@ -1984,6 +1984,11 @@ s390_isel_int_expr_wrk(ISelEnv *env, IRExpr *expr) return dst; } + case Iop_PopCount64: { + addInstr(env, s390_insn_popcnt(8, dst, opnd)); + return dst; + } + default: goto irreducible; } diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 8aeb230eb..9404082b7 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -173,6 +173,7 @@ typedef #define VEX_HWCAPS_S390X_VXD (1 << 14) /* Vector packed-decimal facility */ #define VEX_HWCAPS_S390X_MSA8 (1 << 15) /* Message-security-assist extension 8 */ #define VEX_HWCAPS_S390X_MSA9 (1 << 16) /* Message-security-assist extension 9 */ +#define VEX_HWCAPS_S390X_MI3 (1 << 17) /* Miscellaneous-instruction-extensions facility 3 */ /* Special value representing all available s390x hwcaps */ #define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_VX | \ @@ -185,7 +186,8 @@ typedef VEX_HWCAPS_S390X_VXE2 | \ VEX_HWCAPS_S390X_VXD | \ VEX_HWCAPS_S390X_MSA8 | \ - VEX_HWCAPS_S390X_MSA9) + VEX_HWCAPS_S390X_MSA9 | \ + VEX_HWCAPS_S390X_MI3) #define VEX_HWCAPS_S390X(x) ((x) & ~VEX_S390X_MODEL_MASK) #define VEX_S390X_MODEL(x) ((x) & VEX_S390X_MODEL_MASK) diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 8ff70aa6a..5458be6ca 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1585,6 +1585,7 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 134, VEX_HWCAPS_S390X_VXD, "VXD" }, { False, 146, VEX_HWCAPS_S390X_MSA8, "MSA8" }, { False, 155, VEX_HWCAPS_S390X_MSA9, "MSA9" }, + { False, 61, VEX_HWCAPS_S390X_MI3, "MI3" }, }; /* Set hwcaps according to the detected facilities */ diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index 1f830d6f3..20f4df082 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -11,7 +11,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr lam_stam xc mvst add sub mul \ ex_sig ex_clone cu14 cu14_1 cu41 ecag \ bfp-fpc bfp-306054 \ bfp-muldiv comp-1 comp-2 exrl tmll tm stmg \ - ex clst mvc test_fork test_sig rxsbg popcnt \ + ex clst mvc test_fork test_sig rxsbg popcnt popcnt-mi3 \ high-word traps \ spechelper-alr spechelper-algr \ spechelper-slr spechelper-slgr \ diff --git a/none/tests/s390x/misc3.c b/none/tests/s390x/misc3.c index c5df05ea5..a878e8027 100644 --- a/none/tests/s390x/misc3.c +++ b/none/tests/s390x/misc3.c @@ -62,34 +62,6 @@ static void test_all_logical_insns() #undef TEST_EXEC -/* -- Full population count -- */ - -static void test_popcnt(unsigned long op2) -{ - unsigned long result; - int cc; - - __asm__(".insn rrf,0xb9e10000,%[result],%[op2],8,0\n\t" - "ipm %[cc]\n\t" - "srl %[cc],28\n" - : [result]"=d" (result), - [cc]"=d" (cc) - : [op2]"d" (op2) - : "cc"); - printf("\t%016lx -> %2lu cc=%d\n", op2, result, cc); -} - -static int test_all_popcnt() -{ - puts("popcnt"); - test_popcnt(0); - test_popcnt(1); - test_popcnt(0x8000000000000000); - test_popcnt(-1UL); - test_popcnt(0xff427e3800556bcd); - return 0; -} - /* -- Select -- */ #define TEST_GENERATE(opcode,insn) \ @@ -174,7 +146,6 @@ static void test_all_mvcrl() int main() { test_all_logical_insns(); - test_all_popcnt(); test_all_select(); test_all_mvcrl(); return 0; diff --git a/none/tests/s390x/misc3.stdout.exp b/none/tests/s390x/misc3.stdout.exp index caaba4960..91dede4e9 100644 --- a/none/tests/s390x/misc3.stdout.exp +++ b/none/tests/s390x/misc3.stdout.exp @@ -78,12 +78,6 @@ ocgrk 0012345678abcdef 0000000000000000 -> ffffffffffffffff cc=1 0012345678abcdef ffffffffffffffff -> 0012345678abcdef cc=1 55555555aaaaaaaa aaaaaaaa55555555 -> 55555555aaaaaaaa cc=1 -popcnt - 0000000000000000 -> 0 cc=0 - 0000000000000001 -> 1 cc=1 - 8000000000000000 -> 1 cc=1 - ffffffffffffffff -> 64 cc=1 - ff427e3800556bcd -> 33 cc=1 selr ffffffffffffffff 0000000000000000 -> 0cafebadffffffff 0badcafe00000000 0000000000000000 ffffffffffffffff -> 0cafebad00000000 0badcafeffffffff diff --git a/none/tests/s390x/popcnt-mi3.c b/none/tests/s390x/popcnt-mi3.c new file mode 100644 index 000000000..55a28f78b --- /dev/null +++ b/none/tests/s390x/popcnt-mi3.c @@ -0,0 +1,28 @@ +#include + +/* -- Full population count -- */ + +static void test_popcnt(unsigned long op2) +{ + unsigned long result; + int cc; + + __asm__(".insn rrf,0xb9e10000,%[result],%[op2],8,0\n\t" + "ipm %[cc]\n\t" + "srl %[cc],28\n" + : [result]"=d" (result), + [cc]"=d" (cc) + : [op2]"d" (op2) + : "cc"); + printf("%016lx -> %2lu cc=%d\n", op2, result, cc); +} + +int main(void) +{ + test_popcnt(0); + test_popcnt(1); + test_popcnt(0x8000000000000000UL); + test_popcnt(~0UL); + test_popcnt(0xff427e3800556bcd); + return 0; +} diff --git a/none/tests/s390x/popcnt-mi3.stderr.exp b/none/tests/s390x/popcnt-mi3.stderr.exp new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/none/tests/s390x/popcnt-mi3.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/popcnt-mi3.stdout.exp b/none/tests/s390x/popcnt-mi3.stdout.exp new file mode 100644 index 000000000..e383bb5b7 --- /dev/null +++ b/none/tests/s390x/popcnt-mi3.stdout.exp @@ -0,0 +1,5 @@ +0000000000000000 -> 0 cc=0 +0000000000000001 -> 1 cc=1 +8000000000000000 -> 1 cc=1 +ffffffffffffffff -> 64 cc=1 +ff427e3800556bcd -> 33 cc=1 diff --git a/none/tests/s390x/popcnt-mi3.vgtest b/none/tests/s390x/popcnt-mi3.vgtest new file mode 100644 index 000000000..0f3c6d7e0 --- /dev/null +++ b/none/tests/s390x/popcnt-mi3.vgtest @@ -0,0 +1,2 @@ +prereq: ../../../tests/s390x_features s390x-mi3 +prog: popcnt-mi3 diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 954db9f05..e0ad0c98d 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -244,6 +244,8 @@ static int go(char *feature, char *cpu) 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-vxe2") == 0 ) { match = (GET_HWCAP() & 0x800) && (facilities[2] & FAC_BIT(20)); } else { From 08286ed39d9cea81ff3895638f48f729dbeeaa76 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Tue, 17 Feb 2026 20:26:09 +0100 Subject: [PATCH 338/502] Bug 406674 - False positive when reading bitfield value on code compiled with clang 7.0 --- .gitignore | 1 + NEWS | 2 + VEX/priv/guest_amd64_helpers.c | 8 +++ memcheck/tests/amd64/Makefile.am | 3 + memcheck/tests/amd64/bug406674.cpp | 84 +++++++++++++++++++++++++++ memcheck/tests/amd64/bug406674.vgtest | 2 + 6 files changed, 100 insertions(+) create mode 100644 memcheck/tests/amd64/bug406674.cpp create mode 100644 memcheck/tests/amd64/bug406674.vgtest diff --git a/.gitignore b/.gitignore index e1990dfbd..a0822fc65 100644 --- a/.gitignore +++ b/.gitignore @@ -1083,6 +1083,7 @@ /memcheck/tests/amd64/bt_everything /memcheck/tests/amd64/bug132146 /memcheck/tests/amd64/bug279698 +/memcheck/tests/amd64/bug406674 /memcheck/tests/amd64/bug492210 /memcheck/tests/amd64/defcfaexpr /memcheck/tests/amd64/fxsave-amd64 diff --git a/NEWS b/NEWS index 0fee784c3..88a2d9be9 100644 --- a/NEWS +++ b/NEWS @@ -54,6 +54,8 @@ are not entered into bugzilla tend to get forgotten about or ignored. 233298 MEMPOOL_FREE not reflected in heap summary 253436 vex amd64->IR: unhandled instruction bytes: 0xF2 0xA6 (repne cmps) 258140 Valgrind on OS X always reports some memory "still reachable" +406674 False positive when reading bitfield value on code compiled with + clang 7.0 413369 unhandled amd64-darwin syscall: unix:151 (getpgid) 487055 memcheck/tests/x86-linux/scalar fails running in Docker 509562 s390x: Define minimum required machine model diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c index b8fa52460..7a9b38abd 100644 --- a/VEX/priv/guest_amd64_helpers.c +++ b/VEX/priv/guest_amd64_helpers.c @@ -1989,6 +1989,14 @@ IRExpr* guest_amd64_spechelper ( const HChar* function_name, // vassert(0); //} + /*---------------- SHLB ----------------*/ + if (isU64(cc_op, AMD64G_CC_OP_SHLB) && isU64(cond, AMD64CondZ)) { + /* SHLB, then Z --> test dep1 == 0 */ + return unop(Iop_1Uto64, + binop(Iop_CmpEQ8, unop(Iop_64to8, cc_dep1), + mkU8(0))); + } + /*---------------- COPY ----------------*/ /* This can happen, as a result of amd64 FP compares: "comisd ... ; jbe" for example. */ diff --git a/memcheck/tests/amd64/Makefile.am b/memcheck/tests/amd64/Makefile.am index 60b2fc9f4..4152a4b4a 100644 --- a/memcheck/tests/amd64/Makefile.am +++ b/memcheck/tests/amd64/Makefile.am @@ -11,6 +11,7 @@ EXTRA_DIST = \ bt_everything.stdout.exp bt_everything.vgtest \ bug132146.vgtest bug132146.stdout.exp \ bug279698.vgtest bug279698.stdout.exp \ + bug406674.vgtest \ bug492210_1.vgtest bug492210_1.stderr.exp \ bug492210_2.vgtest \ fxsave-amd64.vgtest fxsave-amd64.stdout.exp \ @@ -40,6 +41,7 @@ check_PROGRAMS = \ bt_everything \ bug132146 \ bug279698 \ + bug406674 \ fxsave-amd64 \ insn-bsfl \ insn-pmovmskb \ @@ -72,6 +74,7 @@ AM_CFLAGS += @FLAG_M64@ AM_CXXFLAGS += @FLAG_M64@ AM_CCASFLAGS += @FLAG_M64@ +bug406674_SOURCES = bug406674.cpp bug492210_CFLAGS = ${AM_CFLAGS} @FLAG_NO_PIE@ @FLAG_W_NO_UNINITIALIZED@ fxsave_amd64_CFLAGS = $(AM_CFLAGS) @FLAG_NO_PIE@ insn_pcmpistri_CFLAGS = $(AM_CFLAGS) diff --git a/memcheck/tests/amd64/bug406674.cpp b/memcheck/tests/amd64/bug406674.cpp new file mode 100644 index 000000000..7157c722f --- /dev/null +++ b/memcheck/tests/amd64/bug406674.cpp @@ -0,0 +1,84 @@ +// Reproducer for https://bugs.kde.org/show_bug.cgi?id=406674 +// +// BACKGROUND +// ---------- +// Valgrind's memcheck has a false positive triggered by the x86-64 sequence: +// +// shlb $0x4, %al ; 8-bit left shift +// je