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
(31) |
2
(27) |
|
3
(25) |
4
(21) |
5
(21) |
6
(21) |
7
(32) |
8
(23) |
9
(15) |
|
10
(12) |
11
(9) |
12
(10) |
13
(10) |
14
(9) |
15
(7) |
16
(20) |
|
17
(14) |
18
(71) |
19
(67) |
20
(50) |
21
(25) |
22
(15) |
23
(37) |
|
24
(25) |
25
(41) |
26
(34) |
27
(57) |
28
(20) |
29
(30) |
30
(13) |
|
31
(18) |
|
|
|
|
|
|
|
From: <sv...@va...> - 2005-07-23 23:23:33
|
Author: sewardj
Date: 2005-07-24 00:22:24 +0100 (Sun, 24 Jul 2005)
New Revision: 4234
Log:
Remove dead #undef.
Modified:
trunk/coregrind/m_translate.c
Modified: trunk/coregrind/m_translate.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/coregrind/m_translate.c 2005-07-23 17:45:15 UTC (rev 4233)
+++ trunk/coregrind/m_translate.c 2005-07-23 23:22:24 UTC (rev 4234)
@@ -583,8 +583,6 @@
=20
VGP_POPCC(VgpVexTime);
=20
-#undef DECIDE_IF_PRINTING_CODEGEN
-
/* Copy data at trans_addr into the translation cache. */
vg_assert(tmpbuf_used > 0 && tmpbuf_used < 65536);
=20
|
|
From: <sv...@va...> - 2005-07-23 20:35:29
|
Author: sewardj
Date: 2005-07-23 21:34:51 +0100 (Sat, 23 Jul 2005)
New Revision: 1296
Log:
Some of the ppc32 front end stuff generates huge amounts of IR and
more space is needed.
Modified:
trunk/priv/main/vex_util.c
Modified: trunk/priv/main/vex_util.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/priv/main/vex_util.c 2005-07-23 17:37:03 UTC (rev 1295)
+++ trunk/priv/main/vex_util.c 2005-07-23 20:34:51 UTC (rev 1296)
@@ -51,7 +51,7 @@
MByte/sec. Once the size increases enough to fall out of the cache
into memory, the rate falls by about a factor of 3.=20
*/
-#define N_TEMPORARY_BYTES 1200000
+#define N_TEMPORARY_BYTES 2400000
=20
static Char temporary[N_TEMPORARY_BYTES];
static Int temporary_used =3D 0;
|
|
From: Tom H. <to...@co...> - 2005-07-23 17:55:06
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> > > the sysenter instruction is the culprit
> >
> > How did you get to a sysenter instruction though? We don't support
> > that and instead force all system calls to go the int $80 route.
>
> This is on solaris-x86.
So presumably you just need to make vex-x86 treat that as a syscall
instruction and end the BB so valgrind gets control and then Naveen
can worry about writing a system call handler to haul values out of
the appropriate registers.
In principle we could use that on linux as well and remove the hack
that forces int $80 for system calls.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: <sv...@va...> - 2005-07-23 17:45:18
|
Author: sewardj
Date: 2005-07-23 18:45:15 +0100 (Sat, 23 Jul 2005)
New Revision: 4233
Log:
Replace a bunch of useless memory-to-memory copies with some highly
predictable branches.
Modified:
trunk/coregrind/m_debuginfo/symtab.c
Modified: trunk/coregrind/m_debuginfo/symtab.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/coregrind/m_debuginfo/symtab.c 2005-07-23 17:14:03 UTC (rev 423=
2)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-07-23 17:45:15 UTC (rev 423=
3)
@@ -711,7 +711,8 @@
j =3D 0;
for (i =3D 0; i < si->scopetab_used; i++) {
if (si->scopetab[i].size > 0) {
- si->scopetab[j] =3D si->scopetab[i];
+ if (j !=3D i)
+ si->scopetab[j] =3D si->scopetab[i];
j++;
}
}
@@ -790,7 +791,8 @@
j =3D 0;
for (i =3D 0; i < (Int)si->loctab_used; i++) {
if (si->loctab[i].size > 0) {
- si->loctab[j] =3D si->loctab[i];
+ if (j !=3D i)
+ si->loctab[j] =3D si->loctab[i];
j++;
}
}
@@ -887,7 +889,8 @@
j =3D 0;
for (i =3D 0; i < (Int)si->cfisi_used; i++) {
if (si->cfisi[i].len > 0) {
- si->cfisi[j] =3D si->cfisi[i];
+ if (j !=3D i)
+ si->cfisi[j] =3D si->cfisi[i];
j++;
}
}
|
|
From: <sv...@va...> - 2005-07-23 17:37:06
|
Author: sewardj
Date: 2005-07-23 18:37:03 +0100 (Sat, 23 Jul 2005)
New Revision: 1295
Log:
Reenable an ADC variant.
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/toIR.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/priv/guest-amd64/toIR.c 2005-07-23 13:50:32 UTC (rev 1294)
+++ trunk/priv/guest-amd64/toIR.c 2005-07-23 17:37:03 UTC (rev 1295)
@@ -2544,7 +2544,6 @@
assign(src, getIRegG(size,pfx,rm));
=20
if (addSubCarry && op8 =3D=3D Iop_Add8) {
- vassert(0); /* awaiting test case */
helper_ADC( size, dst1, dst0, src );
storeLE(mkexpr(addr), mkexpr(dst1));
} else
|
|
From: Julian S. <js...@ac...> - 2005-07-23 17:35:15
|
> > the sysenter instruction is the culprit > > How did you get to a sysenter instruction though? We don't support > that and instead force all system calls to go the int $80 route. This is on solaris-x86. J |
|
From: Tom H. <to...@co...> - 2005-07-23 17:22:44
|
In message <200...@we...>
Naveen Kumar <g_n...@ya...> wrote:
> Got another unhandled instr
>
> vex x86->IR: unhandled instruction bytes: 0xF 0x34
> 0x5A 0x89
>
> 0f 34 sysenter
> 5a popl %edx
> 89 54 24 00 movl %edx,0x0(%esp)
>
> the sysenter instruction is the culprit
How did you get to a sysenter instruction though? We don't support
that and instead force all system calls to go the int $80 route.
I don't know how hard it would be too implement - we do support the amd
version (the syscall instruction) on amd64 (but not on x86 currently).
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Naveen K. <g_n...@ya...> - 2005-07-23 17:18:10
|
Got another unhandled instr vex x86->IR: unhandled instruction bytes: 0xF 0x34 0x5A 0x89 0f 34 sysenter 5a popl %edx 89 54 24 00 movl %edx,0x0(%esp) the sysenter instruction is the culprit Naveen __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: <sv...@va...> - 2005-07-23 17:14:18
|
Author: sewardj
Date: 2005-07-23 18:14:03 +0100 (Sat, 23 Jul 2005)
New Revision: 4232
Log:
When canonicalising CFI information, truncate overlapping address
ranges and remove zero-length entries. If these appear it's because
the generating compiler has created invalid CFI info. Nevertheless we
should handle this robustly. This fixes a bug reported by Bill
Hoover.
Modified:
trunk/coregrind/m_debuginfo/symtab.c
Modified: trunk/coregrind/m_debuginfo/symtab.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/coregrind/m_debuginfo/symtab.c 2005-07-23 11:36:03 UTC (rev 423=
1)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-07-23 17:14:03 UTC (rev 423=
2)
@@ -838,15 +838,22 @@
static
void canonicaliseCfiSI ( SegInfo* si )
{
- Int i;
+ Int i, j;
const Addr minAddr =3D 0;
const Addr maxAddr =3D ~minAddr;
=20
+ /* Note: take care in here. si->cfisi can be NULL, in which
+ case _used and _size fields will be zero. */
+ if (si->cfisi =3D=3D NULL) {
+ vg_assert(si->cfisi_used =3D=3D 0);
+ vg_assert(si->cfisi_size =3D=3D 0);
+ }
+
/* Set cfisi_minaddr and cfisi_maxaddr to summarise the entire
address range contained in cfisi[0 .. cfisi_used-1]. */
si->cfisi_minaddr =3D maxAddr;=20
si->cfisi_maxaddr =3D minAddr;
- for (i =3D 0; i < si->cfisi_used; i++) {
+ for (i =3D 0; i < (Int)si->cfisi_used; i++) {
Addr here_min =3D si->cfisi[i].base;
Addr here_max =3D si->cfisi[i].base + si->cfisi[i].len - 1;
if (here_min < si->cfisi_minaddr)
@@ -863,8 +870,32 @@
/* Sort the cfisi array by base address. */
VG_(ssort)(si->cfisi, si->cfisi_used, sizeof(*si->cfisi), compare_Cfi=
SI);
=20
+ /* If two adjacent entries overlap, truncate the first. */
+ for (i =3D 0; i < (Int)si->cfisi_used-1; i++) {
+ if (si->cfisi[i].base + si->cfisi[i].len > si->cfisi[i+1].base) {
+ Int new_len =3D si->cfisi[i+1].base - si->cfisi[i].base;
+ /* how could it be otherwise? The entries are sorted by the
+ .base field. */ =20
+ vg_assert(new_len >=3D 0);
+ vg_assert(new_len <=3D si->cfisi[i].len);
+ si->cfisi[i].len =3D new_len;
+ }
+ }
+
+ /* Zap any zero-sized entries resulting from the truncation
+ process. */
+ j =3D 0;
+ for (i =3D 0; i < (Int)si->cfisi_used; i++) {
+ if (si->cfisi[i].len > 0) {
+ si->cfisi[j] =3D si->cfisi[i];
+ j++;
+ }
+ }
+ /* VG_(printf)("XXXXXXXXXXXXX %d %d\n", si->cfisi_used, j); */
+ si->cfisi_used =3D j;
+
/* Ensure relevant postconditions hold. */
- for (i =3D 0; i < si->cfisi_used; i++) {
+ for (i =3D 0; i < (Int)si->cfisi_used; i++) {
/* No zero-length ranges. */
vg_assert(si->cfisi[i].len > 0);
/* Makes sense w.r.t. summary address range */
|
|
From: Tom H. <to...@co...> - 2005-07-23 16:24:01
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> > You don't have to precompile them, just make sure you use -gstabs
> > or -gstabs+ when building them to force stabs debugging.
>
> That's true, but that would then expose you to the vagaries of whatever
> the compiler in question decided to emit into the stabs, which would mean
> it wasn't really clear what was being tested.
Putting the assembly output from the compiler in is another option
as that preserves the stabs that the compiler generated whilst still
being text. That said subversion should handle binary files better.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Julian S. <js...@ac...> - 2005-07-23 15:56:10
|
> Nicholas Nethercote <nj...@cs...> wrote: > > So I was wondering about the idea of keeping some pre-compiled binaries > > in the test suite to improve its coverage. Any reason why this wouldn't > > work? Perhaps you'd want to use static binaries, which would then be > > fairly large... It's a good question. > You don't have to precompile them, just make sure you use -gstabs > or -gstabs+ when building them to force stabs debugging. That's true, but that would then expose you to the vagaries of whatever the compiler in question decided to emit into the stabs, which would mean it wasn't really clear what was being tested. How about adding to the repo a .so which is made just once -- so we know exactly what it tests, and kept the same forever. The test can then dlopen it, which will make V read the debug info. This gives us a fixed test without having to incorporate a huge static binary. V can then run code inside the .so, which presumably does a variety of Bad Things which memcheck reports, and so the reported line numbers on those error messages should match known-good values. Hmm. Interesting idea in general. We spent way too much time fixing up trivial differences in backtraces in the regtest suite, and this provides at least a partial way to insulate ourselves from such variation. J |
|
From: <sv...@va...> - 2005-07-23 13:50:41
|
Author: sewardj
Date: 2005-07-23 14:50:32 +0100 (Sat, 23 Jul 2005)
New Revision: 1294
Log:
Implement ADC Ib, AL.
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/toIR.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/priv/guest-amd64/toIR.c 2005-07-23 13:28:05 UTC (rev 1293)
+++ trunk/priv/guest-amd64/toIR.c 2005-07-23 13:50:32 UTC (rev 1294)
@@ -2662,6 +2662,7 @@
/* op $immediate, AL/AX/EAX/RAX. */
static
ULong dis_op_imm_A ( Int size,
+ Bool carrying,
IROp op8,
Bool keep,
Long delta,
@@ -2675,14 +2676,23 @@
Long lit =3D getSDisp(size4,delta);
assign(dst0, getIRegRAX(size));
assign(src, mkU(ty,lit & mkSizeMask(size)));
- assign(dst1, binop(mkSizedOp(ty,op8), mkexpr(dst0), mkexpr(src)) );
- if (isAddSub(op8))
+
+ if (isAddSub(op8) && !carrying) {
+ assign(dst1, binop(mkSizedOp(ty,op8), mkexpr(dst0), mkexpr(src)) )=
;
setFlags_DEP1_DEP2(op8, dst0, src, ty);
+ }
else
- if (isLogic(op8))
+ if (isLogic(op8)) {
+ vassert(!carrying);
+ assign(dst1, binop(mkSizedOp(ty,op8), mkexpr(dst0), mkexpr(src)) )=
;
setFlags_DEP1(op8, dst1, ty);
+ }
else
- vpanic("dis_op_imm_A(amd64)");
+ if (op8 =3D=3D Iop_Add8 && carrying) {
+ helper_ADC( size, dst1, dst0, src );
+ }
+ else
+ vpanic("dis_op_imm_A(amd64,guest)");
=20
if (keep)
putIRegRAX(size, mkexpr(dst1));
@@ -11792,25 +11802,25 @@
=20
case 0x04: /* ADD Ib, AL */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( 1, Iop_Add8, True, delta, "add" );
+ delta =3D dis_op_imm_A( 1, False, Iop_Add8, True, delta, "add" );
break;
case 0x05: /* ADD Iv, eAX */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A(sz, Iop_Add8, True, delta, "add" );
+ delta =3D dis_op_imm_A(sz, False, Iop_Add8, True, delta, "add" );
break;
=20
case 0x0C: /* OR Ib, AL */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( 1, Iop_Or8, True, delta, "or" );
+ delta =3D dis_op_imm_A( 1, False, Iop_Or8, True, delta, "or" );
break;
case 0x0D: /* OR Iv, eAX */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( sz, Iop_Or8, True, delta, "or" );
+ delta =3D dis_op_imm_A( sz, False, Iop_Or8, True, delta, "or" );
break;
=20
-//.. //-- case 0x14: /* ADC Ib, AL */
-//.. //-- delta =3D dis_op_imm_A( 1, ADC, True, delta, "adc" );
-//.. //-- break;
+ case 0x14: /* ADC Ib, AL */
+ delta =3D dis_op_imm_A( 1, True, Iop_Add8, True, delta, "adc" );
+ break;
//.. //-- case 0x15: /* ADC Iv, eAX */
//.. //-- delta =3D dis_op_imm_A( sz, ADC, True, delta, "adc" );
//.. //-- break;
@@ -11824,47 +11834,47 @@
//.. //--=20
case 0x24: /* AND Ib, AL */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( 1, Iop_And8, True, delta, "and" );
+ delta =3D dis_op_imm_A( 1, False, Iop_And8, True, delta, "and" );
break;
case 0x25: /* AND Iv, eAX */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( sz, Iop_And8, True, delta, "and" );
+ delta =3D dis_op_imm_A( sz, False, Iop_And8, True, delta, "and" );
break;
=20
case 0x2C: /* SUB Ib, AL */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A(1, Iop_Sub8, True, delta, "sub" );
+ delta =3D dis_op_imm_A(1, False, Iop_Sub8, True, delta, "sub" );
break;
case 0x2D: /* SUB Iv, eAX */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( sz, Iop_Sub8, True, delta, "sub" );
+ delta =3D dis_op_imm_A( sz, False, Iop_Sub8, True, delta, "sub" );
break;
=20
case 0x34: /* XOR Ib, AL */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( 1, Iop_Xor8, True, delta, "xor" );
+ delta =3D dis_op_imm_A( 1, False, Iop_Xor8, True, delta, "xor" );
break;
case 0x35: /* XOR Iv, eAX */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( sz, Iop_Xor8, True, delta, "xor" );
+ delta =3D dis_op_imm_A( sz, False, Iop_Xor8, True, delta, "xor" );
break;
=20
case 0x3C: /* CMP Ib, AL */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( 1, Iop_Sub8, False, delta, "cmp" );
+ delta =3D dis_op_imm_A( 1, False, Iop_Sub8, False, delta, "cmp" );
break;
case 0x3D: /* CMP Iv, eAX */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( sz, Iop_Sub8, False, delta, "cmp" );
+ delta =3D dis_op_imm_A( sz, False, Iop_Sub8, False, delta, "cmp" )=
;
break;
=20
case 0xA8: /* TEST Ib, AL */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( 1, Iop_And8, False, delta, "test" );
+ delta =3D dis_op_imm_A( 1, False, Iop_And8, False, delta, "test" )=
;
break;
case 0xA9: /* TEST Iv, eAX */
if (haveF2orF3(pfx)) goto decode_failure;
- delta =3D dis_op_imm_A( sz, Iop_And8, False, delta, "test" );
+ delta =3D dis_op_imm_A( sz, False, Iop_And8, False, delta, "test" =
);
break;
=20
/* ------------------------ opl Ev, Gv ----------------- */
|
|
From: <sv...@va...> - 2005-07-23 13:28:09
|
Author: sewardj Date: 2005-07-23 14:28:05 +0100 (Sat, 23 Jul 2005) New Revision: 1293 Log: Enable RCR tests. Modified: trunk/test/test-amd64.c Modified: trunk/test/test-amd64.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/test/test-amd64.c 2005-07-23 13:19:32 UTC (rev 1292) +++ trunk/test/test-amd64.c 2005-07-23 13:28:05 UTC (rev 1293) @@ -1,3 +1,13 @@ + +/* To build:=20 + + gcc -O -g -o test-amd64 test-amd64.c -lm + + */ + +/* Contrary to what the next comment says, this is now an amd64 CPU + test. */ + /* * x86 CPU test *=20 @@ -120,11 +130,9 @@ #define OP ror #include "test-amd64-shift.h" =20 -#if 0 #define OP rcr #define OP_CC #include "test-amd64-shift.h" -#endif =20 #if 0 #define OP rcl |
|
From: <sv...@va...> - 2005-07-23 13:20:23
|
Author: sewardj
Date: 2005-07-23 14:19:32 +0100 (Sat, 23 Jul 2005)
New Revision: 1292
Log:
An appallingly inefficient, but correct, implementation of rcr. On
x86, rcr is a dog. On amd64 it is a mangy dog with fleas on.
Modified:
trunk/priv/guest-amd64/gdefs.h
trunk/priv/guest-amd64/ghelpers.c
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/gdefs.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/priv/guest-amd64/gdefs.h 2005-07-23 12:07:37 UTC (rev 1291)
+++ trunk/priv/guest-amd64/gdefs.h 2005-07-23 13:19:32 UTC (rev 1292)
@@ -94,11 +94,9 @@
=20
//extern ULong amd64g_calculate_FXAM ( ULong tag, ULong dbl );
=20
-// Hmm. This is going to be a problem as it needs to return
-// 64bits and rflags.
-//extern ULong amd64g_calculate_RCR (=20
-// UInt arg, UInt rot_amt, UInt eflags_in, UInt sz=20
-// );
+extern ULong amd64g_calculate_RCR (=20
+ ULong arg, ULong rot_amt, ULong rflags_in, Long sz=20
+ );
=20
extern ULong amd64g_check_fldcw ( ULong fpucw );
=20
Modified: trunk/priv/guest-amd64/ghelpers.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/priv/guest-amd64/ghelpers.c 2005-07-23 12:07:37 UTC (rev 1291)
+++ trunk/priv/guest-amd64/ghelpers.c 2005-07-23 13:19:32 UTC (rev 1292)
@@ -1507,6 +1507,75 @@
}
=20
=20
+ULong amd64g_calculate_RCR ( ULong arg,=20
+ ULong rot_amt,=20
+ ULong rflags_in,=20
+ Long szIN )
+{
+ Bool wantRflags =3D toBool(szIN < 0);
+ ULong sz =3D wantRflags ? (-szIN) : szIN;
+ ULong tempCOUNT =3D rot_amt & (sz =3D=3D 8 ? 0x3F : 0x1F);
+ ULong cf=3D0, of=3D0, tempcf;
+
+ switch (sz) {
+ case 8:
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ of =3D ((arg >> 63) ^ cf) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D arg & 1;
+ arg =3D (arg >> 1) | (cf << 63);
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ break;
+ case 4:
+ while (tempCOUNT >=3D 33) tempCOUNT -=3D 33;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ of =3D ((arg >> 31) ^ cf) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D arg & 1;
+ arg =3D ((arg >> 1) & 0x7FFFFFFFULL) | (cf << 31);
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ break;
+ case 2:
+ while (tempCOUNT >=3D 17) tempCOUNT -=3D 17;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ of =3D ((arg >> 15) ^ cf) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D arg & 1;
+ arg =3D ((arg >> 1) & 0x7FFFULL) | (cf << 15);
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ break;
+ case 1:
+ while (tempCOUNT >=3D 9) tempCOUNT -=3D 9;
+ cf =3D (rflags_in >> AMD64G_CC_SHIFT_C) & 1;
+ of =3D ((arg >> 7) ^ cf) & 1;
+ while (tempCOUNT > 0) {
+ tempcf =3D arg & 1;
+ arg =3D ((arg >> 1) & 0x7FULL) | (cf << 7);
+ cf =3D tempcf;
+ tempCOUNT--;
+ }
+ break;
+ default:
+ vpanic("calculate_RCR(amd64g): invalid size");
+ }
+
+ cf &=3D 1;
+ of &=3D 1;
+ rflags_in &=3D ~(AMD64G_CC_MASK_C | AMD64G_CC_MASK_O);
+ rflags_in |=3D (cf << AMD64G_CC_SHIFT_C) | (of << AMD64G_CC_SHIFT_O);
+
+ /* caller can ask to have back either the resulting flags or
+ resulting value, but not both */
+ return wantRflags ? rflags_in : arg;
+}
+
+
/*---------------------------------------------------------------*/
/*--- Helpers for MMX/SSE/SSE2. ---*/
/*---------------------------------------------------------------*/
Modified: trunk/priv/guest-amd64/toIR.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/priv/guest-amd64/toIR.c 2005-07-23 12:07:37 UTC (rev 1291)
+++ trunk/priv/guest-amd64/toIR.c 2005-07-23 13:19:32 UTC (rev 1292)
@@ -2922,30 +2922,59 @@
}
=20
if (isRotateRC) {
- vpanic("dis_Grp2(Reg,amd64): unhandled case(RotateRC)");
- vassert(0);
-//.. /* call a helper; this insn is so ridiculous it does not dese=
rve
-//.. better */
-//.. IRTemp r64 =3D newTemp(Ity_I64);
-//.. IRExpr** args=20
-//.. =3D mkIRExprVec_4( widenUto32(mkexpr(dst0)), /* thing to r=
otate */
-//.. widenUto32(shift_expr), /* rotate amoun=
t */
-//.. widenUto32(mk_x86g_calculate_eflags_all()=
),
-//.. mkU32(sz) );
-//.. assign( r64, mkIRExprCCall(
-//.. Ity_I64,=20
-//.. 0/*regparm*/,=20
-//.. "x86g_calculate_RCR", &x86g_calculate_RCR,
-//.. args
-//.. )
-//.. );
-//.. /* new eflags in hi half r64; new value in lo half r64 */
-//.. assign( dst1, narrowTo(ty, unop(Iop_64to32, mkexpr(r64))) );
-//.. stmt( IRStmt_Put( OFFB_CC_OP, mkU32(X86G_CC_OP_COPY) ));
-//.. stmt( IRStmt_Put( OFFB_CC_DEP1, unop(Iop_64HIto32, mkexpr(r64=
)) ));
-//.. stmt( IRStmt_Put( OFFB_CC_DEP2, mkU32(0) ));
+ /* Call a helper; this insn is so ridiculous it does not deserve
+ better. One problem is, the helper has to calculate both the
+ new value and the new flags. This is more than 64 bits, and
+ there is no way to return more than 64 bits from the helper.
+ Hence the crude and obvious solution is to call it twice,
+ using the sign of the sz field to indicate whether it is the
+ value or rflags result we want.
+ */
+ IRExpr** argsVALUE;
+ IRExpr** argsRFLAGS;
+
+ IRTemp new_value =3D newTemp(Ity_I64);
+ IRTemp new_rflags =3D newTemp(Ity_I64);
+ IRTemp old_rflags =3D newTemp(Ity_I64);
+
+ assign( old_rflags, widenUto64(mk_amd64g_calculate_rflags_all()) )=
;
+
+ argsVALUE
+ =3D mkIRExprVec_4( widenUto64(mkexpr(dst0)), /* thing to rotate=
*/
+ widenUto64(shift_expr), /* rotate amount */
+ mkexpr(old_rflags),
+ mkU64(sz) );
+ assign( new_value,=20
+ mkIRExprCCall(
+ Ity_I64,=20
+ 0/*regparm*/,=20
+ "amd64g_calculate_RCR", &amd64g_calculate_RCR,
+ argsVALUE
+ )
+ );
+ =20
+ argsRFLAGS
+ =3D mkIRExprVec_4( widenUto64(mkexpr(dst0)), /* thing to rotate=
*/
+ widenUto64(shift_expr), /* rotate amount */
+ mkexpr(old_rflags),
+ mkU64(-sz) );
+ assign( new_rflags,=20
+ mkIRExprCCall(
+ Ity_I64,=20
+ 0/*regparm*/,=20
+ "amd64g_calculate_RCR", &amd64g_calculate_RCR,
+ argsRFLAGS
+ )
+ );
+
+ assign( dst1, narrowTo(ty, mkexpr(new_value)) );
+ stmt( IRStmt_Put( OFFB_CC_OP, mkU64(AMD64G_CC_OP_COPY) ));
+ stmt( IRStmt_Put( OFFB_CC_DEP1, mkexpr(new_rflags) ));
+ stmt( IRStmt_Put( OFFB_CC_DEP2, mkU64(0) ));
+ stmt( IRStmt_Put( OFFB_CC_NDEP, mkU64(0) ));
}
=20
+ else
if (isShift) {
=20
IRTemp pre64 =3D newTemp(Ity_I64);
|
|
From: Julian S. <js...@ac...> - 2005-07-23 13:11:41
|
> Are you using the new nightly script? Perhaps I should have made some > visible difference in the output in the case where nothing changed from 24 > hours ago... Oh, sorry. I am Way Too Busy(tm). I forgot. I'll hook it up for tonight's runs. J |
|
From: Tom H. <to...@co...> - 2005-07-23 12:55:52
|
In message <Pin...@ch...>
Nicholas Nethercote <nj...@cs...> wrote:
> So I was wondering about the idea of keeping some pre-compiled binaries in
> the test suite to improve its coverage. Any reason why this wouldn't
> work? Perhaps you'd want to use static binaries, which would then be
> fairly large...
You don't have to precompile them, just make sure you use -gstabs
or -gstabs+ when building them to force stabs debugging.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Nicholas N. <nj...@cs...> - 2005-07-23 12:52:51
|
Hi, The recent action in the stabs reader got me thinking -- it's a part of Valgrind that's really hard to regularly test, because most (all?) of the nightly tests will use DWARF. So I was wondering about the idea of keeping some pre-compiled binaries in the test suite to improve its coverage. Any reason why this wouldn't work? Perhaps you'd want to use static binaries, which would then be fairly large... N |
|
From: Tom H. <to...@co...> - 2005-07-23 12:52:37
|
In message <Pin...@ch...>
Nicholas Nethercote <nj...@cs...> wrote:
> Are you using the new nightly script? Perhaps I should have made some
> visible difference in the output in the case where nothing changed from 24
> hours ago...
I'm using whatever is in the repository - my test harness checks out
the nightly build script and then runs it.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Nicholas N. <nj...@cs...> - 2005-07-23 12:49:05
|
On Sat, 23 Jul 2005, Tom Hughes wrote: > Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2005-07-23 03:05:04 BST Tom and Julian, Are you using the new nightly script? Perhaps I should have made some visible difference in the output in the case where nothing changed from 24 hours ago... N |
|
From: Tom H. <to...@co...> - 2005-07-23 12:39:06
|
In message <20050713073208.18731395@godzilla>
Rich Coe <Ric...@me...> wrote:
> Was having a problem with VG-2.4.0 parsing some old stabs debug info.
> Below is my diff of vg_stabs.c from VG-2.2.1 into VG-2.4.0.
I don't think I understand what that diff is... You say it's a diff
from 2.2.1 to 2.4.0 but as there wasn't a 2.2.1 that doesn't make
much sense. Plus the patch appears to be from 2.4.0 back to some
older version as it looks it is undoing a number of recent stabs
fixes.
I completely reworked the C++ name parsing in stabs for 2.4.0 to try
and fix a large number of open bugs. I spent some time analysing what
gdb does and trying to do the same thing. This is what I wrote in the
commit liog:
: r362575 | thughes | 2004-11-12 23:16:31 +0000 (Fri, 12 Nov 2004) | 18 lines
:
: Try and improve the parsing of C++ stabs that contain :: sequences. This
: patch attempts to follow the same rules that gdb uses and is based on the
: fact that there appear to be three places where :: can appear:
:
: - In the name of a undefined struct/union/enum after an x type
: marker. In this case we follow a simplified version of the old
: rules and only allow :: inside <> characters.
:
: - In a method name. These are mangled so :: will never appear as
: part of the name but will always occurs as the terminator. We
: handle this by stopping at the first :: sequence.
:
: - In a symbol/type name. This can include :: but can only be ended
: by a single colon so we simply carry on until we see that.
:
: I suspect this will resolve a number of bugs but I'm still waiting for
: the submitters to confirm exactly which ones it resolves.
I assume that you have a case which has actually been broken by this
but I need to understand which of the three cases it is and why the
above rules aren't working.
> Also attached is the VG output which coredumps VG-2.4.0.
Unfortunately what I really need is the input, not the output. The full
text of the stab that is causing the problem would be ideal.
> @@ -678,6 +706,8 @@ static SymType *stabtype_parser(SegInfo
> EXPECT(';', "FP-TYPE");
> bytes = atoi(&p, 0);
> EXPECT(';', "FP-TYPE bytes");
> + atoi(&p, 0);
> + EXPECT(';', "FP-TYPE extra");
>
> type = VG_(st_mkfloat)(def, bytes);
> break;
Was there a reason for including this chunk, which reverts another
recent fix? Do you have a compiler which is generating the extra
field for this stab (the 'specification' doesn't mention such an
extra field).
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Tom H. <to...@co...> - 2005-07-23 12:23:06
|
In message <20050721095436.243babda@godzilla>
Rich Coe <Ric...@me...> wrote:
> I'm building V 3.0.0 on x86 FC3 like system and I'm getting 83 failures
> in from the test framework.
>
> 71 of 73 errors are definitely from here:
> + Conditional jump or move depends on uninitialised value(s)
> + at 0x........: index (in /lib/ld-2.3.5.so)
> + by 0x........: map_doit (in /lib/ld-2.3.5.so)
> + by 0x........: _dl_catch_error (in /lib/ld-2.3.5.so)
> + by 0x........: dl_main (in /lib/ld-2.3.5.so)
> + by 0x........: _dl_sysdep_start (in /lib/ld-2.3.5.so)
> + by 0x........: _dl_start (in /lib/ld-2.3.5.so)
Are you still getting this in the current SVN code? If you are then
it will probably need another suppression adding.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: <sv...@va...> - 2005-07-23 12:07:43
|
Author: sewardj
Date: 2005-07-23 13:07:37 +0100 (Sat, 23 Jul 2005)
New Revision: 1291
Log:
Implement bswapq %reg. Generates pretty verbose code, but it works.
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/toIR.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/priv/guest-amd64/toIR.c 2005-07-22 09:39:02 UTC (rev 1290)
+++ trunk/priv/guest-amd64/toIR.c 2005-07-23 12:07:37 UTC (rev 1291)
@@ -1026,6 +1026,7 @@
{
vassert(lo3bits < 8);
vassert(IS_VALID_PFX(pfx));
+ vassert(sz =3D=3D 8 || sz =3D=3D 4 || sz =3D=3D 2 || sz =3D=3D 1);
vassert(typeOfIRExpr(irbb->tyenv, e) =3D=3D szToITy(sz));
stmt( IRStmt_Put(=20
offsetIReg( sz, lo3bits | (getRexB(pfx) << 3),=20
@@ -12793,6 +12794,39 @@
putIRegRexB(4, pfx, opc-0xC8, mkexpr(t2));
DIP("bswapl %s\n", nameIRegRexB(4, pfx, opc-0xC8));
break;
+ }
+ else if (sz =3D=3D 8) {
+ t1 =3D newTemp(Ity_I64);
+ t2 =3D newTemp(Ity_I64);
+ assign( t1, getIRegRexB(8, pfx, opc-0xC8) );
+
+# define LANE(_nn) \
+ binop( Iop_Shl64, \
+ binop( Iop_And64, \
+ binop(Iop_Shr64, mkexpr(t1), \
+ mkU8(8 * (7 - (_nn)))), \
+ mkU64(0xFF)), \
+ mkU8(8 * (_nn)))
+
+ assign(=20
+ t2,
+ binop(Iop_Or64,
+ binop(Iop_Or64,
+ binop(Iop_Or64,LANE(0),LANE(1)),
+ binop(Iop_Or64,LANE(2),LANE(3))
+ ),
+ binop(Iop_Or64,
+ binop(Iop_Or64,LANE(4),LANE(5)),
+ binop(Iop_Or64,LANE(6),LANE(7))
+ )
+ )
+ );
+
+# undef LANE
+
+ putIRegRexB(8, pfx, opc-0xC8, mkexpr(t2));
+ DIP("bswapq %s\n", nameIRegRexB(8, pfx, opc-0xC8));
+ break;
} else {
goto decode_failure;
}
|
|
From: <sv...@va...> - 2005-07-23 11:36:22
|
Author: sewardj
Date: 2005-07-23 12:36:03 +0100 (Sat, 23 Jul 2005)
New Revision: 4231
Log:
Fix comment.
Modified:
trunk/coregrind/m_redir.c
Modified: trunk/coregrind/m_redir.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/coregrind/m_redir.c 2005-07-23 09:52:21 UTC (rev 4230)
+++ trunk/coregrind/m_redir.c 2005-07-23 11:36:03 UTC (rev 4231)
@@ -145,7 +145,8 @@
rid of the translation.=20
=20
Note, this is potentially expensive -- discarding
- translations causes complete unchaining. =20
+ translations requires a complete search through all of
+ them.
*/
TRACE_REDIR("Discarding translation due to redirect of already =
loaded function" );
TRACE_REDIR(" %s:%s(%p) -> %p)", redir->from_lib, redir->from=
_sym,
|
|
From: <sv...@va...> - 2005-07-23 09:53:17
|
Author: sewardj
Date: 2005-07-23 10:52:21 +0100 (Sat, 23 Jul 2005)
New Revision: 4230
Log:
Change the criteria by which translations are discarded in the presence o=
f
redirections. Patch from Tom Hughes. This fixes #109401.
Modified:
trunk/coregrind/m_redir.c
Modified: trunk/coregrind/m_redir.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/coregrind/m_redir.c 2005-07-23 09:22:46 UTC (rev 4229)
+++ trunk/coregrind/m_redir.c 2005-07-23 09:52:21 UTC (rev 4230)
@@ -117,7 +117,7 @@
unresolved_redirs =3D redir;
}
=20
-static void add_redir_to_resolved_list(CodeRedirect *redir)
+static void add_redir_to_resolved_list(CodeRedirect *redir, Bool need_di=
scard)
{
vg_assert(redir->from_addr);
=20
@@ -131,13 +131,11 @@
=20
vg_assert(redir->to_addr !=3D 0);
=20
- if (VG_(search_transtab)(NULL, (Addr64)redir->from_addr, False)) {
+ if (need_discard) {
/* For some given (from, to) redir, the "from" function got
- called before the .so containing "to" became available. We
- know this because there is already a translation for the
- entry point of the original "from". So the redirect will
- never actually take effect unless that translation is
- discarded. =20
+ loaded before the .so containing "to" became available so
+ we need to discard any existing translations involving
+ the "from" function.
=20
Note, we only really need to discard the first bb of the
old entry point, and so we avoid the problem of having to
@@ -149,7 +147,7 @@
Note, this is potentially expensive -- discarding
translations causes complete unchaining. =20
*/
- TRACE_REDIR("Discarding translation due to redirect of already =
called function" );
+ TRACE_REDIR("Discarding translation due to redirect of already =
loaded function" );
TRACE_REDIR(" %s:%s(%p) -> %p)", redir->from_lib, redir->from=
_sym,
redir->from_addr, redir->to_=
addr );
VG_(discard_translations)((Addr64)redir->from_addr, 1);
@@ -240,7 +238,7 @@
if (resolve_redir_with_seginfo(redir, si)) {
*prevp =3D next;
redir->next =3D NULL;
- add_redir_to_resolved_list(redir);
+ add_redir_to_resolved_list(redir, False);
} else
prevp =3D &redir->next;
}
@@ -268,7 +266,7 @@
TRACE_REDIR("REDIRECT addr to addr: %p to %p", from_addr, to_addr);
=20
// This redirection is already resolved, put it straight in the list.
- add_redir_to_resolved_list(redir);
+ add_redir_to_resolved_list(redir, True);
}
=20
/* Redirect a lib/symbol reference to a function at addr */
@@ -294,7 +292,7 @@
// function is loaded after the replacee). Then add it to the
// appropriate list.
if (resolve_redir_with_existing_seginfos(redir)) {
- add_redir_to_resolved_list(redir);
+ add_redir_to_resolved_list(redir, True);
} else {
add_redir_to_unresolved_list(redir);
}
@@ -318,7 +316,7 @@
// Check against all existing segments to see if this redirection
// can be resolved immediately. Then add it to the appropriate list.
if (resolve_redir_with_existing_seginfos(redir)) {
- add_redir_to_resolved_list(redir);
+ add_redir_to_resolved_list(redir, True);
} else {
add_redir_to_unresolved_list(redir);
}
|
|
From: Julian S. <js...@ac...> - 2005-07-23 09:26:45
|
Ashley > 1) would it be possible to drop the .pid<pid> suffix if > --log-file-qualifier is set, there seems little point in having two > qualifiers and if automating this process having as little ambiguity > over filenames as possible seems a good thing. Yeh, I wondered about this myself. Done (r4228). > 2) Can you put the qualifier in the logfile somewhere, maybe not in > place of ==<pid>== but possibly in the header, something like: > > ==21666== My PID = 21666, parent PID = 21664, qualifier = 0. > ==21666== Prog and args are: > ==21666== /usr/lib/mpi/mpi_gnu/bin/mping > ==21666== For more details, rerun with: -v > > Whilst this isn't strictly necessairy for the what I've described (I > currently get it from the filenames) at some point I intend to try using > a listener process instead of files. Hmm, not enthusiastic about changing the output format. J |