|
|
@@ -237,13 +237,6 @@ namespace ARMeilleure.Translation
|
|
|
|
|
|
Logger.StartPass(PassName.Translation);
|
|
|
|
|
|
- Counter<uint> counter = null;
|
|
|
-
|
|
|
- if (!context.HighCq)
|
|
|
- {
|
|
|
- EmitRejitCheck(context, out counter);
|
|
|
- }
|
|
|
-
|
|
|
EmitSynchronization(context);
|
|
|
|
|
|
if (blocks[0].Address != address)
|
|
|
@@ -251,7 +244,7 @@ namespace ARMeilleure.Translation
|
|
|
context.Branch(context.GetLabel(address));
|
|
|
}
|
|
|
|
|
|
- ControlFlowGraph cfg = EmitAndGetCFG(context, blocks, out Range funcRange);
|
|
|
+ ControlFlowGraph cfg = EmitAndGetCFG(context, blocks, out Range funcRange, out Counter<uint> counter);
|
|
|
|
|
|
ulong funcSize = funcRange.End - funcRange.Start;
|
|
|
|
|
|
@@ -322,8 +315,14 @@ namespace ARMeilleure.Translation
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private static ControlFlowGraph EmitAndGetCFG(ArmEmitterContext context, Block[] blocks, out Range range)
|
|
|
+ private static ControlFlowGraph EmitAndGetCFG(
|
|
|
+ ArmEmitterContext context,
|
|
|
+ Block[] blocks,
|
|
|
+ out Range range,
|
|
|
+ out Counter<uint> counter)
|
|
|
{
|
|
|
+ counter = null;
|
|
|
+
|
|
|
ulong rangeStart = ulong.MaxValue;
|
|
|
ulong rangeEnd = 0;
|
|
|
|
|
|
@@ -344,6 +343,11 @@ namespace ARMeilleure.Translation
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (block.Address == context.EntryAddress && !context.HighCq)
|
|
|
+ {
|
|
|
+ EmitRejitCheck(context, out counter);
|
|
|
+ }
|
|
|
+
|
|
|
context.CurrBlock = block;
|
|
|
|
|
|
context.MarkLabel(context.GetLabel(block.Address));
|