aboutsummaryrefslogtreecommitdiff
path: root/src/ARMeilleure/Translation/Cache/CacheEntry.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ARMeilleure/Translation/Cache/CacheEntry.cs')
-rw-r--r--src/ARMeilleure/Translation/Cache/CacheEntry.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ARMeilleure/Translation/Cache/CacheEntry.cs b/src/ARMeilleure/Translation/Cache/CacheEntry.cs
new file mode 100644
index 00000000..dc5503b1
--- /dev/null
+++ b/src/ARMeilleure/Translation/Cache/CacheEntry.cs
@@ -0,0 +1,26 @@
+using ARMeilleure.CodeGen.Unwinding;
+using System;
+using System.Diagnostics.CodeAnalysis;
+
+namespace ARMeilleure.Translation.Cache
+{
+ readonly struct CacheEntry : IComparable<CacheEntry>
+ {
+ public int Offset { get; }
+ public int Size { get; }
+
+ public UnwindInfo UnwindInfo { get; }
+
+ public CacheEntry(int offset, int size, UnwindInfo unwindInfo)
+ {
+ Offset = offset;
+ Size = size;
+ UnwindInfo = unwindInfo;
+ }
+
+ public int CompareTo([AllowNull] CacheEntry other)
+ {
+ return Offset.CompareTo(other.Offset);
+ }
+ }
+} \ No newline at end of file