Commit Graph

3713 Commits

Author SHA1 Message Date
Nick Lewycky
dde31076a8 Grammer in comment. 2019-10-18 13:00:40 -07:00
Nick Lewycky
b180a2e14c Get aggressive about running cargo check over all packages with all features.
Fixes the one issue uncovered. The capstone disassembling support in the LLVM backend was broken. Fixed by removing it. Instead, use the `--llvm-object-file` flag to get a finished object file to disassemble with any disassembler.
2019-10-17 15:37:35 -07:00
bors[bot]
5ca6fc4aaa
Merge #885
885: fix(cranelift-backend) Remove broken (and useless?) debug code r=nlewycky a=Hywan

This debug code is broken (it doesn't compile). It can be assumed
nobody uses it, and can be considered as dead code. As such, this PR
removes it.

The `debug` feature is kept in `Cargo.toml` to activate `wasmer-runtime-core/debug`.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2019-10-17 21:25:46 +00:00
Ivan Enderlin
f101775380 fix(cranelift-backend) Remove broken (and useless?) debug code.
This debug code is broken (it doesn't compile). It can be assumed
nobody uses it, and can be considered as dead code. As such, this PR
removes it.
2019-10-17 22:55:30 +02:00
bors[bot]
62b2cdc5e9
Merge #884
884: Show the full hex value of a float that fails assert returns arithmetic nan or assert returns canonical nan. r=nlewycky a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-10-17 19:29:22 +00:00
Nick Lewycky
c0acd5be11 Show the full hex value of a float that fails assert returns arithmetic nan or assert returns canonical nan. 2019-10-17 12:20:34 -07:00
bors[bot]
8c308d055b
Merge #880
880: Remove usage of LZCNT and TZCNT from singlepass. r=nlewycky a=nlewycky

# Description
This PR removes usage of LZCNT and TZCNT in singlepass to work on machines that don't support them. Unlike other instructions that fail loudly when not supported, LZCNT and TZCNT silently change behaviour by falling back to BSR and BSF which may produce different answers. They were used in the I32Clz, I32Ctz, I64Clz and I64Ctz instructions. Fixes i32.wast and i64.wast test failures on our Mac buildbot.

As an alternative, we could detect presence of LZCNT and TZCNT at runtime, either by running them directly or by querying CPUID to detect whether the CPU claims support for these instructions. I decided against that because having multiple paths is more complicated, and we aren't concerned with runtime of singlepass code, as a rule.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-10-17 00:13:02 +00:00
nlewycky
01e81ee809
Merge branch 'master' into feature/singlepass-mac-int 2019-10-16 17:12:36 -07:00
Syrus Akbary
eafb1237a8
Merge pull request #881 from Hywan/feat-runtime-core-imported-closure
feat(runtime-core) Add documentation and make macros more readable.
2019-10-16 16:20:29 -07:00
Ivan Enderlin
81be25d970 feat(runtime-core) Add documentation and make macros more readable.
After a long time, the macros are easy to read, but not at first
glance. I hope this PR will improve the situation: Same syntax used
everywhere, more spaces…
2019-10-16 16:07:50 +02:00
Nick Lewycky
5ee311adab These were both calling i32.clz. They should be fixed. 2019-10-15 14:10:26 -07:00
Nick Lewycky
4e5d559ab5 Remove dead functions LZCNT and TZCNT. 2019-10-15 13:44:18 -07:00
Nick Lewycky
99f7499a05 Reimplement I32Ctz, I64Clz and I64Ctz without LZCNT or TZCNT. 2019-10-15 13:42:05 -07:00
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
bors[bot]
caae21c065
Merge #879
879: Add extended system information for Mac. Enough to see CPUID flags. r=nlewycky a=nlewycky



Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-10-15 19:08:28 +00:00
Nick Lewycky
761a5e843c Indentation for syntax. 2019-10-15 11:08:10 -07:00
Nick Lewycky
169665db8c Add extended system information for Mac. Enough to see CPUID flags. 2019-10-15 11:03:55 -07:00
bors[bot]
852fbced5c
Merge #876
876: Bump structopt from 0.3.2 to 0.3.3 r=Hywan a=dependabot-preview[bot]

Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.2 to 0.3.3.
<details>
<summary>Changelog</summary>

*Sourced from [structopt's changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md).*

> # v0.3.3 (2019-10-10)
> 
> * Add `from_flag` custom parser to create flags from non-bool types.
>   Fixes [#185](https://github-redirect.dependabot.com/TeXitoi/structopt/issues/185)
</details>
<details>
<summary>Commits</summary>

- [`2cb1fbf`](2cb1fbf679) v0.3.3
- [`fd2cc62`](fd2cc62b63) Add from_flag parser ([#271](https://github-redirect.dependabot.com/TeXitoi/structopt/issues/271))
- [`6a3fc8b`](6a3fc8bc79) Run ui tests only on stable
- [`8d86616`](8d86616957) Fix code formatting
- [`cf61ff1`](cf61ff1eaf) Fix nightly tests
- [`0c888e9`](0c888e962d) Fix clippy warnings
- [`1cae9fa`](1cae9fab4b) Suppress all clippy warnings
- [`c228c23`](c228c2399b) Fix version in docs (AGAIN)
- See full diff in [compare view](https://github.com/TeXitoi/structopt/compare/v0.3.2...v0.3.3)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=structopt&package-manager=cargo&previous-version=0.3.2&new-version=0.3.3)](https://dependabot.com/compatibility-score.html?dependency-name=structopt&package-manager=cargo&previous-version=0.3.2&new-version=0.3.3)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-10-14 15:24:19 +00:00
dependabot-preview[bot]
4e7ba405b8
Bump structopt from 0.3.2 to 0.3.3
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.2...v0.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 14:10:50 +00:00
Syrus Akbary
5611bec3eb
Update README.md 2019-10-13 21:52:10 -07:00
Syrus Akbary
416f03917c
Merge pull request #875 from alocquet/doc/link-to-so-in-c-api-example
doc: add link to SO in C api example
2019-10-13 21:35:37 -07:00
Arnaud
e9f476c93b
doc: add link to SO in C api example 2019-10-13 10:30:02 +02: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
bors[bot]
e6693612f8
Merge #872
872: Pass llvm debug flags to the llvm backend. r=nlewycky a=nlewycky

This was accidentally removed in 124ad73e8a .

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-10-08 19:30:46 +00:00
Nick Lewycky
0567845ead cargo fmt 2019-10-08 11:29:03 -07:00
Nick Lewycky
c61cbf6c0b Add a comment. 2019-10-08 11:25:10 -07:00
Nick Lewycky
ebd71672e0 Pass llvm debug flags to the llvm backend.
This was accidentally removed in 124ad73e8a .
2019-10-08 11:23:18 -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
bors[bot]
f6df1e577a
Merge #868
868: Replace "be the i32 type" with "be an i32" in error messages. r=nlewycky a=nlewycky

# Description
Adjust wording in error messages.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-10-07 20:33:27 +00:00
Nick Lewycky
4d99963640 Replace "be the i32 type" with "be an i32" in error messages. 2019-10-07 12:11:10 -07: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
da0cfb8fc2 Add changelog entry. 2019-10-04 11:36:38 -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
Syrus Akbary
c8e9530805
Merge pull request #860 from wasmerio/MarkMcCaskey-patch-1
Remove incorrect duplicate entry
2019-10-02 19:29:56 -07:00
bors[bot]
1a4206605c
Merge #831
831: Add support for atomic operations, excluding wait and notify, to singlepass. r=nlewycky a=nlewycky

# Description
Adds support for atomic operations, excluding wait and notify, to singlepass. Enable with `--enable-threads`.

# Review

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


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-10-03 00:36:56 +00:00
nlewycky
f63c706abc
Merge branch 'master' into feature/singlepass-atomicops 2019-10-02 16:46:59 -07:00
Mark McCaskey
5859074597
Remove incorrect duplicate entry 2019-10-02 16:36:57 -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
e401f8ebe0 Add changelog entry. 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