ARM: Decode the rbit instruction.
This commit is contained in:
parent
5cc1bb6842
commit
00320a53ab
1 changed files with 14 additions and 14 deletions
|
@ -283,15 +283,16 @@ def format ArmPackUnpackSatReverse() {{
|
|||
}
|
||||
break;
|
||||
case 0x7:
|
||||
if (op2 == 0x1) {
|
||||
return new WarnUnimplemented("rbit", machInst);
|
||||
} else if (op2 == 0x3) {
|
||||
{
|
||||
const IntRegIndex rn =
|
||||
(IntRegIndex)(uint32_t)bits(machInst, 19, 16);
|
||||
const IntRegIndex rd =
|
||||
(IntRegIndex)(uint32_t)bits(machInst, 15, 12);
|
||||
const IntRegIndex rm =
|
||||
(IntRegIndex)(uint32_t)bits(machInst, 3, 0);
|
||||
if (op2 == 0x1) {
|
||||
return new Rbit(machInst, rd, rm);
|
||||
} else if (op2 == 0x3) {
|
||||
const uint32_t rotation =
|
||||
(uint32_t)bits(machInst, 11, 10) << 3;
|
||||
if (a == 0xf) {
|
||||
|
@ -300,10 +301,9 @@ def format ArmPackUnpackSatReverse() {{
|
|||
return new Uxtah(machInst, rd, rn, rm, rotation);
|
||||
}
|
||||
} else if (op2 == 0x5) {
|
||||
IntRegIndex rd = (IntRegIndex)(uint32_t)bits(machInst, 15, 12);
|
||||
IntRegIndex rm = (IntRegIndex)(uint32_t)bits(machInst, 3, 0);
|
||||
return new Revsh(machInst, rd, rm);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return new Unknown(machInst);
|
||||
|
@ -791,7 +791,7 @@ def format Thumb32DataProcReg() {{
|
|||
case 0x1:
|
||||
return new Rev16(machInst, rd, rn);
|
||||
case 0x2:
|
||||
return new WarnUnimplemented("rbit", machInst);
|
||||
return new Rbit(machInst, rd, rm);
|
||||
case 0x3:
|
||||
return new Revsh(machInst, rd, rn);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue