This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Added WasmAsmParser.
ClosedPublic

Authored by aardappel on Nov 9 2018, 3:11 PM.

Details

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.

Diff Detail

Event Timeline

aardappel created this revision.Nov 9 2018, 3:11 PM
aardappel updated this revision to Diff 173456.Nov 9 2018, 3:13 PM

Forgot to add new file.

aardappel updated this revision to Diff 173459.Nov 9 2018, 3:22 PM

Fixed title.

aardappel retitled this revision from [WebAssembly] Assed WasmAsmParser. to [WebAssembly] Added WasmAsmParser..Nov 9 2018, 3:23 PM
dschuff accepted this revision.Nov 9 2018, 4:25 PM

otherwise lgtm

lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
328–329

can we now remove this override?

This revision is now accepted and ready to land.Nov 9 2018, 4:25 PM
sbc100 accepted this revision.Nov 9 2018, 4:38 PM
sbc100 added inline comments.
lib/MC/MCParser/WasmAsmParser.cpp
17

I think the common pattern is to join the file comment header to the copyright header and add another horizontal bar after.

aardappel marked 2 inline comments as done.Nov 12 2018, 11:58 AM

Addressed minor code review changes.

This revision was automatically updated to reflect the committed changes.