Andrew Brown
c5a69cee9f
Add x86 legalization for fcvt_to_uint_sat.i32x4
...
This converts an `f32x4` into an `i32x4` (unsigned) with rounding by using a long sequence of SSE4.1 compatible instructions.
2020-07-08 10:20:01 -07:00
Yury Delendik
091373f9b8
Removes duplicate code in src/obj.rs, crates/obj and crates/jit/object.rs ( #1993 )
...
Changes:
- Moves object creation code from crates/jit/object.rs to the creates/obj (as ObjectBuilder)
- Removes legacy crates/obj/function.rs
- Removes write_debugsections
2020-07-08 12:14:19 -05:00
Nick Fitzgerald
2a4f72aeb7
Merge pull request #1991 from fitzgen/func-wrap-and-ref-types
...
Support reference types in `Func::wrap`
2020-07-07 16:03:57 -07:00
Nick Fitzgerald
62655cdbe7
wasmtime: Document support for {extern,func}ref in Func::wrap
2020-07-07 14:27:07 -07:00
Nick Fitzgerald
392bbadac7
wasmtime: Ensure that Func::wrap'd return values are compatible with the current store
2020-07-07 14:27:07 -07:00
Nick Fitzgerald
c2fc371e58
wasmtime: Expand Func::{wrap,get} tests to cover {func,extern}ref args/returns
2020-07-07 13:04:29 -07:00
Nick Fitzgerald
3e63774e99
wasmtime: Add support for Option<Func> args and returns in Func::wrap
2020-07-07 11:09:20 -07:00
Nick Fitzgerald
46ef80bf2f
wasmtime: Support ExternRefs in Func::wrap'd functions
...
Fixes #1868
2020-07-07 11:09:20 -07:00
Nick Fitzgerald
44e6fae29c
wasmtime: Modify WasmTy and WasmRet for future {extern,func}ref support
2020-07-07 11:09:20 -07:00
Yury Delendik
bef1b87be0
Write ELF image and instantiate code_memory from it ( #1931 )
...
- Create the ELF image from Compilation
- Create CodeMemory from the ELF image
- Link using ELF image
- Remove creation of GDB JIT images from crates/debug
- Move make_trampoline from compiler.rs
2020-07-07 12:51:24 -05:00
Gabor Greif
79f054f77f
Correct the files' directory index when downgrading DWARF5 -> 4 ( #1989 )
...
* correct the files' directory index when downgrading DWARF5 -> 4
2020-07-07 11:20:32 -05:00
Yury Delendik
9900641674
Support reference types in the DWARF transform ( #1986 )
2020-07-07 09:43:03 -05:00
Nick Fitzgerald
70cef0a433
fuzzing: Enforce a maximum input length for peepmatic_compile target ( #1985 )
...
This avoids timeouts from large inputs, like
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23906
2020-07-07 09:03:14 -05:00
Peter Huene
d6ae72abe6
Merge pull request #1983 from peterhuene/fix-unwind-info
...
Remove 'set frame pointer' unwind code from Windows x64 unwind.
2020-07-06 22:26:41 -07:00
Peter Huene
92864baa1f
Fix module doc comment.
2020-07-06 19:02:52 -07:00
Peter Huene
b1c7c1401e
Fix incorrect scaling for SaveXmm128Far.
...
The `SaveXmm128Far` unwind op should have a 32-bit unscaled value.
The value was accidentally scaled down by 16 while calculating whether or not
the `SaveXmm128` or `SaveXmm128Far` unwind op should be used.
2020-07-06 18:52:16 -07:00
Nick Fitzgerald
62530e4d23
Merge pull request #1975 from MaxGraey/more-peephole-opts
...
peepmatic: add reminder by a power of two rule
2020-07-06 16:32:16 -07:00
MaxGraey
305659427d
changes according review
2020-07-07 01:55:18 +03:00
Nick Fitzgerald
22865769cb
Merge pull request #1984 from fitzgen/ref-types-in-rust-api
...
wasmtime: Support reference types in the Rust API
2020-07-06 15:17:35 -07:00
Peter Huene
b391817c0f
Add a test case for unwind with saved FPRs on Windows.
...
This commit adds a simple test case that reproduces the problem in
2020-07-06 14:23:01 -07:00
Peter Huene
3a33749404
Remove 'set frame pointer' unwind code from Windows x64 unwind.
...
This commit removes the "set frame pointer" unwind code and frame
pointer information from Windows x64 unwind information.
In Windows x64 unwind information, a "frame pointer" is actually the
*base address* of the static part of the local frame and would be at some
negative offset to RSP upon establishing the frame pointer.
Currently Cranelift uses a "traditional" notion of a frame pointer, one
that is the highest address in the local frame (i.e. pointing at the
previous frame pointer on the stack).
Windows x64 unwind doesn't describe such frame pointers and only needs
one described if the frame contains a dynamic stack allocation.
Fixes #1967 .
2020-07-06 14:22:57 -07:00
Nick Fitzgerald
a7c6433773
wasmtime: Support reference types in the Rust API
...
This is a mix of exposing new things (e.g. a `Table::fill` method) and extending
existing support to `externref`s (e.g. `Table::new`).
Part of #929
2020-07-06 14:21:32 -07:00
Dan Gohman
cf5289c553
Begin porting yanix to WASI.
...
This isn't complete yet, but subsequent steps will depend on Rust libstd
and libc bindings changes that are in flight.
2020-07-06 20:20:28 +02:00
Nick Fitzgerald
25397d0c15
Merge pull request #1982 from fitzgen/fuzz-reference-types
...
fuzzing: Enable reference types by default
2020-07-06 10:27:09 -07:00
Daiki Ueno
2ce2dd0203
wasmtime: add build-time option for parallel compilation ( #1903 )
...
When running in embedded environments, threads creation is sometimes
undesirable. This adds a feature to toggle wasmtime's internal thread
creation for parallel compilation.
2020-07-06 11:22:05 -05:00
Nick Fitzgerald
9b56203732
fuzzing: Enable reference types by default
...
Part of #929
2020-07-06 09:18:52 -07:00
Nick Fitzgerald
80ff22fd18
Merge pull request #1973 from fitzgen/table-fill
...
wasmtime: Implement `table.fill`
2020-07-06 09:03:25 -07:00
Graham Scheaffer
ef8fe18262
Updated region versions ( #1978 )
2020-07-06 09:26:28 -05:00
MaxGraey
2048278d2a
typo
2020-07-03 21:45:40 +03:00
Davy Duperron
8d7ba0ad76
wasmtime: fix typo in summary
2020-07-03 14:34:30 +02:00
Benjamin Bouvier
9d5be00de4
Address review comments
...
- put the division in the synthetic instruction as well,
- put the branch table check in the inst's emission code,
- replace OneWayCondJmp by TrapIf vcode instruction,
- add comments describing code generated by the synthetic instructions
2020-07-03 14:33:52 +02:00
Benjamin Bouvier
2115e70acb
machinst x64: implement enough to support branch tables;
2020-07-03 14:33:52 +02:00
Benjamin Bouvier
f86ecdcb86
machinst x64: lower and implement div/idiv; ADD TESTS
2020-07-03 14:33:52 +02:00
Benjamin Bouvier
da30527368
machinst x64: implement one way conditional jmp
2020-07-03 14:33:52 +02:00
Benjamin Bouvier
9d1bcfb2e8
machinst x64: implement cmov
2020-07-03 14:33:52 +02:00
Benjamin Bouvier
bd88065571
machinst x64: lower binary ALU operators;
2020-07-03 14:33:52 +02:00
Benjamin Bouvier
faeed3c7a4
machinst x64: implement spills and reloads
2020-07-03 14:33:52 +02:00
Benjamin Bouvier
08efcbd9d5
machinst x64: use movss for f32 loads;
2020-07-03 11:19:32 +02:00
MaxGraey
d21ca7f2a3
fixed added fits-in-native-word contrain
2020-07-03 11:46:37 +03:00
MaxGraey
03b6c97e15
typo
2020-07-03 11:05:55 +03:00
MaxGraey
1fcb215895
trailing new line
2020-07-03 11:03:03 +03:00
MaxGraey
1033cf5748
use (isub 1 $C) instead (iadd -1 $C)
2020-07-03 11:01:35 +03:00
MaxGraey
d839d83f7e
add reminder by a power of two peephole rule
2020-07-03 09:44:59 +03:00
Nick Fitzgerald
3555f97906
wasmtime: Implement table.fill
...
Part of #929
2020-07-02 16:59:07 -07:00
Nick Fitzgerald
d87ada209c
Merge pull request #1972 from bytecodealliance/fitzgen-patch-1
...
readme: Make "wasmtime-go" use monospace font
2020-07-02 15:20:09 -07:00
Johnnie Birch
60681d7019
Add __dso_handle to exception list of deprecated export symbols
...
When compiling C to WASM with clang-8, __dso_handle is a global
that maybe exported but that currently is not whitelisted along
with __heap_base and _data_end to be handled as allowable depricated
exports. This PR adds the case for __dso_handle.
2020-07-02 14:58:53 -07:00
Nick Fitzgerald
9162563bb7
readme: Make "wasmtime-go" use monospace font
...
Similar to other package names.
2020-07-02 14:13:39 -07:00
Chris Fallin
b700646c93
Merge pull request #1962 from cfallin/aarch64-lowering-condbr
...
AArch64: avoid branches with explicit offsets at lowering stage.
2020-07-02 14:05:40 -07:00
Nick Fitzgerald
bffd54c016
wasmtime: Implement global.{get,set} for externref globals ( #1969 )
...
* wasmtime: Implement `global.{get,set}` for externref globals
We use libcalls to implement these -- unlike `table.{get,set}`, for which we
create inline JIT fast paths -- because no known toolchain actually uses
externref globals.
Part of #929
* wasmtime: Enable `{extern,func}ref` globals in the API
2020-07-02 16:04:01 -05:00
Nick Fitzgerald
3fa3ff2ece
Merge pull request #1968 from alexcrichton/link-c-docs
...
Link to C API docs and make a landing page
2020-07-02 13:28:20 -07:00