llvm-project/llvm/lib
Derek Schuff e4825975d8 [WebAssembly] Added initial AsmParser implementation.
It uses the MC framework and the tablegen matcher to do the
heavy lifting. Can handle both explicit and implicit locals
(-disable-wasm-explicit-locals). Comes with a small regression
test.

This is a first basic implementation that can parse most llvm .s
output and round-trips most instructions succesfully, but in order
to keep the commit small, does not address all issues.

There are a fair number of mismatches between what MC / assembly
matcher think a "CPU" should look like and what WASM provides,
some already have workarounds in this commit (e.g. the way it
deals with register operands) and some that require further work.
Some of that further work may involve changing what the
Disassembler outputs (and what s2wasm parses), so are probably
best left to followups.

Some known things missing:
- Many directives are ignored and not emitted.
- Vararg calls are parsed but extra args not emitted.
- Loop signatures are likely incorrect.
- $drop= is not emitted.
- Disassembler does not output SIMD types correctly, so assembler
  can't test them.

Patch by Wouter van Oortmerssen

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

llvm-svn: 328028
2018-03-20 20:06:35 +00:00
..
Analysis [MustExecute] Use the annotation style printer 2018-03-20 18:43:44 +00:00
AsmParser [X86] Added support for nocf_check attribute for indirect Branch Tracking 2018-03-17 13:29:46 +00:00
BinaryFormat DWARF: Unify form size handling code 2018-03-14 09:39:54 +00:00
Bitcode [X86] Added support for nocf_check attribute for indirect Branch Tracking 2018-03-17 13:29:46 +00:00
CodeGen [PowerPC][LegalizeFloatTypes] Move the PPC hacks for (i32 fp_to_sint/fp_to_uint (ppcf128 X)) out of LegalizeFloatTypes and into PPC specific code 2018-03-20 18:49:28 +00:00
DebugInfo Revert "Resubmit "Support embedding natvis files in PDBs."" 2018-03-20 18:37:03 +00:00
Demangle [demangler] Recopy the demangler from libcxxabi. 2018-03-19 15:18:23 +00:00
ExecutionEngine [ORC] Don't fully qualify explicit destructor call -- it confuses some compilers. 2018-03-20 05:56:58 +00:00
FuzzMutate [llvm-opt-fuzzer] Add irce to the fuzzing options 2018-03-20 11:32:13 +00:00
Fuzzer [libFuzzer] Delete llvm/lib/Fuzzer 2017-10-16 20:48:19 +00:00
IR Make ConstantDataArray::get constructor templated. Will support signed integers. 2018-03-19 19:49:28 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LTO [LTO] Return proper error object rather than null LTOModule 2018-03-13 04:37:01 +00:00
LineEditor
Linker [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
MC [WebAssembly] Added initial AsmParser implementation. 2018-03-20 20:06:35 +00:00
Object Object: Fix handling of @@@ in .symver directive 2018-03-20 00:45:03 +00:00
ObjectYAML Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
Option [NFC] Replace iterators in PrintHelp with range-based for 2018-03-12 18:31:07 +00:00
Passes [New PM][IRCE] port of Inductive Range Check Elimination pass to the new pass manager 2018-03-15 11:01:19 +00:00
ProfileData [SampleFDO] Extend SampleProfReader to handle demangled names. 2018-03-07 16:45:33 +00:00
Support Changed createTemporaryFile without FD to actually create a file. 2018-03-19 14:19:58 +00:00
TableGen TableGen: Explicitly forbid self-references to field members 2018-03-19 14:14:28 +00:00
Target [WebAssembly] Added initial AsmParser implementation. 2018-03-20 20:06:35 +00:00
Testing Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
ToolDrivers [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode 2018-01-20 11:44:32 +00:00
Transforms [MergeICmps] Break eargerly out of loop 2018-03-20 12:03:25 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt Moving libFuzzer from LLVM to compiler-rt. 2017-08-21 23:25:12 +00:00
LLVMBuild.txt