Improve CPU initial translation speeds (#50)
* Add background translation to the CPU * Do not use a separate thread for translation, implement 2 tiers translation * Remove unnecessary usings * Lower MinCallCountForReJit * Remove unused variable
This commit is contained in:
parent
ee9df32e3e
commit
3edb66f389
10 changed files with 319 additions and 107 deletions
|
@ -18,6 +18,18 @@ namespace ChocolArm64.Decoder
|
|||
OpActivators = new ConcurrentDictionary<Type, OpActivator>();
|
||||
}
|
||||
|
||||
public static ABlock DecodeBasicBlock(
|
||||
ATranslator Translator,
|
||||
AMemory Memory,
|
||||
long Start)
|
||||
{
|
||||
ABlock Block = new ABlock(Start);
|
||||
|
||||
FillBlock(Memory, Block);
|
||||
|
||||
return Block;
|
||||
}
|
||||
|
||||
public static (ABlock[] Graph, ABlock Root) DecodeSubroutine(
|
||||
ATranslator Translator,
|
||||
AMemory Memory,
|
||||
|
@ -72,8 +84,8 @@ namespace ChocolArm64.Decoder
|
|||
}
|
||||
}
|
||||
|
||||
if ((!(LastOp is AOpCodeBImmAl) &&
|
||||
!(LastOp is AOpCodeBReg)) || HasCachedSub)
|
||||
if (!((LastOp is AOpCodeBImmAl) ||
|
||||
(LastOp is AOpCodeBReg)) || HasCachedSub)
|
||||
{
|
||||
Current.Next = Enqueue(Current.EndPosition);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue