pub(crate) fn equals(ty: Type, from: RegMem, to: Writable<Reg>) -> Inst {
        match ty {
            types::I8X16 | types::B8X16 => Inst::xmm_rm_r(SseOpcode::Pcmpeqb, from, to),
            types::I16X8 | types::B16X8 => Inst::xmm_rm_r(SseOpcode::Pcmpeqw, from, to),
            types::I32X4 | types::B32X4 => Inst::xmm_rm_r(SseOpcode::Pcmpeqd, from, to),
            types::I64X2 | types::B64X2 => Inst::xmm_rm_r(SseOpcode::Pcmpeqq, from, to),
            types::F32X4 => {
                Inst::xmm_rm_r_imm(SseOpcode::Cmpps, from, to, FcmpImm::Equal.encode(), false)
            }
            types::F64X2 => {
                Inst::xmm_rm_r_imm(SseOpcode::Cmppd, from, to, FcmpImm::Equal.encode(), false)
            }
            _ => unimplemented!("unimplemented type for Inst::equals: {}", ty),
        }
    }
/// Choose which instruction to use for comparing two values for equality.
Choose which instruction to use for comparing two values for equality.
Choose which instruction to use for comparing two values for equality .
pub(crate) fn equals(ty: Type, from: RegMem, to: Writable<Reg>) -> Inst {
        match ty {
            types::I8X16 | types::B8X16 => Inst::xmm_rm_r(SseOpcode::Pcmpeqb, from, to),
            types::I16X8 | types::B16X8 => Inst::xmm_rm_r(SseOpcode::Pcmpeqw, from, to),
            types::I32X4 | types::B32X4 => Inst::xmm_rm_r(SseOpcode::Pcmpeqd, from, to),
            types::I64X2 | types::B64X2 => Inst::xmm_rm_r(SseOpcode::Pcmpeqq, from, to),
            types::F32X4 => {
                Inst::xmm_rm_r_imm(SseOpcode::Cmpps, from, to, FcmpImm::Equal.encode(), false)
            }
            types::F64X2 => {
                Inst::xmm_rm_r_imm(SseOpcode::Cmppd, from, to, FcmpImm::Equal.encode(), false)
            }
            _ => unimplemented!("unimplemented type for Inst::equals: {}", ty),
        }
    }
pub ( crate ) fn equals ( ty : Type , from : RegMem , to : Writable < Reg > ) -> Inst { match ty { types :: I8X16 | types :: B8X16 => Inst :: xmm_rm_r ( SseOpcode :: Pcmpeqb , from , to ) , types :: I16X8 | types :: B16X8 => Inst :: xmm_rm_r ( SseOpcode :: Pcmpeqw , from , to ) , types :: I32X4 | types :: B32X4 => Inst :: xmm_rm_r ( SseOpcode :: Pcmpeqd , from , to ) , types :: I64X2 | types :: B64X2 => Inst :: xmm_rm_r ( SseOpcode :: Pcmpeqq , from , to ) , types :: F32X4 => { Inst :: xmm_rm_r_imm ( SseOpcode :: Cmpps , from , to , FcmpImm :: Equal . encode ( ) , false ) } types :: F64X2 => { Inst :: xmm_rm_r_imm ( SseOpcode :: Cmppd , from , to , FcmpImm :: Equal . encode ( ) , false ) } _ => unimplemented ! ( " " ty ) , } }
Choose which instruction to use for comparing two values for equality.
Choose which instruction to use for comparing two values for equality .
ty
Type
from
RegMem
to
Writable<Reg>
ty
Type
from
RegMem
to
Writable<Reg>