Commit Graph

200 Commits

Author SHA1 Message Date
Dan Gohman
3d89a8645b Fix rustfmt errors. 2018-08-16 15:26:53 -07:00
Dan Gohman
6a07c72867 Bump version to 0.19.0 2018-08-14 12:55:34 -07:00
Dan Gohman
cc4bf1c7fb Deny unstable_features in "std" builds. 2018-08-13 12:51:49 -07:00
Sergey Pepyakin
9dbfbbde10 Stack Limit as an Argument Purpose (#372)
* Initial approach.

* Move stack_limit check before opening the frame

* Account for GPRs and frame pointer in stack check

* Check stack_limit example.

* Remove stack_limit attribute code.

Amends #359

* fmt
2018-08-04 06:16:21 -07:00
Dan Gohman
cd02010a78 Bump version to 0.18.1 2018-08-02 20:10:23 -07:00
Dan Gohman
c4a056a7a0 Bump version to 0.18.0 2018-08-02 18:34:22 -07:00
Dan Gohman
1b30265c5c Define a "table" concept.
"Table" is to WebAssembly tables as "Heap" is to WebAssembly linear
memories.
2018-08-02 15:21:34 -07:00
Dan Gohman
cd75176f10 Update to the rustfmt in rust 1.28, which is now stable.
Also, rustfmt's --write-mode=check is now named --check.
2018-08-02 09:55:40 -07:00
Dan Gohman
c49c20713c Check for duplicate jump tables before performing any IR mutations.
This isn't fixing an actual bug, but it does make `add_jt` more
consistent with the other `add_*` functions.
2018-08-01 13:33:54 -07:00
Dan Gohman
1b42105faa Remove reserved_reg functionality. (#424)
* Remove reserved_reg functionality.

This wasn't implemented, and if we need it in the future, it seems like
it would be better to extend the concept of global values to cover this.

* Use GlobalValue::reserved_value() for sentinal values.
2018-07-31 07:57:37 -07:00
Aaron Power
13fea26c95 Correctly handle duplicate definitions 2018-07-28 11:48:13 -07:00
Dan Gohman
d6d1e7253d Bump version to 0.17.0 2018-07-23 16:57:51 -07:00
Dan Gohman
6cb03a873d Bump version to 0.17.0-alpha 2018-07-23 16:15:53 -07:00
Dan Gohman
c068721964 Bump version to 0.16.1 2018-07-18 13:33:15 -07:00
Dan Gohman
ce27b2a74f Bump version to 0.16.0 2018-07-17 15:49:04 -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
8930cb1b5d Update dependency versions. 2018-07-13 16:34:34 -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
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
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
Dan Gohman
112ae6df56 Bump version to 0.13.0 2018-07-02 15:48:18 -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
cc94adca3b Update to the rustfmt in rust 1.27, which is now stable. (#377) 2018-06-26 13:06:16 -07:00
Dan Gohman
603bb4ac02 Remove an obsolete comment. 2018-06-21 15:45:24 -07:00
Dan Gohman
0349270b58 Bump version to 0.12.0 2018-06-16 07:50:27 -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
dfc7065252 Bump version to 0.11.0 2018-06-15 08:46:25 -07:00
Dan Gohman
9542cab5ed Bump version to 0.10.0 2018-06-12 12:29:59 -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
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
Sergey Pepyakin
73b6468d25 Parsing stack_limit 2018-06-09 13:18:12 -07:00
Dan Gohman
944251260b Bump version to 0.9.0 2018-06-07 11:46:36 -07:00
Dan Gohman
f48c1d4f89 Update to target-lexicon 0.0.1 and faerie 0.4.1.
This fixes handling of custom targets.
2018-05-30 17:25:48 -07:00
Dan Gohman
4e67e08efd Use the target-lexicon crate.
This switches from a custom list of architectures to use the
target-lexicon crate.

 - "set is_64bit=1; isa x86" is replaced with "target x86_64", and
   similar for other architectures, and the `is_64bit` flag is removed
   entirely.

 - The `is_compressed` flag is removed too; it's no longer being used to
   control REX prefixes on x86-64, ARM and Thumb are separate
   architectures in target-lexicon, and we can figure out how to
   select RISC-V compressed encodings when we're ready.
2018-05-30 06:13:35 -07:00
Dan Gohman
a1fe0f82e1 Update to the latest stable rustfmt, 0.4.2-stable (febbb36 2018-04-12). 2018-05-29 10:37:38 -07:00
Dan Gohman
6b88cd44a8 Update to rustfmt-preview (#348)
* Update to rustfmt-preview.

* Run "cargo fmt --all" with rustfmt 0.4.1.

rustfmt 0.4.1 is the latest release of rustfmt-preview available on the
stable channel.

* Fix a long line that rustfmt 0.4.1 can't handle.

* Remove unneeded commas left behind by rustfmt.
2018-05-25 11:38:38 -07:00
Tyler McMullen
f636d795c5 load_complex and store_complex instructions (#309)
* Start adding the load_complex and store_complex instructions.

N.b.:
The text format is not correct yet. Requires changes to the lexer and parser.
I'm not sure why I needed to change the RuntimeError to Exception yet. Will fix.

* Get first few encodings of load_complex working. Still needs var args type checking.

* Clean up ModRM helper functions in binemit.

* Implement 32-bit displace for load_complex

* Use encoding helpers instead of doing them all by hand

* Initial implementation of store_complex

* Parse value list for load/store_complex with + as delimiter. Looks nice.

* Add sign/zero-extension and size variants for load_complex.

* Add size variants of store_complex.

* Add asm helper lines to load/store complex bin tests.

* Example of length-checking the instruction ValueList for an encoding. Extremely questionable implementation.

* Fix Python linting issues

* First draft of postopt pass to fold adds and loads into load_complex. Just simple loads for now.

* Optimization pass now works with all types of loads.

* Add store+add -> store_complex to postopt pass

* Put complex address optimization behind ISA flag.

* Add load/store complex for f32 and f64

* Fixes changes to lexer that broke NaN parsing.

Abstracts away the repeated checks for whether or not the characters
following a + or - are going to be parsed as a number or not.

* Fix formatting issues

* Fix register restrictions for complex addresses.

* Encoding tests for x86-32.

* Add documentation for newly added instructions, recipes, and cdsl changes.

* Fix python formatting again

* Apply value-list length predicates to all LoadComplex and StoreComplex instructions.

* Add predicate types to new encoding helpers for mypy.

* Import FieldPredicate to satisfy mypy.

* Add and fix some "asm" strings in the encoding tests.

* Line-up 'bin' comments in x86/binary64 test

* Test parsing of offset-less store_complex instruction.

* 'sNaN' not 'sNan'

* Bounds check the lookup for polymorphic typevar operand.

* Fix encodings for istore16_complex.
2018-05-09 14:07:00 -05:00
Dan Gohman
b4f9eb5e55 Bump versino to 0.8.0 2018-05-01 19:54:21 -07:00
Dan Gohman
94a883abae Make settings::Flags::new consume the Builder.
This makes it more clear what the relationship is between the Builder
and the resulting Flags.
2018-04-30 13:53:36 -07:00
Dan Gohman
f4fe438bae Suppress a warning about AsciiExt being deprecated.
We currently support versions of Rust which need this import, so
suppress the warning on versions of Rust which deprecated it.
2018-04-30 13:53:29 -07:00
Dan Gohman
525f01713b Bump version to 0.7.0 2018-04-27 06:10:15 -07:00
Dan Gohman
e356c742aa Bump version to 0.6.0 2018-04-23 14:35:23 -07:00
Dan Gohman
c5b15c2396 Refactor calling convention settings. (#304)
Add a calling-convention setting to the `Flags` used as part of the
`TargetIsa`. This allows Cretonne code that generates calls to use the
correct convention, such as when emitting libcalls during legalization
or when the wasm frontend is decoding functions. This setting can be
overridden per-function.

This also adds "fast", "cold", and "fastcall" conventions, with "fast"
as the new default. Note that "fast" and "cold" are not intended to be
ABI-compatible across Cretonne versions.

This will also ensure Windows users will get an `unimplemented!` rather
than silent calling-convention mismatches, which reflects the fact that
Windows calling conventions are not yet implemented.

This also renames SpiderWASM, which isn't camel-case, to Baldrdash,
which is, and which is also a more relevant name.
2018-04-22 21:35:18 -07:00
Dan Gohman
1ba468b230 Bump version to 0.5.1 2018-04-17 22:18:30 -07:00