271c767785
Replace all usages of to_wasm_error
2020-12-22 09:17:09 +01:00
e7dd725c6d
Add module info transformation method to ModuleMiddleware
.
2020-11-20 14:34:46 -08:00
1a4cd326e8
Merge #1781
...
1781: Cranelift upgrade r=syrusakbary a=syrusakbary
<!--
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests
-->
# Description
Upgrade Cranelift to `0.67`. This upgrade also enables all SIMD tests (with one small exception operator that is still not fixed in Cranelift).
<!--
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->
Co-authored-by: Syrus <me@syrusakbary.com >
Co-authored-by: Syrus Akbary <me@syrusakbary.com >
2020-10-30 04:47:24 +00:00
b123f92f56
Simplified local_decl
2020-10-29 20:19:37 -07:00
afbfcefb03
Implement new SIMD zero-extend loads.
2020-10-29 17:14:04 -07:00
68a0ae9615
Upgrade wasmparser to 0.63
2020-10-29 16:43:02 -07:00
ba60630407
Upgrade wasmparser to 0.62
2020-10-29 16:21:43 -07:00
b7792f03c2
Upgrade wasmparser to 0.60
2020-10-29 15:50:04 -07:00
e89b1c089b
Split the ABIs into separate implementations and trait files.
2020-10-23 14:09:14 -07:00
e4981c4f66
Add a get_abi(TargetMachine) method instead of creating X86_64SystemV directly.
...
A new Arm64Linux ABI is added but it's an unedited copy of the X86_64SystemV one so far.
A bunch of cleanups from clippy. Use matches! more, don't pass &Box<dyn Abi>.
2020-10-20 14:46:45 -07:00
fa8e423404
Make abi a trait.
2020-10-20 12:53:09 -07:00
d562c2dd9c
Sometimes the store may be partially-successful before trapping, for instance if it is partways in valid memory and partways into the guard page.
...
Use a load instruction before the store to ensure that all the memory is addressable. The loaded value is discarded.
NB. We don't apply this to atomics. It's not clear whether atomic stores can be half-committed.
Fixes align.wast and memory_trap.wast on aarch64.
2020-10-16 16:29:45 -07:00
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
36850d6230
Set the DLL storage class to export.
2020-08-17 23:23:39 -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
8daeff8bc8
Fix section names for MachO.
2020-08-07 17:19:55 -07:00
b027949914
Pick section names that are valid in ELF and Macho.
2020-08-06 17:50:22 -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
bf0df80551
Rename CompilationNamer to SymbolRegistry.
...
SymbolRegistry is invertible so we can remove the wrappers.
2020-08-05 15:07: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
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
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
fb1bdc6f8f
Fixed lint
2020-07-30 15:20:00 -07:00
3e9c9d4cca
Implement SIMD load and extend instructions in compiler-llvm.
2020-07-30 14:49:46 -07:00
a732159514
Use better naming for module functions
2020-07-26 12:02:45 -07:00
c1e3b445a1
Canonicalize floats before branch, in Operator::Return too.
2020-07-10 16:55:22 -07:00
cc081ffff6
Canonicalize the floats first, then branch out of the block.
2020-07-10 16:18:33 -07:00
92f8651312
Renamed wasmer_runtime to wasmer_vm
2020-07-07 21:26:06 -07:00
b57a28edc7
Removed Memory plans in favor of direct styles
2020-07-07 16:50:08 -07:00
98f2e8fe26
Remove TablePlans
2020-07-07 15:10:03 -07:00
b527127d0f
load_object_file is returning an increasingly complex object.
...
Group the data from compilation of a function into its own struct and return that.
2020-06-18 16:43:43 -07:00
54c7b6f876
In trampoline generation, ensure all custom sections are eh frames.
...
.eh_frames may refer to the trampoline, but it is impossible to encode such a relocation. The optional relocation "self-referential" target is replaced with a better named mandatory argument. The value will be discarded in trampoline generation with the rest of the .eh_frame.
2020-06-18 15:37:08 -07:00
52eae576fc
Record the .eh_frame sections from each .o file.
2020-06-18 15:34:23 -07:00
422051ebe5
Simplified compiler config names
2020-06-18 01:36:25 -07:00
8649f2eb79
Remove target from CompilerConfig
2020-06-17 20:26:50 -07:00
69ce68c31a
Merge remote-tracking branch 'origin/master' into middleware
2020-06-17 00:52:20 +08:00