Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,11 @@ static guint16 sri_vector_methods [] = {
SN_AsVector256,
SN_AsVector3,
SN_AsVector4,
SN_Ceiling,
SN_Create,
SN_CreateScalar,
SN_CreateScalarUnsafe,
SN_Floor,
SN_GetElement,
SN_GetLower,
SN_GetUpper,
Expand Down Expand Up @@ -650,6 +652,17 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
return NULL;
return emit_simd_ins (cfg, klass, OP_XCAST, args [0]->dreg, -1);
}
case SN_Ceiling:
case SN_Floor: {
#ifdef TARGET_ARM64
if ((arg0_type != MONO_TYPE_R4) && (arg0_type != MONO_TYPE_R8))
return NULL;
int ceil_or_floor = id == SN_Ceiling ? INTRINS_AARCH64_ADV_SIMD_FRINTP : INTRINS_AARCH64_ADV_SIMD_FRINTM;
return emit_simd_ins_for_sig (cfg, klass, OP_XOP_OVR_X_X, ceil_or_floor, arg0_type, fsig, args);
#else
return NULL;
#endif
}
case SN_Create: {
MonoType *etype = get_vector_t_elem_type (fsig->ret);
if (fsig->param_count == 1 && mono_metadata_type_equal (fsig->params [0], etype))
Expand Down