From 6d65e536642a7cff7afa34be10fdc8ca66a6e79c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 19 Sep 2018 17:07:56 -0300 Subject: Remove cold methods from the CPU cache (#224) * Remove unused tracing functionality from the CPU * GetNsoExecutable -> GetExecutable * Unsigned comparison * Re-add cpu tracing * Config change * Remove cold methods from the translation cache on the cpu * Replace lock with try lock, pass new ATranslatorCache instead of ATranslator * Rebase fixups --- ChocolArm64/Decoder/ADecoder.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'ChocolArm64/Decoder/ADecoder.cs') diff --git a/ChocolArm64/Decoder/ADecoder.cs b/ChocolArm64/Decoder/ADecoder.cs index b154a54c..64beebd2 100644 --- a/ChocolArm64/Decoder/ADecoder.cs +++ b/ChocolArm64/Decoder/ADecoder.cs @@ -19,11 +19,7 @@ namespace ChocolArm64.Decoder OpActivators = new ConcurrentDictionary(); } - public static ABlock DecodeBasicBlock( - AThreadState State, - ATranslator Translator, - AMemory Memory, - long Start) + public static ABlock DecodeBasicBlock(AThreadState State, AMemory Memory, long Start) { ABlock Block = new ABlock(Start); @@ -33,10 +29,10 @@ namespace ChocolArm64.Decoder } public static (ABlock[] Graph, ABlock Root) DecodeSubroutine( - AThreadState State, - ATranslator Translator, - AMemory Memory, - long Start) + ATranslatorCache Cache, + AThreadState State, + AMemory Memory, + long Start) { Dictionary Visited = new Dictionary(); Dictionary VisitedEnd = new Dictionary(); @@ -79,7 +75,7 @@ namespace ChocolArm64.Decoder { if (Op.Emitter == AInstEmit.Bl) { - HasCachedSub = Translator.HasCachedSub(Op.Imm); + HasCachedSub = Cache.HasSubroutine(Op.Imm); } else { -- cgit v1.2.3