Minor cpu fixes

This commit is contained in:
gdkchan 2018-02-18 16:01:21 -03:00
parent 3872ae034d
commit 5a0396efaf
4 changed files with 64 additions and 22 deletions

View file

@ -60,6 +60,8 @@ namespace ChocolArm64.Instruction
Context.Emit(OpCodes.And);
EmitZeroCVFlags(Context);
Context.EmitZNFlagCheck();
EmitDataStoreS(Context);
@ -79,6 +81,8 @@ namespace ChocolArm64.Instruction
if (SetFlags)
{
EmitZeroCVFlags(Context);
Context.EmitZNFlagCheck();
}
@ -334,6 +338,14 @@ namespace ChocolArm64.Instruction
{
Context.Emit(OpCodes.Conv_I4);
}
}
}
private static void EmitZeroCVFlags(AILEmitterCtx Context)
{
Context.EmitLdc_I4(0);
Context.EmitLdc_I4(0);
Context.EmitStflg((int)APState.VBit);
Context.EmitStflg((int)APState.CBit);
}
}
}