|
From: <sv...@va...> - 2006-05-12 20:28:31
|
Author: sewardj
Date: 2006-05-12 21:28:26 +0100 (Fri, 12 May 2006)
New Revision: 5893
Log:
Regression test for clc/stc/cmc on amd64.
Added:
trunk/none/tests/amd64/clc.c
trunk/none/tests/amd64/clc.stderr.exp
trunk/none/tests/amd64/clc.stdout.exp
trunk/none/tests/amd64/clc.vgtest
Modified:
trunk/none/tests/amd64/Makefile.am
Modified: trunk/none/tests/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/Makefile.am 2006-05-12 19:50:44 UTC (rev 5892)
+++ trunk/none/tests/amd64/Makefile.am 2006-05-12 20:28:26 UTC (rev 5893)
@@ -5,6 +5,7 @@
INSN_TESTS =3D insn_basic insn_mmx insn_sse insn_sse2 insn_fpu
=20
EXTRA_DIST =3D $(noinst_SCRIPTS) \
+ clc.vgtest clc.stdout.exp clc.stderr.exp \
faultstatus.vgtest faultstatus.stderr.exp \
fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \
fxtract.vgtest fxtract.stderr.exp fxtract.stdout.exp \
@@ -18,6 +19,7 @@
=20
=20
check_PROGRAMS =3D \
+ clc \
faultstatus fcmovnu fxtract $(INSN_TESTS) looper jrcxz smc1 shrld
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
Added: trunk/none/tests/amd64/clc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/clc.c (rev 0)
+++ trunk/none/tests/amd64/clc.c 2006-05-12 20:28:26 UTC (rev 5893)
@@ -0,0 +1,61 @@
+
+#include <stdio.h>
+
+typedef unsigned long long int ULong;
+
+ULong do_clc ( void )
+{
+ ULong res;
+ __asm__ __volatile__(
+ "pushq $0x8d5\n\t" /* OSZACP */
+ "popfq\n\t"
+ "clc\n\t"
+ "pushfq\n\t"
+ "popq %0"
+ : "=3Dr"(res)
+ :
+ : "memory", "cc"
+ );
+ return res;
+}
+
+ULong do_stc ( void )
+{
+ ULong res;
+ __asm__ __volatile__(
+ "pushq $0x0\n\t"
+ "popfq\n\t"
+ "stc\n\t"
+ "pushfq\n\t"
+ "popq %0"
+ : "=3Dr"(res)
+ :
+ : "memory", "cc"
+ );
+ return res;
+}
+
+ULong do_cmc ( void )
+{
+ ULong res;
+ __asm__ __volatile__(
+ "pushq $0x0\n\t"
+ "popfq\n\t"
+ "stc\n\t"
+ "cmc\n\t"
+ "pushfq\n\t"
+ "popq %0"
+ : "=3Dr"(res)
+ :
+ : "memory", "cc"
+ );
+ return res;
+}
+
+int main ( void )
+{
+ printf("clc: 0x%016llx\n", 0x8d5 & do_clc());
+ printf("stc: 0x%016llx\n", 0x8d5 & do_stc());
+ printf("cmc: 0x%016llx\n", 0x8d5 & do_cmc());
+ return 0;
+}
Added: trunk/none/tests/amd64/clc.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/clc.stderr.exp (rev 0)
+++ trunk/none/tests/amd64/clc.stderr.exp 2006-05-12 20:28:26 UTC (rev 58=
93)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/amd64/clc.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/clc.stdout.exp (rev 0)
+++ trunk/none/tests/amd64/clc.stdout.exp 2006-05-12 20:28:26 UTC (rev 58=
93)
@@ -0,0 +1,3 @@
+clc: 0x00000000000008d4
+stc: 0x0000000000000001
+cmc: 0x0000000000000000
Added: trunk/none/tests/amd64/clc.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/clc.vgtest (rev 0)
+++ trunk/none/tests/amd64/clc.vgtest 2006-05-12 20:28:26 UTC (rev 5893)
@@ -0,0 +1 @@
+prog: clc
|