ARM: Fix the CLZ instruction.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user