Commit Graph

2814 Commits

Author SHA1 Message Date
328ef4e66e use correct debug macro on Windows 2019-07-19 12:55:58 -07:00
d74560e1d4 impl fd_close 2019-07-19 12:10:45 -07:00
a8a0dbed91 improve abstraction impl rm syscalls, properly finish create_dir 2019-07-19 11:47:31 -07:00
9910527b30 further improve sandbox, rework syscalls, add tests 2019-07-18 17:14:01 -07:00
3e009c5971 Reformat. 2019-07-18 13:40:24 -07:00
ea93b68165 Bump size of global up to 128 bits.
Fixes last spec test failure from the WAVM SIMD spec test.
2019-07-18 13:39:41 -07:00
3be6a024aa Fix bugs in V128 support based on results from testing against simd spec test.
These is one test failure remaining with V128 global variables.

* Fix trunc_sat. We need both the largest float that can be converted to an int
  and the largest int, they are not the same number.
* Implement calling of functions that take V128 by passing in two i64's.
* Improve support for V128 in spectests. Parse binary modules with the same
  features as the outer spectest. Fix compilation error involving Result in
  emitted .rs file. Handle V128 in more cases when producing .rs file. Parse
  the wast script with SIMD enabled.
* Adjust the WAVM spectest so that it parses with WABT and mostly passes with
  wasmer. Wabt is particular about ints not having decimal places and floats
  having decimal places. Wasmer does not support mutable globals or shared
  memory. Tests of shuffles are disabled. Some assert_invalid tests that wabt
  won't even parse are disabled.
2019-07-18 12:52:59 -07:00
3f3bf38d94 Fix typo in comment.
"Then thou must count to three. Three shall be the number of the counting and the number of the counting shall be three. Four shalt thou not count, neither shalt thou count two, excepting that thou then proceedeth to three."
2019-07-18 11:24:25 -07:00
2e030c9c4a Parsing LLVM stackmaps. 2019-07-19 02:02:15 +08:00
dc19bf32b9 fmt 2019-07-17 15:47:59 -07:00
e7e1b8c7d3 get tests passing! (more tests and clean up required) 2019-07-17 15:32:47 -07:00
65bc9a5203 massive fs rewrite; add virtual root, tests 2019-07-17 14:00:51 -07:00
a14a8e4c50 Emit stack map at critical points. 2019-07-18 02:43:04 +08:00
36098189b3 doc(runtime-c-api) Document and reorganize exports.rs.
This patch moves all structs at the beginning of the file, and
documents them.
2019-07-17 11:01:42 +02:00
eeac6d5d2d Merge branch 'master' of github.com:wasmerio/wasmer into simd 2019-07-16 19:16:45 -07:00
78702fc1a0 Merge remote-tracking branch 'origin/master' into feature/wasi-readlink 2019-07-16 13:50:56 -07:00
cea7d5da7d add readlink test 2019-07-16 13:49:45 -07:00
19f544e489 update to 0.5.6 2019-07-16 13:12:21 -07:00
dd1ddea37b wip fs improvements 2019-07-15 17:37:11 -07:00
193665461b Merge branch 'master' into improve-wasi-tests 2019-07-15 12:43:21 -07:00
42780042ef Fix typo in comment. 2019-07-15 10:55:26 -07:00
affb9465d5 update rustfmt.toml to ignore and fmt 2019-07-15 10:43:30 -07:00
53d7ecba2c improve wasitest infra and fix fseek test 2019-07-15 10:36:12 -07:00
122963909f symlink code from last week 2019-07-15 09:59:07 -07:00
ad10152982 * vm.rs - calling Ctx data_finalizer upon destruction 2019-07-15 15:14:09 +03:00
24f1e99ead Fixed WASI tests 2019-07-13 16:00:18 -07:00
b0ead8fc04 Merge branch 'master' into feature/complete-fd-seek 2019-07-13 15:40:51 -07:00
ed19fd2913 Update loader-kernel feature name, fix compilation track state, cargo fmt 2019-07-12 23:02:57 -05:00
5119f07ea3 implement wasi::readlink 2019-07-12 15:58:28 -07:00
a608f3aad0 fix wasi test template code 2019-07-12 15:17:10 -07:00
cbac3ed92d finish implementation of wasi::fd_seek, fix bug in filestat 2019-07-12 15:10:16 -07:00
977fd1e25e Fix trap offset lookup. 2019-07-13 00:17:33 +08:00
450109e2bb Fix singlepass compilation error. 2019-07-13 00:17:21 +08:00
08cdc9a42f Allow disabling state tracking for faster startup. 2019-07-12 23:37:40 +08:00
f327feccef Merge remote-tracking branch 'origin/master' into fix/imul-relax 2019-07-12 23:37:01 +08:00
278adf678a Merge branch 'master' into nlewycky/llvm 2019-07-11 16:48:46 -07:00
7fb88251d4 Simplify trap_if_not_representable_as_int.
Fix typo in function name. Use two fcmp instructions instead of unpacking the bits of the IEEE float and using integer arithmetic to determine details about its value.
2019-07-11 16:46:37 -07:00
7045030532 Try a new list of optimization passes.
A few notes:
a) the inliner doesn't help because all the calls are indirect and not even opt -O2 can figure out which functions they're actually calling.
b) aggressive instruction combining is not a super-set of the instruction combiner. Instcombine is made up of a large number (probably 10,000s) of patterns, and some particularly slow ones were taken out and moved to the aggressive instruction combiner. Aggressive instcombine *only* runs that handful of optimizations, which fired zero times on our example wasm files.
c) NewGVN is not ready for production, it has asserts that fire when building sqlite or cowsay. This is why sqlite didn't build with the llvm backend.
d) Scalar-replacement-of-aggregates (sroa) is a strict superset of promote-memory-to-registers (mem2reg), and you probably want sroa because it's usually faster. It also fires 10,000s more times than mem2reg on lua.wasm.
e) Aggressive-dead-code-elimination was only deleting as much regular dead-code-elimination, but is slower because it depends on a postdominator tree (PDT) analysis that. Other passes don't need PDT so we'll have to build it for just this one pass (as opposed to regular dominator-tree which is reused by many passes). I've replaced this with bit-tracking dead-code-elimination which deletes more code than dce/adce.
2019-07-11 14:48:07 -07:00
c186e0244e Fix compile error on imul. 2019-07-11 20:26:20 +08:00
b41040cc59 Update to nix 0.14.
Instead of using a mix of nix 0.12 & 0.13
2019-07-11 12:28:56 +02:00
0c4a8f77d2 Merge #543 #544
543: update version numbers to 0.5.5 r=MarkMcCaskey a=MarkMcCaskey



544: Use bitcast instead of alloca+load+ptrcast+store sequence. r=MarkMcCaskey a=nlewycky



Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-07-11 00:51:31 +00:00
3795b48401 Merge branch 'master' into llvm-cleanup 2019-07-10 16:58:27 -07:00
7789d1b096 Merge branch 'master' into release-0.5.5 2019-07-10 16:35:00 -07:00
7f00dc3cdb Reformat. 2019-07-10 15:33:32 -07:00
8faff26c31 Give float_bits bitcast instruction a name. 2019-07-10 15:31:18 -07:00
50302d5d4e use published forks of clif so we can publish again 2019-07-10 15:10:00 -07:00
e980931329 Added simd spectest file 2019-07-10 14:43:54 -07:00
a14d2b27b4 Added simd tests for llvm 2019-07-10 14:41:15 -07:00
e4123433a1 Reformat. 2019-07-10 14:28:07 -07:00
53907b0ab2 Update inkwell to our own copy until upstream supports LLVM 8.
LLVM 8 support from https://github.com/lumen/inkwell/tree/llvm8 .
2019-07-10 14:23:47 -07:00