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.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs b/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
index 742842fa..56d07288 100644
--- a/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
+++ b/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
@@ -5,21 +5,25 @@ namespace ARMeilleure.IntermediateRepresentation
public Operand BaseAddress { get; set; }
public Operand Index { get; set; }
- public Multiplier Scale { get; }
+ public Multiplier Scale { get; private set; }
- public int Displacement { get; }
+ public int Displacement { get; private set; }
- public MemoryOperand(
+ public MemoryOperand() { }
+
+ public MemoryOperand With(
OperandType type,
Operand baseAddress,
Operand index = null,
Multiplier scale = Multiplier.x1,
- int displacement = 0) : base(OperandKind.Memory, type)
+ int displacement = 0)
{
+ With(OperandKind.Memory, type);
BaseAddress = baseAddress;
Index = index;
Scale = scale;
Displacement = displacement;
+ return this;
}
}
} \ No newline at end of file