summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/memcpy-4.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2012-01-02 13:56:36 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2012-01-02 13:56:36 +0000
commit0d8f5d625faf1a8a063bb849770665e743110aaf (patch)
tree39f96b35ec1e219ff6c91560fb53beab4a2ffdcc /gcc/testsuite/gcc.dg/memcpy-4.c
parent9f929ce61f62c3dd84bb773b056652cadeebdec5 (diff)
downloadgcc-0d8f5d625faf1a8a063bb849770665e743110aaf.tar.gz
expr.h (move_by_pieces_ninsns): Declare.
gcc/ * expr.h (move_by_pieces_ninsns): Declare. * expr.c (move_by_pieces_ninsns): Make external. * config/mips/mips-protos.h (mips_move_by_pieces_p): Declare. (mips_store_by_pieces_p): Likewise. * config/mips/mips.h (MOVE_BY_PIECES_P): Call mips_move_by_pieces_p. (STORE_BY_PIECES_P): Likewise mips_store_by_pieces_p. * config/mips/mips.c (mips_move_by_pieces_p): New function. (mips_store_by_pieces_p): Likewise. gcc/testsuite/ * gcc.dg/memcpy-4.c: Add nomips16 attribute for MIPS targets. Increase copy to 5 bytes. Look for at least two "mem/s/u"s, rather than a specific number. From-SVN: r182801
Diffstat (limited to 'gcc/testsuite/gcc.dg/memcpy-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/memcpy-4.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/memcpy-4.c b/gcc/testsuite/gcc.dg/memcpy-4.c
index 4fe72ec5b89..80a943bdb78 100644
--- a/gcc/testsuite/gcc.dg/memcpy-4.c
+++ b/gcc/testsuite/gcc.dg/memcpy-4.c
@@ -1,11 +1,14 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-rtl-expand" } */
+#ifdef __mips
+__attribute__((nomips16))
+#endif
void
f1 (char *p)
{
- __builtin_memcpy (p, "123", 3);
+ __builtin_memcpy (p, "12345", 5);
}
-/* { dg-final { scan-rtl-dump-times "mem/s/u" 3 "expand" { target mips*-*-* } } } */
+/* { dg-final { scan-rtl-dump "mem/s/u.*mem/s/u" "expand" { target mips*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "expand" } } */