|
From: <sv...@va...> - 2005-05-02 16:16:18
|
Author: sewardj
Date: 2005-05-02 17:16:15 +0100 (Mon, 02 May 2005)
New Revision: 1155
Modified:
trunk/priv/host-x86/isel.c
Log:
Minor tweakage: use testl rather than andl in three places on the
basis that andl trashes the tested register whereas testl doesn't. In
two out of the three cases this makes no difference since the tested
register is a copy of some other register anyway, but hey.
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-05-02 15:52:44 UTC (rev 1154)
+++ trunk/priv/host-x86/isel.c 2005-05-02 16:16:15 UTC (rev 1155)
@@ -1471,9 +1471,8 @@
/* 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));
+ /* Test32 doesn't modify r32; so this is OK. */
+ addInstr(env, X86Instr_Test32(1,r32));
return Xcc_NZ;
}
=20
@@ -1626,7 +1625,7 @@
HReg r =3D newVRegI(env);
addInstr(env, mk_iMOVsd_RR(r1,r));
addInstr(env, X86Instr_Alu32R(Xalu_XOR,rmi2,r));
- addInstr(env, X86Instr_Alu32R(Xalu_AND,X86RMI_Imm(0xFF),r));
+ addInstr(env, X86Instr_Test32(0xFF,r));
switch (e->Iex.Binop.op) {
case Iop_CmpEQ8: return Xcc_Z;
case Iop_CmpNE8: return Xcc_NZ;
@@ -1643,7 +1642,7 @@
HReg r =3D newVRegI(env);
addInstr(env, mk_iMOVsd_RR(r1,r));
addInstr(env, X86Instr_Alu32R(Xalu_XOR,rmi2,r));
- addInstr(env, X86Instr_Alu32R(Xalu_AND,X86RMI_Imm(0xFFFF),r));
+ addInstr(env, X86Instr_Test32(0xFFFF,r));
switch (e->Iex.Binop.op) {
case Iop_CmpEQ16: return Xcc_Z;
case Iop_CmpNE16: return Xcc_NZ;
|