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
(36) |
2
(30) |
|
3
(17) |
4
(21) |
5
(18) |
6
(14) |
7
(23) |
8
(12) |
9
(11) |
|
10
(11) |
11
(12) |
12
(11) |
13
(12) |
14
(11) |
15
(11) |
16
(15) |
|
17
(12) |
18
(15) |
19
(15) |
20
(25) |
21
(26) |
22
(21) |
23
(18) |
|
24
(25) |
25
(28) |
26
(27) |
27
(32) |
28
(13) |
29
(12) |
30
(10) |
|
From: <sv...@va...> - 2005-04-26 23:49:30
|
Author: sewardj
Date: 2005-04-27 00:49:24 +0100 (Wed, 27 Apr 2005)
New Revision: 3572
Modified:
trunk/memcheck/mc_translate.c
Log:
* Modify the instrumenter to use the new primops introduced in=20
vex rev 1144.
* Observe that mkLazy2 generates IR which often turns into=20
long and slow code sequences in the back end, primarily because
PCast operations are expensive. Add a couple of special=20
cases which give noticably better performance when handling
FP-intensive code on x86.
Modified: trunk/memcheck/mc_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/memcheck/mc_translate.c 2005-04-26 08:13:24 UTC (rev 3571)
+++ trunk/memcheck/mc_translate.c 2005-04-26 23:49:24 UTC (rev 3572)
@@ -338,8 +338,7 @@
return assignNew(mce, Ity_I8,=20
binop(Iop_Or8, a1,=20
assignNew(mce, Ity_I8,
- /* unop(Iop_Neg8, a1)))); */
- binop(Iop_Sub8, mkU8(0), a1) )));
+ unop(Iop_Neg8, a1))));
}
=20
static IRAtom* mkLeft16 ( MCEnv* mce, IRAtom* a1 ) {
@@ -348,8 +347,7 @@
return assignNew(mce, Ity_I16,=20
binop(Iop_Or16, a1,=20
assignNew(mce, Ity_I16,
- /* unop(Iop_Neg16, a1)))); */
- binop(Iop_Sub16, mkU16(0), a1) )));
+ unop(Iop_Neg16, a1))));
}
=20
static IRAtom* mkLeft32 ( MCEnv* mce, IRAtom* a1 ) {
@@ -358,8 +356,7 @@
return assignNew(mce, Ity_I32,=20
binop(Iop_Or32, a1,=20
assignNew(mce, Ity_I32,
- /* unop(Iop_Neg32, a1)))); */
- binop(Iop_Sub32, mkU32(0), a1) )));
+ unop(Iop_Neg32, a1))));
}
=20
static IRAtom* mkLeft64 ( MCEnv* mce, IRAtom* a1 ) {
@@ -368,8 +365,7 @@
return assignNew(mce, Ity_I64,=20
binop(Iop_Or64, a1,=20
assignNew(mce, Ity_I64,
- /* unop(Iop_Neg32, a1)))); */
- binop(Iop_Sub64, mkU64(0), a1) )));
+ unop(Iop_Neg64, a1))));
}
=20
/* --------- 'Improvement' functions for AND/OR. --------- */
@@ -496,16 +492,16 @@
tmp1 =3D vbits;
break;
case Ity_I8:=20
- tmp1 =3D assignNew(mce, Ity_I1, binop(Iop_CmpNE8, vbits, mkU8(0=
)));
+ tmp1 =3D assignNew(mce, Ity_I1, unop(Iop_CmpNEZ8, vbits));
break;
case Ity_I16:=20
- tmp1 =3D assignNew(mce, Ity_I1, binop(Iop_CmpNE16, vbits, mkU16=
(0)));
+ tmp1 =3D assignNew(mce, Ity_I1, unop(Iop_CmpNEZ16, vbits));
break;
case Ity_I32:=20
- tmp1 =3D assignNew(mce, Ity_I1, binop(Iop_CmpNE32, vbits, mkU32=
(0)));
+ tmp1 =3D assignNew(mce, Ity_I1, unop(Iop_CmpNEZ32, vbits));
break;
case Ity_I64:=20
- tmp1 =3D assignNew(mce, Ity_I1, binop(Iop_CmpNE64, vbits, mkU64=
(0)));
+ tmp1 =3D assignNew(mce, Ity_I1, unop(Iop_CmpNEZ64, vbits));
break;
case Ity_I128: {
/* Gah. Chop it in half, OR the halves together, and compare
@@ -514,7 +510,7 @@
IRAtom* tmp3 =3D assignNew(mce, Ity_I64, unop(Iop_128to64, vbit=
s));
IRAtom* tmp4 =3D assignNew(mce, Ity_I64, binop(Iop_Or64, tmp2, =
tmp3));
tmp1 =3D assignNew(mce, Ity_I1,=20
- binop(Iop_CmpNE64, tmp4, mkU64(0)=
));
+ unop(Iop_CmpNEZ64, tmp4));
break;
}
default:
@@ -601,7 +597,7 @@
opNOT =3D Iop_Not64;
opXOR =3D Iop_Xor64;
opCMP =3D Iop_CmpEQ64;
- top =3D mkU64(0xFFFFFFFFFFFFFFFF);
+ top =3D mkU64(0xFFFFFFFFFFFFFFFFULL);
break;
default:
VG_(tool_panic)("expensiveCmpEQorNE");
@@ -901,10 +897,43 @@
static
IRAtom* mkLazy2 ( MCEnv* mce, IRType finalVty, IRAtom* va1, IRAtom* va2 =
)
{
- /* force everything via 32-bit intermediaries. */
IRAtom* at;
+ IRType t1 =3D typeOfIRExpr(mce->bb->tyenv, va1);
+ IRType t2 =3D typeOfIRExpr(mce->bb->tyenv, va2);
tl_assert(isShadowAtom(mce,va1));
tl_assert(isShadowAtom(mce,va2));
+
+ /* The general case is inefficient because PCast is an expensive
+ operation. Here are some special cases which use PCast only
+ once rather than twice. */
+
+ /* I64 x I64 -> I64 */
+ if (t1 =3D=3D Ity_I64 && t2 =3D=3D Ity_I64 && finalVty =3D=3D Ity_I64=
) {
+ if (0) VG_(printf)("mkLazy2: I64 x I64 -> I64\n");
+ at =3D mkUifU(mce, Ity_I64, va1, va2);
+ at =3D mkPCastTo(mce, Ity_I64, at);
+ return at;
+ }
+
+ /* I64 x I64 -> I32 */
+ if (t1 =3D=3D Ity_I64 && t2 =3D=3D Ity_I64 && finalVty =3D=3D Ity_I32=
) {
+ if (0) VG_(printf)("mkLazy2: I64 x I64 -> I32\n");
+ at =3D mkUifU(mce, Ity_I64, va1, va2);
+ at =3D mkPCastTo(mce, Ity_I32, at);
+ return at;
+ }
+
+ if (0) {
+ VG_(printf)("mkLazy2 ");
+ ppIRType(t1);
+ VG_(printf)("_");
+ ppIRType(t2);
+ VG_(printf)("_");
+ ppIRType(finalVty);
+ VG_(printf)("\n");
+ }
+
+ /* General case: force everything via 32-bit intermediaries. */
at =3D mkPCastTo(mce, Ity_I32, va1);
at =3D mkUifU(mce, Ity_I32, at, mkPCastTo(mce, Ity_I32, va2));
at =3D mkPCastTo(mce, finalVty, at);
|
|
From: <sv...@va...> - 2005-04-26 23:39:48
|
Author: sewardj
Date: 2005-04-27 00:39:45 +0100 (Wed, 27 Apr 2005)
New Revision: 1145
Modified:
trunk/priv/host-x86/isel.c
Log:
* Enhance the x86 instruction selector to generate for the primops
introduced in rev 1144.
* Rearrange iselCondCode and introduce a few new patterns which
deal better with the IR that Memcheck commonly generates
Modified: trunk/priv/host-x86/isel.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/host-x86/isel.c 2005-04-26 23:34:34 UTC (rev 1144)
+++ trunk/priv/host-x86/isel.c 2005-04-26 23:39:45 UTC (rev 1145)
@@ -763,15 +763,6 @@
X86AluOp aluOp;
X86ShiftOp shOp;
=20
- /* Pattern: Sub32(0,x) */
- if (e->Iex.Binop.op =3D=3D Iop_Sub32 && isZero32(e->Iex.Binop.arg1=
)) {
- HReg dst =3D newVRegI(env);
- HReg reg =3D iselIntExpr_R(env, e->Iex.Binop.arg2);
- addInstr(env, mk_iMOVsd_RR(reg,dst));
- addInstr(env, X86Instr_Unary32(Xun_NEG,dst));
- return dst;
- }
-
/* Is it an addition or logical style op? */
switch (e->Iex.Binop.op) {
case Iop_Add8: case Iop_Add16: case Iop_Add32:
@@ -1121,6 +1112,15 @@
X86RMI_Reg(tmp), dst));
return dst;
}
+ case Iop_Neg8:
+ case Iop_Neg16:
+ case Iop_Neg32: {
+ HReg dst =3D newVRegI(env);
+ HReg reg =3D iselIntExpr_R(env, e->Iex.Unop.arg);
+ addInstr(env, mk_iMOVsd_RR(reg,dst));
+ addInstr(env, X86Instr_Unary32(Xun_NEG,dst));
+ return dst;
+ }
=20
case Iop_V128to32: {
HReg dst =3D newVRegI(env);
@@ -1487,6 +1487,15 @@
vassert(e);
vassert(typeOfIRExpr(env->type_env,e) =3D=3D Ity_I1);
=20
+ /* var */
+ if (e->tag =3D=3D Iex_Tmp) {
+ HReg r32 =3D lookupIRTemp(env, e->Iex.Tmp.tmp);
+ HReg dst =3D newVRegI(env);
+ addInstr(env, mk_iMOVsd_RR(r32,dst));
+ addInstr(env, X86Instr_Alu32R(Xalu_AND,X86RMI_Imm(1),dst));
+ return Xcc_NZ;
+ }
+
/* Constant 1:Bit */
if (e->tag =3D=3D Iex_Const && e->Iex.Const.con->Ico.U1 =3D=3D True) =
{
HReg r;
@@ -1497,13 +1506,15 @@
return Xcc_Z;
}
=20
- /* Not1(...) */
+ /* Not1(e) */
if (e->tag =3D=3D Iex_Unop && e->Iex.Unop.op =3D=3D Iop_Not1) {
/* Generate code for the arg, and negate the test condition */
return 1 ^ iselCondCode(env, e->Iex.Unop.arg);
}
=20
- /* 32to1(1Uto32(expr1)) -- the casts are pointless, ignore them */
+ /* --- patterns rooted at: 32to1 --- */
+
+ /* 32to1(1Uto32(e)) =3D=3D> e */
DEFINE_PATTERN(p_1Uto32_then_32to1,
unop(Iop_32to1,unop(Iop_1Uto32,bind(0))));
if (matchIRExpr(&mi,p_1Uto32_then_32to1,e)) {
@@ -1511,7 +1522,7 @@
return iselCondCode(env, expr1);
}
=20
- /* 32to1(1Sto32(expr1)) -- the casts are pointless, ignore them */
+ /* 32to1(1Sto32(e)) =3D=3D> e */
DEFINE_PATTERN(p_1Sto32_then_32to1,
unop(Iop_32to1,unop(Iop_1Sto32,bind(0))));
if (matchIRExpr(&mi,p_1Sto32_then_32to1,e)) {
@@ -1519,9 +1530,9 @@
return iselCondCode(env, expr1);
}
=20
- /* pattern: 32to1(expr32) */
+ /* 32to1(expr32) */
DEFINE_PATTERN(p_32to1,=20
- unop(Iop_32to1,bind(0))
+ unop(Iop_32to1,bind(0))
);
if (matchIRExpr(&mi,p_32to1,e)) {
HReg r =3D iselIntExpr_R(env, mi.bindee[0]);
@@ -1529,6 +1540,102 @@
return Xcc_NZ;
}
=20
+ /* --- patterns rooted at: CmpNEZ8 --- */
+
+ /* CmpNEZ8(x) */
+ if (e->tag =3D=3D Iex_Unop=20
+ && e->Iex.Unop.op =3D=3D Iop_CmpNEZ8) {
+ HReg r =3D iselIntExpr_R(env, e->Iex.Unop.arg);
+ addInstr(env, X86Instr_Test32(0xFF,r));
+ return Xcc_NZ;
+ }
+
+ /* --- patterns rooted at: CmpNEZ16 --- */
+
+ /* CmpNEZ16(x) */
+ if (e->tag =3D=3D Iex_Unop=20
+ && e->Iex.Unop.op =3D=3D Iop_CmpNEZ16) {
+ HReg r =3D iselIntExpr_R(env, e->Iex.Unop.arg);
+ addInstr(env, X86Instr_Test32(0xFFFF,r));
+ return Xcc_NZ;
+ }
+
+ /* --- patterns rooted at: CmpNEZ32 --- */
+
+ /* CmpNEZ32(1Sto32(b)) =3D=3D> b */
+ {
+ DECLARE_PATTERN(p_CmpNEZ32_1Sto32);
+ DEFINE_PATTERN(p_CmpNEZ32_1Sto32,
+ unop(Iop_CmpNEZ32, unop(Iop_1Sto32,bind(0))));
+ if (matchIRExpr(&mi, p_CmpNEZ32_1Sto32, e)) {
+ return iselCondCode(env, mi.bindee[0]);
+ }
+ }
+
+ /* CmpNEZ32(And32(x,y)) */
+ {
+ DECLARE_PATTERN(p_CmpNEZ32_And32);
+ DEFINE_PATTERN(p_CmpNEZ32_And32,
+ unop(Iop_CmpNEZ32, binop(Iop_And32, bind(0), bind(1=
))));
+ if (matchIRExpr(&mi, p_CmpNEZ32_And32, e)) {
+ HReg r0 =3D iselIntExpr_R(env, mi.bindee[0]);
+ X86RMI* rmi1 =3D iselIntExpr_RMI(env, mi.bindee[1]);
+ HReg tmp =3D newVRegI(env);
+ addInstr(env, mk_iMOVsd_RR(r0, tmp));
+ addInstr(env, X86Instr_Alu32R(Xalu_AND,rmi1,tmp));
+ return Xcc_NZ;
+ }
+ }
+
+ /* CmpNEZ32(Or32(x,y)) */
+ {
+ DECLARE_PATTERN(p_CmpNEZ32_Or32);
+ DEFINE_PATTERN(p_CmpNEZ32_Or32,
+ unop(Iop_CmpNEZ32, binop(Iop_Or32, bind(0), bind(1)=
)));
+ if (matchIRExpr(&mi, p_CmpNEZ32_Or32, e)) {
+ HReg r0 =3D iselIntExpr_R(env, mi.bindee[0]);
+ X86RMI* rmi1 =3D iselIntExpr_RMI(env, mi.bindee[1]);
+ HReg tmp =3D newVRegI(env);
+ addInstr(env, mk_iMOVsd_RR(r0, tmp));
+ addInstr(env, X86Instr_Alu32R(Xalu_OR,rmi1,tmp));
+ return Xcc_NZ;
+ }
+ }
+ /* CmpNEZ32(x) */
+ if (e->tag =3D=3D Iex_Unop=20
+ && e->Iex.Unop.op =3D=3D Iop_CmpNEZ32) {
+ HReg r1 =3D iselIntExpr_R(env, e->Iex.Unop.arg);
+ X86RMI* rmi2 =3D X86RMI_Imm(0);
+ addInstr(env, X86Instr_Alu32R(Xalu_CMP,rmi2,r1));
+ return Xcc_NZ;
+ }
+
+ /* --- patterns rooted at: CmpNEZ64 --- */
+
+ /* CmpNEZ64(1Sto64(b)) =3D=3D> b */
+ {
+ DECLARE_PATTERN(p_CmpNEZ64_1Sto64);
+ DEFINE_PATTERN(
+ p_CmpNEZ64_1Sto64,
+ unop(Iop_CmpNEZ64, unop(Iop_1Sto64,bind(0))));
+ if (matchIRExpr(&mi, p_CmpNEZ64_1Sto64, e)) {
+ return iselCondCode(env, mi.bindee[0]);
+ }
+ }
+
+ /* CmpNEZ64(x) */
+ if (e->tag =3D=3D Iex_Unop=20
+ && e->Iex.Unop.op =3D=3D Iop_CmpNEZ64) {
+ HReg hi, lo;
+ HReg tmp =3D newVRegI(env);
+ iselInt64Expr( &hi, &lo, env, e->Iex.Unop.arg );
+ addInstr(env, mk_iMOVsd_RR(hi, tmp));
+ addInstr(env, X86Instr_Alu32R(Xalu_OR,X86RMI_Reg(lo), tmp));
+ return Xcc_NZ;
+ }
+
+ /* --- patterns rooted at: Cmp{EQ,NE}{8,16} --- */
+
/* CmpEQ8 / CmpNE8 */
if (e->tag =3D=3D Iex_Binop=20
&& (e->Iex.Binop.op =3D=3D Iop_CmpEQ8
@@ -1563,17 +1670,6 @@
}
}
=20
- /* CmpNE32(1Sto32(b), 0) =3D=3D> b */
- {
- DECLARE_PATTERN(p_CmpNE32_1Sto32);
- DEFINE_PATTERN(
- p_CmpNE32_1Sto32,
- binop(Iop_CmpNE32, unop(Iop_1Sto32,bind(0)), mkU32(0)));
- if (matchIRExpr(&mi, p_CmpNE32_1Sto32, e)) {
- return iselCondCode(env, mi.bindee[0]);
- }
- }
-
/* Cmp*32*(x,y) */
if (e->tag =3D=3D Iex_Binop=20
&& (e->Iex.Binop.op =3D=3D Iop_CmpEQ32
@@ -1596,34 +1692,6 @@
}
}
=20
- /* CmpNE64(1Sto64(b), 0) =3D=3D> b */
- {
- DECLARE_PATTERN(p_CmpNE64_1Sto64);
- DEFINE_PATTERN(
- p_CmpNE64_1Sto64,
- binop(Iop_CmpNE64, unop(Iop_1Sto64,bind(0)), mkU64(0)));
- if (matchIRExpr(&mi, p_CmpNE64_1Sto64, e)) {
- return iselCondCode(env, mi.bindee[0]);
- }
- }
-
- /* CmpNE64(x, 0) */
- {
- DECLARE_PATTERN(p_CmpNE64_x_zero);
- DEFINE_PATTERN(
- p_CmpNE64_x_zero,
- binop(Iop_CmpNE64, bind(0), mkU64(0)) );
- if (matchIRExpr(&mi, p_CmpNE64_x_zero, e)) {
- HReg hi, lo;
- IRExpr* x =3D mi.bindee[0];
- HReg tmp =3D newVRegI(env);
- iselInt64Expr( &hi, &lo, env, x );
- addInstr(env, mk_iMOVsd_RR(hi, tmp));
- addInstr(env, X86Instr_Alu32R(Xalu_OR,X86RMI_Reg(lo), tmp));
- return Xcc_NZ;
- }
- }
-
/* CmpNE64 */
if (e->tag =3D=3D Iex_Binop=20
&& e->Iex.Binop.op =3D=3D Iop_CmpNE64) {
@@ -1643,15 +1711,6 @@
}
}
=20
- /* var */
- if (e->tag =3D=3D Iex_Tmp) {
- HReg r32 =3D lookupIRTemp(env, e->Iex.Tmp.tmp);
- HReg dst =3D newVRegI(env);
- addInstr(env, mk_iMOVsd_RR(r32,dst));
- addInstr(env, X86Instr_Alu32R(Xalu_AND,X86RMI_Imm(1),dst));
- return Xcc_NZ;
- }
-
ppIRExpr(e);
vpanic("iselCondCode");
}
|
|
From: <sv...@va...> - 2005-04-26 23:34:42
|
Author: sewardj
Date: 2005-04-27 00:34:34 +0100 (Wed, 27 Apr 2005)
New Revision: 1144
Modified:
trunk/priv/ir/irdefs.c
trunk/priv/ir/iropt.c
trunk/pub/libvex_ir.h
Log:
Add a few new primops which allow for more concise expression of
the instrumentation Memcheck generates:
* CmpNEZ{8,16,32,64}, which are equivalent to CmpNE<sz> with one
argument zero
* Neg{8,16,32,64}, which is equivalent to Sub<sz> with the first
argument zero
For 64-bit platforms, add these primops. This gives a complete set of
primops for conversions between the integral types (I8, I16, I32,
I64), so that a widening/narrowing from any type to any other type can
be achieved in a single primop:
* Iop_8Uto64, Iop_8Sto64, Iop_16Uto64, Iop_16Sto64
* Iop_64to8, Iop_64to16
Modified: trunk/priv/ir/irdefs.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/ir/irdefs.c 2005-04-26 01:53:48 UTC (rev 1143)
+++ trunk/priv/ir/irdefs.c 2005-04-26 23:34:34 UTC (rev 1144)
@@ -176,6 +176,16 @@
case Iop_CmpLT64U: vex_printf("CmpLT64U"); return;
case Iop_CmpLE64U: vex_printf("CmpLE64U"); return;
=20
+ case Iop_CmpNEZ8: vex_printf("CmpNEZ8"); return;
+ case Iop_CmpNEZ16: vex_printf("CmpNEZ16"); return;
+ case Iop_CmpNEZ32: vex_printf("CmpNEZ32"); return;
+ case Iop_CmpNEZ64: vex_printf("CmpNEZ64"); return;
+
+ case Iop_Neg8: vex_printf("Neg8"); return;
+ case Iop_Neg16: vex_printf("Neg16"); return;
+ case Iop_Neg32: vex_printf("Neg32"); return;
+ case Iop_Neg64: vex_printf("Neg64"); return;
+
case Iop_DivU32: vex_printf("DivU32"); return;
case Iop_DivS32: vex_printf("DivS32"); return;
=20
@@ -1206,6 +1216,8 @@
*t_dst =3D (_td); *t_arg1 =3D (_ta1); *t_arg2 =3D (_ta2); break
# define COMPARISON(_ta) \
*t_dst =3D Ity_I1; *t_arg1 =3D *t_arg2 =3D (_ta); break;
+# define UNARY_COMPARISON(_ta) \
+ *t_dst =3D Ity_I1; *t_arg1 =3D (_ta); break;
=20
*t_dst =3D Ity_INVALID;
*t_arg1 =3D Ity_INVALID;
@@ -1259,11 +1271,15 @@
case Iop_Shl64: case Iop_Shr64: case Iop_Sar64:
BINARY(Ity_I64, Ity_I64,Ity_I8);
=20
- case Iop_Not8: UNARY(Ity_I8,Ity_I8);
- case Iop_Not16: UNARY(Ity_I16,Ity_I16);
- case Iop_Not32: UNARY(Ity_I32,Ity_I32);
+ case Iop_Not8: case Iop_Neg8:
+ UNARY(Ity_I8,Ity_I8);
+ case Iop_Not16: case Iop_Neg16:
+ UNARY(Ity_I16,Ity_I16);
+ case Iop_Not32: case Iop_Neg32:
+ UNARY(Ity_I32,Ity_I32);
=20
- case Iop_Not64: =20
+ case Iop_Neg64:
+ case Iop_Not64:
case Iop_CmpNEZ32x2: case Iop_CmpNEZ16x4: case Iop_CmpNEZ8x8:
UNARY(Ity_I64,Ity_I64);
=20
@@ -1280,6 +1296,11 @@
case Iop_CmpLT64U: case Iop_CmpLE64U:
COMPARISON(Ity_I64);
=20
+ case Iop_CmpNEZ8: UNARY_COMPARISON(Ity_I8);
+ case Iop_CmpNEZ16: UNARY_COMPARISON(Ity_I16);
+ case Iop_CmpNEZ32: UNARY_COMPARISON(Ity_I32);
+ case Iop_CmpNEZ64: UNARY_COMPARISON(Ity_I64);
+
case Iop_MullU8: case Iop_MullS8:
BINARY(Ity_I16, Ity_I8,Ity_I8);
case Iop_MullU16: case Iop_MullS16:
@@ -1456,6 +1477,7 @@
# undef UNARY
# undef BINARY
# undef COMPARISON
+# undef UNARY_COMPARISON
}
=20
=20
Modified: trunk/priv/ir/iropt.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/ir/iropt.c 2005-04-26 01:53:48 UTC (rev 1143)
+++ trunk/priv/ir/iropt.c 2005-04-26 23:34:34 UTC (rev 1144)
@@ -846,6 +846,20 @@
vpanic("notBool");
}
=20
+/* Make a zero which has the same type as the result of the given
+ primop. */
+static IRExpr* mkZeroForXor ( IROp op )
+{
+ switch (op) {
+ case Iop_Xor8: return IRExpr_Const(IRConst_U8(0));
+ case Iop_Xor16: return IRExpr_Const(IRConst_U16(0));
+ case Iop_Xor32: return IRExpr_Const(IRConst_U32(0));
+ case Iop_Xor64: return IRExpr_Const(IRConst_U64(0));
+ default: vpanic("mkZeroForXor: bad primop");
+ }
+}
+
+
static IRExpr* fold_Expr ( IRExpr* e )
{
Int shift;
@@ -928,6 +942,15 @@
notBool(e->Iex.Unop.arg->Iex.Const.con->Ico.U1)));
break;
=20
+ case Iop_Neg32:
+ e2 =3D IRExpr_Const(IRConst_U32(
+ - (e->Iex.Unop.arg->Iex.Const.con->Ico.U32)));
+ break;
+ case Iop_Neg8:
+ e2 =3D IRExpr_Const(IRConst_U8(
+ - (e->Iex.Unop.arg->Iex.Const.con->Ico.U8)));
+ break;
+
case Iop_64to32: {
ULong w64 =3D e->Iex.Unop.arg->Iex.Const.con->Ico.U64;
w64 &=3D 0x00000000FFFFFFFFULL;
@@ -946,6 +969,24 @@
& e->Iex.Unop.arg->Iex.Const.con->Ico.U32));
break;
=20
+ case Iop_CmpNEZ8:
+ e2 =3D IRExpr_Const(IRConst_U1(toBool(
+ 0 !=3D=20
+ (0xFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U8)
+ )));
+ break;
+ case Iop_CmpNEZ32:
+ e2 =3D IRExpr_Const(IRConst_U1(toBool(
+ 0 !=3D=20
+ (0xFFFFFFFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U3=
2)
+ )));
+ break;
+ case Iop_CmpNEZ64:
+ e2 =3D IRExpr_Const(IRConst_U1(toBool(
+ 0ULL !=3D e->Iex.Unop.arg->Iex.Const.con->Ico.U64
+ )));
+ break;
+
default:=20
goto unhandled;
}
@@ -1235,6 +1276,13 @@
e2 =3D e->Iex.Binop.arg1;
} else
=20
+ /* Or16(x,0) =3D=3D> x */
+ if ((e->Iex.Binop.op =3D=3D Iop_Or16)
+ && e->Iex.Binop.arg2->tag =3D=3D Iex_Const
+ && e->Iex.Binop.arg2->Iex.Const.con->Ico.U16 =3D=3D 0) {
+ e2 =3D e->Iex.Binop.arg1;
+ } else
+
/* Or32/Add32(x,0) =3D=3D> x */
if ((e->Iex.Binop.op =3D=3D Iop_Add32 || e->Iex.Binop.op =3D=3D=
Iop_Or32)
&& e->Iex.Binop.arg2->tag =3D=3D Iex_Const
@@ -1277,6 +1325,16 @@
e2 =3D e->Iex.Binop.arg1;
}
=20
+ /* Xor8/16/32/64(t,t) =3D=3D> 0, for some IRTemp t */
+ if ( (e->Iex.Binop.op =3D=3D Iop_Xor64
+ || e->Iex.Binop.op =3D=3D Iop_Xor32
+ || e->Iex.Binop.op =3D=3D Iop_Xor16
+ || e->Iex.Binop.op =3D=3D Iop_Xor8)
+ && sameIRTemps(e->Iex.Binop.arg1, e->Iex.Binop.arg2)) {
+ vassert(0); /* awaiting test case */
+ e2 =3D mkZeroForXor(e->Iex.Binop.op);
+ }
+
}
}
=20
Modified: trunk/pub/libvex_ir.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/pub/libvex_ir.h 2005-04-26 01:53:48 UTC (rev 1143)
+++ trunk/pub/libvex_ir.h 2005-04-26 23:34:34 UTC (rev 1144)
@@ -235,6 +235,10 @@
Iop_CmpLT32U, Iop_CmpLT64U,
Iop_CmpLE32U, Iop_CmpLE64U,
=20
+ /* As a sop to Valgrind-Memcheck, the following are useful. */
+ Iop_CmpNEZ8, Iop_CmpNEZ16, Iop_CmpNEZ32, Iop_CmpNEZ64,
+ Iop_Neg8, Iop_Neg16, Iop_Neg32, Iop_Neg64,
+
/* Division */
/* TODO: clarify semantics wrt rounding, negative values, whatever=
*/
Iop_DivU32, // :: I32,I32 -> I32 (simple div, no mod)
@@ -248,11 +252,21 @@
// of which lo half is div and hi half is mod
Iop_DivModS128to64, // ditto, signed
=20
+ /* Integer conversions. Some of these are redundant (eg
+ Iop_64to8 is the same as Iop_64to32 and then Iop_32to8), but
+ having a complete set reduces the typical dynamic size of IR
+ and makes the instruction selectors easier to write. */
+
/* Widening conversions */
- Iop_8Uto16, Iop_8Uto32, Iop_16Uto32, Iop_32Uto64,
- Iop_8Sto16, Iop_8Sto32, Iop_16Sto32, Iop_32Sto64,
+ Iop_8Uto16, Iop_8Uto32, Iop_8Uto64,
+ Iop_16Uto32, Iop_16Uto64,
+ Iop_32Uto64,
+ Iop_8Sto16, Iop_8Sto32, Iop_8Sto64,
+ Iop_16Sto32, Iop_16Sto64,
+ Iop_32Sto64,
+
/* Narrowing conversions */
- Iop_32to8,
+ Iop_64to8, Iop_32to8, Iop_64to16,
/* 8 <-> 16 bit conversions */
Iop_16to8, // :: I16 -> I8, low half
Iop_16HIto8, // :: I16 -> I8, high half
|
|
From: Benoit P. <ben...@en...> - 2005-04-26 22:44:30
|
On Tue, 26 Apr 2005 17:01:17 -0500 (CDT) Nicholas Nethercote <nj...@cs...> wrote: > Nice job. I've only scanned the code quickly so far, but I have three > immediate questions: >=20 > - Are you sure you're developing from the Subversion repository? It=20 > really looks to me like you're working from CVS. Oops, you're right. > - Is a new output file generated for each execution? An important=20 > feature of coverage tools is that you want to be able to run a program=20 > multiple times, and get the total coverage from all the executions, not=20 > just a single one. So that way you can, for example, run your test suite= =20 > with many tests and then at the end get a coverage figure. The output is named using the process's pid. But using the cover script you can merge two output files into a new one. > - Does cv_header.h need to be separate -- could its contents just be pu= t=20 > into cv_main.c? It can be put into cv_main.c, I separated it for readability and because=20 I thought it didn't really belong to the tool. > Thanks for releasing this version! :) Next one soon :) Benoit PS: No need to CC me, I'm on the list now. |
|
From: Benoit P. <ben...@en...> - 2005-04-26 22:36:02
|
On Tue, 26 Apr 2005 23:44:12 +0200
Josef Weidendorfer <Jos...@gm...> wrote:
> [Suggestions ...]
I'll take this into account.
> Small example for a small test loop:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> ...
> hasDebug executed execCount
>=20
> . . . int main()
> 1 1 1 {
> 1 1 1 int i, j=3D0;
> . . .
> 1 1 2 printf("Hello World!\n");
> . . .
> 2 2 202 for(i=3D0;i<100;i++)
> 1 1 200 j +=3D a(i);
> . . .
> 1 1 1 return j;
> 1 1 1 }
> ...
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> What is the exact semantic of the numbers? I am curious because of=20
> "executed=3D2" for the printf line, "hasDebug=3D2" on the for() line, and=
=20
> "execCount=3D200" on the loop body line.
hasDebug is the number of executable instructions in the line
executed is the number of executable instructions the code passed through i=
n the line
execCount is the number of times the code passed through the line
Benoit
|
|
From: Nicholas N. <nj...@cs...> - 2005-04-26 22:01:27
|
On Tue, 26 Apr 2005, Benoit Peccatte wrote: > This is a first version of my coverage tool. > You can find it at http://b.peccatte.free.fr/cover-0.01.tgz > > To build it : > - extract cover.tgz into the valgrind directory > - add cover to Makefile.am in the 'TOOL = ...' line > - build as usualy > > To use it simply call valgrind withe --tool=cover > This produces a cover.pid file. This file can be read with cg_annotate > or kcachegrind. This is not really tested. It currently produces warnings > because I use ob= inappropriatly. > > I made a script to get clean summary of coverage information. > Simply run > ./cover cover.pid > ./cover -h will give you explanations on how to use it. Nice job. I've only scanned the code quickly so far, but I have three immediate questions: - Are you sure you're developing from the Subversion repository? It really looks to me like you're working from CVS. - Is a new output file generated for each execution? An important feature of coverage tools is that you want to be able to run a program multiple times, and get the total coverage from all the executions, not just a single one. So that way you can, for example, run your test suite with many tests and then at the end get a coverage figure. - Does cv_header.h need to be separate -- could its contents just be put into cv_main.c? Thanks for releasing this version! :) N |
|
From: Josef W. <Jos...@gm...> - 2005-04-26 21:43:19
|
On Tuesday 26 April 2005 20:13, Benoit Peccatte wrote: > Hi, > > This is a first version of my coverage tool. > You can find it at http://b.peccatte.free.fr/cover-0.01.tgz Cool, it even compiles with VG 2.4.0 without problems. > To build it : > - extract cover.tgz into the valgrind directory > - add cover to Makefile.am in the 'TOOL = ...' line I needed to add the directory also at the end of configure.in, so that configure creates the Makefile. I think the script (cover) should be installed, too, via a bin_SCRIPT line in Makefile.am. > To use it simply call valgrind withe --tool=cover > This produces a cover.pid file. This file can be read with cg_annotate This works good if you rename it to "cachegrind.out.*" (aside from the warnings because of the "ob=" lines). Especially the source annotation looks good. Small example for a small test loop: ==================================== ... hasDebug executed execCount . . . int main() 1 1 1 { 1 1 1 int i, j=0; . . . 1 1 2 printf("Hello World!\n"); . . . 2 2 202 for(i=0;i<100;i++) 1 1 200 j += a(i); . . . 1 1 1 return j; 1 1 1 } ... ======================================= What is the exact semantic of the numbers? I am curious because of "executed=2" for the printf line, "hasDebug=2" on the for() line, and "execCount=200" on the loop body line. > or kcachegrind. This works fine out of the box, with function grouping according to object file and similar annotation as above. The function overview is currently limited to show only one event type... Regarding a patch for iterators for debug info for Valgrind: best is to send it to the mailing list (or a link to it if it's long), and ask for inclusion. Josef > This is not really tested. It currently produces warnings > because I use ob= inappropriatly. > > I made a script to get clean summary of coverage information. > Simply run > ./cover cover.pid > ./cover -h will give you explanations on how to use it. > > Benoit |
|
From: Benoit P. <ben...@en...> - 2005-04-26 18:14:12
|
Hi,=20 This is a first version of my coverage tool.=20 You can find it at http://b.peccatte.free.fr/cover-0.01.tgz To build it : - extract cover.tgz into the valgrind directory - add cover to Makefile.am in the 'TOOL =3D ...' line - build as usualy To use it simply call valgrind withe --tool=3Dcover This produces a cover.pid file. This file can be read with cg_annotate=20 or kcachegrind. This is not really tested. It currently produces warnings because I use ob=3D inappropriatly. I made a script to get clean summary of coverage information. Simply run ./cover cover.pid ./cover -h will give you explanations on how to use it. Benoit |
|
From: <sv...@va...> - 2005-04-26 15:27:21
|
Author: njn Date: 2005-04-26 16:27:08 +0100 (Tue, 26 Apr 2005) New Revision: 110 Modified: trunk/gallery/users.html Log: Added Ardour. Modified: trunk/gallery/users.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/gallery/users.html 2005-04-25 16:06:06 UTC (rev 109) +++ trunk/gallery/users.html 2005-04-26 15:27:08 UTC (rev 110) @@ -456,6 +456,9 @@ <li><a href=3D"http://www.buzztard.org/">Buzztard:</a> A modular "Tracker"-style audio sequencer.</li> =20 + <li><a href=3D"http://ardour.org/">Ardour:</a> A digital audio=20 + workstation.</li> + </ul> =20 =20 |
|
From: Nicholas N. <nj...@cs...> - 2005-04-26 15:25:00
|
On Mon, 25 Apr 2005, Benoit Peccatte wrote: > I'm using the svn version from 10 days ago. Good! N |
|
From: <sv...@va...> - 2005-04-26 08:13:44
|
Author: tom
Date: 2005-04-26 09:13:24 +0100 (Tue, 26 Apr 2005)
New Revision: 3571
Modified:
trunk/coregrind/amd64-linux/syscalls.c
trunk/coregrind/linux/core_os.h
trunk/coregrind/linux/syscalls.c
trunk/coregrind/x86-linux/syscalls.c
Log:
Add support for the fadvise system calls.
Modified: trunk/coregrind/amd64-linux/syscalls.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/amd64-linux/syscalls.c 2005-04-26 07:44:48 UTC (rev 3=
570)
+++ trunk/coregrind/amd64-linux/syscalls.c 2005-04-26 08:13:24 UTC (rev 3=
571)
@@ -1166,7 +1166,7 @@
// (__NR_restart_syscall, sys_restart_syscall),// 219=20
=20
PLAX_(__NR_semtimedop, sys_semtimedop), // 220=20
- // (__NR_fadvise64, sys_fadvise64), // 221=20
+ LINX_(__NR_fadvise64, sys_fadvise64), // 221=20
// (__NR_timer_create, sys_timer_create), // 222=20
// (__NR_timer_settime, sys_timer_settime), // 223=20
// (__NR_timer_gettime, sys_timer_gettime), // 224=20
Modified: trunk/coregrind/linux/core_os.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/coregrind/linux/core_os.h 2005-04-26 07:44:48 UTC (rev 3570)
+++ trunk/coregrind/linux/core_os.h 2005-04-26 08:13:24 UTC (rev 3571)
@@ -86,6 +86,9 @@
VGO_LINUX_SYSCALL_WRAPPER(sys_tkill);
VGO_LINUX_SYSCALL_WRAPPER(sys_tgkill);
=20
+VGO_LINUX_SYSCALL_WRAPPER(sys_fadvise64);
+VGO_LINUX_SYSCALL_WRAPPER(sys_fadvise64_64);
+
VGO_LINUX_SYSCALL_WRAPPER(sys_io_setup);
VGO_LINUX_SYSCALL_WRAPPER(sys_io_destroy);
VGO_LINUX_SYSCALL_WRAPPER(sys_io_getevents);
Modified: trunk/coregrind/linux/syscalls.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/linux/syscalls.c 2005-04-26 07:44:48 UTC (rev 3570)
+++ trunk/coregrind/linux/syscalls.c 2005-04-26 08:13:24 UTC (rev 3571)
@@ -567,7 +567,20 @@
VG_(poll_signals)(tid);
}
=20
+PRE(sys_fadvise64, 0)
+{
+ PRINT("sys_fadvise64 ( %d, %lld, %lu, %d )", ARG1,ARG2,ARG3);
+ PRE_REG_READ4(long, "fadvise64",
+ int, fd, vki_loff_t, offset, vki_size_t, len, int, advi=
ce)
+}
=20
+PRE(sys_fadvise64_64, 0)
+{
+ PRINT("sys_fadvise64_64 ( %d, %lld, %lld, %d )", ARG1,ARG2,ARG3);
+ PRE_REG_READ4(long, "fadvise64_64",
+ int, fd, vki_loff_t, offset, vki_loff_t, len, int, advi=
ce)
+}
+
// Nb: this wrapper is "Special" because we have to pad/unpad memory aro=
und
// the syscall itself, and this allows us to control exactly the code th=
at
// gets run while the padding is in place.
Modified: trunk/coregrind/x86-linux/syscalls.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/x86-linux/syscalls.c 2005-04-26 07:44:48 UTC (rev 357=
0)
+++ trunk/coregrind/x86-linux/syscalls.c 2005-04-26 08:13:24 UTC (rev 357=
1)
@@ -1283,7 +1283,7 @@
LINX_(__NR_io_submit, sys_io_submit), // 248
LINXY(__NR_io_cancel, sys_io_cancel), // 249
=20
- // (__NR_fadvise64, sys_fadvise64), // 250 */(Linux?)
+ LINX_(__NR_fadvise64, sys_fadvise64), // 250 */(Linux?)
GENX_(251, sys_ni_syscall), // 251
LINX_(__NR_exit_group, sys_exit_group), // 252
GENXY(__NR_lookup_dcookie, sys_lookup_dcookie), // 253
@@ -1309,7 +1309,7 @@
=20
LINX_(__NR_tgkill, sys_tgkill), // 270 */Linux
GENX_(__NR_utimes, sys_utimes), // 271
- // (__NR_fadvise64_64, sys_fadvise64_64), // 272 */(Linux?)
+ LINX_(__NR_fadvise64_64, sys_fadvise64_64), // 272 */(Linux?)
GENX_(__NR_vserver, sys_ni_syscall), // 273
// (__NR_mbind, sys_mbind), // 274 ?/?
=20
|
|
From: <sv...@va...> - 2005-04-26 07:45:13
|
Author: tom
Date: 2005-04-26 08:44:48 +0100 (Tue, 26 Apr 2005)
New Revision: 3570
Modified:
trunk/memcheck/mc_translate.c
Log:
Support the 64 bit comparison instructions which vex is now using.
Modified: trunk/memcheck/mc_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/memcheck/mc_translate.c 2005-04-25 17:08:32 UTC (rev 3569)
+++ trunk/memcheck/mc_translate.c 2005-04-26 07:44:48 UTC (rev 3570)
@@ -595,6 +595,14 @@
opCMP =3D Iop_CmpEQ32;
top =3D mkU32(0xFFFFFFFF);
break;
+ case Ity_I64:
+ opDIFD =3D Iop_And64;
+ opUIFU =3D Iop_Or64;
+ opNOT =3D Iop_Not64;
+ opXOR =3D Iop_Xor64;
+ opCMP =3D Iop_CmpEQ64;
+ top =3D mkU64(0xFFFFFFFFFFFFFFFF);
+ break;
default:
VG_(tool_panic)("expensiveCmpEQorNE");
}
@@ -1651,9 +1659,9 @@
else
goto cheap_cmp64;
cheap_cmp64:
- // case Iop_CmpLE64S: case Iop_CmpLE64U:=20
- // case Iop_CmpLT64U: case Iop_CmpLT64S:
- // case Iop_CmpNE64:
+ case Iop_CmpLE64S: case Iop_CmpLE64U:=20
+ case Iop_CmpLT64U: case Iop_CmpLT64S:
+ case Iop_CmpNE64:
return mkPCastTo(mce, Ity_I1, mkUifU64(mce, vatom1,vatom2));
=20
case Iop_CmpEQ32:=20
|
|
From: <js...@ac...> - 2005-04-26 03:05:53
|
Nightly build on phoenix ( SuSE 9.1 ) started at 2005-04-26 03:50:00 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmx: valgrind ./insn_mmx insn_mmxext: (skipping, prereq failed: ../../../tests/cputest x86-mmxext) insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 201 tests, 5 stderr failures, 0 stdout failures ================= memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/writev (stderr) corecheck/tests/fdleak_fcntl (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:34:55
|
Nightly build on honda ( x86_64, Fedora Core 3 ) started at 2005-04-26 03:10:08 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 156 tests, 84 stderr failures, 21 stdout failures ================= memcheck/tests/addressable (stdout) memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stdout) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stdout) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stdout) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stdout) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stdout) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stdout) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stdout) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stdout) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stdout) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stdout) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stdout) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_fork (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/scalar_vfork (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stdout) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/threadederrno (stdout) memcheck/tests/threadederrno (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stdout) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stdout) memcheck/tests/zeropage (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/tls (stdout) |
|
From: Tom H. <to...@co...> - 2005-04-26 02:31:42
|
Nightly build on dunsmere ( athlon, Fedora Core 3 ) started at 2005-04-26 03:30:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... failed Last 20 lines of log.verbose follow gcc -Wmissing-prototypes -Winline -Wall -Wshadow -O -g -mpreferred-stack-boundary=2 -DELFSZ=32 -fno-omit-frame-pointer -Wno-long-long -o valgrind -static -g ume.o stage1.o m_debuglog.o jmp_with_stack.o if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../include -I../include/x86 -I../include/linux -I../include/x86-linux -I/tmp/valgrind.25894/vex/pub -DVG_LIBDIR="\"/tmp/valgrind.25894/Inst/lib/valgrind"\" -I./demangle -DKICKSTART_BASE=0xb0000000 -DVG_PLATFORM="x86-linux" -Wmissing-prototypes -Winline -Wall -Wshadow -O -g -mpreferred-stack-boundary=2 -DELFSZ=32 -fno-omit-frame-pointer -fpie -Wno-long-long -MT stage2-m_errormgr.o -MD -MP -MF ".deps/stage2-m_errormgr.Tpo" -c -o stage2-m_errormgr.o `test -f 'm_errormgr.c' || echo './'`m_errormgr.c; \ then mv -f ".deps/stage2-m_errormgr.Tpo" ".deps/stage2-m_errormgr.Po"; else rm -f ".deps/stage2-m_errormgr.Tpo"; exit 1; fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../include -I../include/x86 -I../include/linux -I../include/x86-linux -I/tmp/valgrind.25894/vex/pub -DVG_LIBDIR="\"/tmp/valgrind.25894/Inst/lib/valgrind"\" -I./demangle -DKICKSTART_BASE=0xb0000000 -DVG_PLATFORM="x86-linux" -Wmissing-prototypes -Winline -Wall -Wshadow -O -g -mpreferred-stack-boundary=2 -DELFSZ=32 -fno-omit-frame-pointer -fpie -Wno-long-long -MT stage2-m_execontext.o -MD -MP -MF ".deps/stage2-m_execontext.Tpo" -c -o stage2-m_execontext.o `test -f 'm_execontext.c' || echo './'`m_execontext.c; \ then mv -f ".deps/stage2-m_execontext.Tpo" ".deps/stage2-m_execontext.Po"; else rm -f ".deps/stage2-m_execontext.Tpo"; exit 1; fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../include -I../include/x86 -I../include/linux -I../include/x86-linux -I/tmp/valgrind.25894/vex/pub -DVG_LIBDIR="\"/tmp/valgrind.25894/Inst/lib/valgrind"\" -I./demangle -DKICKSTART_BASE=0xb0000000 -DVG_PLATFORM="x86-linux" -Wmissing-prototypes -Winline -Wall -Wshadow -O -g -mpreferred-stack-boundary=2 -DELFSZ=32 -fno-omit-frame-pointer -fpie -Wno-long-long -MT stage2-m_stacktrace.o -MD -MP -MF ".deps/stage2-m_stacktrace.Tpo" -c -o stage2-m_stacktrace.o `test -f 'm_stacktrace.c' || echo './'`m_stacktrace.c; \ then mv -f ".deps/stage2-m_stacktrace.Tpo" ".deps/stage2-m_stacktrace.Po"; else rm -f ".deps/stage2-m_stacktrace.Tpo"; exit 1; fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I../coregrind -I.. -I../coregrind/x86 -I../coregrind/x86 -I../coregrind/linux -I../coregrind/x86-linux -I../include -I../include -I../include/x86 -I../include/linux -I../include/x86-linux -I/tmp/valgrind.25894/vex/pub -DVG_LIBDIR="\"/tmp/valgrind.25894/Inst/lib/valgrind"\" -I./demangle -DKICKSTART_BASE=0xb0000000 -DVG_PLATFORM="x86-linux" -Wmissing-prototypes -Winline -Wall -Wshadow -O -g -mpreferred-stack-boundary=2 -DELFSZ=32 -fno-omit-frame-pointer -fpie -Wno-long-long -MT stage2-m_debuglog.o -MD -MP -MF ".deps/stage2-m_debuglog.Tpo" -c -o stage2-m_debuglog.o `test -f 'm_debuglog.c' || echo './'`m_debuglog.c; \ then mv -f ".deps/stage2-m_debuglog.Tpo" ".deps/stage2-m_debuglog.Po"; else rm -f ".deps/stage2-m_debuglog.Tpo"; exit 1; fi m_debuglog.c: In function `local_sys_write_stderr': m_debuglog.c:65: error: can't find a register in class `BREG' while reloading `asm' make[4]: *** [stage2-m_debuglog.o] Error 1 make[4]: Leaving directory `/tmp/valgrind.25894/valgrind/coregrind' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/tmp/valgrind.25894/valgrind/coregrind' make[2]: *** [all] Error 2 make[2]: Leaving directory `/tmp/valgrind.25894/valgrind/coregrind' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/valgrind.25894/valgrind' make: *** [all] Error 2 |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:31:14
|
Nightly build on audi ( i686, Red Hat 9 ) started at 2005-04-26 03:25:02 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 175 tests, 16 stderr failures, 4 stdout failures ================= memcheck/tests/error_counts (stdout) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/trivialleak (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/sigcontext (stdout) none/tests/x86/sigcontext (stderr) |
|
From: Tom H. <to...@co...> - 2005-04-26 02:26:44
|
Nightly build on dunsmere ( Fedora Core 3 ) started at 2005-04-26 03:20:04 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int sh: line 1: 25677 Segmentation fault VALGRINDLIB=/tmp/valgrind.32381/valgrind/.in_place /tmp/valgrind.32381/valgrind/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --addrcheck:leak-check=no --tool=none ./int >int.stdout.out 2>int.stderr.out pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 207 tests, 4 stderr failures, 0 stdout failures ================= memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_supp (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:25:53
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-04-26 03:20:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 174 tests, 17 stderr failures, 4 stdout failures ================= memcheck/tests/error_counts (stdout) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/trivialleak (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/sigcontext (stdout) none/tests/x86/sigcontext (stderr) |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:22:41
|
Nightly build on audi ( Red Hat 9 ) started at 2005-04-26 03:15:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow fpu_lazy_eflags: valgrind ./fpu_lazy_eflags insn_basic: valgrind ./insn_basic insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 206 tests, 1 stderr failure, 0 stdout failures ================= memcheck/tests/scalar (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:21:00
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-04-26 03:15:01 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 174 tests, 21 stderr failures, 4 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/match-overrun (stderr) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/sigcontext (stdout) none/tests/x86/sigcontext (stderr) |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:16:53
|
Nightly build on ginetta ( Red Hat 8.0 ) started at 2005-04-26 03:10:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow insn_cmov: valgrind ./insn_cmov insn_fpu: valgrind ./insn_fpu insn_mmx: valgrind ./insn_mmx insn_mmxext: valgrind ./insn_mmxext insn_sse: valgrind ./insn_sse insn_sse2: (skipping, prereq failed: ../../../tests/cputest x86-sse2) int: valgrind ./int pushpopseg: valgrind ./pushpopseg rcl_assert: valgrind ./rcl_assert seg_override: valgrind ./seg_override -- Finished tests in none/tests/x86 ------------------------------------ yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 205 tests, 3 stderr failures, 0 stdout failures ================= memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:11:44
|
Nightly build on alvis ( Red Hat 7.3 ) started at 2005-04-26 03:05:02 BST Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow == 205 tests, 17 stderr failures, 0 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/distinguished-writes (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/pth_once (stderr) memcheck/tests/scalar (stderr) memcheck/tests/threadederrno (stderr) memcheck/tests/vgtest_ume (stderr) addrcheck/tests/leak-0 (stderr) addrcheck/tests/leak-cycle (stderr) addrcheck/tests/leak-regroot (stderr) addrcheck/tests/leak-tree (stderr) make: *** [regtest] Error 1 |
|
From: Tom H. <th...@cy...> - 2005-04-26 02:02:58
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-04-26 03:00:03 BST Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 156 tests, 84 stderr failures, 21 stdout failures ================= memcheck/tests/addressable (stdout) memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stdout) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stdout) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stdout) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stdout) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stdout) memcheck/tests/malloc3 (stderr) memcheck/tests/manuel1 (stdout) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stdout) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stdout) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stdout) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/overlap (stdout) memcheck/tests/overlap (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stdout) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/scalar (stderr) memcheck/tests/scalar_exit_group (stderr) memcheck/tests/scalar_fork (stderr) memcheck/tests/scalar_supp (stderr) memcheck/tests/scalar_vfork (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/signal2 (stdout) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/threadederrno (stdout) memcheck/tests/threadederrno (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stdout) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stdout) memcheck/tests/zeropage (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/selfrun (stdout) none/tests/selfrun (stderr) none/tests/yield (stdout) |
|
From: <sv...@va...> - 2005-04-26 01:53:51
|
Author: sewardj
Date: 2005-04-26 02:53:48 +0100 (Tue, 26 Apr 2005)
New Revision: 1143
Modified:
trunk/priv/guest-amd64/ghelpers.c
Log:
Add various %rflag-helper specialisation cases and fast paths. This
more or less doubles performance of the baseline simulation on integer
code.
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-04-26 01:52:29 UTC (rev 1142)
+++ trunk/priv/guest-amd64/ghelpers.c 2005-04-26 01:53:48 UTC (rev 1143)
@@ -525,12 +525,14 @@
for (op =3D 0; op < AMD64G_CC_OP_NUMBER; op++) {
=20
ch =3D ' ';
- if (op > 0 && (op-1) % 3 =3D=3D 0)=20
+ if (op > 0 && (op-1) % 4 =3D=3D 0)=20
ch =3D 'B';
- if (op > 0 && (op-1) % 3 =3D=3D 1)=20
+ if (op > 0 && (op-1) % 4 =3D=3D 1)=20
ch =3D 'W';
- if (op > 0 && (op-1) % 3 =3D=3D 2)=20
+ if (op > 0 && (op-1) % 4 =3D=3D 2)=20
ch =3D 'L';
+ if (op > 0 && (op-1) % 4 =3D=3D 3)=20
+ ch =3D 'Q';
=20
vex_printf("%2d%c: ", op, ch);
vex_printf("%6u ", tabc_slow[op]);
@@ -694,24 +696,23 @@
=20
/* Fast-case some common ones. */
switch (cc_op) {
-# if 0 // REINSTATE CAREFULLY
+ case AMD64G_CC_OP_LOGICQ:=20
case AMD64G_CC_OP_LOGICL:=20
case AMD64G_CC_OP_LOGICW:=20
case AMD64G_CC_OP_LOGICB:
return 0;
- case AMD64G_CC_OP_SUBL:
- return ((UInt)cc_dep1) < ((UInt)cc_dep2)
- ? AMD64G_CC_MASK_C : 0;
- case AMD64G_CC_OP_SUBW:
- return ((UInt)(cc_dep1 & 0xFFFF)) < ((UInt)(cc_dep2 & 0xFFFF))
- ? AMD64G_CC_MASK_C : 0;
- case AMD64G_CC_OP_SUBB:
- return ((UInt)(cc_dep1 & 0xFF)) < ((UInt)(cc_dep2 & 0xFF))
- ? AMD64G_CC_MASK_C : 0;
- case AMD64G_CC_OP_INCL:
- case AMD64G_CC_OP_DECL:
- return cc_ndep & AMD64G_CC_MASK_C;
-# endif // REINSTATE CAREFULLY
+ // case AMD64G_CC_OP_SUBL:
+ // return ((UInt)cc_dep1) < ((UInt)cc_dep2)
+ // ? AMD64G_CC_MASK_C : 0;
+ // case AMD64G_CC_OP_SUBW:
+ // return ((UInt)(cc_dep1 & 0xFFFF)) < ((UInt)(cc_dep2 & 0xFFF=
F))
+ // ? AMD64G_CC_MASK_C : 0;
+ // case AMD64G_CC_OP_SUBB:
+ // return ((UInt)(cc_dep1 & 0xFF)) < ((UInt)(cc_dep2 & 0xFF))
+ // ? AMD64G_CC_MASK_C : 0;
+ // case AMD64G_CC_OP_INCL:
+ // case AMD64G_CC_OP_DECL:
+ // return cc_ndep & AMD64G_CC_MASK_C;
default:=20
break;
}
@@ -830,48 +831,48 @@
/*--- %rflags functions. ---*/
/*---------------------------------------------------------------*/
=20
-//.. /* Used by the optimiser to try specialisations. Returns an
-//.. equivalent expression, or NULL if none. */
-//..=20
-//.. static Bool isU32 ( IRExpr* e, UInt n )
-//.. {
-//.. return e->tag =3D=3D Iex_Const
-//.. && e->Iex.Const.con->tag =3D=3D Ico_U32
-//.. && e->Iex.Const.con->Ico.U32 =3D=3D n;
-//.. }
+/* Used by the optimiser to try specialisations. Returns an
+ equivalent expression, or NULL if none. */
=20
+static Bool isU64 ( IRExpr* e, ULong n )
+{
+ return e->tag =3D=3D Iex_Const
+ && e->Iex.Const.con->tag =3D=3D Ico_U64
+ && e->Iex.Const.con->Ico.U64 =3D=3D n;
+}
+
IRExpr* guest_amd64_spechelper ( HChar* function_name,
IRExpr** args )
{
-//.. # define unop(_op,_a1) IRExpr_Unop((_op),(_a1))
-//.. # define binop(_op,_a1,_a2) IRExpr_Binop((_op),(_a1),(_a2))
-//.. # define mkU32(_n) IRExpr_Const(IRConst_U32(_n))
-//.. # define mkU8(_n) IRExpr_Const(IRConst_U8(_n))
-//..=20
-//.. Int i, arity =3D 0;
-//.. for (i =3D 0; args[i]; i++)
-//.. arity++;
-//.. # if 0
-//.. vex_printf("spec request:\n");
-//.. vex_printf(" %s ", function_name);
-//.. for (i =3D 0; i < arity; i++) {
-//.. vex_printf(" ");
-//.. ppIRExpr(args[i]);
-//.. }
-//.. vex_printf("\n");
-//.. # endif
-//..=20
-//.. /* --------- specialising "x86g_calculate_condition" --------- *=
/
-//..=20
-//.. if (vex_streq(function_name, "x86g_calculate_condition")) {
-//.. /* specialise calls to above "calculate condition" function *=
/
-//.. IRExpr *cond, *cc_op, *cc_dep1, *cc_dep2;
-//.. vassert(arity =3D=3D 5);
-//.. cond =3D args[0];
-//.. cc_op =3D args[1];
-//.. cc_dep1 =3D args[2];
-//.. cc_dep2 =3D args[3];
-//..=20
+# define unop(_op,_a1) IRExpr_Unop((_op),(_a1))
+# define binop(_op,_a1,_a2) IRExpr_Binop((_op),(_a1),(_a2))
+# define mkU64(_n) IRExpr_Const(IRConst_U64(_n))
+# define mkU8(_n) IRExpr_Const(IRConst_U8(_n))
+
+ Int i, arity =3D 0;
+ for (i =3D 0; args[i]; i++)
+ arity++;
+# if 0
+ vex_printf("spec request:\n");
+ vex_printf(" %s ", function_name);
+ for (i =3D 0; i < arity; i++) {
+ vex_printf(" ");
+ ppIRExpr(args[i]);
+ }
+ vex_printf("\n");
+# endif
+
+ /* --------- specialising "amd64g_calculate_condition" --------- */
+
+ if (vex_streq(function_name, "amd64g_calculate_condition")) {
+ /* specialise calls to above "calculate condition" function */
+ IRExpr *cond, *cc_op, *cc_dep1, *cc_dep2;
+ vassert(arity =3D=3D 5);
+ cond =3D args[0];
+ cc_op =3D args[1];
+ cc_dep1 =3D args[2];
+ cc_dep2 =3D args[3];
+
//.. /*---------------- ADDL ----------------*/
//..=20
//.. if (isU32(cc_op, AMD64G_CC_OP_ADDL) && isU32(cond, X86CondZ))=
{
@@ -881,9 +882,9 @@
//.. binop(Iop_Add32, cc_dep1, cc_dep2),
//.. mkU32(0)));
//.. }
-//..=20
-//.. /*---------------- SUBL ----------------*/
-//..=20
+
+ /*---------------- SUBL ----------------*/
+
//.. if (isU32(cc_op, AMD64G_CC_OP_SUBL) && isU32(cond, X86CondZ))=
{
//.. /* long sub/cmp, then Z --> test dst=3D=3Dsrc */
//.. return unop(Iop_1Uto32,
@@ -895,21 +896,30 @@
//.. return unop(Iop_1Uto32,
//.. binop(Iop_CmpNE32, cc_dep1, cc_dep2));
//.. }
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBL) && isU32(cond, X86CondL))=
{
-//.. /* long sub/cmp, then L (signed less than)=20
-//.. --> test dst <s src */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpLT32S, cc_dep1, cc_dep2));
-//.. }
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBL) && isU32(cond, X86CondLE)=
) {
-//.. /* long sub/cmp, then LE (signed less than or equal)
-//.. --> test dst <=3Ds src */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpLE32S, cc_dep1, cc_dep2));
-//.. }
-//..=20
+
+ if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondL)) {
+ /* long sub/cmp, then L (signed less than)=20
+ --> test dst <s src */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLT64S,=20
+ binop(Iop_Shl64,cc_dep1,mkU8(32)),
+ binop(Iop_Shl64,cc_dep2,mkU8(32)))));
+
+ }
+
+ if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondLE)) {
+ /* long sub/cmp, then L (signed less than or equal)=20
+ --> test dst <s src */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLE64S,=20
+ binop(Iop_Shl64,cc_dep1,mkU8(32)),
+ binop(Iop_Shl64,cc_dep2,mkU8(32)))));
+
+ }
+
+
//.. if (isU32(cc_op, AMD64G_CC_OP_SUBL) && isU32(cond, X86CondBE)=
) {
//.. /* long sub/cmp, then BE (unsigned less than or equal)
//.. --> test dst <=3Du src */
@@ -923,35 +933,38 @@
//.. return unop(Iop_1Uto32,
//.. binop(Iop_CmpLT32U, cc_dep1, cc_dep2));
//.. }
-//..=20
-//.. /*---------------- SUBW ----------------*/
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBW) && isU32(cond, X86CondZ))=
{
-//.. /* byte sub/cmp, then Z --> test dst=3D=3Dsrc */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpEQ16,=20
-//.. unop(Iop_32to16,cc_dep1),=20
-//.. unop(Iop_32to16,cc_dep2)));
-//.. }
-//..=20
-//.. /*---------------- SUBB ----------------*/
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBB) && isU32(cond, X86CondZ))=
{
-//.. /* byte sub/cmp, then Z --> test dst=3D=3Dsrc */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpEQ8,=20
-//.. unop(Iop_32to8,cc_dep1),=20
-//.. unop(Iop_32to8,cc_dep2)));
-//.. }
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBB) && isU32(cond, X86CondNZ)=
) {
-//.. /* byte sub/cmp, then NZ --> test dst!=3Dsrc */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpNE8,=20
-//.. unop(Iop_32to8,cc_dep1),=20
-//.. unop(Iop_32to8,cc_dep2)));
-//.. }
-//..=20
+
+ /*---------------- SUBW ----------------*/
+
+ if (isU64(cc_op, AMD64G_CC_OP_SUBW) && isU64(cond, AMD64CondZ)) {
+ /* word sub/cmp, then Z --> test dst=3D=3Dsrc */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpEQ16,=20
+ unop(Iop_32to16,unop(Iop_64to32,cc_dep1)),
+ unop(Iop_32to16,unop(Iop_64to32,cc_dep2)))));
+ }
+
+ /*---------------- SUBB ----------------*/
+
+ if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondZ)) {
+ /* byte sub/cmp, then Z --> test dst=3D=3Dsrc */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpEQ8,=20
+ unop(Iop_32to8,unop(Iop_64to32,cc_dep1)),
+ unop(Iop_32to8,unop(Iop_64to32,cc_dep2)))));
+ }
+
+// if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondNZ))=
{
+// /* byte sub/cmp, then NZ --> test dst!=3Dsrc */
+// return unop(Iop_32Uto64,
+// unop(Iop_1Uto32,
+// binop(Iop_CmpNE8,=20
+// unop(Iop_32to8,unop(Iop_64to32,cc_dep1)),
+// unop(Iop_32to8,unop(Iop_64to32,cc_dep2)))))=
;
+// }
+
//.. if (isU32(cc_op, AMD64G_CC_OP_SUBB) && isU32(cond, X86CondNBE=
)) {
//.. /* long sub/cmp, then NBE (unsigned greater than)
//.. --> test src <=3Du dst */
@@ -961,29 +974,35 @@
//.. binop(Iop_And32,cc_dep2,mkU32(0xFF)),
//.. binop(Iop_And32,cc_dep1,mkU32(0xFF))));
//.. }
-//..=20
-//.. /*---------------- LOGICL ----------------*/
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondZ=
)) {
-//.. /* long and/or/xor, then Z --> test dst=3D=3D0 */
-//.. return unop(Iop_1Uto32,binop(Iop_CmpEQ32, cc_dep1, mkU32(0=
)));
-//.. }
-//..=20
+
+ /*---------------- LOGICL ----------------*/
+
+ if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondZ)) =
{
+ /* long and/or/xor, then Z --> test dst=3D=3D0 */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,binop(Iop_CmpEQ64,=20
+ binop(Iop_Shl64,cc_dep1,mkU8(32)),=
=20
+ mkU64(0))));
+ }
+
//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondS=
)) {
//.. /* long and/or/xor, then S --> test dst <s 0 */
//.. return unop(Iop_1Uto32,binop(Iop_CmpLT32S, cc_dep1, mkU32(=
0)));
//.. }
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondL=
E)) {
-//.. /* long and/or/xor, then LE
-//.. This is pretty subtle. LOGIC sets SF and ZF according =
to the
-//.. result and makes OF be zero. LE computes (SZ ^ OF) | Z=
F, but
-//.. OF is zero, so this reduces to SZ | ZF -- which will be=
1 iff
-//.. the result is <=3Dsigned 0. Hence ...
-//.. */
-//.. return unop(Iop_1Uto32,binop(Iop_CmpLE32S, cc_dep1, mkU32(=
0)));
-//.. }
-//..=20
+
+ if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondLE))=
{
+ /* long and/or/xor, then LE
+ This is pretty subtle. LOGIC sets SF and ZF according to th=
e
+ result and makes OF be zero. LE computes (SZ ^ OF) | ZF, bu=
t
+ OF is zero, so this reduces to SZ | ZF -- which will be 1 if=
f
+ the result is <=3Dsigned 0. Hence ...
+ */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,binop(Iop_CmpLE64S,=20
+ binop(Iop_Shl64,cc_dep1,mkU8(32)),=
=20
+ mkU64(0))));
+ }
+
//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL) && isU32(cond, X86CondB=
E)) {
//.. /* long and/or/xor, then BE
//.. LOGIC sets ZF according to the result and makes CF be z=
ero.
@@ -1076,43 +1095,49 @@
//.. )
//.. );
//.. }
-//..=20
-//.. return NULL;
-//.. }
-//..=20
-//.. /* --------- specialising "x86g_calculate_eflags_c" --------- */
-//..=20
-//.. if (vex_streq(function_name, "x86g_calculate_eflags_c")) {
-//.. /* specialise calls to above "calculate_eflags_c" function */
-//.. IRExpr *cc_op, *cc_dep1, *cc_dep2, *cc_ndep;
-//.. vassert(arity =3D=3D 4);
-//.. cc_op =3D args[0];
-//.. cc_dep1 =3D args[1];
-//.. cc_dep2 =3D args[2];
-//.. cc_ndep =3D args[3];
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBL)) {
-//.. /* C after sub denotes unsigned less than */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpLT32U, cc_dep1, cc_dep2));
-//.. }
-//.. if (isU32(cc_op, AMD64G_CC_OP_SUBB)) {
-//.. /* C after sub denotes unsigned less than */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpLT32U,=20
-//.. binop(Iop_And32,cc_dep1,mkU32(0xFF)),
-//.. binop(Iop_And32,cc_dep2,mkU32(0xFF))));
-//.. }
-//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICL)
-//.. || isU32(cc_op, AMD64G_CC_OP_LOGICW)
-//.. || isU32(cc_op, AMD64G_CC_OP_LOGICB)) {
-//.. /* cflag after logic is zero */
-//.. return mkU32(0);
-//.. }
-//.. if (isU32(cc_op, AMD64G_CC_OP_DECL) || isU32(cc_op, AMD64G_CC=
_OP_INCL)) {
-//.. /* If the thunk is dec or inc, the cflag is supplied as CC=
_NDEP. */
-//.. return cc_ndep;
-//.. }
+
+ return NULL;
+ }
+
+ /* --------- specialising "amd64g_calculate_rflags_c" --------- */
+
+ if (vex_streq(function_name, "amd64g_calculate_rflags_c")) {
+ /* specialise calls to above "calculate_rflags_c" function */
+ IRExpr *cc_op, *cc_dep1, *cc_dep2, *cc_ndep;
+ vassert(arity =3D=3D 4);
+ cc_op =3D args[0];
+ cc_dep1 =3D args[1];
+ cc_dep2 =3D args[2];
+ cc_ndep =3D args[3];
+
+ if (isU64(cc_op, AMD64G_CC_OP_SUBL)) {
+ /* C after sub denotes unsigned less than */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLT64U,=20
+ binop(Iop_Shl64,cc_dep1,mkU8(32)),=20
+ binop(Iop_Shl64,cc_dep2,mkU8(32)))));
+ }
+ if (isU64(cc_op, AMD64G_CC_OP_SUBB)) {
+ /* C after sub denotes unsigned less than */
+ return unop(Iop_32Uto64,
+ unop(Iop_1Uto32,
+ binop(Iop_CmpLT64U,=20
+ binop(Iop_And64,cc_dep1,mkU64(0xFF)),
+ binop(Iop_And64,cc_dep2,mkU64(0xFF)))));
+ }
+ if (isU64(cc_op, AMD64G_CC_OP_LOGICQ)
+ || isU64(cc_op, AMD64G_CC_OP_LOGICL)
+ || isU64(cc_op, AMD64G_CC_OP_LOGICW)
+ || isU64(cc_op, AMD64G_CC_OP_LOGICB)) {
+ /* cflag after logic is zero */
+ return mkU64(0);
+ }
+ if (isU64(cc_op, AMD64G_CC_OP_DECL) || isU64(cc_op, AMD64G_CC_OP_I=
NCL)
+ || isU64(cc_op, AMD64G_CC_OP_DECQ) || isU64(cc_op, AMD64G_CC_O=
P_INCQ)) {
+ /* If the thunk is dec or inc, the cflag is supplied as CC_NDEP=
. */
+ return cc_ndep;
+ }
//.. if (isU32(cc_op, AMD64G_CC_OP_COPY)) {
//.. /* cflag after COPY is stored in DEP1. */
//.. return
@@ -1127,14 +1152,14 @@
//.. vex_printf("CFLAG "); ppIRExpr(cc_op); vex_printf("\n");
//.. }
//.. # endif
+
+ return NULL;
+ }
+
+//.. /* --------- specialising "x86g_calculate_rflags_all" --------- =
*/
//..=20
-//.. return NULL;
-//.. }
-//..=20
-//.. /* --------- specialising "x86g_calculate_eflags_all" --------- =
*/
-//..=20
-//.. if (vex_streq(function_name, "x86g_calculate_eflags_all")) {
-//.. /* specialise calls to above "calculate_eflags_all" function =
*/
+//.. if (vex_streq(function_name, "x86g_calculate_rflags_all")) {
+//.. /* specialise calls to above "calculate_rflags_all" function =
*/
//.. IRExpr *cc_op, *cc_dep1, *cc_dep2, *cc_ndep;
//.. vassert(arity =3D=3D 4);
//.. cc_op =3D args[0];
@@ -1153,11 +1178,11 @@
//.. );
//.. }
//.. return NULL;
-//.. }
+//.. }
=20
# undef unop
# undef binop
-# undef mkU32
+# undef mkU64
# undef mkU8
=20
return NULL;
|
|
From: <sv...@va...> - 2005-04-26 01:52:48
|
Author: sewardj
Date: 2005-04-26 02:52:29 +0100 (Tue, 26 Apr 2005)
New Revision: 1142
Modified:
trunk/priv/host-amd64/isel.c
Log:
Handle more cases, and a bit of tuning.
Modified: trunk/priv/host-amd64/isel.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/host-amd64/isel.c 2005-04-26 01:52:01 UTC (rev 1141)
+++ trunk/priv/host-amd64/isel.c 2005-04-26 01:52:29 UTC (rev 1142)
@@ -1207,7 +1207,7 @@
return rLo; /* and abandon rHi */
}
case Iop_8Uto16:
-//.. case Iop_8Uto32:
+ case Iop_8Uto32:
case Iop_16Uto32: {
HReg dst =3D newVRegI(env);
HReg src =3D iselIntExpr_R(env, e->Iex.Unop.arg);
@@ -1264,7 +1264,7 @@
Ash_SHR, shift, AMD64RM_Reg(dst)));
return dst;
}
-//.. case Iop_1Uto32:
+ case Iop_1Uto32:
case Iop_1Uto8: {
HReg dst =3D newVRegI(env);
AMD64CondCode cond =3D iselCondCode(env, e->Iex.Unop.arg);
@@ -1744,6 +1744,8 @@
//.. DECLARE_PATTERN(p_1Uto32_then_32to1);
//.. DECLARE_PATTERN(p_1Sto32_then_32to1);
=20
+ DECLARE_PATTERN(p_1Uto64_then_64to1);
+
vassert(e);
vassert(typeOfIRExpr(env->type_env,e) =3D=3D Ity_I1);
=20
@@ -1763,6 +1765,21 @@
return 1 ^ iselCondCode(env, e->Iex.Unop.arg);
}
=20
+ /* 32to1(64to32(32Uto64(1Uto32(expr1))))
+ -- the casts are pointless, ignore them */
+ DEFINE_PATTERN(
+ p_1Uto64_then_64to1,
+ unop(Iop_32to1,
+ unop(Iop_64to32,
+ unop(Iop_32Uto64,
+ unop(Iop_1Uto32,
+ bind(0)))))
+ );
+ if (matchIRExpr(&mi,p_1Uto64_then_64to1,e)) {
+ IRExpr* expr1 =3D mi.bindee[0];
+ return iselCondCode(env, expr1);
+ }
+
//.. /* 32to1(1Uto32(expr1)) -- the casts are pointless, ignore them =
*/
//.. DEFINE_PATTERN(p_1Uto32_then_32to1,
//.. unop(Iop_32to1,unop(Iop_1Uto32,bind(0))));
@@ -1806,6 +1823,23 @@
}
}
=20
+ /* CmpEQ16 / CmpNE16 */
+ if (e->tag =3D=3D Iex_Binop=20
+ && (e->Iex.Binop.op =3D=3D Iop_CmpEQ16
+ || e->Iex.Binop.op =3D=3D Iop_CmpNE16)) {
+ HReg r1 =3D iselIntExpr_R(env, e->Iex.Binop.arg1);
+ AMD64RMI* rmi2 =3D iselIntExpr_RMI(env, e->Iex.Binop.arg2);
+ HReg r =3D newVRegI(env);
+ addInstr(env, mk_iMOVsd_RR(r1,r));
+ addInstr(env, AMD64Instr_Alu64R(Aalu_XOR,rmi2,r));
+ addInstr(env, AMD64Instr_Alu64R(Aalu_AND,AMD64RMI_Imm(0xFFFF),r));
+ switch (e->Iex.Binop.op) {
+ case Iop_CmpEQ16: return Acc_Z;
+ case Iop_CmpNE16: return Acc_NZ;
+ default: vpanic("iselCondCode(amd64): CmpXX16");
+ }
+ }
+
/* CmpEQ32 / CmpNE32 */
if (e->tag =3D=3D Iex_Binop=20
&& (e->Iex.Binop.op =3D=3D Iop_CmpEQ32
@@ -1856,9 +1890,9 @@
if (e->tag =3D=3D Iex_Binop=20
&& (e->Iex.Binop.op =3D=3D Iop_CmpEQ64
|| e->Iex.Binop.op =3D=3D Iop_CmpNE64
- //|| e->Iex.Binop.op =3D=3D Iop_CmpLT64S
- //|| e->Iex.Binop.op =3D=3D Iop_CmpLT64U
- //|| e->Iex.Binop.op =3D=3D Iop_CmpLE64S
+ || e->Iex.Binop.op =3D=3D Iop_CmpLT64S
+ || e->Iex.Binop.op =3D=3D Iop_CmpLT64U
+ || e->Iex.Binop.op =3D=3D Iop_CmpLE64S
//|| e->Iex.Binop.op =3D=3D Iop_CmpLE64U
)) {
HReg r1 =3D iselIntExpr_R(env, e->Iex.Binop.arg1);
@@ -1867,9 +1901,9 @@
switch (e->Iex.Binop.op) {
case Iop_CmpEQ64: return Acc_Z;
case Iop_CmpNE64: return Acc_NZ;
- //case Iop_CmpLT64S: return Acc_L;
- //case Iop_CmpLT64U: return Acc_B;
- //case Iop_CmpLE64S: return Acc_LE;
+ case Iop_CmpLT64S: return Acc_L;
+ case Iop_CmpLT64U: return Acc_B;
+ case Iop_CmpLE64S: return Acc_LE;
//case Iop_CmpLE64U: return Acc_BE;
default: vpanic("iselCondCode(amd64): CmpXX64");
}
|