aboutsummaryrefslogblamecommitdiff
path: root/ARMeilleure/Decoders/OpCodeT16AluImm8.cs
blob: 673a46045ffbfc0391cdae2636744e868876f736 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                 
 
                                                       
     
                              
 
                                      
 
                                     

                                                                                                                                       

                                                                                                             
                                     
                                             
                              
         
 
namespace ARMeilleure.Decoders
{
    class OpCodeT16AluImm8 : OpCodeT16, IOpCode32AluImm
    {
        public int Rd { get; }
        public int Rn { get; }

        public bool? SetFlags => null;

        public int Immediate { get; }

        public bool IsRotated { get; }

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

        public OpCodeT16AluImm8(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
        {
            Rd = (opCode >> 8) & 0x7;
            Rn = (opCode >> 8) & 0x7;
            Immediate = (opCode >> 0) & 0xff;
            IsRotated = false;
        }
    }
}