]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Test for fcmovnu.
authorJulian Seward <jseward@acm.org>
Mon, 6 Mar 2006 19:36:30 +0000 (19:36 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 6 Mar 2006 19:36:30 +0000 (19:36 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5714

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

index e7622198fa94b1a0c5441bb6b60e889caa9d2be8..32d54430860c39314ace965f33517a20bceace15 100644 (file)
@@ -6,6 +6,7 @@ INSN_TESTS = insn_basic insn_mmx insn_sse insn_sse2 insn_fpu
 
 EXTRA_DIST = $(noinst_SCRIPTS) \
        faultstatus.vgtest faultstatus.stderr.exp \
+       fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \
        $(addsuffix .stderr.exp,$(INSN_TESTS)) \
        $(addsuffix .stdout.exp,$(INSN_TESTS)) \
        $(addsuffix .vgtest,$(INSN_TESTS)) \
@@ -16,7 +17,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
 
 
 check_PROGRAMS = \
-       faultstatus $(INSN_TESTS) looper jrcxz smc1 shrld
+       faultstatus fcmovnu $(INSN_TESTS) looper jrcxz smc1 shrld
 
 AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include
                @FLAG_M64@
diff --git a/none/tests/amd64/fcmovnu.c b/none/tests/amd64/fcmovnu.c
new file mode 100644 (file)
index 0000000..aac5f20
--- /dev/null
@@ -0,0 +1,24 @@
+
+#include <stdio.h>
+
+double zzz;
+
+int main ( void )
+{
+  zzz = 1.234;
+  printf("zzz = %f\n", zzz);
+  __asm__ __volatile__(
+    "finit\n\t"
+    "fldpi\n\t"
+    "fldl2e\n\t"
+    "pushq %r15\n\t"
+    "movq $0,%r15\n\t"
+    "add %r15,%r15\n\t"
+    "fcmovnu %st(1), %st(0)\n\t"
+    "fstl zzz\n\t"
+    "finit\n\t"
+    "popq %r15\n\t"
+    );
+  printf("zzz = %f\n", zzz);
+  return 0;
+}
diff --git a/none/tests/amd64/fcmovnu.stderr.exp b/none/tests/amd64/fcmovnu.stderr.exp
new file mode 100644 (file)
index 0000000..139597f
--- /dev/null
@@ -0,0 +1,2 @@
+
+
diff --git a/none/tests/amd64/fcmovnu.stdout.exp b/none/tests/amd64/fcmovnu.stdout.exp
new file mode 100644 (file)
index 0000000..38f06b7
--- /dev/null
@@ -0,0 +1,2 @@
+zzz = 1.234000
+zzz = 1.442695
diff --git a/none/tests/amd64/fcmovnu.vgtest b/none/tests/amd64/fcmovnu.vgtest
new file mode 100644 (file)
index 0000000..14ac1fd
--- /dev/null
@@ -0,0 +1 @@
+prog: fcmovnu