aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Decoders/OpCodeSimdCvt.cs
blob: 05b32941a2a6e6141e2fe5253ad250a4dc6ebd27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace ARMeilleure.Decoders
{
    class OpCodeSimdCvt : OpCodeSimd
    {
        public int FBits { get; }

        public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeSimdCvt(inst, address, opCode);

        public OpCodeSimdCvt(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
        {
            int scale = (opCode >> 10) & 0x3f;
            int sf    = (opCode >> 31) & 0x1;

            FBits = 64 - scale;

            RegisterSize = sf != 0
                ? RegisterSize.Int64
                : RegisterSize.Int32;
        }
    }
}