aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c
blob: 99957086e7e561194cdcc2ab50161df5f708fe56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 } } */