aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation/MemoryOperand.cs')
-rw-r--r--ARMeilleure/IntermediateRepresentation/MemoryOperand.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs b/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
new file mode 100644
index 00000000..742842fa
--- /dev/null
+++ b/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
@@ -0,0 +1,25 @@
+namespace ARMeilleure.IntermediateRepresentation
+{
+ class MemoryOperand : Operand
+ {
+ public Operand BaseAddress { get; set; }
+ public Operand Index { get; set; }
+
+ public Multiplier Scale { get; }
+
+ public int Displacement { get; }
+
+ public MemoryOperand(
+ OperandType type,
+ Operand baseAddress,
+ Operand index = null,
+ Multiplier scale = Multiplier.x1,
+ int displacement = 0) : base(OperandKind.Memory, type)
+ {
+ BaseAddress = baseAddress;
+ Index = index;
+ Scale = scale;
+ Displacement = displacement;
+ }
+ }
+} \ No newline at end of file