llvm-project/llvm/utils/TableGen
Sam Clegg 16c16827bc [WebAssembly] Initial Disassembler.
This implements a new table-gen emitter to create tables for
a wasm disassembler, and a dissassembler to use them.

Comes with 2 tests, that tests a few instructions manually. Is also able to
disassemble large .wasm files with objdump reasonably.

Not working so well, to be addressed in followups:
- objdump appears to be passing an incorrect starting point.
- since the disassembler works an instruction at a time, and it is
  disassembling stack instruction, it has no idea of pseudo register assignments.
  These registers are required for the instruction printing code that follows.
  For now, all such registers appear in the output as $0.

Patch by Wouter van Oortmerssen

Differential Revision: https://reviews.llvm.org/D45848

llvm-svn: 332052
2018-05-10 22:16:44 +00:00
..
AsmMatcherEmitter.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
AsmWriterEmitter.cpp [AArch64][TableGen] Skip tied result operands for InstAlias 2017-11-20 14:36:40 +00:00
AsmWriterInst.cpp
AsmWriterInst.h
Attributes.cpp Remove redundant includes from utils/TableGen. 2017-12-13 21:31:13 +00:00
CMakeLists.txt [WebAssembly] Initial Disassembler. 2018-05-10 22:16:44 +00:00
CTagsEmitter.cpp [TableGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 20:18:05 +00:00
CallingConvEmitter.cpp [TableGen] Simplify CallingConvEmitter.cpp. NFC. 2017-10-16 14:52:26 +00:00
CodeEmitterGen.cpp [tablegen] Avoid creating a temporary vector in getInstructionCase 2017-07-04 06:16:53 +00:00
CodeGenDAGPatterns.cpp [TableGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 20:18:05 +00:00
CodeGenDAGPatterns.h [TableGen] Print more helpful information in case of type contradiction 2017-12-21 17:12:43 +00:00
CodeGenHwModes.cpp TableGen support for parameterized register class information 2017-09-14 16:56:21 +00:00
CodeGenHwModes.h TableGen support for parameterized register class information 2017-09-14 16:56:21 +00:00
CodeGenInstruction.cpp [globalisel][tablegen] Generalize pointer-type inference by introducing ptypeN. NFC 2017-11-18 00:16:44 +00:00
CodeGenInstruction.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
CodeGenIntrinsics.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
CodeGenMapTable.cpp [mips] Improve diagnostics for instruction mapping 2018-01-08 16:25:40 +00:00
CodeGenRegisters.cpp [TableGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 20:18:05 +00:00
CodeGenRegisters.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
CodeGenSchedule.cpp [Tablegen] Simplify code in CodeGenSchedule. NFCI 2018-04-26 12:56:26 +00:00
CodeGenSchedule.h [Tablegen] Simplify code in CodeGenSchedule. NFCI 2018-04-26 12:56:26 +00:00
CodeGenTarget.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
CodeGenTarget.h [MachineOperand][Target] MachineOperand::isRenamable semantics changes 2018-02-23 18:25:08 +00:00
DAGISelEmitter.cpp [TableGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 20:18:05 +00:00
DAGISelMatcher.cpp Remove redundant includes from utils/TableGen. 2017-12-13 21:31:13 +00:00
DAGISelMatcher.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
DAGISelMatcherEmitter.cpp [SelectionDAG] Add a isel matcher op to check the type of node results other than result 0. 2017-11-22 07:11:01 +00:00
DAGISelMatcherGen.cpp TableGen support for parameterized register class information 2017-09-14 16:56:21 +00:00
DAGISelMatcherOpt.cpp [TableGen] Use less stack in DAGISelMatcherOpt 2017-02-06 19:41:44 +00:00
DFAPacketizerEmitter.cpp Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
DisassemblerEmitter.cpp [WebAssembly] Initial Disassembler. 2018-05-10 22:16:44 +00:00
FastISelEmitter.cpp [TableGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 20:18:05 +00:00
FixedLenDecoderEmitter.cpp TableGen: Use DefInit::getDef() instead of the type's getRecord() 2018-03-05 14:01:30 +00:00
GlobalISelEmitter.cpp [globalisel] Update GlobalISel emitter to match new representation of extending loads 2018-05-05 20:53:24 +00:00
InfoByHwMode.cpp [TableGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 20:18:05 +00:00
InfoByHwMode.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
InstrDocsEmitter.cpp [Docs] Add tablegen backend for target opcode documentation 2017-11-14 15:35:15 +00:00
InstrInfoEmitter.cpp [MachineOperand][Target] MachineOperand::isRenamable semantics changes 2018-02-23 18:25:08 +00:00
IntrinsicEmitter.cpp NFC - Typo fixes lib/VMCore -> lib/IR 2018-04-30 10:18:11 +00:00
LLVMBuild.txt Add missing dependency (headers are included from MC, so a link dependency could exist easily enough) 2018-03-29 00:29:43 +00:00
OptParserEmitter.cpp [Bash-autocompletion] Add support for -std= 2017-08-29 02:01:56 +00:00
PseudoLoweringEmitter.cpp
RISCVCompressInstEmitter.cpp [RISCV] Tablegen-driven Instruction Compression. 2018-04-06 21:07:05 +00:00
RegisterBankEmitter.cpp [globalisel][regbank] Warn about MIR ambiguities when register bank/class names clash. 2017-11-01 22:13:05 +00:00
RegisterInfoEmitter.cpp [TableGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 20:18:05 +00:00
SDNodeProperties.cpp TableGen: Allow setting SDNodeProperties on intrinsics 2017-12-20 19:36:28 +00:00
SDNodeProperties.h TableGen: Allow setting SDNodeProperties on intrinsics 2017-12-20 19:36:28 +00:00
SearchableTableEmitter.cpp TableGen: Support Intrinsic values in SearchableTable 2018-04-01 17:08:58 +00:00
SequenceToOffsetTable.h Remove usages of deprecated std::unary_function and std::binary_function. 2017-09-14 18:33:25 +00:00
SubtargetEmitter.cpp [Tablegen] SubtargetEmitter: move the logic that prints predicates for variant scheduling classes to helper functions. NFC 2018-04-26 18:03:24 +00:00
SubtargetFeatureInfo.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
SubtargetFeatureInfo.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
TableGen.cpp [RISCV] Tablegen-driven Instruction Compression. 2018-04-06 21:07:05 +00:00
TableGenBackends.h [RISCV] Tablegen-driven Instruction Compression. 2018-04-06 21:07:05 +00:00
Types.cpp [globalisel][tablegen] Import SelectionDAG's rule predicates and support the equivalent in GIRule. 2017-04-21 15:59:56 +00:00
Types.h
WebAssemblyDisassemblerEmitter.cpp [WebAssembly] Initial Disassembler. 2018-05-10 22:16:44 +00:00
WebAssemblyDisassemblerEmitter.h [WebAssembly] Initial Disassembler. 2018-05-10 22:16:44 +00:00
X86DisassemblerShared.h [X86] Use unique_ptr to simplify memory management. NFC 2018-03-24 07:15:47 +00:00
X86DisassemblerTables.cpp [X86] Remove DATA32_PREFIX. Hack the printing for DATA16_PREFIX to print 'data32' in 16-bit mode. Hack the asm parser to convert 'data32' to 'data16' in 16-bit mode. 2018-04-22 00:52:02 +00:00
X86DisassemblerTables.h [X86] Add a new disassembler opcode map for 3DNow. Stop treating 3DNow as an attribute. 2018-03-24 07:48:54 +00:00
X86EVEX2VEXTablesEmitter.cpp Don't repeatedly evaluate size() in the for loop. NFCI. 2018-04-11 22:24:48 +00:00
X86FoldTablesEmitter.cpp X86FoldTableEntry - avoid unnecessary std::string creation. NFCI. 2018-04-11 23:08:30 +00:00
X86ModRMFilters.cpp
X86ModRMFilters.h fix trivial typos in comments; NFC 2017-07-04 13:09:29 +00:00
X86RecognizableInstr.cpp [X86] movdiri and movdir64b instructions 2018-05-01 10:01:16 +00:00
X86RecognizableInstr.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
tdtags