mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
ARM: Tidy up representation of PKH instruction.
The shift type is implied by the instruction (PKHBT vs. PKHTB) and so shouldn't be also encoded as part of the shift value immediate. Otherwise we're able to represent invalid instructions, plus it needlessly complicates the representation. Preparatory work for asm parsing of these instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135616 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1638,7 +1638,10 @@ static bool DisassembleArithMiscFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
|
||||
else if (Opcode == ARM::PKHTB)
|
||||
Opc = ARM_AM::asr;
|
||||
getImmShiftSE(Opc, ShiftAmt);
|
||||
MI.addOperand(MCOperand::CreateImm(ARM_AM::getSORegOpc(Opc, ShiftAmt)));
|
||||
if (Opcode == ARM::PKHBT || Opcode == ARM::PKHTB)
|
||||
MI.addOperand(MCOperand::CreateImm(ShiftAmt));
|
||||
else
|
||||
MI.addOperand(MCOperand::CreateImm(ARM_AM::getSORegOpc(Opc, ShiftAmt)));
|
||||
++OpIdx;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user