Commit Graph

74 Commits

Author SHA1 Message Date
Dan Gohman
8bd35e154b Tidy up some match bindings to be more consistent with the rest of the codebase. 2018-12-11 13:22:28 -08:00
Dan Gohman
c8e457e834 Bump version to 0.26.0 2018-12-11 12:54:23 -08:00
Dan Gohman
5adab629f2 Update to the rustfmt in rust 1.31, which is now stable. 2018-12-06 16:15:48 -05:00
Benjamin Bouvier
d94e027c2a [build] Move settings generation from Python to Rust code; 2018-11-30 11:05:21 -06:00
Benjamin Bouvier
4c8f1e7a5a [meta] Ignore empty lines to compute indent when parsing multiple lines; 2018-11-30 11:05:21 -06:00
Benjamin Bouvier
12df943409 [meta] Add support to generate Match expressions in Rust; 2018-11-30 11:05:21 -06:00
Dan Gohman
30654a6a7d Bump version to 0.25.0 2018-11-26 22:31:07 -08:00
Dan Gohman
c17579e7ec Bump version to 0.24.0 2018-11-26 22:18:36 -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
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
38e8667f97 Adjust whitespace to match the upstream exception text.
This is a whitespace-only change.
2018-11-07 16:07:51 -08:00
Benjamin Bouvier
b7f2acf0ea [build] Implement registers code generation in the Rust meta crate; 2018-11-06 13:12:17 -08:00
Benjamin Bouvier
4f2d7dd54f [build] Move Isa enum to the meta library; 2018-11-06 13:12:17 -08:00
Dan Gohman
0b769f5020 Use Display rather than having an explicit name() function for types.
This is more idiomatic Rust.
2018-10-30 11:45:35 +01:00
Boris-Chengbiao Zhou
b288c6001a Fix all clippy warnings (#564)
* Fix all clippy warnings

* Revert usage of inclusive ranges

* Remove redundant function argument

* Revert use of unavailable pointer methods

* Introduce ContiguousCaseRange
2018-10-22 21:52:35 -07:00
Dan Gohman
17a9631981 Use more Self keywords instead of repeating the type name. 2018-10-05 16:40:50 -07:00
Benjamin Bouvier
0b3d3ac880 Remove logging levels restrictions (#538)
* Fixes #537: Remove release mode logging levels restrictions;

* Add information about log's logging levels in the README;
2018-10-02 10:45:23 -07:00
Dan Gohman
ab99720959 Bump version to 0.22.0 2018-09-21 21:39:41 -07:00
Dan Gohman
b4c7451ae5 Bump version to 0.21.1 2018-09-10 10:00:45 -07:00
Dan Gohman
e8878ba504 Bump version to 0.21.0 2018-09-04 22:04:22 -07:00
Dan Gohman
7fa0a38793 Bump version to 0.20.0 2018-08-28 16:37:52 -07:00
Dan Gohman
6a07c72867 Bump version to 0.19.0 2018-08-14 12:55:34 -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
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
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
data-pup
d9d40e1cdf lib/codegen-meta moved into lib/codegen. (#423)
* lib/codegen-meta moved into lib/codegen.

* Renamed codegen-meta and existing meta.
2018-07-31 07:56:26 -07:00
Dan Gohman
15520fa961 Enable a few more clippy lints. 2018-07-26 10:10:36 -07:00
Dan Gohman
2db2d946b8 Support the rustc in the latest Ubuntu LTS.
At this time, this is Bionic, with Rust 1.25.0.
2018-07-13 16:26:21 -07:00
Dan Gohman
f4dbd38a4c Rename Cretonne to Cranelift! 2018-07-13 09:15:16 -07:00
Benjamin Bouvier
7204026bc8 Don't display stderr for the testing command in check.sh's runif;
And remove an obsolete comment in check-clippy.sh.
2018-07-11 13:47:25 -07:00
Benjamin Bouvier
bcc268a3cd [clippy] Fix a few clippy issues in lib/codegen/;
- don't generate "&& true" when generating instruction eq() fn;
- use more Self;
- use subsec_millis instead of subsec_nanos and divide;
- coalesce two ifs;
2018-07-11 13:47:25 -07:00
Amanieu d'Antras
5c7aeb46dd Make InstructionData comparable and hashable (#388)
* Don't implement Eq and Hash for EntityList

* Generate eq and hash methods for InstructionData

* Use the eq() and hash() methods of InstructionData in simple_gvn
2018-07-06 12:09:20 -07:00
bjorn3
4f352fa6f1 s/uextend/sextend/ for sload* (#390) 2018-07-06 12:05:01 -07:00
bjorn3
5db45d26cc Legalize several i8 insts (#380)
* Legalize several i8 insts

* X86: implement regmove.{i8,i16}

* Legalize bnot

* Remove comments

* Nicer type param binding in legalize.py

* Legalize sdiv_imm.i8

* Hopefully fix mypy error

* Add missing trailing newlines

* Fix tests
2018-07-04 06:31:00 -07:00
Dan Gohman
632bbf2008 Permit {s,u}{div,rem}_imm instructions to be potentially trapping.
The documentation for these instructions suggests that immediate values
which could lead to trapping should be invalid.

While it seems nice to have these instructions be always non-trapping,
it's also nice to say that the `_imm` forms of instructions are
interchangeable with the corresponding non-`_imm` forms accompanied
by `iconst` instructions.
2018-07-02 22:44:25 -07:00
Dan Gohman
276ba8b97d Support systems which don't have a "python" command. (#386)
Add support for finding an appropriate python command on systems which
don't have "python". Try "python3" and "python2.7".

Fixed #381.
2018-07-02 13:02:00 -07:00
Dan Gohman
8f3c49bc6c Update more references to "global variables".
This continues the transition to "global values", which aren't
implicitly dereferenced.
2018-06-28 12:52:51 -07:00
Dan Gohman
99b9b96eee Pop and fill don't trigger StackOverflow. (#365) 2018-06-28 12:47:13 -07:00
Dan Gohman
c5aad1eb5f Add support for macho relocations. (#378)
This requires splitting X86PCRel4 into two separate relocations, to
distinguish the case where the instruction is a call, as Mach-O uses a
different relocation in that case.

This also makes it explicit that only x86-64 relocations are supported
currently.
2018-06-28 10:15:10 -07:00
Dan Gohman
7d2b44289c Implement stack_addr, stack_load, stack_store for x86-64. (#370) 2018-06-26 06:15:21 -07:00
Dan Gohman
47a96641f9 Rename the memflags operand name from Flags to MemFlags.
This reduces confusion with other kinds of flags.
2018-06-19 14:12:52 -07:00
Lachlan Sneff
3686fc2fc7 Fix typos caused by find-and-replace 2018-06-15 18:33:30 -07:00
Lachlan Sneff
5c320a0d30 Change GlobalVar to GlobalValue 2018-06-15 18:33:30 -07:00
Sergey Pepyakin
399860e2aa Encode bnot on x86. 2018-06-12 11:54:23 -07:00
Dan Gohman
1b55a2d005 Rename more Error and Result types. 2018-06-12 05:02:25 -07:00
Dan Gohman
967da59181 Fix shellcheck warnings in shell scripts. 2018-06-12 05:02:25 -07:00
Sergey Pepyakin
e9111d1de2 Ditch stack_check instruction 2018-06-09 13:18:12 -07:00