diff options
author | Owen Anderson <resistor@mac.com> | 2011-08-01 20:06:49 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-08-01 20:06:49 +0000 |
commit | faee2cf9ff7b698d30a7a72c319e7e52adfa54b8 (patch) | |
tree | f5433f490eff00b55c66569af36f9337085ad2f3 /llvm/utils/TableGen/FixedLenDecoderEmitter.cpp | |
parent | 96d690ccdf2e1743a72f45a6b139af4b945e562e (diff) | |
download | bcm5719-llvm-faee2cf9ff7b698d30a7a72c319e7e52adfa54b8.tar.gz bcm5719-llvm-faee2cf9ff7b698d30a7a72c319e7e52adfa54b8.zip |
The FixedLenDecoder needs to gracefully handle failing per-instruction decoder hooks in addition to per-operand decoder hooks.
llvm-svn: 136645
Diffstat (limited to 'llvm/utils/TableGen/FixedLenDecoderEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/FixedLenDecoderEmitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp index 5d42e71e5e0..249da8e25f7 100644 --- a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -566,7 +566,7 @@ void FilterChooser::emitTop(raw_ostream &o, unsigned Indentation, "static bool decode" << Namespace << "Instruction" << BitWidth << "(MCInst &MI, uint" << BitWidth << "_t insn, uint64_t Address, " << "const void *Decoder) {\n"; - o.indent(Indentation) << " unsigned tmp = 0;\n(void)tmp;\n"; + o.indent(Indentation) << " unsigned tmp = 0;\n (void)tmp;\n"; ++Indentation; ++Indentation; // Emits code to decode the instructions. @@ -776,8 +776,8 @@ bool FilterChooser::emitSingletonDecoder(raw_ostream &o, unsigned &Indentation, I = InsnOperands.begin(), E = InsnOperands.end(); I != E; ++I) { // If a custom instruction decoder was specified, use that. if (I->numFields() == 0 && I->Decoder.size()) { - o.indent(Indentation) << " " << I->Decoder - << "(MI, insn, Address, Decoder);\n"; + o.indent(Indentation) << " if (!" << I->Decoder + << "(MI, insn, Address, Decoder)) return false;\n"; break; } |