Benjamin Bouvier
a46b2d7173
[meta] Move ApplyTarget/bind to cdsl/inst;
2019-05-23 14:31:00 +02:00
Benjamin Bouvier
cbbb7a220e
[meta] Move x86 registers generation to their own file;
2019-05-22 10:55:02 +02:00
Benjamin Bouvier
92109f664c
[meta] Move x86 settings generation to their own file;
2019-05-22 10:55:02 +02:00
Nicolas B. Pierron
72b5487563
Add x86 encoding for rotr_imm and rotl_imm.
2019-05-20 11:56:56 +02:00
Benjamin Bouvier
97ebaa6f37
Add Rust implementation and address review comments of #742 ;
2019-05-20 11:52:43 +02:00
bjorn3
71a345e813
Legalize fcvt_from_u/sint.f32/f64.i8/i16
2019-05-20 11:52:43 +02:00
Julian Seward
91ec44acbf
Add extensive test cases for integer division-by-constant magic number generation.
...
This adds test cases to ensure, to a reasonably high degree of certainty, that
the magic-number generators `magic_u32`, `magic_s32`, `magic_u64` and
`magic_s64` work correctly. This is done by iterating through a large number
of `(n, d)` pairs, generating the magic numbers for `d`, interpreting the
magic numbers so as to perform the division, and comparing against the result
produced directly by the hardware. The distribution of numbers is arranged so
that particular emphasis is given to corner cases -- the range ends and
midpoints -- but also so that there is at least some cover for values away
from those areas. In total 50,148,000 tests are performed.
2019-05-17 12:33:07 +02:00
bjorn3
edd2bf12fd
Export ValueLocRange and DisplayFunctionAnnotations::default()
2019-05-15 09:18:45 +02:00
Yury Delendik
8f95c51730
Reconstruct locations of the original source variable
2019-05-09 00:35:44 -07:00
Benjamin Bouvier
d6059d4605
[meta] Use the Rust crate for settings generation;
2019-05-03 12:01:12 +02:00
Benjamin Bouvier
f335c5c56c
[meta] Small fixes in the settings generation;
2019-05-03 12:01:12 +02:00
Benjamin Bouvier
390cfb37da
[meta] Use named predicates for x86 settings in the Rust crate too;
...
And generate them using the same deterministic order that the Python
code uses.
2019-05-03 12:01:12 +02:00
Benjamin Bouvier
6a25354520
[meta-python] Use named predicates for x86 encodings instead of anonymous predicates;
...
And generate those in a deterministic order that the Rust crate can
reproduce easily.
2019-05-03 12:01:12 +02:00
Lars T Hansen
5cd0724fef
Clarify that FixedTied constraints are not Tied ( #756 )
...
* Clarify that FixedTied constraints are not Tied
2019-05-02 14:33:54 +02:00
Benjamin Bouvier
18a5386c08
Remove and reorganize IntCC/FloatCC imports to avoid a build warning;
2019-05-02 10:08:53 +02:00
Benjamin Bouvier
dca168f350
[meta] Switch to the Rust crate to generate legalizations and remove Python code;
2019-05-02 10:08:53 +02:00
Benjamin Bouvier
efdb7d86b3
Fixes #607 : Use a wrapping multiply when computing div/rem magic numbers; ( #757 )
2019-04-30 11:46:54 +02:00
Benjamin Bouvier
95e6fc9efc
Avoid inserting checks during div/rem legalization when the input is a constant immediate;
2019-04-25 16:58:41 +02:00
Benjamin Bouvier
e3e66acfb1
[meta] Generate legalizations in the Rust crate;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
1f21349c4b
[meta] Add CPU modes to the meta crate;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
d00e42ede3
[meta] Port shared and x86 legalizations to the Rust crate;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
494f3abf1d
[meta] Add type inference, transforms and AST helpers for legalization;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
dfb27c3402
[meta] Make TypeVar shareable and mutable;
...
... since its type set can change over time during type inference. Use a
Rc<RefCell> to achieve this.
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
b85146e945
[meta] Add helper methods and tests to TypeSet;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
e71ae7b02f
[meta] Add instruction predicates;
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
d92778a19e
[meta] Add Instruction helpers and change its representation to make it easily copiable;
...
- adds helpers used by other parts of the code
- allows cheap copies by having Instruction be a lightweight ref-cloned
wrapper of the actual instruction's content.
2019-04-25 11:44:56 +02:00
Benjamin Bouvier
6acf9be540
Refactor simple-preopt to make it slightly simpler to read;
...
- don't use camel case but snake casing;
- longer variable names;
- more whitespace;
- add/wrap comments;
2019-04-24 14:14:44 +02:00
Benjamin Bouvier
00429ebe99
[meta] Fix outdented_line in srcgen;
2019-04-24 10:47:26 +02:00
Benjamin Bouvier
d2d2cdcd78
[meta] Rejigger comments in cdsl/formats;
2019-04-24 10:47:26 +02:00
Benjamin Bouvier
faa9b25691
[meta-python] Simplify Var ctor since it never is given a typevar argument;
2019-04-24 10:47:26 +02:00
Benjamin Bouvier
b3a950b589
[meta] Fix condition codes in immediates;
2019-04-24 10:47:26 +02:00
Benjamin Bouvier
274415d5ee
Fixes #738 : Check ebbs used in jump tables in the verifier;
2019-04-17 15:37:27 +02:00
Tyler McMullen
3b1583ebb7
Style changes in response to code review.
2019-04-17 13:15:41 +02:00
Tyler McMullen
4d427d7c71
Remove old commented out code
2019-04-17 13:15:41 +02:00
Tyler McMullen
5596b5fadc
Address code review comments, simplifying some bits of branch_opt.
2019-04-17 13:15:41 +02:00
Tyler McMullen
402d0d9c83
Add comments to branch folding and reordering functions in simple_preopt.
2019-04-17 13:15:41 +02:00
Tyler McMullen
fd6940baaf
Switch branch order opt from brif/brff to br_icmp, as that's what frontends should produce.
2019-04-17 13:15:41 +02:00
Tyler McMullen
571b87414f
Switch ifcmp+brif folding to be icmp+brz folding, which is what frontends actually produce.
2019-04-17 13:15:41 +02:00
Tyler McMullen
67cc5aafec
Refactoring of branch ordering and zero-check optimization based on PR feedback.
2019-04-17 13:15:41 +02:00
Tyler McMullen
947130be81
Add branch order optimization to simple_preopt to encourage fallthroughs.
2019-04-17 13:15:41 +02:00
Tyler McMullen
57f087c9da
Add note to simple_preopt differentiating its use from the preopt crate.
2019-04-17 13:15:41 +02:00
Tyler McMullen
fc6876c68e
Fold 'ifcmp_imm' + 'brif' where imm is zero and cond is 'eq' or 'ne', into 'brz' or 'brnz'.
2019-04-17 13:15:41 +02:00
Benjamin Bouvier
9b156fd9bb
[meta] Use the Rust crate for opcodes/inst_builder code generation;
2019-04-09 15:42:28 +02:00
Benjamin Bouvier
b5595aadd2
[meta] Generate opcodes.rs/inst_builder.rs with the Rust crate;
2019-04-09 15:42:28 +02:00
Lars T Hansen
aa926e9097
Allow readonly nontrapping loads to be hoisted by licm ( #727 )
2019-04-09 11:40:23 +02:00
carolinecullen
0166d6507a
Adding comment about copying RiscV abi file into ARM32.
2019-04-08 17:06:08 -07:00
carolinecullen
8ab7170a07
Updated comments.
2019-04-08 17:06:08 -07:00
carolinecullen
72bc035d70
Beginnings of arm32 backend.
2019-04-08 17:06:08 -07:00
Philip Craig
b74b49f7c6
Fix x86-64 encoding of uextend.i64.i8
...
The non-REX encoding of movzbl requires one of the ABCD registers as input.
2019-04-08 05:50:59 -07:00
Benjamin Bouvier
84fede890c
[meta] Optimize the sequence table to use whole table suffix prefixing;
2019-04-05 11:59:09 -07:00