| 1 |
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */ |
| 2 |
/* { dg-skip-if "" { powerpc*-*-darwin* } } */ |
| 3 |
/* { dg-options "-O2 -mdejagnu-cpu=power7" } */ |
| 4 |
/* { dg-require-effective-target powerpc_vsx } */ |
| 5 |
/* { dg-final { scan-assembler-times {\mstfiwx\M|\mstxsiwx\M} 4 } } */ |
| 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 {\mfctiwz\M|\mxscvdpsxws\M} 2 } } */ |
| 9 |
/* { dg-final { scan-assembler-times {\mfctiwuz\M|\mxscvdpuxws\M} 2 } } */ |
| 10 |
/* { dg-final { scan-assembler-times {\mfcfids\M|\mxscvsxdsp\M} 2 } } */ |
| 11 |
/* { dg-final { scan-assembler-not {\mlwz\M} } } */ |
| 12 |
/* { dg-final { scan-assembler-not {\mstw\M} } } */ |
| 13 |
|
| 14 |
/* Make sure we don't have loads/stores to the GPR unit. */ |
| 15 |
double |
| 16 |
round_double_int (double a) |
| 17 |
{ |
| 18 |
return (double)(int)a; |
| 19 |
} |
| 20 |
|
| 21 |
float |
| 22 |
round_float_int (float a) |
| 23 |
{ |
| 24 |
return (float)(int)a; |
| 25 |
} |
| 26 |
|
| 27 |
double |
| 28 |
round_double_uint (double a) |
| 29 |
{ |
| 30 |
return (double)(unsigned int)a; |
| 31 |
} |
| 32 |
|
| 33 |
float |
| 34 |
round_float_uint (float a) |
| 35 |
{ |
| 36 |
return (float)(unsigned int)a; |
| 37 |
} |