diff options
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation')
| -rw-r--r-- | ARMeilleure/IntermediateRepresentation/Operand.cs | 15 | ||||
| -rw-r--r-- | ARMeilleure/IntermediateRepresentation/OperandHelper.cs | 4 |
2 files changed, 13 insertions, 6 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) diff --git a/ARMeilleure/IntermediateRepresentation/OperandHelper.cs b/ARMeilleure/IntermediateRepresentation/OperandHelper.cs index cfdb32d9..10040977 100644 --- a/ARMeilleure/IntermediateRepresentation/OperandHelper.cs +++ b/ARMeilleure/IntermediateRepresentation/OperandHelper.cs @@ -34,9 +34,9 @@ namespace ARMeilleure.IntermediateRepresentation return Operand().With(value); } - public static Operand Const(long value) + public static Operand Const(long value, bool disableCF = false, int? index = null) { - return Operand().With(value); + return Operand().With(value, disableCF, index); } public static Operand Const(ulong value) |
