Dan Gohman
0e19f39831
Temporarily disable the fuzz check in test-all.sh
...
We can re-enable it once https://github.com/Amanieu/hashmap_core/pull/8
is merged.
2018-11-26 05:04:05 -08:00
Dan Gohman
e8201d0f93
Begin work on no_std support.
...
This adds no_std support to a bunch of things, but more work is needed.
2018-11-26 04:52:39 -08:00
Dan Gohman
82c8ef95c4
Update for Cranelift API changes.
2018-11-26 04:11:09 -08:00
Dan Gohman
f823526a42
Update to wasmparser 0.22.
2018-11-26 04:10:50 -08:00
Dan Gohman
df2b610304
Add a Rust version badge.
2018-11-25 07:09:46 -08:00
Syrus Akbary
737fde04a8
Improved imports ( #612 )
...
* Impoved support for wasm global imports
* Refactored parse_import_section improving readability
* Improved support for wasm table imports
* Improved support for wasm memory imports
* Improved formatting
* Added DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex structs
2018-11-25 05:10:58 -08:00
Dan Gohman
74ccddcd64
Update to Cranelift 0.24.
2018-11-25 05:08:29 -08:00
Dan Gohman
0a0108f959
Update to Cranelift 0.22.
2018-11-25 05:08:29 -08:00
Aaron Power
b11646aba3
Fix bit count bug in emit_small_{memcpy, memset, memmove}.
2018-11-20 22:32:52 -06:00
Syrus Akbary
48186b3199
Make TargetIsa thread-safe
2018-11-20 22:15:40 -06:00
Dan Gohman
9e56ed5aad
Bump the minimum Rust version to 1.30.1, following Cranelift's policy.
2018-11-16 12:10:52 -08:00
Geoffroy Couprie
7fca0792dd
add a way to provide imported functions during relocation
...
They are provided as a closure taking the module (&str) and function name (&str) as arguments,
returning an address (Option<isize>)
2018-11-16 09:56:36 -08:00
Dan Gohman
0fed78e063
Don't allow loop preheaders to have critical edges.
...
If the block which would be a preheader for a loop has other successors,
don't hoist instructions into it. Instead create a dedicated preheader.
2018-11-16 10:27:24 +01:00
Dan Gohman
641771ac6a
Add encodings to the instructions in LICM's generated preheaders.
...
When LICM generates a preheader, it needs to add encodings to the
instructions it generates, since it runs after legalization.
2018-11-16 10:27:24 +01:00
Dan Robertson
c7bc1b7c56
Fix fuzz_reader_parse_test
...
Fix compilation issues with fuzz_reader_parse_test.
2018-11-15 12:23:28 +01:00
Benjamin Bouvier
86cc33673b
Add binary tests for codegen of loads/stores involving r12/r13 on x86;
2018-11-14 13:08:54 -08:00
Benjamin Bouvier
b41bc55007
Pretty-print errors for extended basic blocks too;
2018-11-14 13:08:54 -08:00
Benjamin Bouvier
d45e8b5830
Add SIB/offset for ABCD stores too;
2018-11-14 13:08:54 -08:00
Benjamin Bouvier
b170b74b65
Fixes #600 : Add a SIB byte when encoding a non-indexed load/store into r12/rsp;
...
Memory access instructions which took the GPR_ZERO_DEREF_SAFE register
class (that was removed in #600 ) should check for the need of either an
offset (r13/rbp) or the SIB byte (r12/rsp). Some load/store instructions
would already take an index, thus already contain the SIB byte in this
case (see instructions which have a comment telling that the else branch
already contains an SIB byte). Non-indexed memory accesses lacked the
SIB byte check, which this patch adds.
2018-11-14 13:08:54 -08:00
Dan Gohman
f6617afcdd
Remove the build time and directory from cranelift-codegen-meta's output.
...
This makes its output nondeterministic, making it friendier for
compilation caching tools.
2018-11-14 13:03:00 -08:00
oooooba
155fd4c72a
Eliminate call stack recursion in VirtRegs::find ( #584 )
...
* Eliminate call stack recursion in VirtRegs::find
2018-11-14 12:58:50 -08:00
bjorn3
5baeed06bb
Better incompatible declaration error ( #605 )
...
* Better incompatible declaration error
* Change display of IncompatibleSignature error
2018-11-14 10:41:56 -08:00
Dan Gohman
039188a4bf
Move Vim integration files into their own repo.
...
https://github.com/CraneStation/cranelift.vim
2018-11-13 16:13:54 -08:00
Dan Gohman
c2f5bc00a5
Fix typos in comments.
2018-11-12 15:15:02 -08:00
Dan Gohman
cd7c57e598
Make spilling visit fallthrough_return instructions too.
...
This is a followup to af2a952aabd82cf401cc664d0262b139ff92d86b. It
teaches the spilling pass to use the is_ghost() property to test whether
to visit instructions. This fixes a bug handling multiple return values
with fallthrough_return.
2018-11-12 19:43:55 +01:00
Dan Gohman
ef2e11265c
Update to Rust 1.30.
2018-11-12 07:13:53 -08:00
Dan Gohman
f3ea2d5d66
Tidy up documentation comment syntax.
2018-11-12 06:38:50 -08:00
Dan Gohman
076850549d
Clarify an assertion error message.
2018-11-12 06:38:46 -08:00
Dan Gohman
7b27fdbf54
Avoid cloning an InstructionData when it isn't needed.
2018-11-09 15:13:42 -08:00
Dan Gohman
a0c2b40c17
Remove unnecessary pub keywords.
2018-11-09 15:11:03 -08:00
Dan Gohman
d54569cbdd
Fix a typo in a comment.
2018-11-09 15:10:17 -08:00
Benjamin Bouvier
ce2364ddd9
[build] Remove dead code in Python and move assertions to the Rust code generator;
2018-11-09 09:23:36 -08:00
Benjamin Bouvier
add4043bb5
[build] Introduce a TargetIsaBuilder to better encapsulate the TargetIsa;
...
It was the caller's responsibility to call TargetIsa::check() before;
now one can't manipulate a TargetIsa without calling the
TargetIsaBuilder::finish() method, which is less error-prone and more in
line with what's coming for other things we're going to generate in the
meta crate.
Also splits the construction of a RegClass in two parts: a prototype is
made first when declaring the RegClass, and missing bits are filled in
when adding it to the TargetIsa(Builder). This avoids an awkward passing
of the isa to the RegClass ctor.
2018-11-09 09:23:36 -08:00
Sergey Pepyakin
08240761d5
Compile a simple function ( #2 )
...
* Implement basics.
* Execute code
* Add wasm2wat test cases.
* abi_loc_for_arg for stack.
* Assert that sp_depth is 0 at the epilogue
* Do 32bit add.
* Assert that RAX can be used as a scratch register
* Reuse assembler.
* Align stack slots.
2018-11-08 13:56:27 -08:00
Benjamin Bouvier
f896bfb946
Prefix fixed_results/fixed_value_arguments with num to indicate they return a usize;
2018-11-08 11:41:04 -08:00
Benjamin Bouvier
e13b0886dc
SimpleJIT: Ignore result of writeln! to avoid a compiler warning when writing the perf map;
2018-11-08 11:41:04 -08:00
Dan Gohman
8b5ad467c6
Fix missing newline.
2018-11-07 16:45:36 -08:00
Dan Gohman
47a33474ef
Fix a typo in the category name.
2018-11-07 16:28:37 -08:00
Dan Gohman
1d14f5ddbd
Use cranelift-entity with default features.
...
The meta crate doesn't need to support no_std, so it can just use
default settings.
2018-11-07 16:24:19 -08:00
Dan Gohman
14dfc0d1b6
Bump version to 0.23.0.
2018-11-07 16:18:04 -08:00
Dan Gohman
ad8a19c7ff
Update no_std support.
2018-11-07 16:14:11 -08:00
Dan Gohman
38e8667f97
Adjust whitespace to match the upstream exception text.
...
This is a whitespace-only change.
2018-11-07 16:07:51 -08:00
Dan Gohman
19dc75f45a
Add preopt to the maintainer scripts.
2018-11-07 16:07:51 -08:00
Dan Gohman
fd875c3f5a
Pass TargetFrontendConfig by value rather than by reference.
2018-11-07 16:01:15 -08:00
Dan Gohman
b476f823d4
Update to target_lexicon 0.2.0.
2018-11-07 16:01:15 -08:00
Lachlan Sneff
3409af7c07
Add early-stage optimization crate ( #556 )
...
* Add simple constant folding and folding tests
2018-11-07 15:59:29 -08:00
Dan Gohman
bdcc06eb15
When lowering br_table to branches, delete the old jump tables.
...
This prevents codegen from emitting unused readonly data.
2018-11-07 11:49:51 +01:00
Dan Gohman
997424a4c5
Add more comments explaining ghost instructions.
2018-11-07 11:03:23 +01:00
Dan Gohman
26da67b394
Add a verifier check that ghost instructions don't have encodings.
2018-11-07 11:03:23 +01:00
Dan Gohman
88bbbca6cd
Make regalloc visit fallthrough_return instructions.
...
Add an explicit "is_ghost" property to selected instructions, and use
that to determine whether reload and coloring should visit instructions.
This allows them to visit fallthrough_return instructions and insert
fills and register moves as needed.
2018-11-07 11:03:23 +01:00