Commit Graph

1100 Commits

Author SHA1 Message Date
bjorn3
00cfe62380 Update README.md 2019-03-08 17:01:36 +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
bjorn3
b4608c02c7 Fixed test 2019-03-05 06:19:46 -08:00
Dan Gohman
395de457c0 Add more tests for emit_small_memset and emit_small_memcpy. (#1) 2019-03-05 06:19:46 -08:00
bjorn3
2d2b041766 Fix emit_small_memset 2019-03-05 06:19:46 -08:00
Benjamin Bouvier
a06d257253 Add a command to push a tag to the repository
The tag is named `v$version` and will thus appear in the tags/releases tabs of the repository, where we can add text explaining new features, API changes, etc.
2019-03-05 06:14:08 -08:00
Benjamin Bouvier
ec521088b7 Fixes #695: Reintroduce a workspace declaration to run all tests with cargo; 2019-03-05 06:10:38 -08:00
Yury Delendik
27b0933a4a Preserve global wasm module offset in SourceLoc. 2019-03-05 14:51:40 +01: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
Dan Gohman
2f2626f4b3 Remove the empty [workspace] declaration.
It doesn't appear to be needed; the crate directories having Cargo.toml
files appears to be sufficient.
2019-03-01 15:19:43 -08:00
Pat Hickey
d2894f9f45 cranelift-faerie: convert to use new extensible decl format
Bump faerie to 0.8.0 and goblin to 0.0.21.

* Preemptible linkages are now weak symbols
* Faerie will put read-only data in .rodata for elf
2019-02-26 08:52:18 -08: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
kryptan
83edf959f2 Fix link to issues in rustc.md 2019-02-25 10:20:30 +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
bjorn3
615499bae8 Remove define_function_peek_compiled 2019-02-15 17:22:26 +01: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
Dan Gohman
d2082abb73 Look for Cargo.toml files only in crate directories. 2019-02-06 21:37:05 -08:00
Rett Berg
084722a118 fix typos in cranelift-frontend/src/lib.rs 2019-02-06 20:31:01 -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
Lukas Bergdoll
54959cf5bb Fix link to cargo workspace documentation 2019-01-28 14:38:44 -08:00
Dan Gohman
45cd3f6193 Bump version to 0.28.0 2019-01-22 23:50:12 -08:00
Dan Gohman
6326140227 Fix legalization of bxor_imm. 2019-01-22 23:45:23 -08:00
Dan Gohman
c8febc1a37 Bump version to 0.27.0.
Major API-incompatible changes include:
 - Introduce TrapCode::UnreachableCodeReached, used for unreachable in wasm.
 - cranelift-wasm's `declare_signature` now takes its signature by value
 - cranelift-wasm's `declare_table_elements` `elems` parameter now takes a boxed slice
 - Remove cranelift-wasm's `ModuleEnvironment`'s `get_signature`,
   `get_num_func_imports`, `get_func_type`, and `get_global`.
2019-01-22 20:06:34 -08:00
Dan Gohman
06a072ead0 Mention wasmtime as a planned use. 2019-01-16 14:13:54 -08:00
Dan Gohman
aeb9161e2c Update no_std support for Rust 2018 Edition.
With Rust 2018 Edition, the `mod std` trick to alias `core` names to
`std` no longer works, so switch to just having the code use `core`
explicitly.

So instead, switch to just using `core::*` for things that in core.
This is more consistent with other Rust no_std code. And it allows
us to enable `no_std` mode unconditionally in the crates that support
it, which makes testing a little easier.

There actually three cases:

 - For things in std and also in core, like `cmp`: Just use them via
   `core::*`.

 - For things in std and also in alloc, like `Vec`: Import alloc as std, as
   use them from std. This allows them to work on both stable (which
   doesn't provide alloc, but we don't support no_std mode anyway) and
   nightly.

 - For HashMap and similar which are not in core or alloc, import them in
   the top-level lib.rs files from either std or the third-party hashmap_core
   crate, and then have the code use super::hashmap_core.

Also, no_std support continues to be "best effort" at this time and not
something most people need to be testing.
2019-01-14 21:48:15 -08:00
Dan Gohman
9eba81a8d9 Update clippy settings and fix a few clippy warnings. 2019-01-07 14:48:02 -08:00
Dan Gohman
7f250e340c Simplify ModuleEnvironment.
Remove some unneeded functions, and remove the `GlobalInit` special case
for data and elem initializer offsets; implementations that want that
information can provide it for themselves.
2019-01-07 13:42:00 -08:00
Benjamin Bouvier
c78a9a4a7c Bump log and file-per-thread-logger; 2019-01-03 12:14:39 -08:00
Dan Gohman
b096d0606b Move ifcmp, icmp_imm, and ffcmp into the CPU flags doc section. 2019-01-02 11:46:15 -08:00
Muhammad Mominul Huque
effe6c04e4 Update to Rust 2018 edition (#632)
* initial cargo fix run

* Upgrade cranelift-entity crate

* Upgrade bforest crate

* Upgrade the codegen crate

* Upgrade the faerie crate

* Upgrade the filetests crate

* Upgrade the codegen-meta crate

* Upgrade the frontend crate

* Upgrade the cranelift-module crate

* Upgrade the cranelift-native crate

* Upgrade the cranelift-preopt crate

* Upgrade the cranelift-reader crate

* Upgrade the cranelift-serde crate

* Upgrade the cranelift-simplejit crate

* Upgrade the cranelift or cranelift-umbrella crate

* Upgrade the cranelift-wasm crate

* Upgrade cranelift-tools crate

* Use new import style on remaining files

* run format-all.sh

* run test-all.sh, update Readme and travis ci configuration
fixed an AssertionError also

* Remove deprecated functions
2018-12-26 09:49:05 -08:00
Bruce Mitchener
4f8753fa11 Fix typos. 2018-12-24 10:03:22 -08:00
Dan Gohman
998a7d2b6d Mention Wasmtime as a complete implementation of the Environment traits. 2018-12-24 09:32:20 -08:00
Vincent Esche
c9666381f6 Fixed links in …/docs/compare-llvm.rst 2018-12-13 09:14:20 -05:00
Dan Gohman
c8e457e834 Bump version to 0.26.0 2018-12-11 12:54:23 -08:00
Dan Gohman
95a6a25db3 Update to pretty_env_logger 0.3.0. 2018-12-11 15:40:24 -05:00
Dan Gohman
a20c852148 Support heaps with no offset-guard pages.
Also, say "guard-offset pages" rather than just "guard pages" to describe the
region of a heap which is never accessible and which exists to support
optimizations for heap accesses with offsets.

And, introduce a `Uimm64` immediate type, and make all heap fields use
`Uimm64` instead of `Imm64` since they really are unsigned.
2018-12-11 15:40:24 -05:00
Benjamin Bouvier
93696a80bb Fixes #614: Implement a debug trap; 2018-12-10 14:14:04 -05:00
Dan Gohman
f065b39d65 Add Wasmtime as another example user of Cranelift. 2018-12-07 01:01:12 -05:00
Dan Gohman
5d7ece3d15 Fix clippy warning namespaces. 2018-12-06 20:50:38 -05:00