gcc/testsuite/gcc.target/sh/sh4a-memmovua.c
raw| 1 | /* Verify that we generate movua to copy unaligned memory regions to |
| 2 | 32-bit-aligned addresses on SH4A. */ |
| 3 | /* { dg-do compile { target { sh4a } } } */ |
| 4 | /* { dg-options "-O" } */ |
| 5 | /* { dg-final { scan-assembler-times "movua.l" 2 } } */ |
| 6 | |
| 7 | #include <string.h> |
| 8 | |
| 9 | struct s { int i; char a[10], b[10]; } x; |
| 10 | |
| 11 | int |
| 12 | f (void) |
| 13 | { |
| 14 | memcpy (x.a, x.b, 10); |
| 15 | } |