mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-22 12:36:41 +00:00
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
|
namespace ARMeilleure.IntermediateRepresentation
|
||
|
{
|
||
|
class Operation : Node
|
||
|
{
|
||
|
public Instruction Instruction { get; private set; }
|
||
|
|
||
|
public Operation(
|
||
|
Instruction instruction,
|
||
|
Operand destination,
|
||
|
params Operand[] sources) : base(destination, sources.Length)
|
||
|
{
|
||
|
Instruction = instruction;
|
||
|
|
||
|
for (int index = 0; index < sources.Length; index++)
|
||
|
{
|
||
|
SetSource(index, sources[index]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public Operation(
|
||
|
Instruction instruction,
|
||
|
Operand[] destinations,
|
||
|
Operand[] sources) : base(destinations, sources.Length)
|
||
|
{
|
||
|
Instruction = instruction;
|
||
|
|
||
|
for (int index = 0; index < sources.Length; index++)
|
||
|
{
|
||
|
SetSource(index, sources[index]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void TurnIntoCopy(Operand source)
|
||
|
{
|
||
|
Instruction = Instruction.Copy;
|
||
|
|
||
|
SetSources(new Operand[] { source });
|
||
|
}
|
||
|
}
|
||
|
}
|