Path: blob/main/cranelift/codegen/shared/src/constants.rs
1692 views
//! This module contains constants that are shared between the codegen and the meta crate, so they1//! are kept in sync.23// Numbering scheme for value types:4//5// 0: Void6// 0x01-0x6f: Special types7// 0x70-0x7d: Lane types8// 0x7e-0x7f: Reference types9// 0x80-0xff: Vector types10// 0x100-0x17f: Dynamic Vector types11//12// Vector types are encoded with the lane type in the low 4 bits and log2(lanes)13// in the next highest 4 bits, giving a range of 2-256 lanes.1415// Dynamic vector types are encoded similarly.1617/// Start of the lane types.18pub const LANE_BASE: u16 = 0x70;1920/// Base for reference types.21pub const REFERENCE_BASE: u16 = 0x7E;2223/// Start of the 2-lane vector types.24pub const VECTOR_BASE: u16 = 0x80;2526/// Start of the dynamic vector types.27pub const DYNAMIC_VECTOR_BASE: u16 = 0x100;282930