Update paths for the meta => meta-python rename.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Runtime support for precomputed constant hash tables.
|
||||
//!
|
||||
//! The `lib/codegen/meta/constant_hash.py` Python module can generate constant hash tables using
|
||||
//! The `lib/codegen/meta-python/constant_hash.py` Python module can generate constant hash tables using
|
||||
//! open addressing and quadratic probing. The hash tables are arrays that are guaranteed to:
|
||||
//!
|
||||
//! - Have a power-of-two size.
|
||||
@@ -56,7 +56,7 @@ pub fn probe<K: Copy + Eq, T: Table<K> + ?Sized>(
|
||||
}
|
||||
|
||||
/// A primitive hash function for matching opcodes.
|
||||
/// Must match `lib/codegen/meta/constant_hash.py`.
|
||||
/// Must match `lib/codegen/meta-python/constant_hash.py`.
|
||||
pub fn simple_hash(s: &str) -> usize {
|
||||
let mut h: u32 = 5381;
|
||||
for c in s.chars() {
|
||||
@@ -71,7 +71,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn basic() {
|
||||
// c.f. `meta/constant_hash.py` tests.
|
||||
// c.f. `meta-python/constant_hash.py` tests.
|
||||
assert_eq!(simple_hash("Hello"), 0x2fa70c01);
|
||||
assert_eq!(simple_hash("world"), 0x5b0c31d5);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ pub trait InstBuilderBase<'f>: Sized {
|
||||
fn build(self, data: InstructionData, ctrl_typevar: Type) -> (Inst, &'f mut DataFlowGraph);
|
||||
}
|
||||
|
||||
// Include trait code generated by `lib/codegen/meta/gen_instr.py`.
|
||||
// Include trait code generated by `lib/codegen/meta-python/gen_instr.py`.
|
||||
//
|
||||
// This file defines the `InstBuilder` trait as an extension of `InstBuilderBase` with methods per
|
||||
// instruction format and per opcode.
|
||||
|
||||
@@ -28,7 +28,7 @@ pub type ValueList = entity::EntityList<Value>;
|
||||
/// Memory pool for holding value lists. See `ValueList`.
|
||||
pub type ValueListPool = entity::ListPool<Value>;
|
||||
|
||||
// Include code generated by `lib/codegen/meta/gen_instr.py`. This file contains:
|
||||
// Include code generated by `lib/codegen/meta-python/gen_instr.py`. This file contains:
|
||||
//
|
||||
// - The `pub enum InstructionFormat` enum with all the instruction formats.
|
||||
// - The `pub enum InstructionData` enum with all the instruction data fields.
|
||||
|
||||
@@ -24,13 +24,13 @@ pub struct Type(u8);
|
||||
/// a SIMD vector.
|
||||
pub const VOID: Type = Type(0);
|
||||
|
||||
/// Start of the lane types. See also `meta/cdsl.types.py`.
|
||||
/// Start of the lane types. See also `meta-python/cdsl.types.py`.
|
||||
const LANE_BASE: u8 = 0x70;
|
||||
|
||||
/// Start of the 2-lane vector types.
|
||||
const VECTOR_BASE: u8 = LANE_BASE + 16;
|
||||
|
||||
// Include code generated by `lib/codegen/meta/gen_types.py`. This file contains constant
|
||||
// Include code generated by `lib/codegen/meta-python/gen_types.py`. This file contains constant
|
||||
// definitions for all the scalar types as well as common vector types for 64, 128, 256, and
|
||||
// 512-bit SIMD vectors.
|
||||
include!(concat!(env!("OUT_DIR"), "/types.rs"));
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use settings::{self, detail, Builder};
|
||||
use std::fmt;
|
||||
|
||||
// Include code generated by `lib/codegen/meta/gen_settings.py`. This file contains a public
|
||||
// Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
|
||||
// `Flags` struct with an impl for all of the settings defined in
|
||||
// `lib/codegen/meta/isa/arm32/settings.py`.
|
||||
// `lib/codegen/meta-python/isa/arm32/settings.py`.
|
||||
include!(concat!(env!("OUT_DIR"), "/settings-arm32.rs"));
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use settings::{self, detail, Builder};
|
||||
use std::fmt;
|
||||
|
||||
// Include code generated by `lib/codegen/meta/gen_settings.py`. This file contains a public
|
||||
// Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
|
||||
// `Flags` struct with an impl for all of the settings defined in
|
||||
// `lib/codegen/meta/isa/arm64/settings.py`.
|
||||
// `lib/codegen/meta-python/isa/arm64/settings.py`.
|
||||
include!(concat!(env!("OUT_DIR"), "/settings-arm64.rs"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Support types for generated encoding tables.
|
||||
//!
|
||||
//! This module contains types and functions for working with the encoding tables generated by
|
||||
//! `lib/codegen/meta/gen_encoding.py`.
|
||||
//! `lib/codegen/meta-python/gen_encoding.py`.
|
||||
|
||||
use constant_hash::{probe, Table};
|
||||
use ir::{Function, InstructionData, Opcode, Type};
|
||||
@@ -164,10 +164,10 @@ where
|
||||
/// Encoding lists are represented as sequences of u16 words.
|
||||
pub type EncListEntry = u16;
|
||||
|
||||
/// Number of bits used to represent a predicate. c.f. `meta/gen_encoding.py`.
|
||||
/// Number of bits used to represent a predicate. c.f. `meta-python/gen_encoding.py`.
|
||||
const PRED_BITS: u8 = 12;
|
||||
const PRED_MASK: usize = (1 << PRED_BITS) - 1;
|
||||
/// First code word representing a predicate check. c.f. `meta/gen_encoding.py`.
|
||||
/// First code word representing a predicate check. c.f. `meta-python/gen_encoding.py`.
|
||||
const PRED_START: usize = 0x1000;
|
||||
|
||||
/// An iterator over legal encodings for the instruction.
|
||||
|
||||
@@ -17,19 +17,19 @@ pub type RegUnit = u16;
|
||||
/// The size of this type is determined by the target ISA that has the most register units defined.
|
||||
/// Currently that is arm32 which has 64+16 units.
|
||||
///
|
||||
/// This type should be coordinated with meta/cdsl/registers.py.
|
||||
/// This type should be coordinated with meta-python/cdsl/registers.py.
|
||||
pub type RegUnitMask = [u32; 3];
|
||||
|
||||
/// A bit mask indexed by register classes.
|
||||
///
|
||||
/// The size of this type is determined by the ISA with the most register classes.
|
||||
///
|
||||
/// This type should be coordinated with meta/cdsl/isa.py.
|
||||
/// This type should be coordinated with meta-python/cdsl/isa.py.
|
||||
pub type RegClassMask = u32;
|
||||
|
||||
/// Guaranteed maximum number of top-level register classes with pressure tracking in any ISA.
|
||||
///
|
||||
/// This can be increased, but should be coordinated with meta/cdsl/isa.py.
|
||||
/// This can be increased, but should be coordinated with meta-python/cdsl/isa.py.
|
||||
pub const MAX_TRACKED_TOPRCS: usize = 4;
|
||||
|
||||
/// The register units in a target ISA are divided into disjoint register banks. Each bank covers a
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
use settings::{self, detail, Builder};
|
||||
use std::fmt;
|
||||
|
||||
// Include code generated by `lib/codegen/meta/gen_settings.py`. This file contains a public
|
||||
// Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
|
||||
// `Flags` struct with an impl for all of the settings defined in
|
||||
// `lib/codegen/meta/isa/riscv/settings.py`.
|
||||
// `lib/codegen/meta-python/isa/riscv/settings.py`.
|
||||
include!(concat!(env!("OUT_DIR"), "/settings-riscv.rs"));
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
use settings::{self, detail, Builder};
|
||||
use std::fmt;
|
||||
|
||||
// Include code generated by `lib/codegen/meta/gen_settings.py`. This file contains a public
|
||||
// Include code generated by `lib/codegen/meta-python/gen_settings.py`. This file contains a public
|
||||
// `Flags` struct with an impl for all of the settings defined in
|
||||
// `lib/codegen/meta/isa/x86/settings.py`.
|
||||
// `lib/codegen/meta-python/isa/x86/settings.py`.
|
||||
include!(concat!(env!("OUT_DIR"), "/settings-x86.rs"));
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -110,7 +110,7 @@ pub fn legalize_function(func: &mut ir::Function, cfg: &mut ControlFlowGraph, is
|
||||
}
|
||||
|
||||
// Include legalization patterns that were generated by `gen_legalizer.py` from the `XForms` in
|
||||
// `lib/codegen/meta/base/legalize.py`.
|
||||
// `lib/codegen/meta-python/base/legalize.py`.
|
||||
//
|
||||
// Concretely, this defines private functions `narrow()`, and `expand()`.
|
||||
include!(concat!(env!("OUT_DIR"), "/legalizer.rs"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Predicate functions for testing instruction fields.
|
||||
//!
|
||||
//! This module defines functions that are used by the instruction predicates defined by
|
||||
//! `lib/codegen/meta/cdsl/predicates.py` classes.
|
||||
//! `lib/codegen/meta-python/cdsl/predicates.py` classes.
|
||||
//!
|
||||
//! The predicates the operate on integer fields use `Into<i64>` as a shared trait bound. This
|
||||
//! bound is implemented by all the native integer types as well as `Imm64`.
|
||||
|
||||
@@ -310,8 +310,9 @@ pub mod detail {
|
||||
}
|
||||
}
|
||||
|
||||
// Include code generated by `meta/gen_settings.py`. This file contains a public `Flags` struct
|
||||
// with an impl for all of the settings defined in `lib/codegen/meta/base/settings.py`.
|
||||
// Include code generated by `meta-python/gen_settings.py`. This file contains a public `Flags`
|
||||
// struct with an impl for all of the settings defined in
|
||||
// `lib/codegen/meta-python/base/settings.py`.
|
||||
include!(concat!(env!("OUT_DIR"), "/settings.rs"));
|
||||
|
||||
/// Wrapper containing flags and optionally a `TargetIsa` trait object.
|
||||
|
||||
Reference in New Issue
Block a user