OSDN Git Service

[WebAssembly] Added WasmAsmParser.
authorWouter van Oortmerssen <aardappel@gmail.com>
Mon, 12 Nov 2018 20:15:01 +0000 (20:15 +0000)
committerWouter van Oortmerssen <aardappel@gmail.com>
Mon, 12 Nov 2018 20:15:01 +0000 (20:15 +0000)
commitc9db589887bbf5b08504277c25fbe298f66ff051
tree50b521153df73b1a1b48705a8b9c666dc57e4a1b
parentf57ca0bbd5241348d16849334ba7d4c6bd9a6b93
[WebAssembly] Added WasmAsmParser.

Summary:
This is to replace the ELFAsmParser that WebAssembly was using, which
so far was a stub that didn't do anything, and couldn't work correctly
with wasm.

This new class is there to implement generic directives related to
wasm as a binary format. Wasm target specific directives are still
parsed in WebAssemblyAsmParser as before. The two classes now
cooperate more correctly too.

Also implemented .result which was missing. Any unknown directives
will now result in errors.

Reviewers: dschuff, sbc100

Subscribers: mgorny, jgravelle-google, eraman, aheejin, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346700 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/AsmParser.cpp
lib/MC/MCParser/CMakeLists.txt
lib/MC/MCParser/WasmAsmParser.cpp [new file with mode: 0644]
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
test/CodeGen/WebAssembly/inline-asm-roundtrip.ll
test/MC/WebAssembly/basic-assembly.s