Nick Lewycky
e9d5c7896c
Merge .eh_frame without interpretation. Add a 0-CIE to the end.
...
Add unfinished attempt at using gimli, to be deleted but recorded in case we need it in the future.
2020-06-18 15:35:37 -07:00
Nick Lewycky
52eae576fc
Record the .eh_frame sections from each .o file.
2020-06-18 15:34:23 -07:00
Syrus
30516b5930
Improved docs
2020-06-18 13:24:41 -07:00
Syrus
769ffebb61
Improved feature-generation to be compiler-based
2020-06-18 02:11:54 -07:00
Syrus
422051ebe5
Simplified compiler config names
2020-06-18 01:36:25 -07:00
Syrus
99bd98458a
Improved compiler configurations
2020-06-17 22:47:32 -07:00
Syrus
8649f2eb79
Remove target from CompilerConfig
2020-06-17 20:26:50 -07:00
Syrus
e062e87d8b
Refactored Compilers
2020-06-17 19:17:06 -07:00
losfair
9d27bd2318
Merge remote-tracking branch 'origin/master' into middleware
2020-06-18 00:41:42 +08:00
Syrus
03494ac1a2
Unify trampolines in Compilation object
2020-06-16 20:11:47 -07:00
losfair
69ce68c31a
Merge remote-tracking branch 'origin/master' into middleware
2020-06-17 00:52:20 +08:00
Syrus
b00f899913
Update to Cranelift 0.65, wasmparser 0.57
2020-06-15 18:00:48 -07:00
losfair
1bbaafb819
Middleware for LLVM.
2020-06-16 00:56:43 +08:00
Syrus
b01350110b
Merge branch 'master' into cranelift-update
...
# Conflicts:
# Cargo.lock
# lib/compiler/src/lib.rs
# lib/compiler/src/target.rs
2020-06-12 14:28:08 -07:00
Syrus
8db235538a
Improve code based on comments
2020-06-12 12:46:16 -07:00
losfair
af46df5e4c
Merge remote-tracking branch 'origin/master' into middleware
2020-06-13 00:55:47 +08:00
Syrus
c514104e3e
Merge branch 'master' into cranelift-update
2020-06-12 04:43:11 -07:00
Syrus
6924a9de08
Improved docs
2020-06-11 23:34:20 -07:00
Syrus
bea005a534
Fix cross-compilation
2020-06-11 16:24:07 -07:00
Syrus
523c95903a
Merge branch 'master' into cranelift-update
...
# Conflicts:
# lib/compiler-cranelift/Cargo.toml
2020-06-11 15:48:17 -07:00
Syrus
1e85e0d528
Update version to 1.0.0-alpha.1
2020-06-11 15:31:29 -07:00
Syrus
8e24589cff
Merge branch 'master' into cranelift-update
...
# Conflicts:
# lib/compiler-cranelift/Cargo.toml
2020-06-11 09:58:42 -07:00
Syrus
36223364e0
Updated Wasmer versions to 1.0
2020-06-11 09:52:26 -07:00
Syrus
e2cafd07da
Improved compilation with Dwarf
2020-06-10 21:37:36 -07:00
Nick Lewycky
dc5c6dd10a
Always put allocas at the beginning of the entry block.
...
Fixes a bug where we allocated stck space for struct return in every call of a function in a loop.
2020-06-08 22:01:22 -07:00
Syrus
5ec1addae1
Use middleware reader
2020-06-08 13:30:38 -07:00
Nick Lewycky
1c3ea9f867
Fix bug packing return values in dynamic function trampoline.
2020-06-06 22:39:52 -07:00
Nick Lewycky
51007692d6
Factor out value expensive to compute value.
2020-06-06 21:02:10 -07:00
Nick Lewycky
cbc7dc8454
Add multi-value-import tests.
...
Also fix implementation of trampolines in LLVM.
2020-06-06 21:02:10 -07:00
Nick Lewycky
ce543fd4ed
NFC. Don't re-lookup frame. It can't have changed, simply reorder operations.
2020-06-06 21:02:10 -07:00
Nick Lewycky
b2c0ef4f95
NFC. Use const_zero() method or free function instead of const_int(0) and const_float(0.0).
2020-06-06 21:02:10 -07:00
Syrus Akbary
616d475785
Update lib/compiler-llvm/src/config.rs
...
Co-authored-by: nlewycky <nick@wasmer.io >
2020-06-04 16:15:58 -07:00
Syrus
fa6de35944
Added support for custom cpu features
2020-06-04 15:50:03 -07:00
Nick Lewycky
fcbffb0b3e
cargo fmt
2020-06-02 17:15:57 -07:00
Nick Lewycky
153a32a9cd
Factor this complex iterator into its own variable.
2020-06-02 17:15:31 -07:00
nlewycky
75b1f4c725
Call blocktype_params_results once to get params and results.
...
Co-authored-by: Syrus Akbary <me@syrusakbary.com >
2020-06-02 17:15:22 -07:00
Nick Lewycky
1990e83ca9
Add two new functions to abi.rs, is_sret and pack_values_for_register_return.
...
Pull the implementations out of wasm.rs and code.rs respectively, and simplify them.
2020-06-02 16:50:46 -07:00
Nick Lewycky
2e68b04e24
Make this match return a CompileError instead of use unimplemented!.
2020-06-02 15:54:22 -07:00
Nick Lewycky
870f241fb7
cargo clippy
2020-06-02 15:46:18 -07:00
Nick Lewycky
a03a5e1775
Also make type_to_llvm_ptr return a CompileError instead of using unimplemented!.
2020-06-02 15:46:18 -07:00
Nick Lewycky
7bdd387474
Use blocktype_params_results in lieu of blocktype_to_types.
...
Remove read_info.rs entirely.
Add `to_compile_error` that converts a WasmResult into a Result<_, CompileError>, use it with `wptype_to_type`. This is a candidate for being moved into shared code.
Many functions had to change to deal with propagating CompileError.
2020-06-02 15:46:16 -07:00
Nick Lewycky
04f2db1b82
Export wptype_to_type from wasmer_compiler.
...
Also fix up its error message when it fails.
Use it in compiler-llvm and remove one of compiler-llvm's copies of this function.
2020-06-02 15:45:31 -07:00
Nick Lewycky
fa3242ce11
Fix bug updating phi nodes when branching up.
2020-06-02 15:44:39 -07:00
Nick Lewycky
c3d26ef639
Reset the value stack correctly when entering the 'else' side of an if-else.
2020-06-02 15:44:39 -07:00
Nick Lewycky
46159ee2a6
Fix value stack after return instruction in multi-value function.
2020-06-02 15:44:39 -07:00
Nick Lewycky
95c55ab40d
NFC. Pull this mapping into two mappings, I think it's nicer.
2020-06-02 15:44:39 -07:00
Nick Lewycky
f39a38779b
Update function prologue, epilogue and CFG instructions.
...
The function prologue now skips the sret argument if there is one.
The function epilogue packs values before return.
Br/BrIf/BrTable/Block/Loop/If/Else/End are updated to support multiple values.
As part of this, `read_info::blocktype_to_type` is removed. `blocktype_to_types` and `blocktype_to_param_types` take its place.
CtxType::func is updated to cache and return attributes. The allows the caller to place 'sret' on the call site, even though it's present on the FunctionValue. This helps some utility functions that check the callsite for presence of sret.
2020-06-02 15:44:39 -07:00
Nick Lewycky
ba8a6d6db6
Update trampoline code and use get_vmctx_ptr_param.
2020-06-02 15:44:39 -07:00
Nick Lewycky
83195a1498
Use abi::func_type_to_llvm when producing an LLVM function type from wasm types.
...
This renames `func_sig_to_llvm` to `func_type_to_llvm` and deletes the old version in intrinsics::. The new version returns a list of attributes along with the type. Update callers to set these attributes on the function or call site.
2020-06-02 15:44:39 -07:00
Nick Lewycky
e5ea5789ea
Use args_to_call and rets_from_call in both calls and indirect calls.
2020-06-02 15:44:39 -07:00