summaryrefslogtreecommitdiff
path: root/utils/TableGen/DisassemblerEmitter.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-08-17 17:44:15 +0000
committerOwen Anderson <resistor@mac.com>2011-08-17 17:44:15 +0000
commit83e3f67fb68d497b600da83a62f000fcce7868a9 (patch)
tree304ea462b8e700eb92526a43c9c2749341fb9e83 /utils/TableGen/DisassemblerEmitter.cpp
parent0e6d230abdbf6ba67a2676c118431a4df8fb15dd (diff)
downloadllvm-83e3f67fb68d497b600da83a62f000fcce7868a9.tar.gz
llvm-83e3f67fb68d497b600da83a62f000fcce7868a9.tar.bz2
llvm-83e3f67fb68d497b600da83a62f000fcce7868a9.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DisassemblerEmitter.cpp')
-rw-r--r--utils/TableGen/DisassemblerEmitter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/TableGen/DisassemblerEmitter.cpp b/utils/TableGen/DisassemblerEmitter.cpp
index 126925369c..ccf644b00e 100644
--- a/utils/TableGen/DisassemblerEmitter.cpp
+++ b/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);
}