Nick Lewycky
99f7499a05
Reimplement I32Ctz, I64Clz and I64Ctz without LZCNT or TZCNT.
2019-10-15 13:42:05 -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
losfair
3de0c7763f
Skip inline non-instruction data.
2019-10-15 22:12:08 +08:00
losfair
81d538ade2
Fix disp < 0 case.
2019-10-15 22:00:33 +08:00
losfair
ee88c459e5
Allow arbitrary size of disp
.
2019-10-15 21:55:04 +08: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
losfair
a525907c60
Emit state information for internal breakpoints.
2019-10-14 20:23:10 +08:00
losfair
5499a69ddc
Run cargo fmt on everything.
2019-10-13 20:02:47 +08:00
losfair
36f95fc660
Support emitting inline breakpoints in singlepass.
2019-10-11 21:05:42 +08:00
losfair
8ee4b7f7b0
Replace brk with undefined instruction.
2019-10-10 22:08:52 +08: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
Nick Lewycky
efc89e829d
Add i32 rmw add and sub.
2019-10-02 16:31:10 -07:00
Nick Lewycky
98f35ef84a
Initial implementation of atomic load/store and i32 atomic rmw add.
2019-10-02 16:31:10 -07:00
losfair
b304317682
More mov variants.
2019-09-30 01:01:15 +08:00
losfair
89d8b5a41c
Fixes for aarch64.
2019-09-28 17:31:10 +08:00
Nick Lewycky
be181f9119
Correct this test and simplify.
2019-09-24 10:54:23 -07:00
Nick Lewycky
07b5991080
No need to emit add of constant zero.
2019-09-23 15:01:19 -07:00
losfair
3dadbc15c9
Integer subset done.
2019-09-23 22:30:08 +08:00
losfair
a124d87d0f
Fix Operator::MemorySize.
2019-09-19 01:10:23 +08:00
losfair
5f8b289751
movzx/movsx
2019-09-19 01:04:20 +08:00
losfair
8a91f801b9
Fix return from homomorphic host redirection trampoline.
2019-09-18 21:47:31 +08:00
losfair
72b6123def
Fix memory grow
2019-09-18 02:38:35 +08:00
losfair
e40600533e
Add missing emit_mov
variants.
2019-09-18 02:30:45 +08:00
losfair
97b75d0124
Ensure callee-saved registers are properly preserved.
2019-09-18 02:21:35 +08:00
losfair
b57aba4ae7
Add homomorphic host redirection abstraction for vm->host calls.
2019-09-18 02:14:13 +08:00
losfair
d8b313e3fd
Fix emit_lea.
2019-09-17 00:49:21 +08:00
Patrick Ventuzelo
00c2e09f43
fix CodeGen message type
2019-09-16 11:00:03 +02:00
Patrick Ventuzelo
33ba6768bc
replace panics by CodeGen Error in codegen_x64
2019-09-16 09:56:41 +02:00
losfair
9b77677e4b
Relax constraints a bit to compile on aarch64.
2019-09-15 18:23:42 +08:00
losfair
d3227f830c
More instructions & aarch64 trampolines.
2019-09-15 17:57:40 +08:00
Nick Lewycky
0387c3ff93
Turn this unreachable into a panic with an error message.
2019-09-13 14:44:54 -07:00
losfair
ce7c903c23
Add impl for more instructions for aarch64 translator.
2019-09-11 01:13:52 +08:00
losfair
4210715070
AArch64 translation module.
2019-09-07 01:32:21 +08:00
Syrus
d8471e2b6a
Improved docs with custom logo and favicon
2019-09-03 17:06:31 -07:00
losfair
9015b79091
Cargo fmt
2019-09-01 18:17:47 +08:00
losfair
45040650dd
Fix the missing Copy trait error
2019-09-01 18:17:31 +08:00
losfair
bf9d915635
Fix a few issues from PR comments.
2019-08-21 14:53:33 -07:00
losfair
124ad73e8a
Merge remote-tracking branch 'origin/master' into feature/llvm-osr
2019-08-19 13:06:59 -07:00
Brandon Fish
7b7f55306c
Merge branch 'master' into feature/fix-singlepass-panic-no-functions
2019-08-17 00:34:06 -06:00
Brandon Fish
bccbbb3d8b
Add deny nonstandard-style and unused-mut lints
2019-08-15 20:18:29 -06:00
losfair
afa0600701
Cargo fmt
2019-08-15 19:13:00 -07:00
losfair
6a24485999
Insert trampolines to preserve callee-saved registers for backends without register save area information.
2019-08-15 19:10:24 -07:00
Brandon Fish
98d3e04137
Fix unused mut warning
2019-08-15 20:09:51 -06:00
Brandon Fish
439e81d41e
Fix singlepass error when no function code present
2019-08-15 10:15:58 -06:00
losfair
98ef9182d7
Run clang-format and cargo fmt
2019-08-14 16:35:40 -07:00
losfair
0e0573c73c
Merge remote-tracking branch 'origin/master' into feature/llvm-osr
2019-08-14 16:33:26 -07:00
losfair
9cade2b441
singlepass: Skip patchpoint.
2019-08-10 03:10:32 +08:00
Brandon Fish
5a41686192
Fix bare_trait_objects warnings
2019-08-08 16:46:52 -06:00
losfair
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
Brandon Fish
2f70a199e4
Add deny dead_code lint and fix one error
2019-08-01 20:46:35 -06:00
losfair
283676af2b
Add .clone() to fix singlepass.
2019-07-30 22:25:37 +08:00
Nick Lewycky
eeac6d5d2d
Merge branch 'master' of github.com:wasmerio/wasmer into simd
2019-07-16 19:16:45 -07:00
Brandon Fish
ed19fd2913
Update loader-kernel feature name, fix compilation track state, cargo fmt
2019-07-12 23:02:57 -05:00
losfair
450109e2bb
Fix singlepass compilation error.
2019-07-13 00:17:21 +08:00
losfair
08cdc9a42f
Allow disabling state tracking for faster startup.
2019-07-12 23:37:40 +08:00
losfair
c186e0244e
Fix compile error on imul
.
2019-07-11 20:26:20 +08:00
Nick Lewycky
3ba8100e98
Add V128 stubs to allow singlepass backend to build again.
2019-07-10 13:48:12 -07:00
losfair
a3dcc0e240
Merge remote-tracking branch 'origin/master' into feature/osr
2019-07-04 23:56:45 +08:00
losfair
02464991da
Cargo fmt
2019-07-04 01:45:54 +08:00
losfair
f32b22d571
Bkpt* -> Breakpoint*
2019-07-04 01:45:06 +08:00
losfair
5c5ecfff7d
Rename alternative_stack
to fault
.
2019-07-04 01:27:19 +08:00
Nick Lewycky
9fc713f9b1
Update for new wasmparser.rs version.
2019-07-01 16:11:38 -07:00
losfair
c67405ffe5
Add workaround for singlepass miscompilation on GetLocal.
2019-07-01 21:20:35 +08:00
losfair
80509e3f78
Fix singlepass miscompilation.
2019-06-30 11:50:06 +08:00
losfair
db117d2f26
Cleanup internal logic.
2019-06-27 17:54:06 +08:00
losfair
967027003d
Full preemptive snapshot/resume.
2019-06-27 15:49:43 +08:00
losfair
63f9818cf6
Move more logic into runtime-core and add an interactive shell.
2019-06-27 00:41:07 +08:00
losfair
a792ac6a48
Wrap alternative stack functions properly.
2019-06-26 20:45:32 +08:00
losfair
9b4343eac5
Fix compilation on Linux.
2019-06-26 12:33:50 +08:00
losfair
2373d371ae
Optimize backtraces.
2019-06-26 11:28:46 +08:00
losfair
2730efcc6c
Cargo fmt
2019-06-26 01:39:30 +08:00
losfair
3f2aeec9bc
Suspend & restore.
2019-06-25 20:01:56 +08:00
losfair
8303853227
Cargo fmt
2019-06-25 03:56:20 +08:00
losfair
fb7c3eee8a
Improve stack trace collection and rendering.
2019-06-25 03:55:33 +08:00
losfair
9585b89705
Fix bugs in state reading.
2019-06-12 23:54:15 +08:00
losfair
32008eba88
Read stack values based on state map.
2019-06-12 22:02:15 +08:00
losfair
00b6bf632a
Dumping stack through import.
2019-06-12 13:38:58 +08:00
losfair
ddd0653a25
Make singlepass backend emit state mapping information.
2019-06-12 00:21:43 +08:00