Commit Graph

2814 Commits

Author SHA1 Message Date
913354adb3 Add function to get export from ns/name via ImportObject to C API 2019-10-09 17:29:27 -07:00
2695093a03 Merge #863
863: Rewrite Min/Max to handle all cases correctly. Fixes 545 spectest failures. r=nlewycky a=nlewycky

# Description
The llvm backend was not quite following the Wasm spec for {F32,F64,F32x4xF64x2}{Min,Max}. We used the `@llvm.minnum` and `@llvm.maxnum` intrinsics which don't handle the corner cases the same. When we tried to use `@llvm.minimum` and `@llvm.maximum` which do, we get an internal error from the x86 backend. I was hoping that crash would go away with the upgrade to LLVM 9, but it does not.

Reimplement these operations using plain LLVM instructions.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-10-09 22:24:07 +00:00
88f126a00b Merge #870
870: Fix unused value warning due to inkwell API change. NFC. r=nlewycky a=nlewycky

# Description
Fix unused value warning due to inkwell API change. No functionality change.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-10-08 23:56:10 +00:00
c61cbf6c0b Add a comment. 2019-10-08 11:25:10 -07:00
bd06aa02ba x 2019-10-08 19:07:38 +08:00
c337999c5c x 2019-10-08 18:43:39 +08:00
b5bb3fa764 Move {push,pop}_code_version to caller side for non-mananged execution. 2019-10-08 18:41:22 +08:00
afddbb2b2a Remove unused value warning due to inkwell API change. NFC. 2019-10-07 17:16:52 -07:00
8f734c5b04 Merge #869
869: Remove exclusions for tests that appear to be passing right now. r=nlewycky a=nlewycky

# Description
Remove exclusions for tests that appear to be passing right now.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-10-08 00:13:56 +00:00
9cdfb48d0c The i1 argument is actually named "is_zero_undef" which we want to be false.
Fixes the test failures that showed up on mac.
2019-10-07 17:11:59 -07:00
158db4cee1 Remove exclusions for tests that appear to be passing right now. 2019-10-07 15:11:45 -07:00
3489bfb9b9 renamed feature flag deterministic to deterministic-execution 2019-10-07 23:07:20 +03:00
7ce5ec4df9 fixes to PR comments 2019-10-07 22:34:32 +03:00
4d99963640 Replace "be the i32 type" with "be an i32" in error messages. 2019-10-07 12:11:10 -07:00
e0e7d58313 Make state mapping work on non-x86 architectures. 2019-10-07 23:00:37 +08:00
6ca5812798 When deterministic feature will be enabled (turned-off by default) it'll guarantee deterministic
execution of wasm programs across different hardware/circumstances.
This is very useful for Blockchain projects having wasm smart-contracts

This is critical for Blockchain projects that require execution to be deterministic
in order to reach a consensus of the state transition of each smart-contract transaction.
2019-10-07 16:58:58 +03:00
ed615c4878 fix build error docs 2019-10-07 12:56:55 +02:00
80d6c4cbc0 Implement get_fault_info for aarch64. 2019-10-06 18:27:35 +08:00
749691ca2a Add a comment explaining why we don't use the intrinsics for these. 2019-10-04 11:50:11 -07:00
1a7f00f0af Rewrite Min/Max to handle all cases correctly.
Fixes 545 spectest failures.
2019-10-03 18:19:12 -07:00
bfb9d3849c Fix merge 2019-10-03 11:58:06 -07:00
689bdd08a1 Merge branch 'master' into feature/wasi-in-c-api 2019-10-03 11:56:37 -07:00
70b55b801d Check argument pointers for null to WASI calls 2019-10-03 10:50:07 -07:00
4b3880c88b add details when calling unimplemented! 2019-10-03 11:26:54 +02:00
f63c706abc Merge branch 'master' into feature/singlepass-atomicops 2019-10-02 16:46:59 -07:00
ab76c2357f Delete dead (commented out) code. NFC. 2019-10-02 16:31:11 -07:00
8e63d54fdb cargo fmt 2019-10-02 16:31:11 -07:00
83b678bc36 Give this function a better name. 2019-10-02 16:31:11 -07:00
11c5e0d71d Make the panics a bit more descriptive. 2019-10-02 16:31:11 -07:00
ba68cfc2c6 Finish atomic operations for singlepass, excluding wait and notify. 2019-10-02 16:31:11 -07:00
bc7e017188 Add atomic.rmw operations, excluding xchg and cmpxchg.
Sizes are now ordered, to facilitate an assertion that one size is less (smaller) than another.

panic! error messages are provided for remaining emitter functions.
2019-10-02 16:31:11 -07:00
f021d59a0b Refactor out a compare-and-swap loop function. 2019-10-02 16:31:11 -07:00
cd1d06f5a5 Initial working implementation of I32AtomicRmwAnd!
Adds the ability to reserve a specific temp-gpr register. Needed for CMPXCHG which always uses RAX.
2019-10-02 16:31:11 -07:00
6937019b65 Use a compare-and-swap loop for AND.
BUG: This might allocate RAX twice.
2019-10-02 16:31:10 -07:00
81895830f0 Add emitter for LOCK CMPXCHG so that we can emit compare-and-swap loops. 2019-10-02 16:31:10 -07:00
efc89e829d Add i32 rmw add and sub. 2019-10-02 16:31:10 -07:00
98f35ef84a Initial implementation of atomic load/store and i32 atomic rmw add. 2019-10-02 16:31:10 -07:00
c77cbc1f40 Prepare for 0.8.0 release 2019-10-02 15:40:35 -07:00
38078173d3 Merge #850
850: Add builder API for WasiState r=MarkMcCaskey a=MarkMcCaskey

Nicer to use and it checks for errors!

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-10-02 20:17:29 +00:00
afbde49d1f Update stub wasi generate import object fn
Fix typo

Fix debug issue
2019-10-02 13:16:47 -07:00
b45b1c12f1 Add WASI support to runtime-c-api 2019-10-02 12:06:17 -07:00
5185f120f4 Update some from feedback, fix tests
format with 1.37
2019-10-02 11:25:55 -07:00
0d997c332f Fix example in runtime readme 2019-10-01 13:45:44 -07:00
75286b580b Merge branch 'master' into feature/builder-api-for-wasi-state 2019-10-01 09:32:25 -07:00
9be72e6808 Fix some other files too 2019-09-30 22:50:04 -07:00
4660bc6652 Update API to be more cleann 2019-09-30 17:52:53 -07:00
38602b257b Move validation to end of Builder 2019-09-30 16:32:18 -07:00
2e860e589a Add builder API for WasiState 2019-09-30 15:26:04 -07:00
b304317682 More mov variants. 2019-09-30 01:01:15 +08:00
dfb8989280 Merge branch 'master' into nlewycky/singlepass-add-zero 2019-09-29 12:52:26 +08:00