Update AInstEmitSimdArithmetic.cs
This commit is contained in:
parent
d7664f8f40
commit
b7ab71f8fc
1 changed files with 16 additions and 12 deletions
|
@ -217,6 +217,9 @@ namespace ChocolArm64.Instruction
|
||||||
|
|
||||||
int Part = (!Scalar & (Op.RegisterSize == ARegisterSize.SIMD128) ? Elems : 0);
|
int Part = (!Scalar & (Op.RegisterSize == ARegisterSize.SIMD128) ? Elems : 0);
|
||||||
|
|
||||||
|
Context.Emit(OpCodes.Ldc_I4_0);
|
||||||
|
Context.EmitSttmp();
|
||||||
|
|
||||||
for (int Index = 0; Index < Elems; Index++)
|
for (int Index = 0; Index < Elems; Index++)
|
||||||
{
|
{
|
||||||
AILLabel LblLe = new AILLabel();
|
AILLabel LblLe = new AILLabel();
|
||||||
|
@ -234,7 +237,9 @@ namespace ChocolArm64.Instruction
|
||||||
Context.Emit(OpCodes.Pop);
|
Context.Emit(OpCodes.Pop);
|
||||||
|
|
||||||
Context.EmitLdc_I4(TMaxValue);
|
Context.EmitLdc_I4(TMaxValue);
|
||||||
SetQCFlag();
|
|
||||||
|
Context.EmitLdc_I4(0x8000000);
|
||||||
|
Context.EmitSttmp();
|
||||||
|
|
||||||
Context.Emit(OpCodes.Br_S, LblGeEnd);
|
Context.Emit(OpCodes.Br_S, LblGeEnd);
|
||||||
|
|
||||||
|
@ -250,7 +255,9 @@ namespace ChocolArm64.Instruction
|
||||||
Context.Emit(OpCodes.Pop);
|
Context.Emit(OpCodes.Pop);
|
||||||
|
|
||||||
Context.EmitLdc_I4(TMinValue);
|
Context.EmitLdc_I4(TMinValue);
|
||||||
SetQCFlag();
|
|
||||||
|
Context.EmitLdc_I4(0x8000000);
|
||||||
|
Context.EmitSttmp();
|
||||||
|
|
||||||
Context.MarkLabel(LblGeEnd);
|
Context.MarkLabel(LblGeEnd);
|
||||||
|
|
||||||
|
@ -267,16 +274,13 @@ namespace ChocolArm64.Instruction
|
||||||
EmitVectorZeroUpper(Context, Op.Rd);
|
EmitVectorZeroUpper(Context, Op.Rd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetQCFlag()
|
|
||||||
{
|
|
||||||
Context.EmitLdarg(ATranslatedSub.StateArgIdx);
|
Context.EmitLdarg(ATranslatedSub.StateArgIdx);
|
||||||
Context.EmitLdarg(ATranslatedSub.StateArgIdx);
|
Context.EmitLdarg(ATranslatedSub.StateArgIdx);
|
||||||
Context.EmitCallPropGet(typeof(AThreadState), nameof(AThreadState.Fpsr));
|
Context.EmitCallPropGet(typeof(AThreadState), nameof(AThreadState.Fpsr));
|
||||||
Context.EmitLdc_I4(0x8000000);
|
Context.EmitLdtmp();
|
||||||
Context.Emit(OpCodes.Or);
|
Context.Emit(OpCodes.Or);
|
||||||
Context.EmitCallPropSet(typeof(AThreadState), nameof(AThreadState.Fpsr));
|
Context.EmitCallPropSet(typeof(AThreadState), nameof(AThreadState.Fpsr));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static void Fabd_S(AILEmitterCtx Context)
|
public static void Fabd_S(AILEmitterCtx Context)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue