| 1 |
/* { dg-do compile { target { powerpc*-*-* } } } */ |
| 2 |
/* { dg-skip-if "" { powerpc*-*-darwin* } } */ |
| 3 |
/* { dg-require-effective-target powerpc_fprs } */ |
| 4 |
/* { dg-options "-O2 -mdejagnu-cpu=power6 -ffast-math" } */ |
| 5 |
/* { dg-final { scan-assembler-times "lfiwax" 2 } } */ |
| 6 |
/* { dg-final { scan-assembler-not "lfiwzx" } } */ |
| 7 |
/* { dg-final { scan-assembler-times "fcfid " 10 } } */ |
| 8 |
/* { dg-final { scan-assembler-not "fcfids " } } */ |
| 9 |
/* { dg-final { scan-assembler-not "fcfidus " } } */ |
| 10 |
/* { dg-final { scan-assembler-not "fcfidu " } } */ |
| 11 |
/* { dg-final { scan-assembler-not "xscvsxddp" } } */ |
| 12 |
/* { dg-final { scan-assembler-not "xscvuxddp" } } */ |
| 13 |
|
| 14 |
void int_to_float (float *dest, int *src) |
| 15 |
{ |
| 16 |
*dest = (float) *src; |
| 17 |
} |
| 18 |
|
| 19 |
void int_to_double (double *dest, int *src) |
| 20 |
{ |
| 21 |
*dest = (double) *src; |
| 22 |
} |
| 23 |
|
| 24 |
void uint_to_float (float *dest, unsigned int *src) |
| 25 |
{ |
| 26 |
*dest = (float) *src; |
| 27 |
} |
| 28 |
|
| 29 |
void uint_to_double (double *dest, unsigned int *src) |
| 30 |
{ |
| 31 |
*dest = (double) *src; |
| 32 |
} |
| 33 |
|
| 34 |
void llong_to_float (float *dest, long long *src) |
| 35 |
{ |
| 36 |
*dest = (float) *src; |
| 37 |
} |
| 38 |
|
| 39 |
void llong_to_double (double *dest, long long *src) |
| 40 |
{ |
| 41 |
*dest = (double) *src; |
| 42 |
} |
| 43 |
|
| 44 |
void ullong_to_float (float *dest, unsigned long long *src) |
| 45 |
{ |
| 46 |
*dest = (float) *src; |
| 47 |
} |
| 48 |
|
| 49 |
void ullong_to_double (double *dest, unsigned long long *src) |
| 50 |
{ |
| 51 |
*dest = (double) *src; |
| 52 |
} |