gcc/testsuite/gcc.target/powerpc/bswap-brh.c
raw| 1 | /* { dg-require-effective-target power10_ok } */ |
| 2 | /* { dg-options "-O2 -mdejagnu-cpu=power10" } */ |
| 3 | |
| 4 | /* This tests whether GCC generates the ISA 3.1 16-bit byte swap |
| 5 | instruction BRH. */ |
| 6 | |
| 7 | unsigned short |
| 8 | bswap_short (unsigned short a) |
| 9 | { |
| 10 | return __builtin_bswap16 (a); /* { dg-final { scan-assembler {\mbrh\M} } } */ |
| 11 | } |