2009-02-09 Zoltan Varga <vargaz@gmail.com>
+ * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
+ this from get_throw_pending_exception, make the signature full aot compatible.
+
* Makefile.am (fullaotcheck): New target to run full-aot tests.
* method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
return lmf->rip;
}
-static gpointer
-get_throw_pending_exception (void)
+gpointer
+mono_arch_get_throw_pending_exception_full (guint32 *code_size, MonoJumpInfo **ji, gboolean aot)
{
- static guint8* start;
- static gboolean inited = FALSE;
- guint8 *code;
+ guint8 *code, *start;
guint8 *br[1];
gpointer throw_trampoline;
- if (inited)
- return start;
+ *ji = NULL;
+
+ g_assert (!aot);
start = code = mono_global_codeman_reserve (128);
g_assert ((code - start) < 128);
- inited = TRUE;
+ *code_size = code - start;
return start;
}
+static gpointer throw_pending_exception;
+
/*
* Called when a thread receives an async exception while executing unmanaged code.
* Instead of checking for this exception in the managed-to-native wrapper, we hijack
/* Signal that lmf->rip is set */
lmf->previous_lmf = (gpointer)((guint64)lmf->previous_lmf | 1);
- *(gpointer*)(lmf->rsp - 8) = get_throw_pending_exception ();
+ *(gpointer*)(lmf->rsp - 8) = throw_pending_exception;
}
void
mono_arch_exceptions_init (void)
{
+ guint32 code_size;
+ MonoJumpInfo *ji;
+
/* Call this to avoid initialization races */
- get_throw_pending_exception ();
+ throw_pending_exception = mono_arch_get_throw_pending_exception_full (&code_size, &ji, FALSE);
}
#ifdef PLATFORM_WIN32
gpointer mono_arch_get_rethrow_exception_full (guint32 *code_size, MonoJumpInfo **ji, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_exception_by_name_full (guint32 *code_size, MonoJumpInfo **ji, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_corlib_exception_full (guint32 *code_size, MonoJumpInfo **ji, gboolean aot) MONO_INTERNAL;
+gpointer mono_arch_get_throw_pending_exception_full (guint32 *code_size, MonoJumpInfo **ji, gboolean aot) MONO_INTERNAL;
gboolean mono_arch_handle_exception (void *sigctx, gpointer obj, gboolean test_only) MONO_INTERNAL;
void mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean stack_ovf) MONO_INTERNAL;
gboolean mono_handle_soft_stack_ovf (MonoJitTlsData *jit_tls, MonoJitInfo *ji, void *ctx, guint8* fault_addr) MONO_INTERNAL;