aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Decoder/ADecoder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ChocolArm64/Decoder/ADecoder.cs')
-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);
}