pub(crate) fn store(ty: Type, from_reg: Reg, to_addr: impl Into<SyntheticAmode>) -> Inst {
        let rc = from_reg.get_class();
        match rc {
            RegClass::I64 => {
                // Always store the full register, to ensure that the high bits are properly set
                // when doing a full reload.
                Inst::mov_r_m(8 /* bytes */, from_reg, to_addr)
            }
            RegClass::V128 => {
                let opcode = match ty {
                    types::F32 => SseOpcode::Movss,
                    types::F64 => SseOpcode::Movsd,
                    types::F32X4 => SseOpcode::Movups,
                    types::F64X2 => SseOpcode::Movupd,
                    _ if ty.is_vector() && ty.bits() == 128 => SseOpcode::Movdqu,
                    _ => unimplemented!("unable to store type: {}", ty),
                };
                Inst::xmm_mov_r_m(opcode, from_reg, to_addr)
            }
            _ => panic!("unable to generate store for register class: {:?}", rc),
        }
    }
/// Choose which instruction to use for storing a register value to memory.
Choose which instruction to use for storing a register value to memory.
Choose which instruction to use for storing a register value to memory .
pub(crate) fn store(ty: Type, from_reg: Reg, to_addr: impl Into<SyntheticAmode>) -> Inst {
        let rc = from_reg.get_class();
        match rc {
            RegClass::I64 => {
                // Always store the full register, to ensure that the high bits are properly set
                // when doing a full reload.
                Inst::mov_r_m(8 /* bytes */, from_reg, to_addr)
            }
            RegClass::V128 => {
                let opcode = match ty {
                    types::F32 => SseOpcode::Movss,
                    types::F64 => SseOpcode::Movsd,
                    types::F32X4 => SseOpcode::Movups,
                    types::F64X2 => SseOpcode::Movupd,
                    _ if ty.is_vector() && ty.bits() == 128 => SseOpcode::Movdqu,
                    _ => unimplemented!("unable to store type: {}", ty),
                };
                Inst::xmm_mov_r_m(opcode, from_reg, to_addr)
            }
            _ => panic!("unable to generate store for register class: {:?}", rc),
        }
    }
pub ( crate ) fn store ( ty : Type , from_reg : Reg , to_addr : impl Into < SyntheticAmode > ) -> Inst { let rc = from_reg . get_class ( ) ; match rc { RegClass :: I64 => { // Always store the full register, to ensure that the high bits are properly set // when doing a full reload. Inst :: mov_r_m ( 8 /* bytes */ , from_reg , to_addr ) } RegClass :: V128 => { let opcode = match ty { types :: F32 => SseOpcode :: Movss , types :: F64 => SseOpcode :: Movsd , types :: F32X4 => SseOpcode :: Movups , types :: F64X2 => SseOpcode :: Movupd , _ if ty . is_vector ( ) && ty . bits ( ) == 128 => SseOpcode :: Movdqu , _ => unimplemented ! ( " " ty ) , } ; Inst :: xmm_mov_r_m ( opcode , from_reg , to_addr ) } _ => panic ! ( " " rc ) , } }
Choose which instruction to use for storing a register value to memory.
Choose which instruction to use for storing a register value to memory .
ty
Type
from_reg
Reg
to_addr
impl Into<SyntheticAmode>
ty
Type
from_reg
Reg
to_addr
impl Into<SyntheticAmode>