summaryrefslogtreecommitdiff
path: root/utils/TableGen/DisassemblerEmitter.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-04-02 22:27:38 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-04-02 22:27:38 +0000
commitb68a3ee82a8a34f7bae1d68d76f574e76a5535ef (patch)
treee2d497f6b8dc8c2f031afbc3d5dd3ff4c7649dd3 /utils/TableGen/DisassemblerEmitter.cpp
parent762647673379dbcff6bbba6167b0b1b0d658ba9d (diff)
downloadllvm-b68a3ee82a8a34f7bae1d68d76f574e76a5535ef.tar.gz
llvm-b68a3ee82a8a34f7bae1d68d76f574e76a5535ef.tar.bz2
llvm-b68a3ee82a8a34f7bae1d68d76f574e76a5535ef.tar.xz
Second try of initial ARM/Thumb disassembler check-in. It consists of a tablgen
backend (ARMDecoderEmitter) which emits the decoder functions for ARM and Thumb, and the disassembler core which invokes the decoder function and builds up the MCInst based on the decoded Opcode. Reviewed by Chris Latter and Bob Wilson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DisassemblerEmitter.cpp')
-rw-r--r--utils/TableGen/DisassemblerEmitter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/TableGen/DisassemblerEmitter.cpp b/utils/TableGen/DisassemblerEmitter.cpp
index a195c0b8d6..3284366c6d 100644
--- a/utils/TableGen/DisassemblerEmitter.cpp
+++ b/utils/TableGen/DisassemblerEmitter.cpp
@@ -12,6 +12,8 @@
#include "Record.h"
#include "X86DisassemblerTables.h"
#include "X86RecognizableInstr.h"
+#include "ARMDecoderEmitter.h"
+
using namespace llvm;
using namespace llvm::X86Disassembler;
@@ -124,6 +126,12 @@ void DisassemblerEmitter::run(raw_ostream &OS) {
return;
}
+ // Fixed-instruction-length targets use a common disassembler.
+ if (Target.getName() == "ARM") {
+ ARMDecoderEmitter(Records).run(OS);
+ return;
+ }
+
throw TGError(Target.getTargetRecord()->getLoc(),
"Unable to generate disassembler for this target");
}