diff options
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c')
-rw-r--r-- | gcc-4.8.1/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c b/gcc-4.8.1/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c new file mode 100644 index 000000000..99957086e --- /dev/null +++ b/gcc-4.8.1/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_unaligned } */ +/* { dg-options "-O2" } */ + +#include <string.h> + +char src[16]; +char dest[16]; + +void aligned_both (void) +{ + memcpy (dest, src, 15); +} + +/* We know both src and dest to be aligned: expect multiword loads/stores. */ + +/* { dg-final { scan-assembler-times "ldmia" 1 } } */ +/* { dg-final { scan-assembler-times "stmia" 1 } } */ |