You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
(13) |
3
(29) |
|
4
(18) |
5
(12) |
6
(12) |
7
(22) |
8
(9) |
9
(14) |
10
(6) |
|
11
|
12
|
13
(1) |
14
(5) |
15
(11) |
16
(7) |
17
(5) |
|
18
(1) |
19
(8) |
20
(7) |
21
(12) |
22
(5) |
23
(17) |
24
(6) |
|
25
(27) |
26
(17) |
27
(2) |
28
(10) |
29
(3) |
30
(8) |
31
(20) |
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:49:12
|
CVS commit by mueller:
cmpxchg8b support (backport)
M +24 -0 coregrind/vg_helpers.S 1.23.2.2
M +2 -0 coregrind/vg_include.h 1.142.2.4
M +3 -0 coregrind/vg_main.c 1.110.2.5
M +75 -1 coregrind/vg_to_ucode.c 1.87.2.15
M +2 -0 include/vg_skin.h 1.79.2.6
--- valgrind/coregrind/vg_helpers.S #1.23.2.1:1.23.2.2
@@ -80,4 +80,5 @@
* setting and getting obscure eflags
* double-length shifts
+ * eight byte compare and exchange
All routines use a standard calling convention designed for
@@ -616,4 +617,27 @@
+/* Eight byte compare and exchange. */
+.globl VG_(helper_cmpxchg8b)
+VG_(helper_cmpxchg8b):
+ pushl %eax
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ movl 20(%esp), %eax
+ movl 24(%esp), %edx
+ movl 28(%esp), %ebx
+ movl 32(%esp), %ecx
+ cmpxchg8b 36(%esp)
+ movl %eax, 20(%esp)
+ movl %edx, 24(%esp)
+ movl %ebx, 28(%esp)
+ movl %ecx, 32(%esp)
+ popl %edx
+ popl %ecx
+ popl %ebx
+ popl %eax
+ ret
+
+
/* Undefined instruction (generates SIGILL) */
.globl VG_(helper_undefined_instruction)
--- valgrind/coregrind/vg_include.h #1.142.2.3:1.142.2.4
@@ -1579,4 +1579,6 @@ extern void VG_(helper_DAS);
extern void VG_(helper_DAA);
+extern void VG_(helper_cmpxchg8b);
+
extern void VG_(helper_undefined_instruction);
--- valgrind/coregrind/vg_main.c #1.110.2.4:1.110.2.5
@@ -103,4 +103,5 @@ Int VGOFF_(helper_LAHF) = INVALID_OFFSET
Int VGOFF_(helper_DAS) = INVALID_OFFSET;
Int VGOFF_(helper_DAA) = INVALID_OFFSET;
+Int VGOFF_(helper_cmpxchg8b) = INVALID_OFFSET;
Int VGOFF_(helper_undefined_instruction) = INVALID_OFFSET;
@@ -382,4 +383,6 @@ static void vg_init_baseBlock ( void )
VGOFF_(helper_OUT)
= alloc_BaB_1_set( (Addr) & VG_(helper_OUT));
+ VGOFF_(helper_cmpxchg8b)
+ = alloc_BaB_1_set( (Addr) & VG_(helper_cmpxchg8b));
VGOFF_(helper_undefined_instruction)
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.14:1.87.2.15
@@ -3052,5 +3052,5 @@ Addr dis_cmpxchg_G_E ( UCodeBlock* cb,
uInstr2(cb, GET, size, ArchReg, gregOfRM(rm), TempReg, src);
uInstr2(cb, GET, size, ArchReg, R_EAX, TempReg, acc);
- uInstr2(cb, MOV, size, TempReg, acc, TempReg, junk);
+ uInstr2(cb, MOV, 4, TempReg, acc, TempReg, junk);
uInstr2(cb, SUB, size, TempReg, dest, TempReg, junk);
setFlagsFromUOpcode(cb, SUB);
@@ -3074,4 +3074,72 @@ Addr dis_cmpxchg_G_E ( UCodeBlock* cb,
+static
+Addr dis_cmpxchg8b ( UCodeBlock* cb,
+ UChar sorb,
+ Addr eip0 )
+{
+ Int tal, tah, junkl, junkh, destl, desth, srcl, srch, accl, acch;
+ UChar dis_buf[50];
+ UChar rm;
+ UInt pair;
+
+ rm = getUChar(eip0);
+ accl = newTemp(cb);
+ acch = newTemp(cb);
+ srcl = newTemp(cb);
+ srch = newTemp(cb);
+ destl = newTemp(cb);
+ desth = newTemp(cb);
+ junkl = newTemp(cb);
+ junkh = newTemp(cb);
+
+ vg_assert(!epartIsReg(rm));
+
+ pair = disAMode ( cb, sorb, eip0, dis?dis_buf:NULL );
+ tal = LOW24(pair);
+ tah = newTemp(cb);
+ uInstr2(cb, MOV, 4, TempReg, tal, TempReg, tah);
+ uInstr2(cb, ADD, 4, Literal, 0, TempReg, tah);
+ uLiteral(cb, 4);
+ eip0 += HI8(pair);
+ if (dis) VG_(printf)("cmpxchg8b %s\n", dis_buf);
+
+ uInstr0(cb, CALLM_S, 0);
+
+ uInstr2(cb, LOAD, 4, TempReg, tah, TempReg, desth);
+ uInstr1(cb, PUSH, 4, TempReg, desth);
+ uInstr2(cb, LOAD, 4, TempReg, tal, TempReg, destl);
+ uInstr1(cb, PUSH, 4, TempReg, destl);
+ uInstr2(cb, GET, 4, ArchReg, R_ECX, TempReg, srch);
+ uInstr1(cb, PUSH, 4, TempReg, srch);
+ uInstr2(cb, GET, 4, ArchReg, R_EBX, TempReg, srcl);
+ uInstr1(cb, PUSH, 4, TempReg, srcl);
+ uInstr2(cb, GET, 4, ArchReg, R_EDX, TempReg, acch);
+ uInstr1(cb, PUSH, 4, TempReg, acch);
+ uInstr2(cb, GET, 4, ArchReg, R_EAX, TempReg, accl);
+ uInstr1(cb, PUSH, 4, TempReg, accl);
+
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_cmpxchg8b));
+ uFlagsRWU(cb, FlagsEmpty, FlagZ, FlagsEmpty);
+
+ uInstr1(cb, POP, 4, TempReg, accl);
+ uInstr2(cb, PUT, 4, TempReg, accl, ArchReg, R_EAX);
+ uInstr1(cb, POP, 4, TempReg, acch);
+ uInstr2(cb, PUT, 4, TempReg, acch, ArchReg, R_EDX);
+ uInstr1(cb, POP, 4, TempReg, srcl);
+ uInstr2(cb, PUT, 4, TempReg, srcl, ArchReg, R_EBX);
+ uInstr1(cb, POP, 4, TempReg, srch);
+ uInstr2(cb, PUT, 4, TempReg, srch, ArchReg, R_ECX);
+ uInstr1(cb, POP, 4, TempReg, destl);
+ uInstr2(cb, STORE, 4, TempReg, destl, TempReg, tal);
+ uInstr1(cb, POP, 4, TempReg, desth);
+ uInstr2(cb, STORE, 4, TempReg, desth, TempReg, tah);
+
+ uInstr0(cb, CALLM_E, 0);
+
+ return eip0;
+}
+
+
/* Handle conditional move instructions of the form
cmovcc E(reg-or-mem), G(reg)
@@ -6205,7 +6273,13 @@ static Addr disInstr ( UCodeBlock* cb, A
/* =-=-=-=-=-=-=-=-=- CMPXCHG -=-=-=-=-=-=-=-=-=-= */
+ case 0xB0: /* CMPXCHG Gv,Ev */
+ eip = dis_cmpxchg_G_E ( cb, sorb, 1, eip );
+ break;
case 0xB1: /* CMPXCHG Gv,Ev */
eip = dis_cmpxchg_G_E ( cb, sorb, sz, eip );
break;
+ case 0xC7: /* CMPXCHG8B Gv */
+ eip = dis_cmpxchg8b ( cb, sorb, eip );
+ break;
/* =-=-=-=-=-=-=-=-=- CPUID -=-=-=-=-=-=-=-=-=-=-= */
--- valgrind/include/vg_skin.h #1.79.2.5:1.79.2.6
@@ -1089,4 +1089,6 @@ extern Int VGOFF_(helper_DAS);
extern Int VGOFF_(helper_DAA);
+extern Int VGOFF_(helper_cmpxchg8b);
+
/*====================================================================*/
|
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:47:10
|
CVS commit by mueller:
fix comment
M +1 -1 mc_translate.c 1.32
--- valgrind/memcheck/mc_translate.c #1.31:1.32
@@ -1492,5 +1492,5 @@ static void vg_propagate_definedness ( U
sz = 1; goto do_ImproveAND;
do_ImproveAND:
- /* Implements Q = T OR Q. So if Q is entirely defined,
+ /* Implements Q = T AND Q. So if Q is entirely defined,
ie all 0s, we get MOV T, Q. */
if (def[u->val2] <= 4) {
|
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:46:01
|
CVS commit by mueller:
backport shufpd support
M +7 -0 vg_to_ucode.c 1.87.2.14
--- valgrind/coregrind/vg_to_ucode.c #1.87.2.13:1.87.2.14
@@ -3961,4 +3961,11 @@ static Addr disInstr ( UCodeBlock* cb, A
}
+ /* SHUFPD */
+ if (sz == 2 && insn[0] == 0x0F && insn[1] == 0xC6) {
+ eip = dis_SSE3_reg_or_mem_Imm8 ( cb, sorb, eip+2, 16, "shufpd",
+ 0x66, insn[0], insn[1] );
+ goto decode_success;
+ }
+
/* SHUFPS */
if (insn[0] == 0x0F && insn[1] == 0xC6) {
|
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:44:15
|
CVS commit by mueller:
backport pkgconfig support
A valgrind.pc.in 1.1.2.1
M +1 -0 .cvsignore 1.4.4.1
M +5 -2 Makefile.am 1.55.2.2
M +1 -0 configure.in 1.93.2.6
--- valgrind/.cvsignore #1.4:1.4.4.1
@@ -11,4 +11,5 @@
vg_annotate
vg_cachegen
+valgrind.pc
default.supp
bin
--- valgrind/Makefile.am #1.55.2.1:1.55.2.2
@@ -26,5 +26,8 @@
val_DATA = $(SUPP_FILES) default.supp
-BUILT_SOURCES = default.supp
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = valgrind.pc
+
+BUILT_SOURCES = default.supp valgrind.pc
DISTCLEANFILES = default.supp
@@ -41,5 +44,5 @@
README_PACKAGERS \
README_MISSING_SYSCALL_OR_IOCTL TODO \
- valgrind.spec valgrind.spec.in
+ valgrind.spec valgrind.spec.in valgrind.pc.in
install-exec-hook:
--- valgrind/configure.in #1.93.2.5:1.93.2.6
@@ -379,4 +379,5 @@
Makefile
valgrind.spec
+ valgrind.pc
docs/Makefile
tests/Makefile
|
|
From: Dirk M. <mu...@kd...> - 2004-01-02 22:43:01
|
CVS commit by mueller:
implement cmpxchg8b, patch by Tom Hughes.
CCMAIL: 696...@bu...
M +24 -0 coregrind/vg_helpers.S 1.27
M +2 -0 coregrind/vg_include.h 1.165
M +3 -0 coregrind/vg_main.c 1.134
M +75 -1 coregrind/vg_to_ucode.c 1.117
M +2 -0 include/vg_skin.h.base 1.5
--- valgrind/coregrind/vg_helpers.S #1.26:1.27
@@ -95,4 +95,5 @@
* setting and getting obscure eflags
* double-length shifts
+ * eight byte compare and exchange
All routines use a standard calling convention designed for
@@ -631,4 +632,27 @@
+/* Eight byte compare and exchange. */
+.globl VG_(helper_cmpxchg8b)
+VG_(helper_cmpxchg8b):
+ pushl %eax
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ movl 20(%esp), %eax
+ movl 24(%esp), %edx
+ movl 28(%esp), %ebx
+ movl 32(%esp), %ecx
+ cmpxchg8b 36(%esp)
+ movl %eax, 20(%esp)
+ movl %edx, 24(%esp)
+ movl %ebx, 28(%esp)
+ movl %ecx, 32(%esp)
+ popl %edx
+ popl %ecx
+ popl %ebx
+ popl %eax
+ ret
+
+
/* Undefined instruction (generates SIGILL) */
.globl VG_(helper_undefined_instruction)
--- valgrind/coregrind/vg_include.h #1.164:1.165
@@ -1746,4 +1746,6 @@ extern void VG_(helper_DAS);
extern void VG_(helper_DAA);
+extern void VG_(helper_cmpxchg8b);
+
extern void VG_(helper_undefined_instruction);
--- valgrind/coregrind/vg_main.c #1.133:1.134
@@ -103,4 +103,5 @@ Int VGOFF_(helper_LAHF) = INVALID_OFFSET
Int VGOFF_(helper_DAS) = INVALID_OFFSET;
Int VGOFF_(helper_DAA) = INVALID_OFFSET;
+Int VGOFF_(helper_cmpxchg8b) = INVALID_OFFSET;
Int VGOFF_(helper_undefined_instruction) = INVALID_OFFSET;
@@ -423,4 +424,6 @@ static void vg_init_baseBlock ( void )
VGOFF_(helper_OUT)
= alloc_BaB_1_set( (Addr) & VG_(helper_OUT));
+ VGOFF_(helper_cmpxchg8b)
+ = alloc_BaB_1_set( (Addr) & VG_(helper_cmpxchg8b));
VGOFF_(helper_undefined_instruction)
--- valgrind/coregrind/vg_to_ucode.c #1.116:1.117
@@ -2755,5 +2755,5 @@ Addr dis_cmpxchg_G_E ( UCodeBlock* cb,
uInstr2(cb, GET, size, ArchReg, gregOfRM(rm), TempReg, src);
uInstr2(cb, GET, size, ArchReg, R_EAX, TempReg, acc);
- uInstr2(cb, MOV, size, TempReg, acc, TempReg, junk);
+ uInstr2(cb, MOV, 4, TempReg, acc, TempReg, junk);
uInstr2(cb, SUB, size, TempReg, dest, TempReg, junk);
setFlagsFromUOpcode(cb, SUB);
@@ -2777,4 +2777,72 @@ Addr dis_cmpxchg_G_E ( UCodeBlock* cb,
+static
+Addr dis_cmpxchg8b ( UCodeBlock* cb,
+ UChar sorb,
+ Addr eip0 )
+{
+ Int tal, tah, junkl, junkh, destl, desth, srcl, srch, accl, acch;
+ UChar dis_buf[50];
+ UChar rm;
+ UInt pair;
+
+ rm = getUChar(eip0);
+ accl = newTemp(cb);
+ acch = newTemp(cb);
+ srcl = newTemp(cb);
+ srch = newTemp(cb);
+ destl = newTemp(cb);
+ desth = newTemp(cb);
+ junkl = newTemp(cb);
+ junkh = newTemp(cb);
+
+ vg_assert(!epartIsReg(rm));
+
+ pair = disAMode ( cb, sorb, eip0, dis?dis_buf:NULL );
+ tal = LOW24(pair);
+ tah = newTemp(cb);
+ uInstr2(cb, MOV, 4, TempReg, tal, TempReg, tah);
+ uInstr2(cb, ADD, 4, Literal, 0, TempReg, tah);
+ uLiteral(cb, 4);
+ eip0 += HI8(pair);
+ if (dis) VG_(printf)("cmpxchg8b %s\n", dis_buf);
+
+ uInstr0(cb, CALLM_S, 0);
+
+ uInstr2(cb, LOAD, 4, TempReg, tah, TempReg, desth);
+ uInstr1(cb, PUSH, 4, TempReg, desth);
+ uInstr2(cb, LOAD, 4, TempReg, tal, TempReg, destl);
+ uInstr1(cb, PUSH, 4, TempReg, destl);
+ uInstr2(cb, GET, 4, ArchReg, R_ECX, TempReg, srch);
+ uInstr1(cb, PUSH, 4, TempReg, srch);
+ uInstr2(cb, GET, 4, ArchReg, R_EBX, TempReg, srcl);
+ uInstr1(cb, PUSH, 4, TempReg, srcl);
+ uInstr2(cb, GET, 4, ArchReg, R_EDX, TempReg, acch);
+ uInstr1(cb, PUSH, 4, TempReg, acch);
+ uInstr2(cb, GET, 4, ArchReg, R_EAX, TempReg, accl);
+ uInstr1(cb, PUSH, 4, TempReg, accl);
+
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_cmpxchg8b));
+ uFlagsRWU(cb, FlagsEmpty, FlagZ, FlagsEmpty);
+
+ uInstr1(cb, POP, 4, TempReg, accl);
+ uInstr2(cb, PUT, 4, TempReg, accl, ArchReg, R_EAX);
+ uInstr1(cb, POP, 4, TempReg, acch);
+ uInstr2(cb, PUT, 4, TempReg, acch, ArchReg, R_EDX);
+ uInstr1(cb, POP, 4, TempReg, srcl);
+ uInstr2(cb, PUT, 4, TempReg, srcl, ArchReg, R_EBX);
+ uInstr1(cb, POP, 4, TempReg, srch);
+ uInstr2(cb, PUT, 4, TempReg, srch, ArchReg, R_ECX);
+ uInstr1(cb, POP, 4, TempReg, destl);
+ uInstr2(cb, STORE, 4, TempReg, destl, TempReg, tal);
+ uInstr1(cb, POP, 4, TempReg, desth);
+ uInstr2(cb, STORE, 4, TempReg, desth, TempReg, tah);
+
+ uInstr0(cb, CALLM_E, 0);
+
+ return eip0;
+}
+
+
/* Handle conditional move instructions of the form
cmovcc E(reg-or-mem), G(reg)
@@ -5887,7 +5955,13 @@ static Addr disInstr ( UCodeBlock* cb, A
/* =-=-=-=-=-=-=-=-=- CMPXCHG -=-=-=-=-=-=-=-=-=-= */
+ case 0xB0: /* CMPXCHG Gv,Ev */
+ eip = dis_cmpxchg_G_E ( cb, sorb, 1, eip );
+ break;
case 0xB1: /* CMPXCHG Gv,Ev */
eip = dis_cmpxchg_G_E ( cb, sorb, sz, eip );
break;
+ case 0xC7: /* CMPXCHG8B Gv */
+ eip = dis_cmpxchg8b ( cb, sorb, eip );
+ break;
/* =-=-=-=-=-=-=-=-=- CPUID -=-=-=-=-=-=-=-=-=-=-= */
--- valgrind/include/vg_skin.h.base #1.4:1.5
@@ -1184,4 +1184,6 @@
extern Int VGOFF_(helper_DAA);
+extern Int VGOFF_(helper_cmpxchg8b);
+
/*====================================================================*/
|
|
From: Doug R. <df...@nl...> - 2004-01-02 11:57:10
|
On Mon, 2003-12-29 at 09:30, Doug Rabson wrote: > > > > I'd be really interested if you can update the port for the FV world. > > I'm going to do that next now that I have the pthreads stuff mostly > working. I've updated the port to work with the post FV valgrind. You can get a patch against today's CVS from http://people.freebsd.org/~dfr/valgrind-20040102-dfr.diff. The only really dodgy bits in this patch are in stage1.c where I had to stub out the stack alignment bits. The code couldn't code when the alignment offset wasn't exactly zero because it assumed that the new aux entries would fit exactly into the gap. I also had problems moving the brk() up past the end of stage2 so I punted on that and just overrode brk() and sbrk() instead. I had problems with vg_signals.c for the async signal handlers. Currently FreeBSD has a bug (which will be fixed RSN) with sigaltstack that means that all threads share the same stack setting. This meant that async signals (intended for the proxylwp) were being delivered on the signal stack instead of the proxylwp stack. I just changed the code to not set SA_ONSTACK for those signals. Attaching GDB doesn't work very well with this port since we have no equivalent of /proc/self/fd. I guess the code could be changed to remember the exec filename and pass that instead of /proc/self/fd/$d. This also affected the implementation of VG_(resolve_filename) which I worked around by using the file descriptor tracking code to lookup the filename. I haven't tested this patch with a Linux box - my RH9 machine is several miles away and switched off for the holidays. I've tried to keep things decently conditional but there are almost certainly one or two nits. |
|
From: Julian S. <js...@ac...> - 2004-01-02 11:39:44
|
CVS commit by jseward:
(David Lee, <dav...@te...>)
This patch fixes a semaphore leak within valgrind. If your application
dynamically allocates/releases semaphores, you will very quickly run out.
Also, as a nice side effect, it implements sem_destroy properly.
(me)
Protect sem_getvalue with a lock/unlock of the semaphore's mutex,
like the other routines do.
M +54 -2 vg_libpthread.c 1.142
--- valgrind/coregrind/vg_libpthread.c #1.141:1.142
@@ -2254,4 +2254,5 @@ typedef
pthread_cond_t se_cv;
int count;
+ int waiters;
}
vg_sem_t;
@@ -2288,4 +2289,27 @@ static vg_sem_t* se_remap ( sem_t* orig
}
+static void se_unmap( sem_t* orig )
+{
+ int res, i;
+ res = __pthread_mutex_lock(&se_remap_mx);
+ my_assert(res == 0);
+
+ for (i = 0; i < se_remap_used; i++) {
+ if (se_remap_orig[i] == orig)
+ break;
+ }
+ if (i == se_remap_used) {
+ res = pthread_mutex_unlock(&se_remap_mx);
+ my_assert(res == 0);
+ barf("se_unmap: unmapping invalid semaphore");
+ } else {
+ se_remap_orig[i] = se_remap_orig[--se_remap_used];
+ se_remap_orig[se_remap_used] = 0;
+ memset(&se_remap_new[se_remap_used], 0,
+ sizeof(se_remap_new[se_remap_used]));
+ }
+ res = pthread_mutex_unlock(&se_remap_mx);
+ my_assert(res == 0);
+}
int sem_init(sem_t *sem, int pshared, unsigned int value)
@@ -2318,5 +2342,7 @@ int sem_wait ( sem_t* sem )
my_assert(res == 0);
while (vg_sem->count == 0) {
+ ++vg_sem->waiters;
res = pthread_cond_wait(&vg_sem->se_cv, &vg_sem->se_mx);
+ --vg_sem->waiters;
my_assert(res == 0);
}
@@ -2371,8 +2397,13 @@ int sem_trywait ( sem_t* sem )
int sem_getvalue(sem_t* sem, int * sval)
{
+ int res;
vg_sem_t* vg_sem;
- ensure_valgrind("sem_trywait");
+ ensure_valgrind("sem_getvalue");
vg_sem = se_remap(sem);
+ res = __pthread_mutex_lock(&vg_sem->se_mx);
+ my_assert(res == 0);
*sval = vg_sem->count;
+ res = __pthread_mutex_unlock(&vg_sem->se_mx);
+ my_assert(res == 0);
return 0;
}
@@ -2381,6 +2412,25 @@ int sem_getvalue(sem_t* sem, int * sval)
int sem_destroy(sem_t * sem)
{
- kludged("sem_destroy", "(it always succeeds, even if semaphore waited on)");
/* if someone waiting on this semaphore, errno = EBUSY, return -1 */
+ vg_sem_t* vg_sem;
+ int res;
+ ensure_valgrind("sem_destroy");
+ vg_sem = se_remap(sem);
+ res = __pthread_mutex_lock(&vg_sem->se_mx);
+ my_assert(res == 0);
+ if (vg_sem->waiters > 0)
+ {
+ *(__errno_location()) = EBUSY;
+ res = __pthread_mutex_unlock(&vg_sem->se_mx);
+ my_assert(res == 0);
+ return -1;
+ }
+ res = pthread_cond_destroy(&vg_sem->se_cv);
+ my_assert(res == 0);
+ res = __pthread_mutex_unlock(&vg_sem->se_mx);
+ my_assert(res == 0);
+ res = pthread_mutex_destroy(&vg_sem->se_mx);
+ my_assert(res == 0);
+ se_unmap(sem);
return 0;
}
@@ -2396,5 +2446,7 @@ int sem_timedwait(sem_t* sem, const stru
my_assert(res == 0);
while ( vg_sem->count == 0 && res != ETIMEDOUT ) {
+ ++vg_sem->waiters;
res = pthread_cond_timedwait(&vg_sem->se_cv, &vg_sem->se_mx, abstime);
+ --vg_sem->waiters;
}
if ( vg_sem->count > 0 ) {
|