OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [980827-1.c] - Rev 867

Go to most recent revision | Compare with Previous | Blame | View Log

/* { 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));
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.