|
From: <sv...@va...> - 2005-11-13 19:51:10
|
Author: sewardj
Date: 2005-11-13 19:51:04 +0000 (Sun, 13 Nov 2005)
New Revision: 1453
Log:
Add some flag-specialisation cases that profiling showed the need for.
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 2005-11-13 00:53:05 UTC (rev 1452)
+++ trunk/priv/guest-amd64/ghelpers.c 2005-11-13 19:51:04 UTC (rev 1453)
@@ -897,6 +897,22 @@
mkU64(0)));
}
=20
+ /*---------------- SUBQ ----------------*/
+
+ if (isU64(cc_op, AMD64G_CC_OP_SUBQ) && isU64(cond, AMD64CondL)) {
+ /* long long sub/cmp, then L (signed less than)=20
+ --> test dst <s src */
+ return unop(Iop_1Uto64,
+ binop(Iop_CmpLT64S, cc_dep1, cc_dep2));
+ }
+
+ if (isU64(cc_op, AMD64G_CC_OP_SUBQ) && isU64(cond, AMD64CondB)) {
+ /* long long sub/cmp, then B (unsigned less than)
+ --> test dst <u src */
+ return unop(Iop_1Uto64,
+ binop(Iop_CmpLT64U, cc_dep1, cc_dep2));
+ }
+
/*---------------- SUBL ----------------*/
=20
if (isU64(cc_op, AMD64G_CC_OP_SUBL) && isU64(cond, AMD64CondZ)) {
@@ -997,6 +1013,14 @@
//.. binop(Iop_And32,cc_dep1,mkU32(0xFF))));
//.. }
=20
+ /*---------------- LOGICQ ----------------*/
+
+ if (isU64(cc_op, AMD64G_CC_OP_LOGICQ) && isU64(cond, AMD64CondZ)) =
{
+ /* long long and/or/xor, then Z --> test dst=3D=3D0 */
+ return unop(Iop_1Uto64,
+ binop(Iop_CmpEQ64, cc_dep1, mkU64(0)));
+ }
+
/*---------------- LOGICL ----------------*/
=20
if (isU64(cc_op, AMD64G_CC_OP_LOGICL) && isU64(cond, AMD64CondZ)) =
{
@@ -1050,17 +1074,16 @@
//.. binop(Iop_CmpEQ32, binop(Iop_And32,cc_dep1,mkU=
32(0xFFFF)),=20
//.. mkU32(0)));
//.. }
-//..=20
-//.. /*---------------- LOGICB ----------------*/
-//..=20
-//.. if (isU32(cc_op, AMD64G_CC_OP_LOGICB) && isU32(cond, X86CondZ=
)) {
-//.. /* byte and/or/xor, then Z --> test dst=3D=3D0 */
-//.. return unop(Iop_1Uto32,
-//.. binop(Iop_CmpEQ32, binop(Iop_And32,cc_dep1,mkU=
32(255)),=20
-//.. mkU32(0)));
-//.. }
-//..=20
=20
+ /*---------------- LOGICB ----------------*/
+
+ if (isU64(cc_op, AMD64G_CC_OP_LOGICB) && isU64(cond, AMD64CondZ)) =
{
+ /* byte and/or/xor, then Z --> test dst=3D=3D0 */
+ return unop(Iop_1Uto64,
+ binop(Iop_CmpEQ64, binop(Iop_And64,cc_dep1,mkU64(25=
5)),=20
+ mkU64(0)));
+ }
+
/*---------------- INCB ----------------*/
=20
if (isU64(cc_op, AMD64G_CC_OP_INCB) && isU64(cond, AMD64CondLE)) {
|