Return the address of the current instruction in EmitSynchronization
This commit is contained in:
parent
fc361f82a7
commit
841aa89581
1 changed files with 3 additions and 2 deletions
|
@ -498,7 +498,7 @@ namespace ARMeilleure.Translation
|
||||||
context.MarkLabel(lblEnd);
|
context.MarkLabel(lblEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void EmitSynchronization(EmitterContext context)
|
internal static void EmitSynchronization(ArmEmitterContext context)
|
||||||
{
|
{
|
||||||
long countOffs = NativeContext.GetCounterOffset();
|
long countOffs = NativeContext.GetCounterOffset();
|
||||||
|
|
||||||
|
@ -512,7 +512,8 @@ namespace ARMeilleure.Translation
|
||||||
Operand running = context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.CheckSynchronization)));
|
Operand running = context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.CheckSynchronization)));
|
||||||
context.BranchIfTrue(lblExit, running, BasicBlockFrequency.Cold);
|
context.BranchIfTrue(lblExit, running, BasicBlockFrequency.Cold);
|
||||||
|
|
||||||
context.Return(Const(0L));
|
OpCode op = context.CurrOp;
|
||||||
|
context.Return(op != null ? Const(op.Address) : Const(0L));
|
||||||
|
|
||||||
context.MarkLabel(lblNonZero);
|
context.MarkLabel(lblNonZero);
|
||||||
count = context.Subtract(count, Const(1));
|
count = context.Subtract(count, Const(1));
|
||||||
|
|
Loading…
Reference in a new issue