|
From: <sv...@va...> - 2010-09-24 22:00:04
|
Author: sewardj
Date: 2010-09-24 22:59:55 +0100 (Fri, 24 Sep 2010)
New Revision: 2042
Log:
Implement RBIT in ARM mode.
Modified:
trunk/priv/guest_arm_toIR.c
Modified: trunk/priv/guest_arm_toIR.c
===================================================================
--- trunk/priv/guest_arm_toIR.c 2010-09-23 11:01:15 UTC (rev 2041)
+++ trunk/priv/guest_arm_toIR.c 2010-09-24 21:59:55 UTC (rev 2042)
@@ -13759,6 +13759,20 @@
}
}
+ /* ------------------- rbit ------------------ */
+ if (INSN(27,16) == 0x6FF && INSN(11,4) == 0xF3) {
+ UInt rD = INSN(15,12);
+ UInt rM = INSN(3,0);
+ if (rD != 15 && rM != 15) {
+ IRTemp arg = newTemp(Ity_I32);
+ assign(arg, getIRegA(rM));
+ IRTemp res = gen_BITREV(arg);
+ putIRegA(rD, mkexpr(res), condT, Ijk_Boring);
+ DIP("rbit r%u, r%u\n", rD, rM);
+ goto decode_success;
+ }
+ }
+
/* ------------------- smmul ------------------ */
if (INSN(27,20) == BITS8(0,1,1,1,0,1,0,1)
&& INSN(15,12) == BITS4(1,1,1,1)
|