summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/bswap64-2.c
blob: 6c3d8ca05289a0fae321338ae755f2e54b4c2db4 (plain)
1
2
3
4
5
6
7
8
9
10
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-options "-O2 -mpopcntd" } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-final { scan-assembler "ldbrx" } } */
/* { dg-final { scan-assembler "stdbrx" } } */

unsigned long ul;
unsigned long load_bswap64 (unsigned long *p) { return __builtin_bswap64 (*p); }
void store_bswap64 (unsigned long a) { ul = __builtin_bswap64 (a); }