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
18 changes: 18 additions & 0 deletions src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ type_to_extract_op (MonoTypeEnum type)
}

static guint16 sri_vector_methods [] = {
SN_Abs,
SN_As,
SN_AsByte,
SN_AsDouble,
Expand Down Expand Up @@ -635,6 +636,23 @@ emit_sri_vector (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsi
MonoTypeEnum arg0_type = fsig->param_count > 0 ? get_underlying_type (fsig->params [0]) : MONO_TYPE_VOID;

switch (id) {
case SN_Abs: {
#ifdef TARGET_ARM64
switch (arg0_type) {
case MONO_TYPE_U1:
case MONO_TYPE_U2:
case MONO_TYPE_U4:
case MONO_TYPE_U8:
case MONO_TYPE_U:
return NULL;
}
gboolean is_float = arg0_type == MONO_TYPE_R4 || arg0_type == MONO_TYPE_R8;
int iid = is_float ? INTRINS_AARCH64_ADV_SIMD_FABS : INTRINS_AARCH64_ADV_SIMD_ABS;
return emit_simd_ins_for_sig (cfg, klass, OP_XOP_OVR_X_X, iid, arg0_type, fsig, args);
#else
return NULL;
#endif
}
case SN_As:
case SN_AsByte:
case SN_AsDouble:
Expand Down