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
19 changes: 12 additions & 7 deletions src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,8 @@ get_vector_t_elem_type (MonoType *vector_type)
}

static gboolean
type_is_unsigned (MonoType *type) {
type_is_unsigned (MonoType *type)
{
MonoClass *klass = mono_class_from_mono_type_internal (type);
MonoType *etype = mono_class_get_context (klass)->class_inst->type_argv [0];
return type_enum_is_unsigned (etype->type);
Expand All @@ -705,7 +706,8 @@ type_enum_is_unsigned (MonoTypeEnum type)
}

static gboolean
type_is_float (MonoType *type) {
type_is_float (MonoType *type)
{
MonoClass *klass = mono_class_from_mono_type_internal (type);
MonoType *etype = mono_class_get_context (klass)->class_inst->type_argv [0];
return type_enum_is_float (etype->type);
Expand Down Expand Up @@ -2145,12 +2147,14 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig
klass = cmethod->klass;
type = m_class_get_byval_arg (klass);
etype = mono_class_get_context (klass)->class_inst->type_argv [0];

if (!MONO_TYPE_IS_VECTOR_PRIMITIVE (etype))
return NULL;

size = mono_class_value_size (mono_class_from_mono_type_internal (etype), NULL);
g_assert (size);
len = register_size / size;

if (!MONO_TYPE_IS_VECTOR_PRIMITIVE (etype))
return NULL;

if (cfg->verbose_level > 1) {
char *name = mono_method_full_name (cmethod, TRUE);
Expand Down Expand Up @@ -4193,13 +4197,14 @@ emit_vector256_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fs

klass = cmethod->klass;
etype = mono_class_get_context (klass)->class_inst->type_argv [0];
size = mono_class_value_size (mono_class_from_mono_type_internal (etype), NULL);
g_assert (size);
len = 32 / size;

if (!MONO_TYPE_IS_VECTOR_PRIMITIVE (etype))
return NULL;

size = mono_class_value_size (mono_class_from_mono_type_internal (etype), NULL);
g_assert (size);
len = 32 / size;

if (cfg->verbose_level > 1) {
char *name = mono_method_full_name (cmethod, TRUE);
printf (" SIMD intrinsic %s\n", name);
Expand Down