use super::MemScope; #[derive(Clone)] pub enum ParsedOperand { Reg(Ident), RegOffset(Ident, i32), Imm(ImmediateValue), VecMember(Ident, u8), VecPack(Vec), } #[derive(Copy, Clone)] pub enum ImmediateValue { U64(u64), S64(i64), F32(f32), F64(f64), } #[derive(Copy, Clone, PartialEq, Eq)] pub enum StCacheOperator { Writeback, L2Only, Streaming, Writethrough, } #[derive(Copy, Clone, PartialEq, Eq)] pub enum LdCacheOperator { Cached, L2Only, Streaming, LastUse, Uncached, } #[derive(Copy, Clone)] pub enum ArithDetails { Integer(ArithInteger), Float(ArithFloat), } impl ArithDetails { pub fn type_(&self) -> super::ScalarType { match self { ArithDetails::Integer(t) => t.type_, ArithDetails::Float(arith) => arith.type_, } } } #[derive(Copy, Clone)] pub struct ArithInteger { pub type_: super::ScalarType, pub saturate: bool, } #[derive(Copy, Clone)] pub struct ArithFloat { pub type_: super::ScalarType, pub rounding: Option, pub flush_to_zero: Option, pub saturate: bool, } #[derive(Copy, Clone, PartialEq, Eq)] pub enum LdStQualifier { Weak, Volatile, Relaxed(MemScope), Acquire(MemScope), Release(MemScope), } #[derive(PartialEq, Eq, Copy, Clone)] pub enum RoundingMode { NearestEven, Zero, NegativeInf, PositiveInf, }