From: Maciej W. Rozycki Date: Sat, 5 Dec 2020 18:26:26 +0000 (+0000) Subject: VAX: Add a test for the `cpymemhi' instruction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c45dc7928697c047c1ef5de710e9b0fd108de57;p=gcc.git VAX: Add a test for the `cpymemhi' instruction gcc/testsuite/ * gcc.target/vax/cpymem.c: New test. --- diff --git a/gcc/testsuite/gcc.target/vax/cpymem.c b/gcc/testsuite/gcc.target/vax/cpymem.c new file mode 100644 index 00000000000..91805a1a5eb --- /dev/null +++ b/gcc/testsuite/gcc.target/vax/cpymem.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ + +#include + +void * +memcpy8 (void *to, const void *from, size_t size) +{ + unsigned char s8 = size; + return __builtin_memcpy (to, from, s8); +} + +/* Expect assembly like: + + movl 4(%ap),%r6 + movzbl 12(%ap),%r7 + movl 8(%ap),%r8 + movc3 %r7,(%r8),(%r6) + movl %r6,%r0 + + */ + +/* { dg-final { scan-assembler "\tmovc3 " } } */