gcc/ChangeLog:
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / ppc-fpconv-1.c
blobde508b784c97e3ba793cdab88b779cc29a0120f5
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
5 /* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
6 /* { dg-final { scan-assembler-times {\mlfiwax\M|\mlxsiwax\M} 2 } } */
7 /* { dg-final { scan-assembler-times {\mlfiwzx\M|\mlxsiwzx\M} 2 } } */
8 /* { dg-final { scan-assembler-times {\mfcfids\M|\mxscvsxdsp\M} 3 } } */
9 /* { dg-final { scan-assembler-times {\mfcfidus\M|\mxscvuxdsp\M} 1 } } */
10 /* { dg-final { scan-assembler-times {\mfcfid\M|\mxscvsxddp\M} 3 } } */
11 /* { dg-final { scan-assembler-times {\mfcfidu\M|\mxscvuxddp\M} 1 } } */
13 void int_to_float (float *dest, int *src)
15 *dest = (float) *src;
18 void int_to_double (double *dest, int *src)
20 *dest = (double) *src;
23 void uint_to_float (float *dest, unsigned int *src)
25 *dest = (float) *src;
28 void uint_to_double (double *dest, unsigned int *src)
30 *dest = (double) *src;
33 void llong_to_float (float *dest, long long *src)
35 *dest = (float) *src;
38 void llong_to_double (double *dest, long long *src)
40 *dest = (double) *src;
43 void ullong_to_float (float *dest, unsigned long long *src)
45 *dest = (float) *src;
48 void ullong_to_double (double *dest, unsigned long long *src)
50 *dest = (double) *src;