aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c
blob: c60cef0cd4f8f7ec10482f3228a56c08b91efacb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* { dg-do compile } */
/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
/* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */

/*
**foo:
**.LFB[0-9]+:
**	.cfi_startproc
**	movq	221\(%rsi\), %rax
**	xorl	%edx, %edx
**	movq	%rax, 221\(%rdi\)
**	movq	229\(%rsi\), %rax
**	movq	%rax, 229\(%rdi\)
**	movq	237\(%rsi\), %rax
**	movq	%rax, 237\(%rdi\)
**	movq	245\(%rsi\), %rax
**	movq	%rax, 245\(%rdi\)
**.L[0-9]+:
**	movl	%edx, %eax
**	addl	\$32, %edx
**	movq	\(%rsi,%rax\), %r10
**	movq	8\(%rsi,%rax\), %r9
**	movq	16\(%rsi,%rax\), %r8
**	movq	24\(%rsi,%rax\), %rcx
**	movq	%r10, \(%rdi,%rax\)
**	movq	%r9, 8\(%rdi,%rax\)
**	movq	%r8, 16\(%rdi,%rax\)
**	movq	%rcx, 24\(%rdi,%rax\)
**	cmpl	\$224, %edx
**	jb	.L[0-9]+
**	ret
**...
*/

void
foo (char *dest, char *src)
{
  __builtin_memcpy (dest, src, 253);
}

/* { dg-final { scan-assembler-not "rep mov" } } */