| 1 |
/* { dg-do compile { target { powerpc*-*-* } } } */ |
| 2 |
/* { dg-skip-if "" { powerpc*-*-aix* } } */ |
| 3 |
/* { dg-options "-O2 -mpowerpc64" } */ |
| 4 |
/* { dg-require-effective-target ilp32 } */ |
| 5 |
/* { dg-final { scan-assembler-times "lwbrx" 2 { target { ! has_arch_pwr7 } } } } */ |
| 6 |
/* { dg-final { scan-assembler-times "stwbrx" 2 { target { ! has_arch_pwr7 } } } } */ |
| 7 |
/* { dg-final { scan-assembler-times "ldbrx" 1 { target has_arch_pwr7 } } } */ |
| 8 |
/* { dg-final { scan-assembler-times "stdbrx" 1 { target has_arch_pwr7 } } } */ |
| 9 |
|
| 10 |
/* On some versions of dejagnu this test will fail when biarch testing |
| 11 |
with RUNTESTFLAGS="--target_board=unix'{-m64,-m32}'" due to -m32 |
| 12 |
being added on the command line after the dg-options -mpowerpc64. |
| 13 |
common/config/rs6000/rs6000-common.c:rs6000_handle_option disables |
| 14 |
-mpowerpc64 for -m32. */ |
| 15 |
|
| 16 |
long long swap_load (long long *a) { return __builtin_bswap64 (*a); } |
| 17 |
long long swap_reg (long long a) { return __builtin_bswap64 (a); } |
| 18 |
void swap_store (long long *a, long long b) { *a = __builtin_bswap64 (b); } |