| 1 |
/* { dg-do compile { target { powerpc*-*-* } } } */ |
| 2 |
/* { dg-skip-if "" { powerpc*-*-darwin* } } */ |
| 3 |
/* { dg-options "-O2 -mdejagnu-cpu=power7 -ffast-math" } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 5 |
/* { dg-final { scan-assembler-times {\mlfiwax\M|\mlxsiwax\M} 2 } } */ |
| 6 |
/* { dg-final { scan-assembler-times {\mlfiwzx\M|\mlxsiwzx\M} 2 } } */ |
| 7 |
/* { dg-final { scan-assembler-times {\mfcfids\M|\mxscvsxdsp\M} 3 } } */ |
| 8 |
/* { dg-final { scan-assembler-times {\mfcfidus\M|\mxscvuxdsp\M} 1 } } */ |
| 9 |
/* { dg-final { scan-assembler-times {\mfcfid\M|\mxscvsxddp\M} 3 } } */ |
| 10 |
/* { dg-final { scan-assembler-times {\mfcfidu\M|\mxscvuxddp\M} 1 } } */ |
| 11 |
|
| 12 |
void int_to_float (float *dest, int *src) |
| 13 |
{ |
| 14 |
*dest = (float) *src; |
| 15 |
} |
| 16 |
|
| 17 |
void int_to_double (double *dest, int *src) |
| 18 |
{ |
| 19 |
*dest = (double) *src; |
| 20 |
} |
| 21 |
|
| 22 |
void uint_to_float (float *dest, unsigned int *src) |
| 23 |
{ |
| 24 |
*dest = (float) *src; |
| 25 |
} |
| 26 |
|
| 27 |
void uint_to_double (double *dest, unsigned int *src) |
| 28 |
{ |
| 29 |
*dest = (double) *src; |
| 30 |
} |
| 31 |
|
| 32 |
void llong_to_float (float *dest, long long *src) |
| 33 |
{ |
| 34 |
*dest = (float) *src; |
| 35 |
} |
| 36 |
|
| 37 |
void llong_to_double (double *dest, long long *src) |
| 38 |
{ |
| 39 |
*dest = (double) *src; |
| 40 |
} |
| 41 |
|
| 42 |
void ullong_to_float (float *dest, unsigned long long *src) |
| 43 |
{ |
| 44 |
*dest = (float) *src; |
| 45 |
} |
| 46 |
|
| 47 |
void ullong_to_double (double *dest, unsigned long long *src) |
| 48 |
{ |
| 49 |
*dest = (double) *src; |
| 50 |
} |