fn emit_signed_cvt(
    sink: &mut MachBuffer<Inst>,
    info: &EmitInfo,
    state: &mut EmitState,
    src: Reg,
    dst: Writable<Reg>,
    to_f64: bool,
) {
    // Handle an unsigned int, which is the "easy" case: a signed conversion will do the
    // right thing.
    let op = if to_f64 {
        SseOpcode::Cvtsi2sd
    } else {
        SseOpcode::Cvtsi2ss
    };
    let inst = Inst::gpr_to_xmm(op, RegMem::reg(src), OperandSize::Size64, dst);
    inst.emit(sink, info, state);
}
/// A small helper to generate a signed conversion instruction.
A small helper to generate a signed conversion instruction.
A small helper to generate a signed conversion instruction .
fn emit_signed_cvt(
    sink: &mut MachBuffer<Inst>,
    info: &EmitInfo,
    state: &mut EmitState,
    src: Reg,
    dst: Writable<Reg>,
    to_f64: bool,
) {
    // Handle an unsigned int, which is the "easy" case: a signed conversion will do the
    // right thing.
    let op = if to_f64 {
        SseOpcode::Cvtsi2sd
    } else {
        SseOpcode::Cvtsi2ss
    };
    let inst = Inst::gpr_to_xmm(op, RegMem::reg(src), OperandSize::Size64, dst);
    inst.emit(sink, info, state);
}
fn emit_signed_cvt ( sink : & mut MachBuffer < Inst > , info : & EmitInfo , state : & mut EmitState , src : Reg , dst : Writable < Reg > , to_f64 : bool , ) { // Handle an unsigned int, which is the "easy" case: a signed conversion will do the // right thing. let op = if to_f64 { SseOpcode :: Cvtsi2sd } else { SseOpcode :: Cvtsi2ss } ; let inst = Inst :: gpr_to_xmm ( op , RegMem :: reg ( src ) , OperandSize :: Size64 , dst ) ; inst . emit ( sink , info , state ) ; }
A small helper to generate a signed conversion instruction.
A small helper to generate a signed conversion instruction .
sink
&mut MachBuffer<Inst>
info
&EmitInfo
state
&mut EmitState
src
Reg
dst
Writable<Reg>
to_f64
bool
sink
&mut MachBuffer<Inst>
info
&EmitInfo
state
&mut EmitState
src
Reg
dst
Writable<Reg>
to_f64
bool