mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
ARM disassembler was erroneously accepting an invalid RSC instruction.
Added checks for regs which should not be 15. rdar://problem/9237734 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128945 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1072,6 +1072,12 @@ static bool DisassembleDPSoRegFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
|
||||
if (slice(insn, 7, 7))
|
||||
return false;
|
||||
|
||||
// A8.6.3 ADC (register-shifted register)
|
||||
// if d == 15 || n == 15 || m == 15 || s == 15 then UNPREDICTABLE;
|
||||
if (decodeRd(insn) == 15 || decodeRn(insn) == 15 ||
|
||||
decodeRm(insn) == 15 || decodeRs(insn) == 15)
|
||||
return false;
|
||||
|
||||
// Register-controlled shifts: [Rm, Rs, shift].
|
||||
MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
|
||||
decodeRs(insn))));
|
||||
|
Reference in New Issue
Block a user