Nick Lewycky
3e854c4a3b
Remove the exclusions for I32Clz.
2019-10-15 13:21:07 -07:00
Nick Lewycky
cafcfd3b50
cargo fmt
2019-10-15 13:07:44 -07:00
Nick Lewycky
cf3d2a830d
Reimplement I32Clz without relying on LZCNT.
2019-10-15 12:50:59 -07:00
Nick Lewycky
feeb9cd8f9
These tests failed on mac on bors. Put them back.
2019-10-14 15:02:51 -07:00
Nick Lewycky
26a4f073f0
Implement F64Min and F64Max.
2019-10-14 14:15:18 -07:00
Nick Lewycky
06ffb00deb
Reimplement F32Max.
2019-10-14 14:07:30 -07:00
Nick Lewycky
b886a41a85
Use temp_gprs instead of hard-coding RAX/RDX.
2019-10-14 13:53:30 -07:00
Nick Lewycky
5cee23455d
Release the registers we acquire. Reformat.
2019-10-14 13:51:03 -07:00
Nick Lewycky
336dab7fd9
Don't use utility functions in F32Min implementation.
2019-10-14 13:46:55 -07:00
Nick Lewycky
765e1d3b9e
Add XMM8--XMM15. These were added in x64.
2019-10-14 13:46:55 -07:00
Nick Lewycky
4b89e01806
Remove commented-out code that I added so as to not lose its history in git. Apply trivial cleanups and reformat.
...
Remove expected test failure entries that are fixed so far.
2019-10-14 13:46:55 -07:00
Nick Lewycky
963148fdce
Fix F32Min for all cases including NaNs.
2019-10-14 13:46:55 -07:00
Nick Lewycky
8b937afc1f
Add comments to indicate the implemention we'd like to have, but can't right now.
2019-10-14 13:46:55 -07:00
Nick Lewycky
0f712c90ab
Don't allocate another register when it's safe to reuse dst.
2019-10-14 13:46:55 -07:00
Nick Lewycky
b75e5c0c7c
When we know RDX is unavailable, use RAX instead. Should be fine here.
2019-10-14 13:46:55 -07:00
Nick Lewycky
d6eba03a2f
Remove loc1/loc2. That intended refactoring didn't work out.
2019-10-14 13:46:55 -07:00
Nick Lewycky
555d933057
Initial commit, reimplementation of F32Min. Fixes F32Min(negative_zero, zero) issue.
...
Also removes some previously-fixed i32 and i64 exclusions from the tests.
2019-10-14 13:46:55 -07:00
Syrus Akbary
5611bec3eb
Update README.md
2019-10-13 21:52:10 -07:00
Arnaud
e9f476c93b
doc: add link to SO in C api example
2019-10-13 10:30:02 +02:00
Ivan Enderlin
c3ff8eb540
fix(runtime-c-api) Replace unsafe code by safe code.
2019-10-11 09:26:05 +02:00
Ivan Enderlin
01c209fe96
feat(runtime-c-api) Move the wasi
module into its own file.
2019-10-11 09:19:46 +02:00
Mark McCaskey
bd8e864656
Add functions import object to get import fns and free them
2019-10-10 16:07:56 -07:00
Mark McCaskey
51f619a132
Change pointer that's not modified to be const in C API
2019-10-10 11:22:45 -07:00
Mark McCaskey
913354adb3
Add function to get export from ns/name via ImportObject to C API
2019-10-09 17:29:27 -07:00
bors[bot]
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
bors[bot]
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
Nick Lewycky
c61cbf6c0b
Add a comment.
2019-10-08 11:25:10 -07:00
Nick Lewycky
afddbb2b2a
Remove unused value warning due to inkwell API change. NFC.
2019-10-07 17:16:52 -07:00
bors[bot]
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
Nick Lewycky
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
Nick Lewycky
158db4cee1
Remove exclusions for tests that appear to be passing right now.
2019-10-07 15:11:45 -07:00
Nick Lewycky
4d99963640
Replace "be the i32 type" with "be an i32" in error messages.
2019-10-07 12:11:10 -07:00
Patrick Ventuzelo
ed615c4878
fix build error docs
2019-10-07 12:56:55 +02:00
Nick Lewycky
749691ca2a
Add a comment explaining why we don't use the intrinsics for these.
2019-10-04 11:50:11 -07:00
Nick Lewycky
1a7f00f0af
Rewrite Min/Max to handle all cases correctly.
...
Fixes 545 spectest failures.
2019-10-03 18:19:12 -07:00
Mark McCaskey
bfb9d3849c
Fix merge
2019-10-03 11:58:06 -07:00
Mark McCaskey
689bdd08a1
Merge branch 'master' into feature/wasi-in-c-api
2019-10-03 11:56:37 -07:00
Mark McCaskey
70b55b801d
Check argument pointers for null to WASI calls
2019-10-03 10:50:07 -07:00
Patrick Ventuzelo
4b3880c88b
add details when calling unimplemented!
2019-10-03 11:26:54 +02:00
nlewycky
f63c706abc
Merge branch 'master' into feature/singlepass-atomicops
2019-10-02 16:46:59 -07:00
Nick Lewycky
ab76c2357f
Delete dead (commented out) code. NFC.
2019-10-02 16:31:11 -07:00
Nick Lewycky
8e63d54fdb
cargo fmt
2019-10-02 16:31:11 -07:00
Nick Lewycky
83b678bc36
Give this function a better name.
2019-10-02 16:31:11 -07:00
Nick Lewycky
11c5e0d71d
Make the panics a bit more descriptive.
2019-10-02 16:31:11 -07:00
Nick Lewycky
ba68cfc2c6
Finish atomic operations for singlepass, excluding wait and notify.
2019-10-02 16:31:11 -07:00
Nick Lewycky
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
Nick Lewycky
f021d59a0b
Refactor out a compare-and-swap loop function.
2019-10-02 16:31:11 -07:00
Nick Lewycky
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
Nick Lewycky
6937019b65
Use a compare-and-swap loop for AND.
...
BUG: This might allocate RAX twice.
2019-10-02 16:31:10 -07:00
Nick Lewycky
81895830f0
Add emitter for LOCK CMPXCHG so that we can emit compare-and-swap loops.
2019-10-02 16:31:10 -07:00