]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Handle the sse4-x86 test correctly when Valgrind compiled with Clang master
authorMartin Cermak <mcermak@redhat.com>
Tue, 4 Aug 2026 08:05:14 +0000 (10:05 +0200)
committerMartin Cermak <mcermak@redhat.com>
Tue, 4 Aug 2026 08:34:15 +0000 (10:34 +0200)
commit5c4be3f11c38f83c814b685994d4f428baa30fb6
tree04ea4a40c83f5e9c4926ffe39e715c3f34ba5112
parentc5c0516d1c71113192f5e9b55669fdbcd03b4de7
Handle the sse4-x86 test correctly when Valgrind compiled with Clang

The none/tests/x86/sse4-x86 fails when valgrind is compiled with clang.
With default clang -O2 (which involves the slp-vectorizer optimization)
this test code translates to assembly involving MOVDQA.  That's a SIMD
instruction requiring explicitly aligned memory.

Turns out that the required 16-byte stack alignment isn't in place by
default.  This instruction ends up with a GP, so that Valgrind ends up
with segmentation fault.

To fix this, the affected clean helper function g_calc_mpsadbw() is
now compiled with the 'force_align_arg_pointer' attribute, making sure
the needed stack alignment is in place.  Both GCC and clang accept
this attribute.

https://bugs.kde.org/show_bug.cgi?id=523626
NEWS
VEX/priv/guest_generic_helpers.h