aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Decoders/Block.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ChocolArm64/Decoders/Block.cs')
-rw-r--r--ChocolArm64/Decoders/Block.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/ChocolArm64/Decoders/Block.cs b/ChocolArm64/Decoders/Block.cs
new file mode 100644
index 00000000..c89ea7c6
--- /dev/null
+++ b/ChocolArm64/Decoders/Block.cs
@@ -0,0 +1,35 @@
+using System.Collections.Generic;
+
+namespace ChocolArm64.Decoders
+{
+ class Block
+ {
+ public long Position { get; set; }
+ public long EndPosition { get; set; }
+
+ public Block Next { get; set; }
+ public Block Branch { get; set; }
+
+ public List<OpCode64> OpCodes { get; private set; }
+
+ public Block()
+ {
+ OpCodes = new List<OpCode64>();
+ }
+
+ public Block(long position) : this()
+ {
+ Position = position;
+ }
+
+ public OpCode64 GetLastOp()
+ {
+ if (OpCodes.Count > 0)
+ {
+ return OpCodes[OpCodes.Count - 1];
+ }
+
+ return null;
+ }
+ }
+} \ No newline at end of file