mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 17:00:17 +00:00
T16: Implement LDR/STR (SP)
This commit is contained in:
parent
f3e068b94a
commit
baaf5e126e
2 changed files with 28 additions and 0 deletions
26
ARMeilleure/Decoders/OpCodeT16MemSp.cs
Normal file
26
ARMeilleure/Decoders/OpCodeT16MemSp.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
namespace ARMeilleure.Decoders
|
||||
{
|
||||
class OpCodeT16MemSp : OpCodeT16, IOpCode32Mem
|
||||
{
|
||||
public int Rt { get; }
|
||||
public int Rn => 13;
|
||||
|
||||
public bool WBack => false;
|
||||
public bool IsLoad { get; }
|
||||
public bool Index => true;
|
||||
public bool Add => true;
|
||||
|
||||
public int Immediate { get; }
|
||||
|
||||
public new static OpCode Create(InstDescriptor inst, ulong address, int opCode, bool inITBlock) => new OpCodeT16MemSp(inst, address, opCode, inITBlock);
|
||||
|
||||
public OpCodeT16MemSp(InstDescriptor inst, ulong address, int opCode, bool inITBlock) : base(inst, address, opCode, inITBlock)
|
||||
{
|
||||
Rt = (opCode >> 8) & 7;
|
||||
|
||||
IsLoad = ((opCode >> 11) & 1) != 0;
|
||||
|
||||
Immediate = ((opCode >> 0) & 0xff) << 2;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1019,6 +1019,8 @@ namespace ARMeilleure.Decoders
|
|||
SetT16("01111xxxxxxxxxxx", InstName.Ldrb, InstEmit32.Ldrb, OpCodeT16MemImm5.Create);
|
||||
SetT16("10000xxxxxxxxxxx", InstName.Strh, InstEmit32.Strh, OpCodeT16MemImm5.Create);
|
||||
SetT16("10001xxxxxxxxxxx", InstName.Ldrh, InstEmit32.Ldrh, OpCodeT16MemImm5.Create);
|
||||
SetT16("10010xxxxxxxxxxx", InstName.Str, InstEmit32.Str, OpCodeT16MemSp.Create);
|
||||
SetT16("10011xxxxxxxxxxx", InstName.Ldr, InstEmit32.Ldr, OpCodeT16MemSp.Create);
|
||||
#endregion
|
||||
|
||||
FillFastLookupTable(InstA32FastLookup, AllInstA32, ToFastLookupIndexA);
|
||||
|
|
Loading…
Reference in a new issue