diff options
Diffstat (limited to 'gnu/llvm/utils/TableGen/DisassemblerEmitter.cpp')
| -rw-r--r-- | gnu/llvm/utils/TableGen/DisassemblerEmitter.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/llvm/utils/TableGen/DisassemblerEmitter.cpp b/gnu/llvm/utils/TableGen/DisassemblerEmitter.cpp index 6e1d8dde981..b99a0a973a2 100644 --- a/gnu/llvm/utils/TableGen/DisassemblerEmitter.cpp +++ b/gnu/llvm/utils/TableGen/DisassemblerEmitter.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "CodeGenTarget.h" +#include "WebAssemblyDisassemblerEmitter.h" #include "X86DisassemblerTables.h" #include "X86RecognizableInstr.h" #include "llvm/TableGen/Error.h" @@ -74,8 +75,8 @@ using namespace llvm::X86Disassembler; /// accurate. Sometimes they are not. /// (3) to fix the tables to reflect the actual context (for example, required /// prefixes), and possibly to add a new context by editing -/// lib/Target/X86/X86DisassemblerDecoderCommon.h. This is unlikely to be -/// the cause. +/// include/llvm/Support/X86DisassemblerDecoderCommon.h. This is unlikely +/// to be the cause. /// /// DisassemblerEmitter.cpp contains the implementation for the emitter, /// which simply pulls out instructions from the CodeGenTarget and pushes them @@ -125,6 +126,14 @@ void EmitDisassembler(RecordKeeper &Records, raw_ostream &OS) { return; } + // WebAssembly has variable length opcodes, so can't use EmitFixedLenDecoder + // below (which depends on a Size table-gen Record), and also uses a custom + // disassembler. + if (Target.getName() == "WebAssembly") { + emitWebAssemblyDisassemblerTables(OS, Target.getInstructionsByEnumValue()); + return; + } + // ARM and Thumb have a CHECK() macro to deal with DecodeStatuses. if (Target.getName() == "ARM" || Target.getName() == "Thumb" || Target.getName() == "AArch64" || Target.getName() == "ARM64") { |
