diff --git a/ChocolArm64/Instructions/InstEmitFlow.cs b/ChocolArm64/Instructions/InstEmitFlow.cs index 7d0897cd..0e9f7cb0 100644 --- a/ChocolArm64/Instructions/InstEmitFlow.cs +++ b/ChocolArm64/Instructions/InstEmitFlow.cs @@ -72,11 +72,14 @@ namespace ChocolArm64.Instructions { OpCodeBReg64 op = (OpCodeBReg64)context.CurrOp; + context.EmitLdintzr(op.Rn); + context.EmitSttmp(); + context.EmitLdc_I(op.Position + 4); context.EmitStint(CpuThreadState.LrIndex); context.EmitStoreState(); - context.EmitLdintzr(op.Rn); + context.EmitLdtmp(); context.Emit(OpCodes.Ret); }