Implement mono_arch_context_set_int_reg () for arm.
[mono.git] / mono / mini / jit-icalls.c
index 1e4cbf540d996889b42776ad21513cd5c37a2352..578cc35c1026841f43c1dda666ebf2e3bc2b230b 100644 (file)
@@ -74,6 +74,8 @@ mono_helper_stelem_ref_check (MonoArray *array, MonoObject *val)
 {
        MONO_ARCH_SAVE_REGS;
 
+       if (!array)
+               mono_raise_exception (mono_get_exception_null_reference ());
        if (val && !mono_object_isinst (val, array->obj.vtable->klass->element_class))
                mono_raise_exception (mono_get_exception_array_type_mismatch ());
 }
@@ -926,6 +928,16 @@ mono_lconv_to_r8_un (guint64 a)
 }
 #endif
 
+#if defined(__native_client_codegen__) || defined(__native_client__)
+/* When we cross-compile to Native Client we can't directly embed calls */
+/* to the math library on the host. This will use the fmod on the target*/
+double
+mono_fmod(double a, double b)
+{
+       return fmod(a, b);
+}
+#endif
+
 gpointer
 mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointer *this_arg)
 {