[18/31] VAX: Add a test for the `cpymemhi' instruction

Message ID alpine.LFD.2.21.2011200253071.656242@eddie.linux-mips.org
State New
Headers show
Series
  • VAX: Bring the port up to date (yes, MODE_CC conversion is included)
Related show

Commit Message

Maciej W. Rozycki Nov. 20, 2020, 3:35 a.m.
gcc/testsuite/
	* gcc.target/vax/cpymem.c: New test.
---
 gcc/testsuite/gcc.target/vax/cpymem.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/vax/cpymem.c

-- 
2.11.0

Comments

Jonathan Wakely via Gcc-patches Nov. 20, 2020, 11:25 p.m. | #1
On 11/19/20 8:35 PM, Maciej W. Rozycki wrote:
> 	gcc/testsuite/

> 	* gcc.target/vax/cpymem.c: New test.

OK
jeff

Patch

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 <stddef.h>
+
+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 " } } */