|
From: <sv...@va...> - 2008-11-06 09:02:49
|
Author: sewardj
Date: 2008-11-06 09:02:34 +0000 (Thu, 06 Nov 2008)
New Revision: 1870
Log:
Support isel (integer conditional move).
Modified:
trunk/priv/guest-ppc/toIR.c
Modified: trunk/priv/guest-ppc/toIR.c
===================================================================
--- trunk/priv/guest-ppc/toIR.c 2008-11-04 11:31:44 UTC (rev 1869)
+++ trunk/priv/guest-ppc/toIR.c 2008-11-06 09:02:34 UTC (rev 1870)
@@ -9476,6 +9476,24 @@
goto decode_failure;
default:
+ /* Deal with some other cases that we would otherwise have
+ punted on. */
+ /* --- ISEL (PowerISA_V2.05.pdf, p74) --- */
+ if (IFIELD(theInstr, 1, 5) == 15) {
+ UInt rT = ifieldRegDS( theInstr );
+ UInt rA = ifieldRegA( theInstr );
+ UInt rB = ifieldRegB( theInstr );
+ UInt bi = ifieldRegC( theInstr );
+ putIReg(
+ rT,
+ IRExpr_Mux0X( unop(Iop_32to8,getCRbit( bi )),
+ getIReg(rB),
+ rA == 0 ? (mode64 ? mkU64(0) : mkU32(0))
+ : getIReg(rA) )
+ );
+ DIP("isel r%u,r%u,r%u,crb%u\n", rT,rA,rB,bi);
+ goto decode_success;
+ }
goto decode_failure;
}
break;
|