[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>
This commit is contained in:
Benjamin Bouvier
2019-06-24 16:48:31 +02:00
parent 4a6b88193e
commit 21aaf0c89f
13 changed files with 608 additions and 28 deletions

View File

@@ -804,7 +804,7 @@ pub fn define(insts: &InstructionGroup, immediates: &OperandKinds) -> TransformG
expand_flags.build_and_add_to(&mut groups);
// XXX The order of declarations unfortunately matters to be compatible with the Python code.
// TODO The order of declarations unfortunately matters to be compatible with the Python code.
// When it's all migrated, we can put this next to the narrow/expand build_and_add_to calls
// above.
widen.build_and_add_to(&mut groups);

View File

@@ -1,6 +1,6 @@
//! This module predefines all the Cranelift scalar types.
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum Bool {
/// 1-bit bool.
B1 = 1,
@@ -41,7 +41,7 @@ impl Iterator for BoolIterator {
}
}
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum Int {
/// 8-bit int.
I8 = 8,
@@ -79,7 +79,7 @@ impl Iterator for IntIterator {
}
}
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
pub enum Float {
F32 = 32,
F64 = 64,