Commit Graph

378 Commits

Author SHA1 Message Date
Nick Lewycky
ace5072169 Try producing the binary format native to each platform if we're going to try to dlopen/LoadLibrary it. 2020-08-06 17:40:27 -07:00
Nick Lewycky
c68e7da972 Emit dynamic trampoline for each function index, not just each signature.
Emit names for trampolines when building through that experimental native pipeline.
2020-08-06 13:39:41 -07:00
Nick Lewycky
ed878db40d Use wasmer_raise_trap and wasmer_probestack in compiler-llvm.
As a linux-only temporary hack, export those two symbols from the wasmer binary.

Note: is a bit of a hack and works on linux only.
2020-08-06 12:12:17 -07:00
Nick Lewycky
2c2da8ec3c Wire up experimental_native_compile_module for LLVM.
Move Symbol and SymbolRegistry to wasmer_compiler crate.
2020-08-05 17:44:52 -07:00
Nick Lewycky
0e6bc3191f Fix the build post-merge that picked up SymbolRegistry. 2020-08-05 17:26:00 -07:00
Nick Lewycky
afe568c5d3 Merge branch 'master' into llvm-native 2020-08-05 17:17:52 -07:00
Nick Lewycky
02c62657f5 Add experimental_native_compile_module and initial implementation changing native engine to use it. 2020-08-05 17:12:17 -07:00
Nick Lewycky
bf0df80551 Rename CompilationNamer to SymbolRegistry.
SymbolRegistry is invertible so we can remove the wrappers.
2020-08-05 15:07:56 -07:00
Nick Lewycky
9ca46f4f2d Include trampolines in the generated object file. 2020-08-05 14:20:47 -07:00
Nick Lewycky
0b62c775de Verify the post-merge bitcode before codegen. 2020-08-05 12:12:47 -07:00
Nick Lewycky
8057083d1f Initial commit of LLVMCompiler::compile_native_object.
Entirely untested.

Works by doing function generation including optimization passes in parallel, then generating bitcode and passing that along to be reparsed into a new module and then module-linked into a single merged module to be emitted as an object file.
2020-08-05 11:25:56 -07:00
Nick Lewycky
64448dda40 Create new InvertibleCompilationNamer and use it to name generated functions.
Fixes build of rustc_binary2.wasm with --llvm.
2020-08-05 10:31:00 -07:00
Nick Lewycky
b92b3d7b04 Split function translation into produce-Module and produce-CompiledFunction. 2020-08-05 09:57:51 -07:00
Nick Lewycky
b4270525f0 Create new InvertibleCompilationNamer and use it to name generated functions.
Fixes build of rustc_binary2.wasm with --llvm.
2020-08-04 16:50:55 -07:00
Syrus
6683648cd2 Merge branch 'master' into simd 2020-08-03 16:24:40 -07:00
Nick Lewycky
29cfeeb03a Implement the remaining integer SIMD arithmetic instructions. 2020-08-03 15:56:01 -07:00
Nick Lewycky
efb26b8c8b Reimplement vector min and max. They now always pick one of the two inputs. 2020-08-03 14:18:46 -07:00
Syrus
48493bcb52 Fix libc requirement. Fix #207 2020-08-03 12:28:25 -07:00
Nick Lewycky
4259f51519 Add i64x2.mul.
Remove commented-out i8x16.mul. This no longer exists in the SIMD proposal.
2020-07-31 14:33:51 -07:00
Nick Lewycky
b1e3468be6 Fix boundary conditions on SIMD trunc_sat instructions. 2020-07-31 14:26:59 -07:00
Nick Lewycky
fe080432d9 Implement SIMD integer widening operators. 2020-07-31 13:57:14 -07:00
Nick Lewycky
242e178ab1 Add implementation of SIMD narrow operators. 2020-07-31 13:35:19 -07:00
Nick Lewycky
03faf2c7a6 Implement v128.andnot. 2020-07-30 15:53:25 -07:00
Nick Lewycky
3d649abe95 Fix trampoline generation with V128 parameter.
Params used to be packed into 64-bit chunks so we'd need to skip one space after processing a V128. We changed to packing them to 128-bit spaces but didn't remove the skipping.
2020-07-30 15:47:42 -07:00
Syrus
fb1bdc6f8f Fixed lint 2020-07-30 15:20:00 -07:00
Nick Lewycky
3e9c9d4cca Implement SIMD load and extend instructions in compiler-llvm. 2020-07-30 14:49:46 -07:00
Syrus
48dd090da6 Updated build links 2020-07-29 17:30:15 -07:00
Syrus
a732159514 Use better naming for module functions 2020-07-26 12:02:45 -07:00
Syrus
79034f069d Improve crate readmes 2020-07-24 15:33:12 -07:00
Syrus
b7d41e1e31 Merge branch 'master' into feature/improve-thread-safety-of-core-types
# Conflicts:
#	lib/api/src/instance.rs
#	lib/engine-jit/src/artifact.rs
#	lib/engine-native/src/artifact.rs
2020-07-23 15:29:13 -07:00
Syrus
1293df8dd6 Added Debug to public structs. Close #173 2020-07-21 20:38:32 -07:00
Ivan Enderlin
159af42644 doc(compiler-llvm) Fix link to example + typos. 2020-07-16 10:21:29 +02:00
Syrus
8677ac1b0c Fixed examples urls 2020-07-15 12:39:06 -07:00
Syrus
6f1677f5b3 Added more examples 2020-07-14 14:14:46 -07:00
Nick Lewycky
138899c186 Remove verify_ir() from Cranelift and LLVM config classes.
It's replaced by `enable_verifier()` on the CompilerConfig trait.

Enable verifier for all compilers (it's a no-op on singlepass but enabled
nevertheless) when running tests.
2020-07-13 12:13:49 -07:00
Nick Lewycky
50e54f6be6 Add --enable-verifier to the wasmer command line. Wire it through CompilerConfig. 2020-07-13 12:03:52 -07:00
Nick Lewycky
c1e3b445a1 Canonicalize floats before branch, in Operator::Return too. 2020-07-10 16:55:22 -07:00
Nick Lewycky
cc081ffff6 Canonicalize the floats first, then branch out of the block. 2020-07-10 16:18:33 -07:00
Mark McCaskey
f9bce8858b Merge branch 'master' into feature/improve-thread-safety-of-core-types 2020-07-09 13:57:58 -07:00
Syrus
92f8651312 Renamed wasmer_runtime to wasmer_vm 2020-07-07 21:26:06 -07:00
Syrus
38459698d1 Trying to fix issues 2020-07-07 17:05:30 -07:00
Syrus
b57a28edc7 Removed Memory plans in favor of direct styles 2020-07-07 16:50:08 -07:00
Syrus
416b76ab34 Move offset_guard_size to the memory style 2020-07-07 15:58:46 -07:00
Syrus
98f2e8fe26 Remove TablePlans 2020-07-07 15:10:03 -07:00
Mark McCaskey
d4d738d97e Add an extra layer of indirection for shared globals 2020-07-02 18:23:19 -07:00
Ivan Enderlin
f00e089ad3 fix(compiler-llvm) Remove an unused import. 2020-06-23 09:32:50 +02:00
Syrus
56c2f52001 Improved Compiler API 2020-06-22 14:58:58 -07:00
Nick Lewycky
2017acf99e Some clippy cleanup. 2020-06-20 13:43:46 -07:00
Nick Lewycky
c0b2f968e2 more formatting 2020-06-18 16:50:56 -07:00
Nick Lewycky
914da3266b cargo fmt 2020-06-18 16:48:44 -07:00