OSDN Git Service

PR target/48496
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / ia64 / pr48496.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
5
6 typedef struct
7 {
8   UINT64 x[2] __attribute__((aligned(16)));
9 } fpreg;
10
11 struct ia64_args
12 {
13   fpreg fp_regs[8];
14   UINT64 gp_regs[8];
15 };
16
17 ffi_call(long i, long gpcount, long fpcount, void **avalue)
18 {
19   struct ia64_args *stack;
20   stack = __builtin_alloca (64);
21   asm ("stf.spill %0 = %1%P0" : "=m" (*&stack->fp_regs[fpcount++])
22                               : "f"(*(double *)avalue[i]));
23   stack->gp_regs[gpcount++] = *(UINT64 *)avalue[i];
24 }