i386.c (ix86_expand_movmem): Fix epilogue generation.
gcc: * config/i386/i386.c (ix86_expand_movmem): Fix epilogue generation. gcc/testsuite: * gcc.dg/torture/memcpy-1.c: New test. From-SVN: r202423
This commit is contained in:
parent
32a19da43b
commit
ff131f2627
@ -1,3 +1,7 @@
|
||||
2013-09-10 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
|
||||
|
||||
* config/i386/i386.c (ix86_expand_movmem): Fix epilogue generation.
|
||||
|
||||
2013-09-10 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR target/58330
|
||||
|
@ -23329,7 +23329,7 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp,
|
||||
|
||||
if (count_exp != const0_rtx && epilogue_size_needed > 1)
|
||||
expand_movmem_epilogue (dst, src, destreg, srcreg, count_exp,
|
||||
size_needed);
|
||||
epilogue_size_needed);
|
||||
if (jump_around_label)
|
||||
emit_label (jump_around_label);
|
||||
return true;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2013-09-10 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
|
||||
|
||||
* gcc.dg/torture/memcpy-1.c: New test.
|
||||
|
||||
2013-09-10 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* gcc.target/powerpc/pr58330.c: New.
|
||||
|
22
gcc/testsuite/gcc.dg/torture/memcpy-1.c
Normal file
22
gcc/testsuite/gcc.dg/torture/memcpy-1.c
Normal file
@ -0,0 +1,22 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-additional-options "-mtune=pentiumpro" { target ia32 } } */
|
||||
/* { dg-additional-options "-minline-all-stringops" { target { i?86-*-* x86_64-*-* } } } */
|
||||
|
||||
static void __attribute__((noinline, noclone))
|
||||
my_memcpy (char *dest, const char *src, int n)
|
||||
{
|
||||
__builtin_memcpy (dest, src, n);
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
char a1[4], a2[4];
|
||||
__builtin_memset (a1, 'a', 4);
|
||||
__builtin_memset (a2, 'b', 4);
|
||||
my_memcpy (a2, a1, 4);
|
||||
if (a2[0] != 'a')
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user