*
* (C) 2002 Ximian, Inc.
*/
-
+#include <config.h>
#include <math.h>
#include <limits.h>
+#ifdef HAVE_ALLOCA_H
#include <alloca.h>
+#endif
#include "jit-icalls.h"
#endif
-#ifdef MONO_ARCH_EMULATE_MUL_DIV
+#if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_EMULATE_MUL_OVF)
gint32
mono_imul (gint32 a, gint32 b)
res = (gint64)a * (gint64)b;
- if ((res > 0x7fffffffL) || (res < -2147483648))
+ if ((res > 0x7fffffffL) || (res < -2147483648LL))
mono_raise_exception (mono_get_exception_overflow ());
return res;
return isunordered (a, b) || a < b;
}
+gboolean
+mono_isfinite (double a)
+{
+#ifdef HAVE_ISFINITE
+ return isfinite (a);
+#else
+ g_assert_not_reached ();
+ return TRUE;
+#endif
+}
+
double
mono_fload_r4 (float *ptr)
{