mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-26 03:31:56 +01:00
36 lines
892 B
C#
36 lines
892 B
C#
|
namespace ARMeilleure.Decoders
|
||
|
{
|
||
|
class OpCodeMov : OpCode
|
||
|
{
|
||
|
public int Rd { get; private set; }
|
||
|
|
||
|
public long Immediate { get; private set; }
|
||
|
|
||
|
public int Bit { get; private set; }
|
||
|
|
||
|
public OpCodeMov(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
|
||
|
{
|
||
|
int p1 = (opCode >> 22) & 1;
|
||
|
int sf = (opCode >> 31) & 1;
|
||
|
|
||
|
if (sf == 0 && p1 != 0)
|
||
|
{
|
||
|
Instruction = InstDescriptor.Undefined;
|
||
|
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
Rd = (opCode >> 0) & 0x1f;
|
||
|
Immediate = (opCode >> 5) & 0xffff;
|
||
|
Bit = (opCode >> 21) & 0x3;
|
||
|
|
||
|
Bit <<= 4;
|
||
|
|
||
|
Immediate <<= Bit;
|
||
|
|
||
|
RegisterSize = (opCode >> 31) != 0
|
||
|
? RegisterSize.Int64
|
||
|
: RegisterSize.Int32;
|
||
|
}
|
||
|
}
|
||
|
}
|