Fix BLR when the source reg is X30

This commit is contained in:
gdkchan 2018-11-09 13:28:48 -03:00
parent 44c1cf3fe5
commit e20e17e444

View file

@ -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);
}