[PATCH] D55149: [WebAssembly] Enforce assembler emits emits to streamer in order.
Wouter van Oortmerssen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 30 15:02:06 PST 2018
aardappel created this revision.
aardappel added reviewers: sbc100, dschuff, aheejin.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google.
The assembler processes directives and instructions in whatever order
they are in the file, then directly emits them to the streamer. This
could cause badly written (or generated) .s files to produce
incorrect binaries.
It now has state that tracks what it has most recently seen, to
enforce they are emitted in a given order that always produces
correct wasm binaries.
Also added a new test that compares obj2yaml output from llc (the
backend) to that going via .s and the assembler to ensure both paths
generate the same binaries.
The features this test covers could be extended.
Passes all wasm Lit tests.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=39557
Repository:
rL LLVM
https://reviews.llvm.org/D55149
Files:
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
test/MC/WebAssembly/assembler-binary.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55149.176212.patch
Type: text/x-patch
Size: 8121 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181130/c8c8d1b2/attachment.bin>
More information about the llvm-commits
mailing list