[llvm-commits] [llvm] r101306 - /llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
Johnny Chen
johnny.chen at apple.com
Wed Apr 14 15:37:17 PDT 2010
Author: johnny
Date: Wed Apr 14 17:37:17 2010
New Revision: 101306
URL: http://llvm.org/viewvc/llvm-project?rev=101306&view=rev
Log:
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).
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp?rev=101306&r1=101305&r2=101306&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp Wed Apr 14 17:37:17 2010
@@ -1909,6 +1909,12 @@
// 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)));
More information about the llvm-commits
mailing list