diff options
author | Owen Anderson <resistor@mac.com> | 2011-08-17 17:44:15 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-08-17 17:44:15 +0000 |
commit | a4043c4b3237c4c37b3a1aba838e6255be4fb742 (patch) | |
tree | 400786eb5474d9a5da56ae61b08bd1d80f5af242 /llvm/utils/TableGen/DisassemblerEmitter.cpp | |
parent | 3fce368d879815920f384ffb44177e447ef411c6 (diff) | |
download | llvm-a4043c4b3237c4c37b3a1aba838e6255be4fb742.zip llvm-a4043c4b3237c4c37b3a1aba838e6255be4fb742.tar.gz llvm-a4043c4b3237c4c37b3a1aba838e6255be4fb742.tar.bz2 |
Allow the MCDisassembler to return a "soft fail" status code, indicating an instruction that is disassemblable, but invalid. Only used for ARM UNPREDICTABLE instructions at the moment.
Patch by James Molloy.
llvm-svn: 137830
Diffstat (limited to 'llvm/utils/TableGen/DisassemblerEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/DisassemblerEmitter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/DisassemblerEmitter.cpp b/llvm/utils/TableGen/DisassemblerEmitter.cpp index 1269253..ccf644b 100644 --- a/llvm/utils/TableGen/DisassemblerEmitter.cpp +++ b/llvm/utils/TableGen/DisassemblerEmitter.cpp @@ -128,5 +128,15 @@ void DisassemblerEmitter::run(raw_ostream &OS) { return; } + // ARM and Thumb have a CHECK() macro to deal with DecodeStatuses. + if (Target.getName() == "ARM" || + Target.getName() == "Thumb") { + FixedLenDecoderEmitter(Records, + "CHECK(S, ", ");", + "S", "Fail", + "DecodeStatus S = Success;\n(void)S;").run(OS); + return; + } + FixedLenDecoderEmitter(Records).run(OS); } |