emit_arm64_data_processing: Fix flags issue in Add32 overflow variant

This commit is contained in:
Merry 2023-01-19 19:51:07 +00:00
parent 33fa44acf6
commit ba42318ab2

View file

@ -898,6 +898,7 @@ static void EmitAddSub(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst*
auto Rb = ctx.reg_alloc.ReadReg<bitsize>(args[1]); auto Rb = ctx.reg_alloc.ReadReg<bitsize>(args[1]);
auto Woverflow = ctx.reg_alloc.WriteW(overflow_inst); auto Woverflow = ctx.reg_alloc.WriteW(overflow_inst);
ctx.reg_alloc.SpillFlags();
RegAlloc::Realize(Rresult, Ra, Rb, Woverflow); RegAlloc::Realize(Rresult, Ra, Rb, Woverflow);
code.ADDS(Rresult, *Ra, Rb); code.ADDS(Rresult, *Ra, Rb);