public static void EmitVectorImmOp(AILEmitterCtx Context, Action Emit, bool Binary) { AOpCodeSimdImm Op = (AOpCodeSimdImm)Context.CurrOp; int Bytes = Context.CurrOp.GetBitsCount() >> 3; for (int Index = 0; Index < (Bytes >> Op.Size); Index++) { if (Binary) { EmitVectorExtractZx(Context, Op.Rd, Index, Op.Size); } Context.EmitLdc_I8(Op.Imm); Emit(); EmitVectorInsert(Context, Op.Rd, Index, Op.Size); } if (Op.RegisterSize == ARegisterSize.SIMD64) { EmitVectorZeroUpper(Context, Op.Rd); } }
public static void Fmov_V(AILEmitterCtx Context) { AOpCodeSimdImm Op = (AOpCodeSimdImm)Context.CurrOp; Context.EmitLdc_I8(Op.Imm); Context.EmitLdc_I4(Op.Size + 2); ASoftFallback.EmitCall(Context, nameof(ASoftFallback.Dup_Gp64), nameof(ASoftFallback.Dup_Gp128)); Context.EmitStvec(Op.Rd); }
private static void EmitMovi_V(AILEmitterCtx Context, bool Not) { AOpCodeSimdImm Op = (AOpCodeSimdImm)Context.CurrOp; Context.EmitLdc_I8(Not ? ~Op.Imm : Op.Imm); Context.EmitLdc_I4(Op.Size); ASoftFallback.EmitCall(Context, nameof(ASoftFallback.Dup_Gp64), nameof(ASoftFallback.Dup_Gp128)); Context.EmitStvec(Op.Rd); }
public static void Bic_Vi(AILEmitterCtx Context) { AOpCodeSimdImm Op = (AOpCodeSimdImm)Context.CurrOp; Context.EmitLdvec(Op.Rd); Context.EmitLdc_I8(Op.Imm); Context.EmitLdc_I4(Op.Size); ASoftFallback.EmitCall(Context, nameof(ASoftFallback.Bic_Vi64), nameof(ASoftFallback.Bic_Vi128)); Context.EmitStvec(Op.Rd); }
public static void Fmov_V(AILEmitterCtx Context) { AOpCodeSimdImm Op = (AOpCodeSimdImm)Context.CurrOp; int Elems = Op.RegisterSize == ARegisterSize.SIMD128 ? 4 : 2; for (int Index = 0; Index < (Elems >> Op.Size); Index++) { Context.EmitLdc_I8(Op.Imm); EmitVectorInsert(Context, Op.Rd, Index, Op.Size + 2); } if (Op.RegisterSize == ARegisterSize.SIMD64) { EmitVectorZeroUpper(Context, Op.Rd); } }