1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-05 01:32:00 +00:00
Ryujinx/ARMeilleure/Decoders/OpCodeSimdFmov.cs
gdkchan 2f16491712
Get rid of Reflection.Emit dependency on CPU and Shader projects (#1626)
* Get rid of Reflection.Emit dependency on CPU and Shader projects

* Remove useless private sets

* Missed those due to the alignment
2020-10-21 09:13:44 -03:00

32 lines
No EOL
923 B
C#

namespace ARMeilleure.Decoders
{
class OpCodeSimdFmov : OpCode, IOpCodeSimd
{
public int Rd { get; }
public long Immediate { get; }
public int Size { get; }
public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeSimdFmov(inst, address, opCode);
public OpCodeSimdFmov(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
{
int type = (opCode >> 22) & 0x3;
Size = type;
long imm;
Rd = (opCode >> 0) & 0x1f;
imm = (opCode >> 13) & 0xff;
if (type == 0)
{
Immediate = (long)DecoderHelper.Imm8ToFP32Table[(int)imm];
}
else /* if (type == 1) */
{
Immediate = (long)DecoderHelper.Imm8ToFP64Table[(int)imm];
}
}
}
}