Commit Graph

197 Commits

Author SHA1 Message Date
Dan Gohman
b4c7451ae5 Bump version to 0.21.1 2018-09-10 10:00:45 -07:00
Dan Gohman
608e74d8cb Document that b8 etc. are intended for use as SIMD elements. 2018-09-05 14:23:03 -07:00
Dan Gohman
e8878ba504 Bump version to 0.21.0 2018-09-04 22:04:22 -07:00
Dan Gohman
112e4a6083 Add a use std::vec::Vec; to fix the no_std build. 2018-09-04 21:57:32 -07:00
Dan Gohman
d4b8622393 Rename the VOID type to INVALID and clean up obsolete comments.
The VOID type isn't used for anything resembling what "void" means in C,
so rename it to INVALID to avoid confusion.
2018-09-04 21:46:22 -07:00
Dan Gohman
18900df4d5 Clean up obsolete comments. 2018-09-04 21:22:50 -07:00
Dan Gohman
ca9da7702e Reorganize the global value kinds. (#490)
* Reorganize the global value kinds.

This:
 - renames "deref" global values to "load" and gives it a offset that works
   like the "load" instructions' does
 - adds an explicit "iadd_imm" global value kind, which replaces the
   builtin iadd in "vmctx" and "deref" global values.
 - also renames "globalsym" to "symbol"
2018-09-04 21:09:04 -07:00
Aaron Power
17bb62c16c Added bitrev instruction for 32 and 64 bit integers (#486) 2018-09-04 16:23:50 -07:00
Kaz Wesley
7e571f4a49 Print value aliases at referrent definition (#492)
* Print value aliases at referrent definition

Closes #488.
2018-09-04 15:02:46 -07:00
Dan Gohman
c836a96e30 Bump cranelift-entity version to 0.20.1. 2018-08-28 20:19:09 -07:00
Dan Gohman
7fa0a38793 Bump version to 0.20.0 2018-08-28 16:37:52 -07:00
Dan Gohman
c23bfdaa91 Minor code simplification. 2018-08-28 16:24:10 -07:00
Dan Gohman
8e2d01a675 Add an index_type field to Table.
This parallels the `index_type` field in `Heap`.
2018-08-28 14:28:43 -07:00
Dan Gohman
eb439c9a68 Fix legalization of heap_addrs with 32-bit indices. (#480)
This makes several changes:
 - It adds an index_type to heap declarations, allowing heaps to specify the
   type for indexing. This also anticipates 64-bit heap support.

 - It adds a memory_type to deref global values, allowing deref globals to
   have types other than pointers. This is used to allow the bound variable
   in dynamic heaps to have type i32, to match the index type in heaps
   with i32 index type.

 - And, it fixes heap legalization to do the bounds check in the heap's
   index type.
2018-08-28 13:37:33 -07:00
Dan Gohman
6af407144c Remove Signature's argument_bytes field.
It's not currently used. If we do need such information, it would be
better to compute it on demand.
2018-08-28 13:19:59 -07:00
Grégoire Geis
0e67255f52 Fix error not reported if at least one other error expected. (#485)
* fix error not reported if at least one other error expected.

* Fixed unused extern crate error if wasm feature is not enabled.

* No longer reporting deref cycles multiple times.

* Fix filetest type_check.clif.

* Switched comparison order for perf.

* Fixed isa/riscv/verify-encoding.clif filetest.
2018-08-28 10:33:46 -07:00
Grégoire Geis
8e74a4f8fc Pretty printing preamble errors. (#472)
* Pretty printing preamble errors.
2018-08-27 09:38:44 -07:00
Dan Gohman
2c9b7fd73a Add "no-std" category to crates supporting no-std.
And add "wasm" category to cranelift-wasm.
2018-08-22 12:51:54 -07:00
Dan Gohman
ad170c7412 Update to log 0.4.4. 2018-08-17 12:04:01 -07:00
Dan Gohman
3d89a8645b Fix rustfmt errors. 2018-08-16 15:26:53 -07:00
Grégoire Geis
e2badb0ad6 Improvements to error reporting (#470)
* Fixed error reporting.

* Fixed compile time error when wasm feature is disabled.

* Fixed valid instructions not being printed in print_function_error.

* Fixed errors print_function_error not writing valid instructions after end.

* Made multiple checks non-fatal.

* verify_global_values is no longer fatal.

* Slightly better formatting of errors in pretty_verifier_error.
2018-08-16 11:34:52 -07:00
Dan Gohman
6a07c72867 Bump version to 0.19.0 2018-08-14 12:55:34 -07:00
Dan Gohman
932b4ef9f3 Fix a few declarations for the no_std build. 2018-08-14 12:48:47 -07:00
Grégoire Geis
dbc547091f Verifier now accepts multiple errors (fixes #387). (#452)
* Verifier now accepts multiple errors (fixes #387).
2018-08-14 10:55:10 -07:00
bjorn3
3f582f7cbd Legalize br_icmp (#449)
* Legalize br_icmp
2018-08-13 18:31:39 -07:00
Dan Gohman
bee5210b40 Merge pull request #461 from bjorn3/legalize-bint-i8
Legalize bint.i8
2018-08-13 16:02:11 -07:00
Dan Gohman
51698f93f2 Merge branch 'master' into bforest 2018-08-13 15:55:31 -07:00
Dan Gohman
4769e67468 Fix a few declarations for the no_std build. 2018-08-13 12:52:43 -07:00
Dan Gohman
d4a83576e4 Add a few miscellaneous comments. 2018-08-13 12:51:49 -07:00
Dan Gohman
cc4bf1c7fb Deny unstable_features in "std" builds. 2018-08-13 12:51:49 -07:00
Benjamin Bouvier
a044f58cea Fixes #404: Use log.rs and a file-per-thread logger instead of the dbg! macro; 2018-08-13 12:51:14 -07:00
bjorn3
fa65ee7a68 Legalize bint.i8 2018-08-13 21:23:25 +02:00
Amanieu d'Antras
0b548c720c Don't make the Comparator a type argument for bforest 2018-08-12 15:46:35 +02:00
Amanieu d'Antras
ae3a3c368b Move bforest into a separate crate 2018-08-12 15:46:35 +02:00
Benjamin Bouvier
f7e481d9ac Implement wasm saturating conversions; 2018-08-09 19:50:41 -07:00
Sergey Pepyakin
9dbfbbde10 Stack Limit as an Argument Purpose (#372)
* Initial approach.

* Move stack_limit check before opening the frame

* Account for GPRs and frame pointer in stack check

* Check stack_limit example.

* Remove stack_limit attribute code.

Amends #359

* fmt
2018-08-04 06:16:21 -07:00
Bruce Mitchener
76a7efc8db Clippy improvements (#408)
* clippy: Allow subsec_nanos usage for now.

The recommendation from clippy requires Rust 1.27, but we currently
support Rust 1.25 and later.

* Simplify ref pattern matches.

This was recommended by clippy.
2018-08-02 22:10:51 -07:00
Dan Gohman
c0af810ec0 Add an explicit version to the cranelift-codegen-meta dependency.
This allows it to work in crates.io.
2018-08-02 20:37:58 -07:00
Dan Gohman
cd02010a78 Bump version to 0.18.1 2018-08-02 20:10:23 -07:00
Dan Gohman
a52c547d0e Rename "meta" back to "cranelift-codegen-meta" and publish it.
It appears that having the meta directory crate be inside the codegen
directory is not enough to allow codegen to depend on it without it
being published. So, let's just publish it.
2018-08-02 20:04:41 -07:00
Dan Gohman
c4a056a7a0 Bump version to 0.18.0 2018-08-02 18:34:22 -07:00
Dan Gohman
570f7bc20b Rename "cranelift-meta" to just "meta".
This makes it easier for the publish-all.sh script to know to skip this
crate, and it avoids the need to use `extern cranelift_meta as meta`.
2018-08-02 15:36:54 -07:00
Dan Gohman
5cf2c6f0f7 Update cranelift-meta's Cargo.toml to reflect that it's not published. 2018-08-02 15:25:09 -07:00
Dan Gohman
1b30265c5c Define a "table" concept.
"Table" is to WebAssembly tables as "Heap" is to WebAssembly linear
memories.
2018-08-02 15:21:34 -07:00
Dan Gohman
cd75176f10 Update to the rustfmt in rust 1.28, which is now stable.
Also, rustfmt's --write-mode=check is now named --check.
2018-08-02 09:55:40 -07:00
Dan Gohman
26d122306d Don't attempt to shrink regfill/regspill/regmove instructions.
This is a temporary workaround for bugs such as #420, where normal
operand constraint checking doesn't correctly handle such instructions.
2018-08-02 09:53:25 -07:00
Dan Gohman
c61f8a5baf Rename langref.rst to ir.rst.
This aligns with our use of the term "IR" rather than "IL" or
other terms involving "language".
2018-08-02 09:18:59 -07:00
Dan Gohman
bc8e5f82c8 Add use declarations needed for no_std mode. 2018-08-01 14:10:54 -07:00
Dan Gohman
f89cb1df64 Fix the test script to return an error if formatting diffs are found. 2018-08-01 13:24:53 -07:00
bjorn3
01729be8d7 Add comment support (#379)
* Add comment support

* Don't print empty comments

* Add nop instruction

* Add test and note

* Add FuncWriter trait

* Remove comment support

* Add write_preamble to FuncWriter

* Fix test

* Some changes
2018-08-01 11:21:05 -07:00