aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Decoder
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-03-04 14:09:59 -0300
committerGitHub <noreply@github.com>2018-03-04 14:09:59 -0300
commit3edb66f389ac279bdcde26c5682aa39b9bf5f853 (patch)
treeb3082b45648417a289ba10c2b40f6c134b93fa98 /ChocolArm64/Decoder
parentee9df32e3e13fe982c8154a6454566c8edfa13d3 (diff)
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
Diffstat (limited to 'ChocolArm64/Decoder')
-rw-r--r--ChocolArm64/Decoder/ADecoder.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/ChocolArm64/Decoder/ADecoder.cs b/ChocolArm64/Decoder/ADecoder.cs
index 44302290..2375c185 100644
--- a/ChocolArm64/Decoder/ADecoder.cs
+++ b/ChocolArm64/Decoder/ADecoder.cs
@@ -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);
}