OSDN Git Service

Fix PR target/50099
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / ppc-fpconv-3.c
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3 /* { dg-require-effective-target ilp32 } */
4 /* { dg-options "-O2 -mcpu=power5 -ffast-math" } */
5 /* { dg-final { scan-assembler-not "lfiwax" } } */
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 "xscvsxddp" } } */
11 /* { dg-final { scan-assembler-not "xscvuxddp" } } */
12
13 void int_to_float (float *dest, int *src)
14 {
15   *dest = (float) *src;
16 }
17
18 void int_to_double (double *dest, int *src)
19 {
20   *dest = (double) *src;
21 }
22
23 void uint_to_float (float *dest, unsigned int *src)
24 {
25   *dest = (float) *src;
26 }
27
28 void uint_to_double (double *dest, unsigned int *src)
29 {
30   *dest = (double) *src;
31 }
32
33 void llong_to_float (float *dest, long long *src)
34 {
35   *dest = (float) *src;
36 }
37
38 void llong_to_double (double *dest, long long *src)
39 {
40   *dest = (double) *src;
41 }
42
43 void ullong_to_float (float *dest, unsigned long long *src)
44 {
45   *dest = (float) *src;
46 }
47
48 void ullong_to_double (double *dest, unsigned long long *src)
49 {
50   *dest = (double) *src;
51 }