rjx-mirror/ARMeilleure/Decoders/OpCodeSimdFmov.cs
LDj3SNuD 8c85bdf2ed Implemented fast paths for: (#841)
* cpu-misc_opt

* B = ~b

* ;
2019-12-07 13:45:32 +01:00

30 lines
No EOL
827 B
C#

namespace ARMeilleure.Decoders
{
class OpCodeSimdFmov : OpCode, IOpCodeSimd
{
public int Rd { get; private set; }
public long Immediate { get; private set; }
public int Size { get; private set; }
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];
}
}
}
}