ARM: Fix the CLZ instruction.

This commit is contained in:
Gabe Black
2009-07-27 00:52:59 -07:00
parent dc0df3f396
commit b560acfe17

View File

@@ -113,8 +113,7 @@ format DataOp {
0x1: decode OPCODE {
0x9: BranchExchange::bx({{ }});
0xb: PredOp::clz({{
unsigned lsb = findLsbSet(Rm);
Rd = (lsb > 31) ? 32 : lsb;
Rd = ((Rm == 0) ? 32 : (31 - findMsbSet(Rm)));
}});
}
0x2: decode OPCODE {