mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fixed another assert exposed by fuzzing. Now, the DisassembleVFPLdStMulFrm()
function checks whether we have a valid submode for VLDM/VSTM (must be either "ia" or "db") before calling ARM_AM::getAM5Opc(AMSubMode, unsigned char). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101306 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7b52526d3
commit
d1ec11a850
@ -1909,6 +1909,12 @@ static bool DisassembleVFPLdStMulFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
|
||||
|
||||
// Next comes the AM5 Opcode.
|
||||
ARM_AM::AMSubMode SubMode = getAMSubModeForBits(getPUBits(insn));
|
||||
// Must be either "ia" or "db" submode.
|
||||
if (SubMode != ARM_AM::ia && SubMode != ARM_AM::db) {
|
||||
errs() << "Illegal addressing mode 5 sub-mode!\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned char Imm8 = insn & 0xFF;
|
||||
MI.addOperand(MCOperand::CreateImm(ARM_AM::getAM5Opc(SubMode, Imm8)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user