@@ -684,7 +684,8 @@ get_vector_t_elem_type (MonoType *vector_type)
684
684
}
685
685
686
686
static gboolean
687
- type_is_unsigned (MonoType * type ) {
687
+ type_is_unsigned (MonoType * type )
688
+ {
688
689
MonoClass * klass = mono_class_from_mono_type_internal (type );
689
690
MonoType * etype = mono_class_get_context (klass )-> class_inst -> type_argv [0 ];
690
691
return type_enum_is_unsigned (etype -> type );
@@ -705,7 +706,8 @@ type_enum_is_unsigned (MonoTypeEnum type)
705
706
}
706
707
707
708
static gboolean
708
- type_is_float (MonoType * type ) {
709
+ type_is_float (MonoType * type )
710
+ {
709
711
MonoClass * klass = mono_class_from_mono_type_internal (type );
710
712
MonoType * etype = mono_class_get_context (klass )-> class_inst -> type_argv [0 ];
711
713
return type_enum_is_float (etype -> type );
@@ -2145,12 +2147,14 @@ emit_sys_numerics_vector_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSig
2145
2147
klass = cmethod -> klass ;
2146
2148
type = m_class_get_byval_arg (klass );
2147
2149
etype = mono_class_get_context (klass )-> class_inst -> type_argv [0 ];
2150
+
2151
+ if (!MONO_TYPE_IS_VECTOR_PRIMITIVE (etype ))
2152
+ return NULL ;
2153
+
2148
2154
size = mono_class_value_size (mono_class_from_mono_type_internal (etype ), NULL );
2149
2155
g_assert (size );
2150
2156
len = register_size / size ;
2151
2157
2152
- if (!MONO_TYPE_IS_VECTOR_PRIMITIVE (etype ))
2153
- return NULL ;
2154
2158
2155
2159
if (cfg -> verbose_level > 1 ) {
2156
2160
char * name = mono_method_full_name (cmethod , TRUE);
@@ -4193,13 +4197,14 @@ emit_vector256_t (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fs
4193
4197
4194
4198
klass = cmethod -> klass ;
4195
4199
etype = mono_class_get_context (klass )-> class_inst -> type_argv [0 ];
4196
- size = mono_class_value_size (mono_class_from_mono_type_internal (etype ), NULL );
4197
- g_assert (size );
4198
- len = 32 / size ;
4199
4200
4200
4201
if (!MONO_TYPE_IS_VECTOR_PRIMITIVE (etype ))
4201
4202
return NULL ;
4202
4203
4204
+ size = mono_class_value_size (mono_class_from_mono_type_internal (etype ), NULL );
4205
+ g_assert (size );
4206
+ len = 32 / size ;
4207
+
4203
4208
if (cfg -> verbose_level > 1 ) {
4204
4209
char * name = mono_method_full_name (cmethod , TRUE);
4205
4210
printf (" SIMD intrinsic %s\n" , name );
0 commit comments