|
From: <sv...@va...> - 2005-08-12 23:40:57
|
Author: sewardj
Date: 2005-08-13 00:40:55 +0100 (Sat, 13 Aug 2005)
New Revision: 4390
Log:
Add regtest for x86 cmpxchg8b.
Added:
trunk/none/tests/x86/cmpxchg8b.c
trunk/none/tests/x86/cmpxchg8b.stderr.exp
trunk/none/tests/x86/cmpxchg8b.stdout.exp
trunk/none/tests/x86/cmpxchg8b.vgtest
Modified:
trunk/docs/internals/3_0_BUGSTATUS.txt
trunk/none/tests/x86/Makefile.am
Modified: trunk/docs/internals/3_0_BUGSTATUS.txt
=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/docs/internals/3_0_BUGSTATUS.txt 2005-08-12 19:41:06 UTC (rev 4=
389)
+++ trunk/docs/internals/3_0_BUGSTATUS.txt 2005-08-12 23:40:55 UTC (rev 4=
390)
@@ -55,7 +55,7 @@
=20
This ought to be fixed for 3.0.1.
=20
-FIXED-TRUNK: TODO
+FIXED-TRUNK: done(1331,)
FIXED-30BRANCH: TODO
=20
----------------------------------------------------------------
@@ -243,7 +243,7 @@
=20
110591 amd64: rdtsc not implemented properly
=20
-(Also afflicts x86)
+Under consideration. (Also afflicts x86)
=20
FIXED-TRUNK: no
FIXED-30BRANCH: no
@@ -276,3 +276,18 @@
FIXED-TRUNK: done(4386)
FIXED-30BRANCH: TODO
=20
+----------------------------------------------------------------
+
+110669 valgrind attach to gdb and quitting gdb hangs valgrind
+
+Not clear if this is really a Valgrind bug.
+
+FIXED-TRUNK: no
+FIXED-30BRANCH: no
+
+----------------------------------------------------------------
+
+110671 vex x86->IR: unhandled instruction bytes: 0xF3 0xC3 (rep ret)
+
+FIXED-TRUNK: TODO
+FIXED-30BRANCH: TODO
Modified: trunk/none/tests/x86/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/x86/Makefile.am 2005-08-12 19:41:06 UTC (rev 4389)
+++ trunk/none/tests/x86/Makefile.am 2005-08-12 23:40:55 UTC (rev 4390)
@@ -8,6 +8,7 @@
bt_everything.stderr.exp bt_everything.stdout.exp bt_everything.vgtest =
\
bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \
cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \
+ cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \
fpu_lazy_eflags.stderr.exp fpu_lazy_eflags.stdout.exp \
fpu_lazy_eflags.vgtest \
getseg.stdout.exp getseg.stderr.exp getseg.vgtest \
@@ -22,7 +23,7 @@
yield.stderr.exp yield.stdout.exp yield.vgtest
=20
check_PROGRAMS =3D \
- badseg bt_everything bt_literal cpuid fpu_lazy_eflags \
+ badseg bt_everything bt_literal cmpxchg8b cpuid fpu_lazy_eflags \
getseg $(INSN_TESTS) \
int pushpopseg seg_override sigcontext smc1 yield
=20
Added: trunk/none/tests/x86/cmpxchg8b.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/x86/cmpxchg8b.c 2005-08-12 19:41:06 UTC (rev 4389)
+++ trunk/none/tests/x86/cmpxchg8b.c 2005-08-12 23:40:55 UTC (rev 4390)
@@ -0,0 +1,82 @@
+
+#include <stdio.h>
+
+typedef unsigned long long int ULong;
+typedef unsigned int UInt;
+
+ULong m64;
+
+UInt eax;
+UInt ebx;
+UInt ecx;
+UInt edx;
+UInt zout;
+
+extern void foo ( void );
+asm("\n"
+ "foo:\n"
+ "\tpushl %eax\n"
+ "\tpushl %ebx\n"
+ "\tpushl %ecx\n"
+ "\tpushl %edx\n"
+
+ "\txorl %eax, %eax\n" // get eflags in a known state
+
+ "\tmovl eax,%eax\n"
+ "\tmovl ebx,%ebx\n"
+ "\tmovl ecx,%ecx\n"
+ "\tmovl edx,%edx\n"
+ "\tcmpxchg8b m64\n"
+ "\tmovl %eax,eax\n"
+ "\tmovl %ebx,ebx\n"
+ "\tmovl %ecx,ecx\n"
+ "\tmovl %edx,edx\n"
+ "\tpushfl\n"
+ "\tpopl %eax\n"
+ "\tmovl %eax,zout\n"
+
+ "\tpopl %edx\n"
+ "\tpopl %ecx\n"
+ "\tpopl %edx\n"
+ "\tpopl %eax\n"
+ "\tret\n"
+ );
+
+int main ( void )
+{
+ edx =3D 0x11111111; eax =3D 0x22222222;
+ ecx =3D 0x33333333; ebx =3D 0x44444444;
+ zout =3D 0x55555555;
+ m64 =3D 0x1111111122222222ULL;
+ foo();
+ printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
+ eax, ebx, ecx, edx, zout & 0xFFFF, m64 );
+
+ edx =3D 0x11111111; eax =3D 0x22222222;
+ ecx =3D 0x33333333; ebx =3D 0x44444444;
+ zout =3D 0x55555555;
+ m64 =3D 0x1111111122222222ULL;
+ m64 +=3D 0x1ULL;
+ foo();
+ printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
+ eax, ebx, ecx, edx, zout & 0xFFFF, m64 );
+
+ edx =3D 0x11111111; eax =3D 0x22222222;
+ ecx =3D 0x33333333; ebx =3D 0x44444444;
+ zout =3D 0x55555555;
+ m64 =3D 0x1111111122222222ULL;
+ m64 +=3D 0x100000000ULL;
+ foo();
+ printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
+ eax, ebx, ecx, edx, zout & 0xFFFF, m64 );
+
+ edx =3D 0x11111111; eax =3D 0x22222222;
+ ecx =3D 0x33333333; ebx =3D 0x44444444;
+ zout =3D 0x55555555;
+ m64 =3D 0x6666666677777777ULL;
+ foo();
+ printf("0x%x 0x%x 0x%x 0x%x 0x%x 0x%llx\n",
+ eax, ebx, ecx, edx, zout & 0xFFFF, m64 );
+
+ return 0;
+}
Added: trunk/none/tests/x86/cmpxchg8b.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/x86/cmpxchg8b.stderr.exp 2005-08-12 19:41:06 UTC (re=
v 4389)
+++ trunk/none/tests/x86/cmpxchg8b.stderr.exp 2005-08-12 23:40:55 UTC (re=
v 4390)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/x86/cmpxchg8b.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/x86/cmpxchg8b.stdout.exp 2005-08-12 19:41:06 UTC (re=
v 4389)
+++ trunk/none/tests/x86/cmpxchg8b.stdout.exp 2005-08-12 23:40:55 UTC (re=
v 4390)
@@ -0,0 +1,4 @@
+0x22222222 0x44444444 0x33333333 0x11111111 0x246 0x3333333344444444
+0x22222223 0x44444444 0x33333333 0x11111111 0x206 0x1111111122222223
+0x22222222 0x44444444 0x33333333 0x11111112 0x206 0x1111111222222222
+0x77777777 0x44444444 0x33333333 0x66666666 0x206 0x6666666677777777
Added: trunk/none/tests/x86/cmpxchg8b.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/x86/cmpxchg8b.vgtest 2005-08-12 19:41:06 UTC (rev 43=
89)
+++ trunk/none/tests/x86/cmpxchg8b.vgtest 2005-08-12 23:40:55 UTC (rev 43=
90)
@@ -0,0 +1 @@
+prog: cmpxchg8b
|