diff options
| author | TSR Berry <20988865+TSRBerry@users.noreply.github.com> | 2023-04-08 01:22:00 +0200 |
|---|---|---|
| committer | Mary <thog@protonmail.com> | 2023-04-27 23:51:14 +0200 |
| commit | cee712105850ac3385cd0091a923438167433f9f (patch) | |
| tree | 4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /ARMeilleure/IntermediateRepresentation/MemoryOperand.cs | |
| parent | cd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff) | |
Move solution and projects to src
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation/MemoryOperand.cs')
| -rw-r--r-- | ARMeilleure/IntermediateRepresentation/MemoryOperand.cs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs b/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs deleted file mode 100644 index 07d2633b..00000000 --- a/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; - -namespace ARMeilleure.IntermediateRepresentation -{ - unsafe struct MemoryOperand - { - private struct Data - { -#pragma warning disable CS0649 - public byte Kind; - public byte Type; -#pragma warning restore CS0649 - public byte Scale; - public Operand BaseAddress; - public Operand Index; - public int Displacement; - } - - private Data* _data; - - public MemoryOperand(Operand operand) - { - Debug.Assert(operand.Kind == OperandKind.Memory); - - _data = (Data*)Unsafe.As<Operand, IntPtr>(ref operand); - } - - public Operand BaseAddress - { - get => _data->BaseAddress; - set => _data->BaseAddress = value; - } - - public Operand Index - { - get => _data->Index; - set => _data->Index = value; - } - - public Multiplier Scale - { - get => (Multiplier)_data->Scale; - set => _data->Scale = (byte)value; - } - - public int Displacement - { - get => _data->Displacement; - set => _data->Displacement = value; - } - } -}
\ No newline at end of file |
