fn emit_sub_u64(backend: &mut CodeGenerator, dest: &P<Value>, src: &P<Value>, val: u64) {
    if (val as i64) < 0 {
        emit_add_u64(backend, &dest, &src, (-(val as i64) as u64));
    } else if val == 0 {
        if dest.id() != src.id() {
            backend.emit_mov(&dest, &src);
        }
    } else if is_valid_arithmetic_imm(val) {
        let imm_shift = val > 4096;
        let imm_val = if imm_shift { val >> 12 } else { val };
        backend.emit_sub_imm(&dest, &src, imm_val as u16, imm_shift);
    } else {
        emit_mov_u64(backend, &dest, val);
        backend.emit_sub(&dest, &src, &dest);
    }
}
// Decrement the register by an immediate value
Decrement the register by an immediate value
Decrement the register by an immediate value
fn emit_sub_u64(backend: &mut CodeGenerator, dest: &P<Value>, src: &P<Value>, val: u64) {
    if (val as i64) < 0 {
        emit_add_u64(backend, &dest, &src, (-(val as i64) as u64));
    } else if val == 0 {
        if dest.id() != src.id() {
            backend.emit_mov(&dest, &src);
        }
    } else if is_valid_arithmetic_imm(val) {
        let imm_shift = val > 4096;
        let imm_val = if imm_shift { val >> 12 } else { val };
        backend.emit_sub_imm(&dest, &src, imm_val as u16, imm_shift);
    } else {
        emit_mov_u64(backend, &dest, val);
        backend.emit_sub(&dest, &src, &dest);
    }
}
fn emit_sub_u64 ( backend : & mut CodeGenerator , dest : & P < Value > , src : & P < Value > , val : u64 ) { if ( val as i64 ) < 0 { emit_add_u64 ( backend , & dest , & src , ( - ( val as i64 ) as u64 ) ) ; } else if val == 0 { if dest . id ( ) != src . id ( ) { backend . emit_mov ( & dest , & src ) ; } } else if is_valid_arithmetic_imm ( val ) { let imm_shift = val > 4096 ; let imm_val = if imm_shift { val >> 12 } else { val } ; backend . emit_sub_imm ( & dest , & src , imm_val as u16 , imm_shift ) ; } else { emit_mov_u64 ( backend , & dest , val ) ; backend . emit_sub ( & dest , & src , & dest ) ; } }
Decrement the register by an immediate value
Decrement the register by an immediate value
backend
&mut CodeGenerator
dest
&P<Value>
src
&P<Value>
val
u64
backend
&mut CodeGenerator
dest
&P<Value>
src
&P<Value>
val
u64