]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: fix gdb.reverse/i386-avx-reverse.exp with clang
authorGuinevere Larsen <guinevere@redhat.com>
Wed, 30 Oct 2024 19:16:42 +0000 (16:16 -0300)
committerGuinevere Larsen <guinevere@redhat.com>
Tue, 12 Nov 2024 11:48:03 +0000 (08:48 -0300)
commit09c964ce90335cb902f2e1bb0e9e48891df380c2
treef11b5d7a1fc576f3ca98ec7b3fead7ed522a7b90
parenta4a5f05266b69ebe8172433217d47cc7a737e51d
gdb/testsuite: fix gdb.reverse/i386-avx-reverse.exp with clang

The test gdb.reverse/i386-avx-reverse.exp was changed by the recent
commit:

    commit 5bf288d5a88ab6d3fa9bd7bd070e624afd264dc6
    Author: Guinevere Larsen <guinevere@redhat.com>
    Date:   Fri Jul 26 17:31:14 2024 -0300

    gdb/record: support AVX instructions VMOVDQ(U|A) when recording

In that commit I added a few calls to the instruction vmovdqa to and
from memory addresses. Because my local gcc testing always had aligned
pointers, I thought this would always work, but clang (and maybe other
compilers) might not do the same, which will cause vmovdqa to segfault,
and the test to fail spectacularly.

This commit fixes that by using the pre-existing precise-aligned-alloc
to allocate the dynamic buffers, forcing them to be aligned to the
required boundary for vmovdqa instruction to work. The code was then
re-shuffled to keep the current clustering of instructions.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.reverse/i386-avx-reverse.c
gdb/testsuite/gdb.reverse/i386-avx-reverse.exp