]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix failing test: i386-avx-reverse
authorShiven Kashyap <shivenkashyap24@gmail.com>
Tue, 22 Jul 2025 08:32:57 +0000 (14:02 +0530)
committerGuinevere Larsen <guinevere@redhat.com>
Tue, 22 Jul 2025 13:09:59 +0000 (10:09 -0300)
commit9087bd989b5ff3c02386fc66afc187f37d31aa34
tree78ddd420e4a8aaad158e76b17c1b5a215aecc059
parentf6fc2b523161b7c459e7fc9ae80b288727071be9
Fix failing test: i386-avx-reverse

Running the standalone test `gdb.reverse` with the target board configuration `unix/-fPIE/-pie` leads to the following failure:
'''
FAIL: gdb.reverse/i386-avx-reverse.exp: verify ymm15 before vbroadcastsd
'''

This happens because the test expects values stored in `dyn_buf0`, but instead (in the test source) the address of the buffer itself
got broadcast to xmm15 (and thus to ymm15).
This happened because the pointer to the start of `dyn_buf0` wasn't dereferenced (see 'vpbroadcast_test' in 'i386-avx-reverse.c'):
'''
asm volatile ("vbroadcastss %0, %%xmm15": : "m" (dyn_buf0));
 ^
'''
and this consequently lead to the test failing for the next instruction (`vbroadcastsd`), which depended on the correct value being broadcast to the register.

Also, updated the corresponding expected output (gdb.reverse/i386-avx-reverse.exp) to match.

Tested on x86-64 Linux.

Signed-off-by: Shiven Kashyap <shivenkashyap24@gmail.com>
Approved-By: Guinevere Larsen <guinevere@redhat.com>
gdb/testsuite/gdb.reverse/i386-avx-reverse.c
gdb/testsuite/gdb.reverse/i386-avx-reverse.exp