Add FABD (scalar), ADCS, SBCS instructions, update config with better default control mappings, update readme with the new mappings
This commit is contained in:
parent
c02a2b510f
commit
31b35a9645
8 changed files with 138 additions and 81 deletions
|
@ -11,7 +11,10 @@ namespace ChocolArm64.Instruction
|
|||
{
|
||||
static partial class AInstEmit
|
||||
{
|
||||
public static void Adc(AILEmitterCtx Context)
|
||||
public static void Adc(AILEmitterCtx Context) => EmitAdc(Context, false);
|
||||
public static void Adcs(AILEmitterCtx Context) => EmitAdc(Context, true);
|
||||
|
||||
private static void EmitAdc(AILEmitterCtx Context, bool SetFlags)
|
||||
{
|
||||
EmitDataLoadOpers(Context);
|
||||
|
||||
|
@ -27,11 +30,19 @@ namespace ChocolArm64.Instruction
|
|||
|
||||
if (Context.CurrOp.RegisterSize != ARegisterSize.Int32)
|
||||
{
|
||||
Context.Emit(OpCodes.Conv_I8);
|
||||
Context.Emit(OpCodes.Conv_U8);
|
||||
}
|
||||
|
||||
Context.Emit(OpCodes.Add);
|
||||
|
||||
if (SetFlags)
|
||||
{
|
||||
Context.EmitZNFlagCheck();
|
||||
|
||||
EmitAddsCCheck(Context);
|
||||
EmitAddsVCheck(Context);
|
||||
}
|
||||
|
||||
EmitDataStore(Context);
|
||||
}
|
||||
|
||||
|
@ -145,7 +156,10 @@ namespace ChocolArm64.Instruction
|
|||
public static void Lslv(AILEmitterCtx Context) => EmitDataOpShift(Context, OpCodes.Shl);
|
||||
public static void Lsrv(AILEmitterCtx Context) => EmitDataOpShift(Context, OpCodes.Shr_Un);
|
||||
|
||||
public static void Sbc(AILEmitterCtx Context)
|
||||
public static void Sbc(AILEmitterCtx Context) => EmitSbc(Context, false);
|
||||
public static void Sbcs(AILEmitterCtx Context) => EmitSbc(Context, true);
|
||||
|
||||
private static void EmitSbc(AILEmitterCtx Context, bool SetFlags)
|
||||
{
|
||||
EmitDataLoadOpers(Context);
|
||||
|
||||
|
@ -165,11 +179,19 @@ namespace ChocolArm64.Instruction
|
|||
|
||||
if (Context.CurrOp.RegisterSize != ARegisterSize.Int32)
|
||||
{
|
||||
Context.Emit(OpCodes.Conv_I8);
|
||||
Context.Emit(OpCodes.Conv_U8);
|
||||
}
|
||||
|
||||
Context.Emit(OpCodes.Sub);
|
||||
|
||||
if (SetFlags)
|
||||
{
|
||||
Context.EmitZNFlagCheck();
|
||||
|
||||
EmitSbcsCCheck(Context);
|
||||
EmitSubsVCheck(Context);
|
||||
}
|
||||
|
||||
EmitDataStore(Context);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue