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
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
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
Dan Gohman
ff5660624d
Clarify wording in a comment.
2018-07-02 22:44:50 -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
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
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
Dan Gohman
979162522e
Keep a comment in sync with the code.
2018-06-21 16:24:33 -07:00
Dan Gohman
593e2bae6c
Add timers for branch relaxation and instruction shrinking.
2018-06-21 16:18:34 -07:00
Dan Gohman
d209137149
Rename TargetIsa's emit_function to emit_function_to_memory.
...
This reflects the fact that it takes a concrete `MemoryCodeSink` rather than
a `CodeSink` trait object.
2018-06-21 15:50:29 -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
Dan Gohman
0349270b58
Bump version to 0.12.0
2018-06-16 07:50:27 -07:00
Lachlan Sneff
b3c3ca331b
Removed implicit indirection when computing heap base. ( #363 )
...
Fix expected legalized heap_addr
2018-06-16 07:31:52 -07:00
Lachlan Sneff
f97ad59991
Fix breaking change
2018-06-15 18:33:30 -07:00
Lachlan Sneff
38ab82bcc0
Made changes for review
2018-06-15 18:33:30 -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
Dan Gohman
49cc693d64
Update to hashmap_core 0.1.7.
2018-06-15 10:35:13 -07:00
Dan Gohman
dfc7065252
Bump version to 0.11.0
2018-06-15 08:46:25 -07:00
Dan Gohman
1cab2f2d73
Remove an unneeded comment.
2018-06-13 07:41:39 -07:00
Dan Gohman
9542cab5ed
Bump version to 0.10.0
2018-06-12 12:29:59 -07:00
Sergey Pepyakin
399860e2aa
Encode bnot on x86.
2018-06-12 11:54:23 -07:00
Dan Gohman
a7813c4448
Update to target-lexicon 0.0.2.
...
This fixes compilation on rust 1.22.1.
2018-06-12 06:36:07 -07:00
Dan Gohman
1b55a2d005
Rename more Error and Result types.
2018-06-12 05:02:25 -07:00
Dan Gohman
6971ae1c26
Export CodegenError and CodegenResult at the top level.
...
Make cretonne-codegen's `result` module private, and instead just export
`CodegenError` and `CodegenResult` at the top level of the
cretonne-codegen crate. This makes them more consistent with Result and
Error types in other cretonne crates.
2018-06-12 05:02:25 -07:00
Dan Gohman
8a26a50475
Rename CtonError and CtonResult to CodegenError and CodegenResult.
2018-06-12 05:02:25 -07:00
Dan Gohman
02e34d1bf7
Make CtonError parameterized on the result type.
...
This makes it more consistent with other custom `Result` types.
2018-06-12 05:02:25 -07:00
Dan Gohman
13f22065a2
Rename verifier's Result and Error.
...
This provides consistency with similar types in other parts of
Cretonne, and avoids shadowing `Result` from the standard prelude.
2018-06-12 05:02:25 -07:00
Dan Gohman
ffe57d9051
Fix a typo in a comment.
2018-06-12 05:02:25 -07:00
Dan Gohman
de2a2fe418
Minor code cleanup.
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
Dan Gohman
0daa560368
Accept redundant alias definitions.
...
In the text format, allow aliases to be defined multiple times, as long
as they're always aliasing the same value.
write.rs is already emitting redundant aliases, because it emits them at
their uses, so this change allows the parser to be able to parse such
code.
2018-06-12 05:02:25 -07:00
Dan Gohman
00d7d3a774
Implement IntoIterator for PrimaryMap.
...
This makes iterating through a `PrimaryMap` more consistent with
iterating through a `Vec`.
2018-06-12 05:02:17 -07:00
Dan Gohman
fdf89edbfe
Fail loudly if a build.rs dependency path can't be printed.
2018-06-09 13:22:44 -07:00
Sergey Pepyakin
e4fe1db3b8
Assert that stack_limit is none.
2018-06-09 13:18:12 -07:00
Sergey Pepyakin
ddc8c91419
Displaying stack_limit
2018-06-09 13:18:12 -07:00
Sergey Pepyakin
73b6468d25
Parsing stack_limit
2018-06-09 13:18:12 -07:00
Sergey Pepyakin
effe770c5f
Add stack_limit global_var in Function
2018-06-09 13:18:12 -07:00