1 /* __builtin_apply_args () and __builtin_return () built-in functions does
2 not function properly when -mmmx is used in compile flags.
3 __builtin_apply_args () saves all registers that pass arguments to a
4 function, including %mm0-%mm3, to a memory block, and __builtin_return ()
5 restores %mm0, from a return memory block, as it can be used as a
6 function return register. Unfortunatelly, when MMX registers are touched,
7 i387 FPU switches to MMX mode, and no FP operation is possible until emms
8 instruction is issued. */
10 /* This test case is adapted from gcc.dg/builtin-apply4.c. */
12 /* { dg-do run { xfail { ! *-*-darwin* } } } */
13 /* { dg-options "-O2 -mmmx -fgnu89-inline" } */
14 /* { dg-require-effective-target ia32 } */
16 #include "mmx-check.h"
18 extern void abort (void);
33 __builtin_return (__builtin_apply ((void (*)()) foo
,
34 __builtin_apply_args (), 16));
40 if (bar (116.0) != 117.0)