mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-23 08:47:10 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
54
src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
Normal file
54
src/ARMeilleure/IntermediateRepresentation/MemoryOperand.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue