llvm-project/llvm/test/MC/WebAssembly
Wouter van Oortmerssen c7b89f0f62 [WebAssembly] Enforce assembler emits to streamer in order.
Summary:
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

Reviewers: sbc100, dschuff, aheejin

Subscribers: jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 348185
2018-12-03 20:30:28 +00:00
..
array-fill.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
assembler-binary.ll [WebAssembly] Enforce assembler emits to streamer in order. 2018-12-03 20:30:28 +00:00
basic-assembly.s [WebAssembly] replaced .param/.result by .functype 2018-11-19 17:10:36 +00:00
blockaddress.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
bss.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
comdat.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
compile-twice.ll [WebAssembly] MC: Add compile-twice test and fix corresponding bug 2018-05-30 02:57:20 +00:00
custom-code-section.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
custom-sections.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
debug-info.ll [WebAssembly] Fix debug info tests after r338437. 2018-07-31 22:24:14 +00:00
dwarfdump.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
event-section.ll [WebAssembly] Split BBs after throw instructions 2018-11-16 00:47:18 +00:00
explicit-sections.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
external-data.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
external-func-address.ll [WebAssembly] Refactor WasmSignature and use it for MCSymbolWasm 2018-10-03 22:22:48 +00:00
file-headers.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
func-address.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
function-sections.ll [WebAssembly] Ignore explicit section names for functions 2018-06-14 18:48:19 +00:00
global-ctor-dtor.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
libcall.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
lit.local.cfg
offset.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
reloc-code.ll [WebAssembly] Added default stack-only instruction mode for MC. 2018-08-27 15:45:51 +00:00
reloc-data.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
sections.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
simd-encodings.s [WebAssembly] Renumber SIMD bitwise instructions 2018-11-15 03:38:59 +00:00
stack-ptr.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
types.ll [WebAssembly] Refactor WasmSignature and use it for MCSymbolWasm 2018-10-03 22:22:48 +00:00
unnamed-data.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
visibility.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
weak-alias.ll [MC] Fix 3 objdump tests after rL346610 2018-11-11 19:15:27 +00:00
weak.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00