OSDN Git Service

Fix PR target/50099
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / ppc-fpconv-1.c
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
5 /* { dg-final { scan-assembler-times "lfiwax" 2 } } */
6 /* { dg-final { scan-assembler-times "lfiwzx" 2 } } */
7 /* { dg-final { scan-assembler-times "fcfids" 3 } } */
8 /* { dg-final { scan-assembler-times "fcfidus" 1 } } */
9 /* { dg-final { scan-assembler-times "xscvsxddp" 3 } } */
10 /* { dg-final { scan-assembler-times "xscvuxddp" 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 }