1 /* { dg-do compile { target { powerpc*-*-linux* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-mdejagnu-cpu=power7 -O2" } */
5 /* { dg-final { scan-assembler-times "cdtbcd " 1 } } */
6 /* { dg-final { scan-assembler-times "cbcdtd " 1 } } */
7 /* { dg-final { scan-assembler-times "addg6s " 1 } } */
8 /* { dg-final { scan-assembler-not "bl __builtin" } } */
11 to_bcd (unsigned int a
)
13 return __builtin_cdtbcd (a
);
17 from_bcd (unsigned int a
)
19 return __builtin_cbcdtd (a
);
23 bcd_arith (unsigned int a
, unsigned int b
)
25 return __builtin_addg6s (a
, b
);