Update AInstEmitAlu.cs
This commit is contained in:
parent
0d2f073152
commit
abdab83bf3
1 changed files with 19 additions and 1 deletions
|
@ -100,6 +100,24 @@ namespace ChocolArm64.Instruction
|
|||
EmitDataStore(Context, SetFlags);
|
||||
}
|
||||
|
||||
public static void Cls(AILEmitterCtx Context)
|
||||
{
|
||||
AOpCodeAlu Op = (AOpCodeAlu)Context.CurrOp;
|
||||
|
||||
Context.EmitLdintzr(Op.Rn);
|
||||
|
||||
if (Op.RegisterSize == ARegisterSize.Int32)
|
||||
{
|
||||
ASoftFallback.EmitCall(Context, nameof(ASoftFallback.CountLeadingSigns32));
|
||||
}
|
||||
else
|
||||
{
|
||||
ASoftFallback.EmitCall(Context, nameof(ASoftFallback.CountLeadingSigns64));
|
||||
}
|
||||
|
||||
Context.EmitStintzr(Op.Rd);
|
||||
}
|
||||
|
||||
public static void Clz(AILEmitterCtx Context)
|
||||
{
|
||||
AOpCodeAlu Op = (AOpCodeAlu)Context.CurrOp;
|
||||
|
@ -383,4 +401,4 @@ namespace ChocolArm64.Instruction
|
|||
Context.EmitStflg((int)APState.CBit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue