mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 01:55:27 +00:00
40 lines
1 KiB
C#
40 lines
1 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 });
|
||
|
}
|
||
|
}
|
||
|
}
|