Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / tests / tcg / x86_64 / test-1648.c
blobfd0644a8ce25b2a45ab5112bbbf3bd40fb4ad9a0
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* See https://gitlab.com/qemu-project/qemu/-/issues/1648 */
4 #include <signal.h>
6 __attribute__((noinline))
7 void bar(void)
9 /* Success! Continue through sigreturn. */
13 * Because of the change of ABI between foo and bar, the compiler is
14 * required to save XMM6-XMM15. The compiler will use MOVAPS or MOVDQA,
15 * which will trap if the stack frame is not 16 byte aligned.
17 __attribute__((noinline, ms_abi))
18 void foo(void)
20 bar();
23 void sighandler(int num)
25 foo();
28 int main(void)
30 signal(SIGUSR1, sighandler);
31 raise(SIGUSR1);
32 return 0;