OpCodeTable: Prepare for thumb instructions

This commit is contained in:
merry 2022-02-10 16:57:21 +00:00
parent 08e1e0c985
commit 19c6c1c11c
2 changed files with 19 additions and 1 deletions

View file

@ -345,7 +345,14 @@ namespace ARMeilleure.Decoders
} }
else else
{ {
return new OpCode(inst, address, opCode, inITBlock); if (mode == ExecutionMode.Aarch32Thumb)
{
return new OpCodeT16(inst, address, opCode, inITBlock);
}
else
{
return new OpCode(inst, address, opCode, inITBlock);
}
} }
} }
} }

View file

@ -972,6 +972,10 @@ namespace ARMeilleure.Decoders
SetA32("111100111x11<<10xxxx00011xx0xxxx", InstName.Vzip, InstEmit32.Vzip, OpCode32SimdCmpZ.Create); SetA32("111100111x11<<10xxxx00011xx0xxxx", InstName.Vzip, InstEmit32.Vzip, OpCode32SimdCmpZ.Create);
#endregion #endregion
#region "OpCode Table (AArch32, T16/T32)"
// T16
#endregion
FillFastLookupTable(InstA32FastLookup, AllInstA32); FillFastLookupTable(InstA32FastLookup, AllInstA32);
FillFastLookupTable(InstT32FastLookup, AllInstT32); FillFastLookupTable(InstT32FastLookup, AllInstT32);
FillFastLookupTable(InstA64FastLookup, AllInstA64); FillFastLookupTable(InstA64FastLookup, AllInstA64);
@ -1011,8 +1015,15 @@ namespace ARMeilleure.Decoders
Set(encoding, AllInstA32, new InstDescriptor(name, emitter), makeOp); Set(encoding, AllInstA32, new InstDescriptor(name, emitter), makeOp);
} }
private static void SetT16(string encoding, InstName name, InstEmitter emitter, MakeOp makeOp)
{
encoding = "xxxxxxxxxxxxxxxx" + encoding;
Set(encoding, AllInstT32, new InstDescriptor(name, emitter), makeOp);
}
private static void SetT32(string encoding, InstName name, InstEmitter emitter, MakeOp makeOp) private static void SetT32(string encoding, InstName name, InstEmitter emitter, MakeOp makeOp)
{ {
encoding = encoding.Substring(16) + encoding.Substring(0, 16);
Set(encoding, AllInstT32, new InstDescriptor(name, emitter), makeOp); Set(encoding, AllInstT32, new InstDescriptor(name, emitter), makeOp);
} }