Enhance the fixed length disassembler to better handle operand decoding failures.
authorOwen Anderson <resistor@mac.com>
Mon, 1 Aug 2011 18:44:37 +0000 (18:44 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 1 Aug 2011 18:44:37 +0000 (18:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136635 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/FixedLenDecoderEmitter.cpp

index b87634bfee40e0384aa006f8700d4586d19de32b..5d42e71e5e035ac629328c484feebe1a29c36df2 100644 (file)
@@ -744,8 +744,8 @@ void FilterChooser::emitBinaryParser(raw_ostream &o, unsigned &Indentation,
   }
 
   if (Decoder != "")
-    o.indent(Indentation) << "  " << Decoder
-                          << "(MI, tmp, Address, Decoder);\n";
+    o.indent(Indentation) << "  if (!" << Decoder
+                          << "(MI, tmp, Address, Decoder)) return false;\n";
   else
     o.indent(Indentation) << "  MI.addOperand(MCOperand::CreateImm(tmp));\n";