Running on a kernel that supports the SCV instruction (sets
PPC_FEATURE2_SCV in auxv AT_HWCAPS2) valgrind will assert: valgrind:
m_syswrap/syswrap-main.c:549 (getSyscallArgsFromGuestState): Assertion
'gst->guest_syscall_flag == SC_FLAG' failed.
Removing that assert makes most things work. But also filter out
PPC_FEATURE2_SCV from AT_HWCAPS2 for the client, so it shouldn't try
using the SCV instruction.
https://bugs.kde.org/show_bug.cgi?id=469097
468401 [PATCH] Add a style file for clang-format
468556 Build failure for vgdb
468606 build: remove "Valgrind relies on GCC" check/output
+469097 ppc64(be) doesn't support SCV syscall instruction
n-i-bz FreeBSD rfork syscall fail with EINVAL or ENOSYS rather than VG_(unimplemented)
To see details of a given bug, visit
| 0x04000000ULL /* TAR */
| 0x04000000ULL /* VEC_CRYPTO */
| 0x00800000ULL /* ARCH_3_00 */
+#if defined(VGP_ppc64le_linux)
+ /* Should also be supported on ppc64be,
+ but see https://bugs.kde.org/show_bug.cgi?id=469097 */
| 0x00100000ULL /* PPC_FEATURE2_SCV */
+#endif
| 0x00400000ULL /* HAS_IEEE128 */
| 0x00200000ULL /* PPC_FEATURE2_DARN */
| 0x00040000ULL /* ARCH_3_1 */
canonical->arg7 = gst->guest_syscall_flag;
canonical->arg8 = 0;
-#if defined(VGP_ppc64be_linux)
- /* The sc instruction is currently only supported on LE systems. */
- vg_assert(gst->guest_syscall_flag == SC_FLAG);
-#endif
-
#elif defined(VGP_x86_freebsd)
VexGuestX86State* gst = (VexGuestX86State*)gst_vanilla;
UWord *stack = (UWord *)gst->guest_ESP;