summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/980827-1.c
blob: c2c92337a8642b3242b1081503250ad7409ea92d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* { dg-do run { target { { *-*-linux* && ilp32 } && powerpc_fprs } } } */
/* { dg-options -O2 } */

extern void exit (int);
extern void abort (void);

double dval = 0;

void splat (double d);

int main(void)
{
  splat(0);
  if (dval == 0)
    abort();
  exit (0);
}

void splat (double d)
{
  union {
    double f;
    unsigned int l[2];
  } u;
  
  u.f = d + d;
  u.l[1] |= 1;
  asm volatile ("stfd %0,dval@sdarel(13)" : : "f" (u.f));
}