OSDN Git Service

[WebAssembly] Made disassembler only use stack instructions.
authorWouter van Oortmerssen <aardappel@gmail.com>
Thu, 30 Aug 2018 15:40:53 +0000 (15:40 +0000)
committerWouter van Oortmerssen <aardappel@gmail.com>
Thu, 30 Aug 2018 15:40:53 +0000 (15:40 +0000)
commit9a75e493e8071cdec94e0cab3d75fe1c56fee47e
treee42e7dd2488e936f1f58d89219097eb2ea4b309b
parent386f7a697fe78ec83070907686a14b7d455d6489
[WebAssembly] Made disassembler only use stack instructions.

Summary:
Now uses the StackBased bit from the tablegen defs to identify
stack instructions (and ignore register based or non-wasm instructions).

Also changed how we store operands, since we now have up to 16 of them
per instruction. To not cause static data bloat, these are compressed
into a tiny table.

+ a few other cleanups.

Tested:
- MCTest
- llvm-lit -v `find test -name WebAssembly`

Reviewers: dschuff, jgravelle-google, sunfish, tlively

Subscribers: sbc100, aheejin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341081 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
test/MC/Disassembler/WebAssembly/wasm.txt
utils/TableGen/WebAssemblyDisassemblerEmitter.cpp