Commit Graph

2829 Commits

Author SHA1 Message Date
Dan Gohman
8d0f34310f Convert top-level *.rst files to markdown.
These files don't use any Sphinx has that Markdown lacks, and Markdown
is more widely used and easier to edit.
2018-07-17 15:01:08 -07:00
Dan Gohman
4d5451ad11 Fix "Title overline too short." warnings in more *.rst files. 2018-07-17 14:45:01 -07:00
Dan Gohman
17db4e6be8 Add a LICENSE file to each crate.
The individual crates are published separately from the main repository
on crates.io. To ensure that a copy of the LICENSE file accompanies all
published copies of the code, give each crate its own LICENSE file.
2018-07-17 12:48:27 -07:00
Dan Gohman
a28a3c3ea9 Bump version to 0.15.0 2018-07-14 07:27:35 -07:00
Dan Gohman
eb98082155 Update to faerie 0.4.3.
This resolves conflicts when multiple versions of target-lexicon are
used at the same time.
2018-07-14 06:46:22 -07:00
Dan Gohman
753bb049f8 Fix "Title overline too short." warnings in *.rst files. 2018-07-13 17:23:23 -07:00
Dan Gohman
ff188042bb Update comments and formatting in test-all.sh and publish-all.sh.
In particular, we no longer use the Github Releases page, so remove the
comment about that.
2018-07-13 17:21:03 -07:00
Dan Gohman
fe1a69ac19 Simplify the README.rst entry on building Cretonne.
Include a mention of cargo workspaces, and briefly describe the
test-all.sh script.
2018-07-13 17:08:51 -07:00
Dan Gohman
96e43b366d Add more comments explaining .travis.yml contents. 2018-07-13 17:03:57 -07:00
Dan Gohman
8930cb1b5d Update dependency versions. 2018-07-13 16:34:34 -07:00
Dan Gohman
f833d25ad1 Add a comment mentioning why we're remaining at cpuid 3.x for now. 2018-07-13 16:34:34 -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
Lachlan Sneff
202e45c213 Fix broken build on no_std 2018-07-13 16:26:02 -07:00
Dan Gohman
262689908e Bump version to 0.14.0 2018-07-13 09:26:46 -07:00
Dan Gohman
401c872c52 Update more paths for the CraneStation/cranelift rename. 2018-07-13 09:22:15 -07:00
Dan Gohman
f4dbd38a4c Rename Cretonne to Cranelift! 2018-07-13 09:15:16 -07:00
Dan Gohman
19a636af96 Change Cretonne's license to "Apache-2.0 WITH LLVM-exception".
This adds the "LLVM-exception" to Cretonne's existing Apache-2.0
license.

https://spdx.org/licenses/LLVM-exception.html
2018-07-13 07:25:32 -07:00
Amanieu d'Antras
65ef4a7583 Add EntityList::from_slice to build a list from an existing slice 2018-07-12 09:05:46 -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
Benjamin Bouvier
0616a960d6 [clippy] A few fixes in module/src/module.rs;
- use Self more to indicate the current type;
- explicitly clone one Option;
- invert !is_none to is_some;
2018-07-11 13:47:25 -07:00
Benjamin Bouvier
25508ac66e [clippy] Pass more types by value;
wasmparser::Type is an enum, and there was one Location I missed.
2018-07-11 13:47:25 -07:00
Benjamin Bouvier
bea843519c [clippy] Return explicit unit values; 2018-07-11 13:47:25 -07:00
Benjamin Bouvier
26523fdf5c [clippy] Pass a few argument types by value, not by reference;
Since Location is basically just a usize, and wasmparser::Type is an
enum, and both are copiable, this passes them down by value instead of
by reference, as suggested by Clippy.
2018-07-10 06:11:30 -07:00
Benjamin Bouvier
b263a8344c [clippy] Use subsec_millis() instead of nanos and division; 2018-07-10 06:11:30 -07:00
Benjamin Bouvier
0ad7dbf689 [clippy] Remove unnecessary closures; 2018-07-10 06:11:30 -07:00
Dan Gohman
b616644495 Document that cretonne-module is an optional part of Cretonne. 2018-07-07 13:37:40 -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
Benjamin Bouvier
1987d4dba9 Reject with a plain text error when no ISA is defined with the wasm command; (#391)
And restructure code a bit to make it easier to understand.
2018-07-06 12:04:00 -07:00
Amanieu d'Antras
c6badde836 Update wabt to 0.4 (#389)
This fixes compilation on system with GCC 8.
2018-07-05 19:17:53 -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
Grégoire Geis
dd72b54eef Now diagnosing missing vmctx arguments (fixes #376) (#384)
* Now diagnosing missing vmctx arguments (fixes #376).

* Added filetest for fix of #376.

* Respect formatting rules in verifier/mod.rs.

* Added parameters for each use of vmctx in test files.

* Added comments on additions on vmctx verifications.
2018-07-03 20:59:32 -07:00
Grégoire Geis
e5014e0fff Made Capstone an optional dependency (fixes #382) (#383)
* Made Capstone an optional dependency (fixes #382).

* Introduced feature 'disas' for disassembly (related to #382).

* Made 'disas' a default feature in cretonne-tools.

* Fixed errors in src/compile.rs introduced by get_disassembler changes.

- Moves `use` statements before the function declaration.
- Returns an error if the disassembler cannot be found created.
2018-07-03 20:54:54 -07:00
Dan Gohman
ff5660624d Clarify wording in a comment. 2018-07-02 22:44:50 -07:00
Dan Gohman
4930ef8ba8 Remove srclocs from a regalloc testcase.
These aren't relevant to the testcase.
2018-07-02 22:44:30 -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
112ae6df56 Bump version to 0.13.0 2018-07-02 15:48:18 -07:00
Dan Gohman
b0cce6daec Update the documentation for the new adjust_sp_* instruction names.
`adjust_sp_imm` has been split into `adjust_sp_up_imm` and
`adjust_sp_down_imm`, and `adjust_sp_down` has been added.
2018-07-02 15:43:15 -07:00
Dan Gohman
d2d8b56ddb Fix test-no_std.sh to handle the case where topdir is ".".
Instead of using "cd $topdir" to get back to the top, use popd.
2018-07-02 15:17:14 -07:00
Dan Gohman
b17d1617ca Update to hashmap_core 0.1.8. 2018-07-02 15:09:30 -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
1074e2c755 Tidy up trailing whitespace. 2018-07-02 08:05:14 -07:00
Dan Gohman
7a55a107ae Say "Global Variable" when referring to the WebAssembly concept.
This helps avoid confusion between wasm global variables and cretonne
global values.
2018-07-02 08:05:01 -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
Caroline Cullen
7bed3426a7 Adds decoration to the verifier errors. (#375)
* Adds decoration to the verifier errors.

example:

function %bad(i32) fast {
ebb0(v0: i32):
    brnz.i32 v0, ebb1
    return
    ^~~~~~

verifier inst1: Internal return not allowed with return_at_end=1

ebb1:
    trapz.i32 v0, user6
    return
}

Fixes #68
2018-06-28 10:17:27 -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
cc94adca3b Update to the rustfmt in rust 1.27, which is now stable. (#377) 2018-06-26 13:06:16 -07:00
Dan Gohman
7d2b44289c Implement stack_addr, stack_load, stack_store for x86-64. (#370) 2018-06-26 06:15:21 -07:00