mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 20:50:18 +00:00
T16: Implement ADD/SUB (SP)
This commit is contained in:
parent
1a2ae16395
commit
e11cd2e50a
2 changed files with 23 additions and 0 deletions
21
ARMeilleure/Decoders/OpCodeT16AddSubSp.cs
Normal file
21
ARMeilleure/Decoders/OpCodeT16AddSubSp.cs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
namespace ARMeilleure.Decoders
|
||||||
|
{
|
||||||
|
class OpCodeT16AddSubSp : OpCodeT16, IOpCode32AluImm
|
||||||
|
{
|
||||||
|
public int Rd => 13;
|
||||||
|
public int Rn => 13;
|
||||||
|
|
||||||
|
public bool SetFlags => false;
|
||||||
|
|
||||||
|
public int Immediate { get; }
|
||||||
|
|
||||||
|
public bool IsRotated => false;
|
||||||
|
|
||||||
|
public static new OpCode Create(InstDescriptor inst, ulong address, int opCode, bool inITBlock) => new OpCodeT16AddSubSp(inst, address, opCode, inITBlock);
|
||||||
|
|
||||||
|
public OpCodeT16AddSubSp(InstDescriptor inst, ulong address, int opCode, bool inITBlock) : base(inst, address, opCode, inITBlock)
|
||||||
|
{
|
||||||
|
Immediate = (opCode >> 0) & 0x7f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1023,6 +1023,8 @@ namespace ARMeilleure.Decoders
|
||||||
SetT16("10011xxxxxxxxxxx", InstName.Ldr, InstEmit32.Ldr, OpCodeT16MemSp.Create);
|
SetT16("10011xxxxxxxxxxx", InstName.Ldr, InstEmit32.Ldr, OpCodeT16MemSp.Create);
|
||||||
SetT16("10100xxxxxxxxxxx", InstName.Adr, InstEmit32.Adr, OpCodeT16Adr.Create);
|
SetT16("10100xxxxxxxxxxx", InstName.Adr, InstEmit32.Adr, OpCodeT16Adr.Create);
|
||||||
SetT16("10101xxxxxxxxxxx", InstName.Add, InstEmit32.Add, OpCodeT16SpRel.Create);
|
SetT16("10101xxxxxxxxxxx", InstName.Add, InstEmit32.Add, OpCodeT16SpRel.Create);
|
||||||
|
SetT16("101100000xxxxxxx", InstName.Add, InstEmit32.Add, OpCodeT16AddSubSp.Create);
|
||||||
|
SetT16("101100001xxxxxxx", InstName.Sub, InstEmit32.Sub, OpCodeT16AddSubSp.Create);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
FillFastLookupTable(InstA32FastLookup, AllInstA32, ToFastLookupIndexA);
|
FillFastLookupTable(InstA32FastLookup, AllInstA32, ToFastLookupIndexA);
|
||||||
|
|
Loading…
Reference in a new issue