aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/IntermediateRepresentation/Operand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation/Operand.cs')
-rw-r--r--ARMeilleure/IntermediateRepresentation/Operand.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/ARMeilleure/IntermediateRepresentation/Operand.cs b/ARMeilleure/IntermediateRepresentation/Operand.cs
index 2d5e762a..6f6caea7 100644
--- a/ARMeilleure/IntermediateRepresentation/Operand.cs
+++ b/ARMeilleure/IntermediateRepresentation/Operand.cs
@@ -6,11 +6,13 @@ namespace ARMeilleure.IntermediateRepresentation
class Operand
{
public OperandKind Kind { get; private set; }
-
public OperandType Type { get; private set; }
public ulong Value { get; private set; }
+ public bool DisableCF { get; private set; }
+ public int? PtcIndex { get; private set; }
+
public List<Node> Assignments { get; }
public List<Node> Uses { get; }
@@ -26,14 +28,19 @@ namespace ARMeilleure.IntermediateRepresentation
Type = type;
}
- public Operand With(OperandKind kind, OperandType type = OperandType.None, ulong value = 0)
+ public Operand With(OperandKind kind, OperandType type = OperandType.None, ulong value = 0, bool disableCF = false, int? index = null)
{
Kind = kind;
Type = type;
+
Value = value;
+ DisableCF = disableCF;
+ PtcIndex = index;
+
Assignments.Clear();
Uses.Clear();
+
return this;
}
@@ -47,9 +54,9 @@ namespace ARMeilleure.IntermediateRepresentation
return With(OperandKind.Constant, OperandType.I32, value);
}
- public Operand With(long value)
+ public Operand With(long value, bool disableCF = false, int? index = null)
{
- return With(OperandKind.Constant, OperandType.I64, (ulong)value);
+ return With(OperandKind.Constant, OperandType.I64, (ulong)value, disableCF, index);
}
public Operand With(ulong value)