Commit Graph

982 Commits

Author SHA1 Message Date
Dan Gohman
2fe96c30a6 Check in the Crane and Ferris drawing so that people can remix it :-).
Fixes #514.
2018-09-13 15:30:39 -07:00
Dan Gohman
53a0c6c67f Update to the rustfmt in rust 1.29, which is now stable. 2018-09-13 12:59:25 -07:00
Maddy
52e6b07058 Update the reload pass to replace copies with fill/spill instructions. 2018-09-12 14:15:45 -07:00
Nick Fitzgerald
ea85018ccf clif-util: fix clif-util pass subcommand arguments
Because of the way that the `pass` subcommand orders its arguments, the
positional "single-file" input cannot be optional with a default value, because
it is followed by required positional arguments. If it were optional, that would
result in argument ambiguity where `clap` cannot tell if the optional positional
argument is supplied, or if the given argument is the next required positional
argument.

Before this commit:

```
$ cargo run --bin clif-util -- pass ./filetests/dce/basic.clif dce
   Compiling cranelift-tools v0.21.0 (file:///Users/fitzgen/src/cranelift)
    Finished dev [unoptimized + debuginfo] target(s) in 4.38s
     Running `target/debug/clif-util pass ./filetests/dce/basic.clif dce`
thread 'main' panicked at 'Found positional argument which is not required with a lower index than a required positional argument: "single-file" index 1', /Users/fitzgen/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.32.0/src/app/parser.rs:612:21
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

After this commit:

```
$ cargo run --bin clif-util -- pass ./filetests/dce/basic.clif dce
   Compiling cranelift-filetests v0.21.0 (file:///Users/fitzgen/src/cranelift/lib/filetests)
   Compiling cranelift-tools v0.21.0 (file:///Users/fitzgen/src/cranelift)
    Finished dev [unoptimized + debuginfo] target(s) in 5.96s
     Running `target/debug/clif-util pass ./filetests/dce/basic.clif dce`
1 tests
```
2018-09-11 10:16:14 -07:00
Dan Gohman
cadb76ef71 Rename "Cretonne" to "Cranelift" in image files. 2018-09-10 10:00:45 -07:00
Dan Gohman
b4c7451ae5 Bump version to 0.21.1 2018-09-10 10:00:45 -07:00
Nick Fitzgerald
90756a8a01 clif-util: Default to reading input files from stdin
Fixes #495
2018-09-06 17:35:26 -07:00
Nick Fitzgerald
8fb681b86d clif-util wasm: don't panic when terminal colors are unsupported
This breaks inside of Emacs' `M-x shell` and `compilation-mode`.
2018-09-06 17:35:26 -07:00
Dan Gohman
da0243b0ab Update docs to reflect that saturating fp-to-int conversion is now implemented. 2018-09-05 16:35:41 -07:00
Dan Gohman
437a657899 Document tables. 2018-09-05 14:30:34 -07:00
Dan Gohman
8d41d2cc43 Add more documentation for special parameters. 2018-09-05 14:30:34 -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
1e0c9b546b Move simplejit after the umbrella crate in publish-all.sh.
Simplejit's example program uses the umbrella, so publish it after the
umbrella crate to preserve the topological ordering.
2018-09-05 13:49:10 -07:00
Dan Gohman
e8878ba504 Bump version to 0.21.0 2018-09-04 22:04:22 -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
Caroline Cullen
59b83912ba Adds pass command to clif-util. (#487)
* Adds pass command to clif-util.
2018-09-04 16:31:24 -07:00
Aaron Power
17bb62c16c Added bitrev instruction for 32 and 64 bit integers (#486) 2018-09-04 16:23:50 -07:00
Dan Gohman
4045d50b7b Add a Code of Conduct (#481)
* Create CODE_OF_CONDUCT.md

* Mention the Code of Conduct in CONTRIBUTING.md.

* Add @tyler's email address as an additional contact.
2018-08-31 04:16:36 -07:00
Dan Gohman
c836a96e30 Bump cranelift-entity version to 0.20.1. 2018-08-28 20:19:09 -07:00
Dan Gohman
f834afb5f6 Bump cranelift-wasm version to 0.20.1. 2018-08-28 17:18:36 -07:00
Dan Gohman
7fa0a38793 Bump version to 0.20.0 2018-08-28 16:37:52 -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
0d24641f21 Fix a verifier test failure.
This test was accidentally relying on the bug that #485 fixed.
2018-08-28 13:50:28 -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
ba8dd836ff Update to wabt 0.5.0. 2018-08-28 13:23:37 -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
Dan Gohman
9eee91fc12 Clarify that we use rustfmt-preview.
This may help avoid confusion with older rustfmt versions.
2018-08-27 16:28:24 -07:00
Dan Gohman
eab8f784fa Rename nop.cton to nop.clif. 2018-08-27 16:28:24 -07:00
Dan Gohman
0a65089a36 Add a CONTRIBUTING.md file (#479)
* Add a CONTRIBUTING.md file.

* Document the basic PR process.

This also introduces the Core Team.
2018-08-23 11:03:52 -07:00
Caroline Cullen
0f93ef5cee Changing from docopt to clap for the clif-util #434 (#463)
* Changing from docopt to clap for the clif-util

* Updates to cargo file.

* Remove filecheck subcommand.
2018-08-22 11:25:55 -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
304134d351 Update a testcase for API changes. 2018-08-14 16:47:45 -07:00
Dan Gohman
6a07c72867 Bump version to 0.19.0 2018-08-14 12:55:34 -07:00
Dan Gohman
6cf7a975a1 Factor out a repeated string, and reduce the length of a long line. 2018-08-14 12:28:33 -07:00
bjorn3
3f0103f936 Prevent finalize being called more than once per func/data (fixes #407) 2018-08-14 10:57:59 -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
Caroline Cullen
6f9982fdf5 Updating Sphinx link and install instructions 2018-08-13 15:46:51 -07:00
Dan Gohman
3b56b2f4fb Fix rustfmt errors. 2018-08-13 12:52:09 -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
bjorn3
eb01ae530b Fix gitter link (fixes #458) 2018-08-13 11:59:44 -07:00
Amanieu d'Antras
ae3a3c368b Move bforest into a separate crate 2018-08-12 15:46:35 +02:00
Maddy
f5d46cabe7 Use types to distinguish between wasm function body indices and wasm function indices. 2018-08-09 19:52:21 -07:00
Benjamin Bouvier
f7e481d9ac Implement wasm saturating conversions; 2018-08-09 19:50:41 -07:00