aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instruction/AInstEmitAluHelper.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-02-24 18:47:08 -0300
committergdkchan <gab.dark.100@gmail.com>2018-02-24 18:47:08 -0300
commit31b35a9645524ce25f4bcbcd5f0df8b9784e6b52 (patch)
treefe523cb14748d5f2eb6c3417fcf36a0549089f65 /ChocolArm64/Instruction/AInstEmitAluHelper.cs
parentc02a2b510f4f461c96e4a98e0059f35b5dde97c9 (diff)
Add FABD (scalar), ADCS, SBCS instructions, update config with better default control mappings, update readme with the new mappings
Diffstat (limited to 'ChocolArm64/Instruction/AInstEmitAluHelper.cs')
-rw-r--r--ChocolArm64/Instruction/AInstEmitAluHelper.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/ChocolArm64/Instruction/AInstEmitAluHelper.cs b/ChocolArm64/Instruction/AInstEmitAluHelper.cs
index e848742d..b2ea92a6 100644
--- a/ChocolArm64/Instruction/AInstEmitAluHelper.cs
+++ b/ChocolArm64/Instruction/AInstEmitAluHelper.cs
@@ -41,6 +41,25 @@ namespace ChocolArm64.Instruction
Context.EmitStflg((int)APState.VBit);
}
+ public static void EmitSbcsCCheck(AILEmitterCtx Context)
+ {
+ //C = (Rn == Rm && CIn) || Rn > Rm
+ EmitDataLoadOpers(Context);
+
+ Context.Emit(OpCodes.Ceq);
+
+ Context.EmitLdflg((int)APState.CBit);
+
+ Context.Emit(OpCodes.And);
+
+ EmitDataLoadOpers(Context);
+
+ Context.Emit(OpCodes.Cgt_Un);
+ Context.Emit(OpCodes.Or);
+
+ Context.EmitStflg((int)APState.CBit);
+ }
+
public static void EmitSubsCCheck(AILEmitterCtx Context)
{
//C = Rn == Rm || Rn > Rm = !(Rn < Rm)