-/*
- * magic-types.c: intrinsics for variable sized int/floats
+/**
+ * \file
+ * intrinsics for variable sized int/floats
*
* Author:
* Rodrigo Kumpera (kumpera@gmail.com)
{ 2, STACK_R8, STACK_R8, STACK_R8, OP_FCONV_TO_R8, OP_FCONV_TO_R4, OP_FMOVE, 0, 0, OP_PT_STORE_FP_MEMBASE_REG, 0 },
};
-static inline gboolean mono_class_is_magic_int (MonoClass *klass);
-static inline gboolean mono_class_is_magic_float (MonoClass *klass);
-
static inline gboolean
type_size (MonoCompile *cfg, MonoType *type)
return TRUE;
if (!strcmp ("Xamarin.WatchOS", klass->image->assembly_name))
return TRUE;
+ /* regression test suite */
+ if (!strcmp ("builtin-types", klass->image->assembly_name))
+ return TRUE;
return FALSE;
}
-static inline gboolean
+gboolean
mono_class_is_magic_int (MonoClass *klass)
{
static MonoClass *magic_nint_class;
return FALSE;
}
-static inline gboolean
+gboolean
mono_class_is_magic_float (MonoClass *klass)
{
static MonoClass *magic_nfloat_class;
MonoClassField *value_field = mono_class_get_field_from_name (klass, "v");
g_assert (value_field);
MonoType *t = mono_field_get_type (value_field);
- g_assert (t->type == mini_native_type_replace_type (&klass->byval_arg)->type);
-
+ MonoType *native = mini_native_type_replace_type (&klass->byval_arg);
+ if (t->type != native->type)
+ g_error ("Assembly used for native types '%s' doesn't match this runtime, %s is mapped to %s, expecting %s.\n", klass->image->name, klass->name, mono_type_full_name (t), mono_type_full_name (native));
return TRUE;
}
return FALSE;