1a10d2258e
Merge branch 'master' into feature/dynamic
2020-08-21 10:43:09 -07:00
5d40787856
Add a compiler-llvm CompilerFunctionKind for the whole module which can occur with the experimental API for engine-native.
...
Since it's no longer per-function, rename CompilerFunctionKind to CompilerKind.
2020-08-20 23:28:07 -07:00
8a27a2938b
Turn VMMemoryDefinition::current_length into a u32.
...
The current wasm spec limits the size to 32-bits, and attempting to use a larger size causes problems with compiler-cranelift.
2020-08-19 18:04:12 -07:00
5a6ecd4d00
Fix dynamic memory styles in llvm.
...
Dynamic memory has the same struct as static memory, in particular the length field is not a pointer to a length field.
Also, send the correct trap code.
2020-08-19 17:43:05 -07:00
91414df670
NFC. Import the inkwell::DLLStorageClass name.
2020-08-18 14:20:45 -07:00
9c5e682585
Export the wasmer metadata when building a DLL.
2020-08-18 14:18:07 -07:00
36850d6230
Set the DLL storage class to export.
2020-08-17 23:23:39 -07:00
9e89ee9b7b
Call a callback to emit the merged object file.
2020-08-17 23:21:36 -07:00
d81c9dd686
Fix up Cargo manifests for publishing Wasmer
2020-08-17 10:41:14 -07:00
5861bc5c51
Update to inkwell llvm 10 release crate.
2020-08-14 16:24:24 -07:00
e06ca4ffd2
Prepare for 1.0.0-alpha01.0 release
...
This is the first alpha release of `1.0.0`: expect breaking changes.
The version suffix `alpha01.0` was chosen so that we can ship updates
that automatically update with the latter number and can prevent
auto-updates by incrementing the former number (which is not actually
a number as far as semver is concerned).
Also because crates.io sorts versions lexicographically, it will
display the wrong readme if we get to alpha10, so we pad with an extra
0 just in case we need more than 9 releases of alpha.
2020-08-14 16:08:44 -07:00
6e974b92cd
Run cargo fmt
2020-08-13 18:12:43 -07:00
5049c543dc
Rename wasm-common
crate to wasmer-types
2020-08-13 17:59:26 -07:00
fadd5d6699
Remove nearly-all mentions of reborn.
2020-08-13 11:32:14 -07:00
57b9612352
Fix invalid LLVM IR when using dynamic memories.
2020-08-11 13:32:42 -07:00
dd4f27accc
Fixed ARM cross compilation
2020-08-11 12:23:11 -07:00
6b1df05582
Explain why we switch away from large code model when PIC is enabled.
...
Note that I don't explain why Small vs Medium. I'm not sure myself.
2020-08-10 16:32:35 -07:00
45dcee1282
When we're building PIC we don't need the large code model. Try small.
...
Only mangle darwin to linux when PIC is disabled (the reason we do it is to avoid LLVM forcably enabling PIC for us).
2020-08-07 18:13:56 -07:00
8daeff8bc8
Fix section names for MachO.
2020-08-07 17:19:55 -07:00
15b3a35e0c
Don't clone function body data.
2020-08-07 14:31:36 -07:00
037922bbf2
Change this API to return an Option that's None when it's unimplemented and Some(Result<...>) when it is.
2020-08-07 14:26:53 -07:00
b5d9c29d42
Pass target BinaryFormat through when targeting native object files
...
Co-authored-by: Syrus Akbary <me@syrusakbary.com >
2020-08-07 14:18:01 -07:00
701973ffae
Make Native Engine work with conditional native compilation
2020-08-07 11:35:42 -07:00
f445cc73dd
Fixed trampoline section name.
2020-08-06 18:20:17 -07:00
b027949914
Pick section names that are valid in ELF and Macho.
2020-08-06 17:50:22 -07:00
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
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
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
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
0e6bc3191f
Fix the build post-merge that picked up SymbolRegistry.
2020-08-05 17:26:00 -07:00
afe568c5d3
Merge branch 'master' into llvm-native
2020-08-05 17:17:52 -07:00
02c62657f5
Add experimental_native_compile_module
and initial implementation changing native engine to use it.
2020-08-05 17:12:17 -07:00
bf0df80551
Rename CompilationNamer to SymbolRegistry.
...
SymbolRegistry is invertible so we can remove the wrappers.
2020-08-05 15:07:56 -07:00
9ca46f4f2d
Include trampolines in the generated object file.
2020-08-05 14:20:47 -07:00
0b62c775de
Verify the post-merge bitcode before codegen.
2020-08-05 12:12:47 -07:00
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
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
b92b3d7b04
Split function translation into produce-Module and produce-CompiledFunction.
2020-08-05 09:57:51 -07:00
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
6683648cd2
Merge branch 'master' into simd
2020-08-03 16:24:40 -07:00
29cfeeb03a
Implement the remaining integer SIMD arithmetic instructions.
2020-08-03 15:56:01 -07:00
efb26b8c8b
Reimplement vector min and max. They now always pick one of the two inputs.
2020-08-03 14:18:46 -07:00
48493bcb52
Fix libc requirement. Fix #207
2020-08-03 12:28:25 -07:00
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
b1e3468be6
Fix boundary conditions on SIMD trunc_sat instructions.
2020-07-31 14:26:59 -07:00
fe080432d9
Implement SIMD integer widening operators.
2020-07-31 13:57:14 -07:00
242e178ab1
Add implementation of SIMD narrow operators.
2020-07-31 13:35:19 -07:00
03faf2c7a6
Implement v128.andnot.
2020-07-30 15:53:25 -07:00
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
fb1bdc6f8f
Fixed lint
2020-07-30 15:20:00 -07:00