diff options
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation/OperandHelper.cs')
| -rw-r--r-- | ARMeilleure/IntermediateRepresentation/OperandHelper.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ARMeilleure/IntermediateRepresentation/OperandHelper.cs b/ARMeilleure/IntermediateRepresentation/OperandHelper.cs index 26d66478..1b748f6a 100644 --- a/ARMeilleure/IntermediateRepresentation/OperandHelper.cs +++ b/ARMeilleure/IntermediateRepresentation/OperandHelper.cs @@ -1,4 +1,5 @@ using ARMeilleure.Common; +using System.Runtime.CompilerServices; namespace ARMeilleure.IntermediateRepresentation { @@ -34,6 +35,11 @@ namespace ARMeilleure.IntermediateRepresentation return Operand().With(value); } + public static unsafe Operand Const<T>(ref T reference, int? index = null) + { + return Operand().With((long)Unsafe.AsPointer(ref reference), index != null, index); + } + public static Operand ConstF(float value) { return Operand().With(value); |
