Skip to main content

emit_packed_arith

Function emit_packed_arith 

Source
pub fn emit_packed_arith(
    asm: &mut Asm,
    op: &MicroOp,
    xmm: impl Fn(Slot) -> Xmm,
    scratch: Xmm,
)
Expand description

Lower one straight-line float-arithmetic body op to its 2-wide PACKED form, computing dst = lhs OP rhs over both lanes. xmm(slot) maps a body slot to its assigned lane register; scratch is a free XMM for the awkward dst == rhs non-commutative case. SSE packed ops are 2-operand (x OP= y), so this materializes the 3-operand dst = lhs OP rhs form, never clobbering an operand it still needs. Loads/stores/LoadConst are handled by the loop driver, not here.