Commit Graph

1583 Commits

Author SHA1 Message Date
Benjamin Bouvier
86430abc4c [meta] Port all the Cranelift instructions to the meta crate; 2019-03-28 14:13:29 +01:00
Benjamin Bouvier
3c31eac48c [meta] Port Instruction/InstructionGroup to the Rust meta crate; 2019-03-28 14:13:29 +01:00
Benjamin Bouvier
d59bef1902 [meta] Port Formats and Operands to the Rust crate; 2019-03-27 14:43:27 +01:00
Benjamin Bouvier
146e0bd2f5 [meta] Port Typevar to the Rust crate; 2019-03-27 14:43:27 +01:00
Benjamin Bouvier
f3f449b45b [meta] Tweak generation of settings/registers; 2019-03-27 14:43:27 +01:00
Benjamin Bouvier
393b88af6e [meta] Implement UniqueTable in the Rust crate;
... and also rename the previously-named UniqueTable to UniqueSeqTable,
which is the name used in the Python code.
2019-03-27 14:43:27 +01:00
Benjamin Bouvier
72b0d26ee9 [meta] Add features to srcgen;
- Adds a compiler warning when the fmtln! macro isn't correctly used.
- Allow to add an empty line.
- Make the output of generated matches more beautiful, by having one
struct per line on the clause.
- Add a method to add match with doesn't read any data from fields.
- Make sure that the placeholder clause of a match is put at the end.
2019-03-27 14:43:27 +01:00
Benjamin Bouvier
68bda3a42d [meta-python] Fix typos; 2019-03-27 14:43:27 +01:00
Lars T Hansen
141ccb9e9d Add a --disasm option to clif-util wasm and compile (#713)
- Both the `wasm` and `compile` commands get this new subcommand, and it defaults to false.  This means that test runs with `wasm` can request disassembly (the main reason I am doing this) while test runs with `compile` now must request it, this changes current behavior.
- Switch to using context.compile_and_emit directly, and make the reloc and trap printers just accumulate output, not print it.  This allows us to factor the printing code into the disasm module.
2019-03-27 12:57:13 +01:00
Dan Gohman
82c6867155 Work around Cargo #4866. (#699)
* Work around Cargo build #4866.

This fixes #697.

* Rename "cargo4866workaround" to "core" per review feedback.
2019-03-26 11:28:39 -07:00
Dan Gohman
ec0b10cd34 Bump version to 0.30.0 2019-03-26 09:36:22 -07:00
Dan Gohman
6b854381bb Fix a documentation-comment warning. 2019-03-26 09:11:57 -07:00
Dan Gohman
975b7f2e8d Put a space between "//!" and "```". 2019-03-26 08:40:25 -07:00
Yury Delendik
5e12f4f2b8 Add missing use_srcloc in postopt and regalloc passes 2019-03-25 15:06:41 +01:00
Benjamin Bouvier
b7dfe8aaa6 Fix build warnings for cranelift-codegen tests; 2019-03-12 09:53:36 +01:00
Steffen Butzer
92b3987e54 windows/x64 call convention: only use XMM0 for float return values (#691) 2019-03-11 11:44:44 +01:00
bjorn3
75312a6456 Update faerie to 0.9.1 2019-03-08 17:01:36 +01:00
Dan Gohman
34aba7fe66 Bump version to 0.29.0 2019-03-05 06:36:34 -08:00
Steffen Butzer
2a519092a0 Use single index for param register allocation for windows callconv (… (#693)
* Use single index for param register allocation for windows callconv (#691)

The used registers depend entirely on the parameter index (1st, 2nd, 3rd, 4th, ... param)
and we cannot shift unused registers to other indexes, if they are not designated for
the use for that parameter index.
2019-03-05 12:17:41 +01:00
bjorn3
6267e1ded9 Implement sshr_imm.i8 (#687) 2019-02-25 19:04:32 +01:00
bjorn3
166c11af11 Fix global value colocated printing
It used to print `gv0 = colocated symbol u1:1` while cranelift-reader
expects `gv0 = symbol colocated u1:1`.
2019-02-25 18:01:05 +01:00
robojumper
851f125eda Fix bitrev intrinsic 2019-02-22 16:55:15 -08:00
Benjamin Bouvier
603d80615f [meta] Introduce the fmtln! macro to ease writing formatted strings; 2019-02-20 11:31:38 +01:00
Benjamin Bouvier
c8e09cb37f [meta] Use AsRef<str> to allow passing String or &str to Formatter functions; 2019-02-20 11:31:38 +01:00
YISH
90028a6d0d impl Ieee64::from(f64) and Ieee32::from(f32) 2019-02-19 14:03:21 -08:00
Benjamin Bouvier
a45b814de8 Fixes #13: Enable conditional compilation of ISAs through features; 2019-02-12 08:19:57 -08:00
Benjamin Bouvier
049f067168 [meta] Build registers with their own builder and immutably construct the TargetIsa; 2019-02-12 08:19:57 -08:00
Benjamin Bouvier
f78a61b998 [meta] Rename base/ to shared/ in the Rust meta crate; 2019-02-12 08:19:57 -08:00
Benjamin Bouvier
25fdda6134 [meta] Move source generation responsibility into the meta crate itself; 2019-02-12 08:19:57 -08:00
Benjamin Bouvier
afa4a749c5 Fix #666: Change the way we consider a block has been visited in relaxation;
This was previously using the following condition to decide that a block
hadn't been visited yet: either dest_offset is non-0 or the block isn't
the entry block. Unfortunately, this didn't work when the first block
would be non-empty but wouldn't generate code at all.

Since the original code would do at least one pass over the entire code,
the first pass that determines initial EBB offsets is done separately,
without considering branch relaxation. This ensures that all EBBs have
been visited and have correct initial offsets, and doesn't require a
special check to know whether an EBB has been visited or not.
2019-02-12 14:39:45 +01:00
Rett Berg
68479e6115 Clarify br_table
From comments in
https://github.com/CraneStation/cranelift/issues/101#issuecomment-461284555
2019-02-07 09:18:07 -08:00
Dan Gohman
9f9c306091 Fix indentation warnings reported by flake8. 2019-02-06 21:37:05 -08:00
lazypassion
747ad3c4c5 moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
2019-01-28 15:56:54 -08:00