fn output_to_const<C: LowerCtx<Inst>>(ctx: &mut C, out: InsnOutput) -> Option<u64> {
    if out.output > 0 {
        None
    } else {
        let inst_data = ctx.data(out.insn);
        if inst_data.opcode() == Opcode::Null {
            Some(0)
        } else {
            match inst_data {
                &InstructionData::UnaryImm { opcode: _, imm } => {
                    // Only has Into for i64; we use u64 elsewhere, so we cast.
                    let imm: i64 = imm.into();
                    Some(imm as u64)
                }
                &InstructionData::UnaryIeee32 { opcode: _, imm } => Some(imm.bits() as u64),
                &InstructionData::UnaryIeee64 { opcode: _, imm } => Some(imm.bits()),
                _ => None,
            }
        }
    }
}
/// Lower an instruction output to a 64-bit constant, if possible.
Lower an instruction output to a 64-bit constant, if possible.
Lower an instruction output to a 64 - bit constant if possible .
fn output_to_const<C: LowerCtx<Inst>>(ctx: &mut C, out: InsnOutput) -> Option<u64> {
    if out.output > 0 {
        None
    } else {
        let inst_data = ctx.data(out.insn);
        if inst_data.opcode() == Opcode::Null {
            Some(0)
        } else {
            match inst_data {
                &InstructionData::UnaryImm { opcode: _, imm } => {
                    // Only has Into for i64; we use u64 elsewhere, so we cast.
                    let imm: i64 = imm.into();
                    Some(imm as u64)
                }
                &InstructionData::UnaryIeee32 { opcode: _, imm } => Some(imm.bits() as u64),
                &InstructionData::UnaryIeee64 { opcode: _, imm } => Some(imm.bits()),
                _ => None,
            }
        }
    }
}
fn output_to_const < C : LowerCtx < Inst > > ( ctx : & mut C , out : InsnOutput ) -> Option < u64 > { if out . output > 0 { None } else { let inst_data = ctx . data ( out . insn ) ; if inst_data . opcode ( ) == Opcode :: Null { Some ( 0 ) } else { match inst_data { & InstructionData :: UnaryImm { opcode : _ , imm } => { // Only has Into for i64; we use u64 elsewhere, so we cast. let imm : i64 = imm . into ( ) ; Some ( imm as u64 ) } & InstructionData :: UnaryIeee32 { opcode : _ , imm } => Some ( imm . bits ( ) as u64 ) , & InstructionData :: UnaryIeee64 { opcode : _ , imm } => Some ( imm . bits ( ) ) , _ => None , } } } }
Lower an instruction output to a 64-bit constant, if possible.
Lower an instruction output to a 64 - bit constant if possible .
ctx
&mut C
out
InsnOutput
ctx
&mut C
out
InsnOutput