mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-29 21:30:47 -07:00
Fix corner cases of ADCS and SBFM
This commit is contained in:
@ -7,6 +7,31 @@ namespace ChocolArm64.Instruction
|
||||
{
|
||||
static class AInstEmitAluHelper
|
||||
{
|
||||
public static void EmitAdcsCCheck(AILEmitterCtx Context)
|
||||
{
|
||||
//C = (Rd == Rn && CIn) || Rd < Rn
|
||||
Context.EmitSttmp();
|
||||
Context.EmitLdtmp();
|
||||
Context.EmitLdtmp();
|
||||
|
||||
EmitDataLoadRn(Context);
|
||||
|
||||
Context.Emit(OpCodes.Ceq);
|
||||
|
||||
Context.EmitLdflg((int)APState.CBit);
|
||||
|
||||
Context.Emit(OpCodes.And);
|
||||
|
||||
Context.EmitLdtmp();
|
||||
|
||||
EmitDataLoadRn(Context);
|
||||
|
||||
Context.Emit(OpCodes.Clt_Un);
|
||||
Context.Emit(OpCodes.Or);
|
||||
|
||||
Context.EmitStflg((int)APState.CBit);
|
||||
}
|
||||
|
||||
public static void EmitAddsCCheck(AILEmitterCtx Context)
|
||||
{
|
||||
//C = Rd < Rn
|
||||
|
Reference in New Issue
Block a user