From 6fa95850db4ca120a4b6075859829dbbe637e713 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 6 Mar 2006 19:36:30 +0000 Subject: [PATCH] Test for fcmovnu. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5714 --- none/tests/amd64/Makefile.am | 3 ++- none/tests/amd64/fcmovnu.c | 24 ++++++++++++++++++++++++ none/tests/amd64/fcmovnu.stderr.exp | 2 ++ none/tests/amd64/fcmovnu.stdout.exp | 2 ++ none/tests/amd64/fcmovnu.vgtest | 1 + 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 none/tests/amd64/fcmovnu.c create mode 100644 none/tests/amd64/fcmovnu.stderr.exp create mode 100644 none/tests/amd64/fcmovnu.stdout.exp create mode 100644 none/tests/amd64/fcmovnu.vgtest diff --git a/none/tests/amd64/Makefile.am b/none/tests/amd64/Makefile.am index e7622198fa..32d5443086 100644 --- a/none/tests/amd64/Makefile.am +++ b/none/tests/amd64/Makefile.am @@ -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 index 0000000000..aac5f204e2 --- /dev/null +++ b/none/tests/amd64/fcmovnu.c @@ -0,0 +1,24 @@ + +#include + +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 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/amd64/fcmovnu.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/amd64/fcmovnu.stdout.exp b/none/tests/amd64/fcmovnu.stdout.exp new file mode 100644 index 0000000000..38f06b7ed9 --- /dev/null +++ b/none/tests/amd64/fcmovnu.stdout.exp @@ -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 index 0000000000..14ac1fd19f --- /dev/null +++ b/none/tests/amd64/fcmovnu.vgtest @@ -0,0 +1 @@ +prog: fcmovnu -- 2.47.2