📄 icode.c
字号:
#endifvoidadd_ref_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_add_ref_const) if (HAVE_add_ref_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_add_ref_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); add_ref(dst, src, tmp); slot_freetmp(tmp); }}voidadd_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_add_long) lslot_lslot_lslot(dst, src, src2, HAVE_add_long, Tcomplex);#else add_int(LSLOT(dst), LSLOT(src), LSLOT(src2)); adc_int(HSLOT(dst), HSLOT(src), HSLOT(src2));#endif}#if defined(HAVE_add_long_const)voidadd_long_const(SlotInfo* dst, SlotInfo* src, jlong val){ if (HAVE_add_long_const_rangecheck(val)) { lslot_lslot_lconst(dst, src, val, HAVE_add_long_const, Tcomplex); } else { SlotInfo* tmp; slot_alloctmp(tmp); move_long_const(tmp, val); add_long(dst, src, tmp); slot_freetmp(tmp); }}#endif#if defined(HAVE_add_float)voidadd_float(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_add_float, Tcomplex);}#endif#if defined(HAVE_add_double)voidadd_double(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ lslot_lslot_lslot(dst, src, src2, HAVE_add_double, Tcomplex);}#endif#if defined(HAVE_sbc_int)voidsbc_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_sbc_int, Tcomplex);}#endifvoidsub_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_sub_int_const) if (HAVE_sub_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_sub_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); sub_int(dst, src, tmp); slot_freetmp(tmp); }}#if defined(HAVE_sub_int)voidsub_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_sub_int, Tcomplex);}#endifvoidsub_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_sub_long) lslot_lslot_lslot(dst, src, src2, HAVE_sub_long, Tcomplex);#else sub_int(LSLOT(dst), LSLOT(src), LSLOT(src2)); sbc_int(HSLOT(dst), HSLOT(src), HSLOT(src2));#endif}#if defined(HAVE_sub_long_const)voidsub_long_const(SlotInfo* dst, SlotInfo* src, jlong val){ if (HAVE_sub_long_const_rangecheck(val)) { lslot_lslot_lconst(dst, src, val, HAVE_sub_long_const, Tcomplex); } else { SlotInfo* tmp; slot_alloctmp(tmp); move_long_const(tmp, val); sub_long(dst, src, tmp); slot_freetmp(tmp); }}#endif#if defined(HAVE_sub_float)voidsub_float(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_sub_float, Tcomplex);}#endif#if defined(HAVE_sub_double)voidsub_double(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ lslot_lslot_lslot(dst, src, src2, HAVE_sub_double, Tcomplex);}#endifvoidmul_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_mul_int_const) if (HAVE_mul_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_mul_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); mul_int(dst, src, tmp); slot_freetmp(tmp); }}voidmul_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_mul_int) slot_slot_slot(dst, src, src2, HAVE_mul_int, Tcomplex);#else end_sub_block(); pusharg_int(src2, 1); pusharg_int(src, 0); call_soft(soft_mul); popargs(); start_sub_block(); return_int(dst);#endif}voidmul_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_mul_long) lslot_lslot_lslot(dst, src, src2, HAVE_mul_long, Tcomplex);#else end_sub_block(); pusharg_long(src2, pusharg_long_idx_inc); pusharg_long(src, 0); call_soft(soft_lmul); popargs(); start_sub_block(); return_long(dst);#endif}#if defined(HAVE_mul_long_const)voidmul_long_const(SlotInfo* dst, SlotInfo* src, jlong val){ if (HAVE_mul_long_const_rangecheck(val)) { lslot_lslot_lconst(dst, src, val, HAVE_mul_long_const, Tcomplex); } else { SlotInfo* tmp; slot_alloctmp(tmp); move_long_const(tmp, val); mul_long(dst, src, tmp); slot_freetmp(tmp); }}#endif#if defined(HAVE_mul_float)voidmul_float(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_mul_float, Tcomplex);}#endif#if defined(HAVE_mul_double)voidmul_double(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ lslot_lslot_lslot(dst, src, src2, HAVE_mul_double, Tcomplex);}#endifvoiddiv_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_div_int_const) if (HAVE_div_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_div_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); div_int(dst, src, tmp); slot_freetmp(tmp); }}voiddiv_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_div_int) slot_slot_slot(dst, src, src2, HAVE_div_int, Tcomplex);#else end_sub_block(); pusharg_int(src2, 1); pusharg_int(src, 0); call_soft(soft_div); popargs(); start_sub_block(); return_int(dst);#endif}voiddiv_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_div_long) lslot_lslot_lslot(dst, src, src2, HAVE_div_long, Tcomplex);#else end_sub_block(); pusharg_long(src2, pusharg_long_idx_inc); pusharg_long(src, 0); call_soft(soft_ldiv); popargs(); start_sub_block(); return_long(dst);#endif}voiddiv_float(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ used_ieee_division = true;#if defined(HAVE_div_float) slot_slot_slot(dst, src, src2, HAVE_div_float, Tcomplex);#else end_sub_block(); pusharg_float(src2, 1); pusharg_float(src, 0); call_soft(soft_fdiv); popargs(); start_sub_block(); return_float(dst);#endif}voiddiv_double(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ used_ieee_division = true;#if defined(HAVE_div_double) lslot_lslot_lslot(dst, src, src2, HAVE_div_double, Tcomplex);#else end_sub_block(); pusharg_double(src2, pusharg_long_idx_inc); pusharg_double(src, 0); call_soft(soft_fdivl); popargs(); start_sub_block(); return_double(dst);#endif}voidrem_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_rem_int_const) if (HAVE_rem_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_rem_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); rem_int(dst, src, tmp); slot_freetmp(tmp); }}voidrem_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_rem_int) slot_slot_slot(dst, src, src2, HAVE_rem_int, Tcomplex);#else end_sub_block(); pusharg_int(src2, 1); pusharg_int(src, 0); call_soft(soft_rem); popargs(); start_sub_block(); return_int(dst);#endif}voidrem_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_rem_long) lslot_lslot_lslot(dst, src, src2, HAVE_rem_long, Tcomplex);#else end_sub_block(); pusharg_long(src2, pusharg_long_idx_inc); pusharg_long(src, 0); call_soft(soft_lrem); popargs(); start_sub_block(); return_long(dst);#endif}voidrem_float(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ used_ieee_division = true; end_sub_block(); pusharg_float(src2, 1); pusharg_float(src, 0); call_soft(soft_frem); popargs(); start_sub_block(); return_float(dst);}voidrem_double(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ used_ieee_division = true; end_sub_block(); pusharg_double(src2, pusharg_long_idx_inc); pusharg_double(src, 0); call_soft(soft_freml); popargs(); start_sub_block(); return_double(dst);}voidneg_int(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_neg_int) slot_slot_slot(dst, 0, src, HAVE_neg_int, Tcomplex);#else SlotInfo* zero; slot_alloctmp(zero); move_int_const(zero, 0); sub_int(dst, zero, src); slot_freetmp(zero);#endif}#if defined(HAVE_ngc_int)voidngc_int(SlotInfo* dst, SlotInfo* src){ slot_slot_slot(dst, 0, src, HAVE_ngc_int, Tcomplex);}#endifvoidneg_long(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_neg_long) lslot_lslot_lslot(dst, 0, src, HAVE_neg_long, Tcomplex);#elif defined(HAVE_ngc_int) neg_int(LSLOT(dst), LSLOT(src)); ngc_int(HSLOT(dst), HSLOT(src));#elif defined(HAVE_sbc_int) SlotInfo* zero; slot_alloctmp(zero); move_int_const(zero, 0); sub_int(LSLOT(dst), zero, LSLOT(src)); sbc_int(HSLOT(dst), zero, HSLOT(src)); slot_freetmp(zero);#elif defined(HAVE_adc_int_const) neg_int(LSLOT(dst), LSLOT(src)); adc_int_const(HSLOT(dst), HSLOT(src), 0); neg_int(HSLOT(dst), HSLOT(dst));#else KAFFEVM_ABORT();#endif}voidneg_float(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_neg_float) slot_slot_slot(dst, NULL, src, HAVE_neg_float, Tcomplex);#else SlotInfo* zero; slot_alloctmp(zero); move_float_const(zero, 0); sub_float(dst, zero, src); slot_freetmp(zero);#endif}voidneg_double(SlotInfo* dst, SlotInfo* src){#if defined(HAVE_neg_double) lslot_lslot_lslot(dst, NULL, src, HAVE_neg_double, Tcomplex);#else SlotInfo* zero; slot_alloc2tmp(zero); move_double_const(zero, 0); sub_double(dst, zero, src); slot_free2tmp(zero);#endif}/* ----------------------------------------------------------------------- *//* Logical operators - and, or, etc. *//* */voidand_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_and_int_const) if (HAVE_and_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_and_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); and_int(dst, src, tmp); slot_freetmp(tmp); }}#if defined(HAVE_and_int)voidand_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_and_int, Tcomplex);}#endifvoidand_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_and_long) lslot_lslot_lslot(dst, src, src2, HAVE_and_long, Tcomplex);#else and_int(LSLOT(dst), LSLOT(src), LSLOT(src2)); and_int(HSLOT(dst), HSLOT(src), HSLOT(src2));#endif}voidand_long_const(SlotInfo* dst, SlotInfo* src, jlong val){#if defined(HAVE_and_long_const) if (HAVE_and_long_const_rangecheck(val)) { lslot_lslot_lconst(dst, src, val, HAVE_and_long_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_long_const(tmp, val); and_long(dst, src, tmp); slot_freetmp(tmp); }}voidor_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_or_int_const) if (HAVE_or_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_or_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); or_int(dst, src, tmp); slot_freetmp(tmp); }}#if defined(HAVE_or_int)voidor_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_or_int, Tcomplex);}#endifvoidor_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_or_long) lslot_lslot_lslot(dst, src, src2, HAVE_or_long, Tcomplex);#else or_int(LSLOT(dst), LSLOT(src), LSLOT(src2)); or_int(HSLOT(dst), HSLOT(src), HSLOT(src2));#endif}voidxor_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_xor_int_const) if (HAVE_xor_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_xor_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); xor_int(dst, src, tmp); slot_freetmp(tmp); }}#if defined(HAVE_xor_int)voidxor_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_xor_int, Tcomplex);}#endifvoidxor_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_xor_long) lslot_lslot_lslot(dst, src, src2, HAVE_xor_long, Tcomplex);#else xor_int(LSLOT(dst), LSLOT(src), LSLOT(src2)); xor_int(HSLOT(dst), HSLOT(src), HSLOT(src2));#endif}voidlshl_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_lshl_int_const) if (HAVE_lshl_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_lshl_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); lshl_int(dst, src, tmp); slot_freetmp(tmp); }}#if defined(HAVE_lshl_int)voidlshl_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){ slot_slot_slot(dst, src, src2, HAVE_lshl_int, Tcomplex);}#endif#if defined(HAVE_lshl_long_const)voidlshl_long_const(SlotInfo* dst, SlotInfo* src, jint val){ if (HAVE_lshl_long_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_lshl_long_const, Tcomplex); } else { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); lshl_int(dst, src, tmp); slot_freetmp(tmp); }}#endifvoidlshl_long(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){#if defined(HAVE_lshl_long) lslot_lslot_slot(dst, src, src2, HAVE_lshl_long, Tcomplex);#else end_sub_block(); pusharg_int(src2, pusharg_long_idx_inc); pusharg_long(src, 0); call_soft(soft_lshll); popargs(); start_sub_block(); return_long(dst);#endif}voidashr_int_const(SlotInfo* dst, SlotInfo* src, jint val){#if defined(HAVE_ashr_int_const) if (HAVE_ashr_int_const_rangecheck(val)) { slot_slot_const(dst, src, val, HAVE_ashr_int_const, Tcomplex); } else#endif { SlotInfo* tmp; slot_alloctmp(tmp); move_int_const(tmp, val); ashr_int(dst, src, tmp); slot_freetmp(tmp); }}#if defined(HAVE_ashr_int)voidashr_int(SlotInfo* dst, SlotInfo* src, SlotInfo* src2){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -