|
From: <sv...@va...> - 2006-05-25 18:48:15
|
Author: sewardj
Date: 2006-05-25 19:48:12 +0100 (Thu, 25 May 2006)
New Revision: 1626
Log:
Specialisation rule which reduces memcheck false error rate for=20
KDE on SuSE 10.1 (amd64).
Modified:
trunk/priv/guest-amd64/ghelpers.c
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 2006-05-25 17:08:03 UTC (rev 1625)
+++ trunk/priv/guest-amd64/ghelpers.c 2006-05-25 18:48:12 UTC (rev 1626)
@@ -1010,7 +1010,7 @@
}
=20
if (isU64(cc_op, AMD64G_CC_OP_SUBW) && isU64(cond, AMD64CondLE)) {
- /* 16-bit sub/cmp, then LE (signed less than or equal)=20
+ /* word sub/cmp, then LE (signed less than or equal)=20
--> test dst <=3Ds src */
return unop(Iop_1Uto64,
binop(Iop_CmpLE64S,=20
@@ -1029,6 +1029,21 @@
unop(Iop_64to8,cc_dep2)));
}
=20
+ if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondS)
+ && isU64(cc_dep2, 0)) {
+ /* byte sub/cmp of zero, then S --> test (dst-0 <s 0)
+ --> test dst <s 0
+ --> (ULong)dst[7]
+ This is yet another scheme by which gcc figures out if the
+ top bit of a byte is 1 or 0. See also LOGICB/CondS below. *=
/
+ /* Note: isU64(cc_dep2, 0) is correct, even though this is
+ for an 8-bit comparison, since the args to the helper
+ function are always U64s. */
+ return binop(Iop_And64,
+ binop(Iop_Shr64,cc_dep1,mkU8(7)),
+ mkU64(1));
+ }
+
// if (isU64(cc_op, AMD64G_CC_OP_SUBB) && isU64(cond, AMD64CondNZ))=
{
// /* byte sub/cmp, then NZ --> test dst!=3Dsrc */
// return unop(Iop_32Uto64,
|