Ryujinx/ARMeilleure/Decoders/OpCodeT16SpRel.cs

25 lines
684 B
C#
Raw Normal View History

2022-02-14 21:48:10 +00:00
using ARMeilleure.State;
2022-02-11 11:10:41 +00:00
namespace ARMeilleure.Decoders
{
class OpCodeT16SpRel : OpCodeT16, IOpCode32AluImm
{
public int Rd { get; }
2022-02-14 21:48:10 +00:00
public int Rn => RegisterAlias.Aarch32Sp;
2022-02-11 11:10:41 +00:00
2022-02-14 21:06:24 +00:00
public bool? SetFlags => false;
2022-02-11 11:10:41 +00:00
public int Immediate { get; }
public bool IsRotated => false;
2022-02-14 21:06:24 +00:00
public static new OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeT16SpRel(inst, address, opCode);
2022-02-11 11:10:41 +00:00
2022-02-14 21:06:24 +00:00
public OpCodeT16SpRel(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
2022-02-11 11:10:41 +00:00
{
Rd = (opCode >> 8) & 0x7;
Immediate = ((opCode >> 0) & 0xff) << 2;
2022-02-11 11:10:41 +00:00
}
}
2022-02-14 21:06:24 +00:00
}