Nicolas B. Pierron
26cfbafb32
Add ebb macro to insert a new blocks in legalization output.
2019-09-24 15:55:58 +02:00
Nicolas B. Pierron
0c1f17d6dd
Add empty_vararg literal to generate jump instruction.
2019-09-24 15:55:58 +02:00
Nicolas B. Pierron
614fb7b526
Factor out the var_index function.
2019-09-24 15:55:58 +02:00
Benjamin Bouvier
f0244516c5
[meta] Make more things pub(crate) instead of pub;
...
This could help the compiler find unused fields/methods. It didn't find any
during this migration.
2019-09-23 14:42:20 +02:00
Benjamin Bouvier
c2587c9d61
[meta] Remove Literal's kind field;
2019-09-23 14:42:20 +02:00
Nick Fitzgerald
9b8e7b511e
tidy: Remove extra semicolons
...
These were causing compilation warnings.
2019-09-19 16:25:49 -07:00
Andy Wortman
99380fad1a
Use 'xor r, r' to set registers to 0 instead of mov ( #766 )
2019-09-16 16:35:55 +02:00
Andrew Brown
3dfc68afb1
Avoid extra register movement when lowering the x86 scalar_to_vector of a float value
2019-09-10 10:45:12 -07:00
bjorn3
ffa1e946a7
Fix compilation
2019-09-07 09:55:09 -07:00
bjorn3
67593d997b
Add b128 type to fix tests
2019-09-07 09:55:09 -07:00
bjorn3
fa9602df80
Legalize load.i128 and store.i128
2019-09-07 09:55:09 -07:00
bjorn3
0d5b87038a
Rustfmt
2019-09-07 09:55:09 -07:00
bjorn3
83ac6dd4d4
[meta] Add some Debug derives
2019-09-07 09:55:09 -07:00
bjorn3
a43a3a5e9f
[meta] Give a nicer error message when a legalization uses an incorrect number of arguments
2019-09-07 09:55:09 -07:00
bjorn3
c9a25abbc4
Basic i128 support
2019-09-07 09:55:09 -07:00
Benjamin Bouvier
660b8b28b8
[codegen] Add a pinned register that's entirely under the control of the user;
2019-09-06 16:18:27 +02:00
Benjamin Bouvier
d1d2e790b9
[meta] Morph a few pub into pub(crate), and remove dead code;
2019-09-06 15:47:20 +02:00
Benjamin Bouvier
1c28d43f00
[meta] Remove unused immfield index in the FormatField;
2019-09-05 17:55:03 +02:00
Benjamin Bouvier
38656cce35
[meta] Simplify and comment instruction building a bit;
2019-09-05 17:55:03 +02:00
Benjamin Bouvier
0acddc08ea
[meta] Split FormatBuilder::imm to avoid the extra Into<> parameter type;
2019-09-05 17:55:03 +02:00
Benjamin Bouvier
cd1b2c0af0
[meta] Try to use {prefix+number} when looking up a register by name;
...
This makes it possible to look up registers like r15 on x86.
2019-09-03 14:08:37 +02:00
Andrew Brown
6605f308b3
Fix static analysis warnings
2019-08-20 10:21:12 -07:00
Andrew Brown
d492cf7e0e
Avoid unnecessary lane calculations in codegen code
...
This refactor moves the calculation of the number of lanes to code closer to where the Instruction/BoundInstruction is bound.
2019-08-20 10:21:12 -07:00
Carmen Kwan
19257f80c1
Add reference types R32 and R64
...
-Add resumable_trap, safepoint, isnull, and null instructions
-Add Stackmap struct and StackmapSink trait
Co-authored-by: Mir Ahmed <mirahmed753@gmail.com >
Co-authored-by: Dan Gohman <sunfish@mozilla.com >
2019-08-16 11:35:16 -07:00
David Lattimore
383ce584ae
Fix an assertion that wasn't doing what it said
2019-08-05 15:22:10 +02:00
Andrew Brown
356e6dafe2
Allow CDSL instructions to bind to vector types
2019-07-16 17:07:44 -07:00
Benjamin Bouvier
d5b80b2803
[meta] Generate full documentation for instructions in InstBuilder;
2019-07-11 11:48:45 +02:00
Benjamin Bouvier
cd4c28ad97
[meta] Legalization: Unprefix some module paths to make code neater;
2019-07-09 10:56:50 +02:00
Benjamin Bouvier
4fef03f5f8
[meta] Legalization: remove spurious assert;
...
This assert was added when porting legalization from Python to Rust and
doesn't hold when we have derived type variables.
2019-07-09 10:56:50 +02:00
Benjamin Bouvier
21aaf0c89f
[meta] Add cdsl facilities for encodings and recipes;
...
Co-authored-by: Benjamin Bouvier <public@benj.me >
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com >
2019-07-05 11:38:51 +02:00
Benjamin Bouvier
4a6b88193e
[meta] Map global TransformGroup to local TransformGroup indices;
2019-07-04 16:38:28 +02:00
Benjamin Bouvier
1e42aac41a
[meta] Add new instruction predicates and the InstructionPredicateMap;
...
The latter helps deduplicating predicates during encodings and recipes
construction.
2019-07-04 16:38:28 +02:00
Benjamin Bouvier
ec5678ab7a
[meta] Add the ability to bind any type to an instruction;
2019-07-03 18:39:28 +02:00
Benjamin Bouvier
18fb87cd9c
[meta] Refactor instruction predicates to distinguish format and type checks;
...
Also add the instruction format name in format predicates, since they're
going to be used when generating encodings.
2019-07-03 18:39:28 +02:00
Benjamin Bouvier
f1d1d1e960
[meta] Uniquely number every instruction in the Rust crate;
2019-07-03 18:39:28 +02:00
Benjamin Bouvier
70f79d23bf
[meta] Make Builders build() instead of finish();
2019-05-29 14:05:01 +02:00
Benjamin Bouvier
d9277f249b
[meta] Introduce the InstructionGroupBuilder;
...
This follows the rest of the code base data structures, where we have a
mutable data structure builder; once the data structure is constructed,
it's immutable.
This also makes the definition of instructions easier, and it paves the
way for defining immediate variants.
2019-05-29 14:05:01 +02:00
Benjamin Bouvier
feb90e376a
[meta] Make Instruction name/doc Strings so they can be automatically generated;
2019-05-29 14:05:01 +02:00
Benjamin Bouvier
22a6823496
[meta] Rename cdsl/inst to cdsl/instructions;
2019-05-29 14:05:01 +02:00
Benjamin Bouvier
6935033c9e
[meta] Have bind() be a method of {Bound,}Instruction instead of a static method;
2019-05-23 14:31:00 +02:00
Benjamin Bouvier
724d1cd2a1
[meta] Rename ApplyTarget to InstSpec;
2019-05-23 14:31:00 +02:00
Benjamin Bouvier
a46b2d7173
[meta] Move ApplyTarget/bind to cdsl/inst;
2019-05-23 14:31:00 +02:00
Benjamin Bouvier
97ebaa6f37
Add Rust implementation and address review comments of #742 ;
2019-05-20 11:52:43 +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
1f21349c4b
[meta] Add CPU modes to the meta 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