Commit Graph

201 Commits

Author SHA1 Message Date
6410da9c24 Remove dead intrinsics. 2019-10-22 23:36:18 -07:00
cf1f4c781e Merge #887
887: Get aggressive about running cargo check over all packages with all features. r=nlewycky a=nlewycky

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.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-10-21 22:43:09 +00:00
10dddf9904 Fix repeated typo in comment. 2019-10-18 16:34:45 -07:00
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
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
afddbb2b2a Remove unused value warning due to inkwell API change. NFC. 2019-10-07 17:16:52 -07: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
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
726269a52c fix missing info error 2019-09-17 12:05:00 +02:00
4190f01195 remove panic and unimplemented in llvm-backend and runtime-core 2019-09-17 12:03:03 +02:00
59597b9e83 Switch from PIC+Default (small) to Static+Large. Should fix flaky test failures. 2019-09-16 10:49:39 -07:00
8dd82c05e6 Implement atomic load and store instructions with actual atomics in the LLVM backend.
Includes a run of `cargo update` to pick up the newer inkwell required.
2019-09-13 12:05:55 -07:00
d8471e2b6a Improved docs with custom logo and favicon 2019-09-03 17:06:31 -07:00
bdcd73cd63 Unblock signals in LLVM trap handler. 2019-08-22 17:45:52 -07:00
d7c5bb904e Only disallow dead code in llvm-backend for non-Windows environments. 2019-08-22 13:32:35 -07:00
6534c28aed Allow dead code in llvm-backend. 2019-08-22 13:30:50 -07:00
e89ab43b98 Fix unused 'stackmaps' and 'module_info' on Windows 2019-08-22 13:25:52 -07:00
d868445d09 Fix unused import 'vm' on Windows 2019-08-22 13:19:46 -07:00
eef38429fc Fix unused imports on Windows. 2019-08-22 13:14:05 -07:00
c7377a465f Merge remote-tracking branch 'origin/master' into feature/llvm-osr 2019-08-21 15:49:25 -07:00
b0beb28ea7 Fix unused import on Windows. 2019-08-21 15:32:20 -07:00
56e735349d Format everything 2019-08-21 15:23:56 -07:00
53ebcc355a Disable LLVM stackmap on Windows 2019-08-21 15:23:11 -07:00
08ab8d16e1 Handle SIGILL in LLVM. 2019-08-21 15:05:10 -07:00
e6ec261cd5 Remove commented out code. 2019-08-21 15:01:21 -07:00
bf9d915635 Fix a few issues from PR comments. 2019-08-21 14:53:33 -07:00
2882c75957 No need to emit any alignment check for byte-aligned accesses. 2019-08-20 11:30:30 -07:00
dcf70167da Fix i64.atomic.load32_u and all alignment checks. 2019-08-20 11:03:22 -07:00
0ba73ac50c Correct flipped misalignment test. 2019-08-20 10:39:53 -07:00
90dcdfec1c Cargo fmt 2019-08-19 19:17:50 -07:00
4e6267aa57 Correctly handle more than 5 WASM function parameters when reading state of a LLVM context. 2019-08-19 19:12:33 -07:00
124ad73e8a Merge remote-tracking branch 'origin/master' into feature/llvm-osr 2019-08-19 13:06:59 -07:00
c8378329c1 Expound upon Fence's empty implementation being correct. 2019-08-19 10:51:14 -07:00
aecce465c7 Implement atomic.rmw operations including atomic.rmw.cmpxchg. 2019-08-19 10:51:14 -07:00
f2077c204b Implement fence correctly, atomic load/store as non-atomic.
Adds trap for misaligned accesses.
2019-08-19 10:51:14 -07:00
bccbbb3d8b Add deny nonstandard-style and unused-mut lints 2019-08-15 20:18:29 -06:00
afa0600701 Cargo fmt 2019-08-15 19:13:00 -07:00
7028df23ef Allow only integers for LLVM function param/return values. 2019-08-15 19:07:03 -07:00
0e0573c73c Merge remote-tracking branch 'origin/master' into feature/llvm-osr 2019-08-14 16:33:26 -07:00
2f3c9c3e2f Mark memory.size VM intrinsics as not modifying state, and throw.trap/breakpoint as functions which do not return. 2019-08-13 21:50:54 -07:00
0bf33662d1 Add missing LLVM imported memory functions 2019-08-13 20:07:55 -06:00
137ac206af Return compile error (llvm) for setting immutable global 2019-08-13 17:59:04 -06:00
44f71759f6 Use Vec::with_capacity in various places. 2019-08-10 03:23:29 +08:00
b8c18215aa Refactor tier switching code 2019-08-10 02:32:14 +08:00
d39d4b5f6d Remove structopt dependency from LLVM 2019-08-08 19:42:41 -07:00
b2c4501357 Add support for backend flags. Backend flags are opaque to src/bin/wasmer.rs.
Use them to implement three features in the LLVM backend, getting a valid ELF object file, the post-optimization LLVM IR and the pre-optimization LLVM IR.

Presently they are also global to the backend which is not ideal.
2019-08-08 17:05:31 -07:00
c1619026d5 Swap code lazily when tiering up from singlepass to LLVM.
Does not handle long-running functions, but should work at least.
2019-08-09 04:26:17 +08:00