]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add a test for LOOPNEL. See #256669.
authorJulian Seward <jseward@acm.org>
Fri, 21 Jan 2011 20:59:52 +0000 (20:59 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 21 Jan 2011 20:59:52 +0000 (20:59 +0000)
(Jakub Jelinek <jakub@redhat.com>)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11507

none/tests/amd64/Makefile.am
none/tests/amd64/loopnel.c [new file with mode: 0644]
none/tests/amd64/loopnel.stderr.exp [new file with mode: 0644]
none/tests/amd64/loopnel.stdout.exp [new file with mode: 0644]
none/tests/amd64/loopnel.vgtest [new file with mode: 0644]

index 9e4559d580069a2abcd97d85680479ada1b614ba..6e3bc5a26d0a11bf5f61f8823f6ce73212022715 100644 (file)
@@ -43,6 +43,7 @@ EXTRA_DIST = \
        insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \
        jrcxz.stderr.exp jrcxz.stdout.exp jrcxz.vgtest \
        looper.stderr.exp looper.stdout.exp looper.vgtest \
+       loopnel.stderr.exp loopnel.stdout.exp loopnel.vgtest \
        lzcnt64.stderr.exp lzcnt64.stdout.exp lzcnt64.vgtest \
        nibz_bennee_mmap.stderr.exp nibz_bennee_mmap.stdout.exp \
        nibz_bennee_mmap.vgtest \
@@ -94,6 +95,7 @@ if ! VGCONF_OS_IS_DARWIN
        fcmovnu \
        fxtract \
        looper \
+       loopnel \
        jrcxz \
        shrld \
        slahf-amd64
diff --git a/none/tests/amd64/loopnel.c b/none/tests/amd64/loopnel.c
new file mode 100644 (file)
index 0000000..88bc099
--- /dev/null
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+int
+main (void)
+{
+  long rcx = 0x200000005UL;
+  long rax = 5UL;
+  asm volatile ("1: addq $1, %0; loopnel 1b" : "+a" (rax), "+c" (rcx) : : "cc");
+  printf ("%ld %ld\n", rax, rcx);
+  return 0;
+}
diff --git a/none/tests/amd64/loopnel.stderr.exp b/none/tests/amd64/loopnel.stderr.exp
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/none/tests/amd64/loopnel.stdout.exp b/none/tests/amd64/loopnel.stdout.exp
new file mode 100644 (file)
index 0000000..58d2fb6
--- /dev/null
@@ -0,0 +1 @@
+10 0
diff --git a/none/tests/amd64/loopnel.vgtest b/none/tests/amd64/loopnel.vgtest
new file mode 100644 (file)
index 0000000..ce6acb8
--- /dev/null
@@ -0,0 +1 @@
+prog: loopnel