ARM cleanup of rot_imm encoding.

Start of cleaning this up a bit. First step is to remove the encoder hook by
storing the operand as the bits it'll actually encode to so it can just be
directly used. Map it to the assembly source values 8/16/24 when we print it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136152 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2011-07-26 21:28:43 +00:00
parent 61cc47e15d
commit 85bfd3b023
8 changed files with 47 additions and 44 deletions

View File

@ -1785,8 +1785,7 @@ static bool DisassembleExtFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
&& !OpInfo[OpIdx].isPredicate() && !OpInfo[OpIdx].isOptionalDef()) {
// Extract the 2-bit rotate field Inst{11-10}.
unsigned rot = (insn >> ARMII::ExtRotImmShift) & 3;
// Rotation by 8, 16, or 24 bits.
MI.addOperand(MCOperand::CreateImm(rot << 3));
MI.addOperand(MCOperand::CreateImm(rot));
++OpIdx;
}