inline function that is only called once

This commit is contained in:
Fabian 2022-11-05 21:27:40 -06:00
parent 7fb9654920
commit cdaf8dca3d

View file

@ -1754,16 +1754,7 @@ pub fn gen_getcf(ctx: &mut JitContext, negate: ConditionNegate) {
},
&Instruction::Other => {
gen_profiler_stat_increment(ctx.builder, profiler::stat::CONDITION_UNOPTIMISED);
gen_getcf_unoptimised(ctx);
if negate == ConditionNegate::True {
ctx.builder.eqz_i32();
}
},
}
}
pub fn gen_getcf_unoptimised(ctx: &mut JitContext) {
gen_get_flags_changed(ctx.builder);
let flags_changed = ctx.builder.tee_new_local();
ctx.builder.const_i32(FLAG_CARRY);
@ -1793,6 +1784,12 @@ pub fn gen_getcf_unoptimised(ctx: &mut JitContext) {
ctx.builder.block_end();
ctx.builder.free_local(sub_mask);
if negate == ConditionNegate::True {
ctx.builder.eqz_i32();
}
},
}
}
pub fn gen_getsf(ctx: &mut JitContext, negate: ConditionNegate) {