提交 10727c04 编写于 作者: Z Zoltan Varga

2010-05-05 Zoltan Varga <vargaz@gmail.com>

	* tramp-<ARCH>.c exceptions-<ARCH>.c mini-trampolines.c mini-exceptions.c
	aot-compiler.c: Use the _full trampoline creation functions on all platforms,
	get rid of the _full from their name.

svn path=/trunk/mono/; revision=156726
上级 b5ca0176
2010-05-05 Zoltan Varga <vargaz@gmail.com>
* tramp-<ARCH>.c exceptions-<ARCH>.c mini-trampolines.c mini-exceptions.c
aot-compiler.c: Use the _full trampoline creation functions on all platforms,
get rid of the _full from their name.
2010-05-05 Zoltan Varga <vargaz@gmail.com>
* tramp-x86.c (mono_arch_create_generic_trampoline): Call
......
......@@ -3798,36 +3798,36 @@ emit_trampolines (MonoAotCompile *acfg)
* method.
*/
for (tramp_type = 0; tramp_type < MONO_TRAMPOLINE_NUM; ++tramp_type) {
mono_arch_create_generic_trampoline_full (tramp_type, &info, TRUE);
mono_arch_create_generic_trampoline (tramp_type, &info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
}
mono_arch_get_nullified_class_init_trampoline (&info);
emit_trampoline (acfg, acfg->got_offset, info);
#if defined(MONO_ARCH_MONITOR_OBJECT_REG)
mono_arch_create_monitor_enter_trampoline_full (&info, TRUE);
mono_arch_create_monitor_enter_trampoline (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
mono_arch_create_monitor_exit_trampoline_full (&info, TRUE);
mono_arch_create_monitor_exit_trampoline (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
#endif
mono_arch_create_generic_class_init_trampoline_full (&info, TRUE);
mono_arch_create_generic_class_init_trampoline (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
/* Emit the exception related code pieces */
code = mono_arch_get_restore_context_full (&info, TRUE);
code = mono_arch_get_restore_context (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
code = mono_arch_get_call_filter_full (&info, TRUE);
code = mono_arch_get_call_filter (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
code = mono_arch_get_throw_exception_full (&info, TRUE);
code = mono_arch_get_throw_exception (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
code = mono_arch_get_rethrow_exception_full (&info, TRUE);
code = mono_arch_get_rethrow_exception (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
code = mono_arch_get_throw_corlib_exception_full (&info, TRUE);
code = mono_arch_get_throw_corlib_exception (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
#if defined(TARGET_AMD64)
code = mono_arch_get_throw_pending_exception_full (&info, TRUE);
code = mono_arch_get_throw_pending_exception (&info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
#endif
......@@ -3835,11 +3835,11 @@ emit_trampolines (MonoAotCompile *acfg)
int offset;
offset = MONO_RGCTX_SLOT_MAKE_RGCTX (i);
code = mono_arch_create_rgctx_lazy_fetch_trampoline_full (offset, &info, TRUE);
code = mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
offset = MONO_RGCTX_SLOT_MAKE_MRGCTX (i);
code = mono_arch_create_rgctx_lazy_fetch_trampoline_full (offset, &info, TRUE);
code = mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
}
......
......@@ -152,7 +152,7 @@ void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler)
* Returns a pointer to a method which restores a previously saved sigcontext.
*/
gpointer
mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
guint8 *start = NULL;
guint8 *code;
......@@ -211,7 +211,7 @@ mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot)
* @exc object in this case).
*/
gpointer
mono_arch_get_call_filter_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
guint8 *start;
int i;
......@@ -464,14 +464,14 @@ get_throw_trampoline (MonoTrampInfo **info, gboolean rethrow, gboolean corlib, g
* signature: void (*func) (MonoException *exc);
*
*/
gpointer
mono_arch_get_throw_exception_full (MonoTrampInfo **info, gboolean aot)
gpointer
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
return get_throw_trampoline (info, FALSE, FALSE, aot);
}
gpointer
mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
{
return get_throw_trampoline (info, TRUE, FALSE, aot);
}
......@@ -487,7 +487,7 @@ mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
* needs no relocations in the caller.
*/
gpointer
mono_arch_get_throw_corlib_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
return get_throw_trampoline (info, FALSE, TRUE, aot);
}
......@@ -916,7 +916,7 @@ mono_amd64_get_original_ip (void)
}
gpointer
mono_arch_get_throw_pending_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_pending_exception (MonoTrampInfo **info, gboolean aot)
{
guint8 *code, *start;
guint8 *br[1];
......@@ -1065,7 +1065,7 @@ mono_arch_exceptions_init (void)
throw_pending_exception = mono_aot_get_trampoline ("throw_pending_exception");
} else {
/* Call this to avoid initialization races */
throw_pending_exception = mono_arch_get_throw_pending_exception_full (NULL, FALSE);
throw_pending_exception = mono_arch_get_throw_pending_exception (NULL, FALSE);
}
}
......
......@@ -110,7 +110,7 @@ typedef struct my_ucontext {
* The first argument in r0 is the pointer to the context.
*/
gpointer
mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
guint8 *code;
guint8 *start;
......@@ -162,7 +162,7 @@ mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot)
* @exc object in this case).
*/
gpointer
mono_arch_get_call_filter_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
guint8 *code;
guint8* start;
......@@ -309,7 +309,7 @@ mono_arch_get_throw_exception_generic (int size, gboolean corlib, gboolean rethr
*
*/
gpointer
mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
{
return mono_arch_get_throw_exception_generic (132, FALSE, TRUE, info, aot);
}
......@@ -327,7 +327,7 @@ mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
*
*/
gpointer
mono_arch_get_throw_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
return mono_arch_get_throw_exception_generic (132, FALSE, FALSE, info, aot);
}
......@@ -344,7 +344,7 @@ mono_arch_get_throw_exception_full (MonoTrampInfo **info, gboolean aot)
* On ARM, the ip is passed instead of an offset.
*/
gpointer
mono_arch_get_throw_corlib_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
return mono_arch_get_throw_exception_generic (168, TRUE, FALSE, info, aot);
}
......
......@@ -90,8 +90,12 @@ restore_context (MonoContext *ctx)
* Returns a pointer to a method which restores a previously saved sigcontext.
*/
gpointer
mono_arch_get_restore_context (void)
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
g_assert (!aot);
if (info)
*info = NULL;
return restore_context;
}
......@@ -216,8 +220,12 @@ call_filter (MonoContext *ctx, gpointer ip)
* @exc object in this case).
*/
gpointer
mono_arch_get_call_filter (void)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
g_assert (!aot);
if (info)
*info = NULL;
/* Initialize the real filter non-lazily */
get_real_call_filter ();
......@@ -354,12 +362,16 @@ get_throw_trampoline (gboolean rethrow)
* signature: void (*func) (MonoException *exc);
*
*/
gpointer
mono_arch_get_throw_exception (void)
gpointer
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8* start;
static gboolean inited = FALSE;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -370,12 +382,16 @@ mono_arch_get_throw_exception (void)
return start;
}
gpointer
mono_arch_get_rethrow_exception (void)
gpointer
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8* start;
static gboolean inited = FALSE;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -396,8 +412,8 @@ mono_arch_get_rethrow_exception (void)
* to get the IP of the throw. Passing the offset has the advantage that it
* needs no relocations in the caller.
*/
gpointer
mono_arch_get_throw_corlib_exception (void)
gpointer
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8* res;
static gboolean inited = FALSE;
......@@ -408,6 +424,10 @@ mono_arch_get_throw_corlib_exception (void)
unw_dyn_info_t *di;
unw_dyn_region_info_t *r_pro;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return res;
......
......@@ -58,7 +58,7 @@
* The first argument in a0 is the pointer to the MonoContext.
*/
gpointer
mono_arch_get_restore_context (void)
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
int i;
guint8 *code;
......@@ -66,6 +66,10 @@ mono_arch_get_restore_context (void)
static int inited = 0;
guint32 iregs_to_restore;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
inited = 1;
......@@ -108,7 +112,7 @@ mono_arch_get_restore_context (void)
* handler (void)
*/
gpointer
mono_arch_get_call_filter (void)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
static guint8 start [320];
static int inited = 0;
......@@ -116,6 +120,10 @@ mono_arch_get_call_filter (void)
int alloc_size;
int offset;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -193,7 +201,7 @@ throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, gboolean
#endif
if (!restore_context)
restore_context = mono_arch_get_restore_context ();
restore_context = mono_get_restore_context ();
/* adjust eip so that it point into the call instruction */
eip -= 8;
......@@ -307,11 +315,15 @@ mono_arch_get_throw_exception_generic (guint8 *start, int size, int corlib, gboo
*
*/
gpointer
mono_arch_get_rethrow_exception (void)
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8 start [GENERIC_EXCEPTION_SIZE];
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
mono_arch_get_throw_exception_generic (start, sizeof (start), FALSE, TRUE);
......@@ -331,12 +343,16 @@ mono_arch_get_rethrow_exception (void)
* x86_call_code (code, arch_get_throw_exception ());
*
*/
gpointer
mono_arch_get_throw_exception (void)
gpointer
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8 start [GENERIC_EXCEPTION_SIZE];
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
mono_arch_get_throw_exception_generic (start, sizeof (start), FALSE, FALSE);
......@@ -365,12 +381,16 @@ mono_arch_get_throw_exception_by_name (void)
* signature: void (*func) (guint32 ex_token, guint32 offset);
* On MIPS, the offset argument is missing.
*/
gpointer
mono_arch_get_throw_corlib_exception (void)
gpointer
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8 start [GENERIC_EXCEPTION_SIZE];
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
mono_arch_get_throw_exception_generic (start, sizeof (start), TRUE, FALSE);
......
......@@ -196,7 +196,7 @@ mono_ppc_create_pre_code_ftnptr (guint8 *code)
* The first argument in r3 is the pointer to the context.
*/
gpointer
mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
guint8 *start, *code;
int size = MONO_PPC_32_64_CASE (128, 172) + PPC_FTNPTR_SIZE;
......@@ -254,7 +254,7 @@ emit_save_saved_regs (guint8 *code, int pos)
* @exc object in this case).
*/
gpointer
mono_arch_get_call_filter_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
guint8 *start, *code;
int alloc_size, pos, i;
......@@ -454,7 +454,7 @@ mono_arch_get_throw_exception_generic (int size, MonoTrampInfo **info, int corli
*
*/
gpointer
mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
{
int size = MONO_PPC_32_64_CASE (132, 224) + PPC_FTNPTR_SIZE;
......@@ -476,7 +476,7 @@ mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
*
*/
gpointer
mono_arch_get_throw_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
int size = MONO_PPC_32_64_CASE (132, 224) + PPC_FTNPTR_SIZE;
......@@ -494,7 +494,7 @@ mono_arch_get_throw_exception_full (MonoTrampInfo **info, gboolean aot)
* On PPC, we pass the ip instead of the offset
*/
gpointer
mono_arch_get_throw_corlib_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
int size = MONO_PPC_32_64_CASE (168, 304) + PPC_FTNPTR_SIZE;
......
......@@ -105,13 +105,17 @@ mono_arch_has_unwind_info (gconstpointer addr)
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_call_filter (void)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
static guint8 *start;
static int inited = 0;
guint8 *code;
int alloc_size, pos, i;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -347,12 +351,16 @@ get_throw_exception_generic (guint8 *start, int size,
/* */
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_throw_exception (void)
gpointer
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8 *start;
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
start = mono_global_codeman_reserve (SZ_THROW);
......@@ -375,11 +383,15 @@ mono_arch_get_throw_exception (void)
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_rethrow_exception (void)
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8 *start;
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
start = mono_global_codeman_reserve (SZ_THROW);
......@@ -544,7 +556,7 @@ mono_arch_ip_from_context (void *sigctx)
/*------------------------------------------------------------------*/
/* */
/* Name - mono_arch_get_restore_context */
/* Name - mono_arch_get_restore_context */
/* */
/* Function - Return the address of the routine that will rest- */
/* ore the context. */
......@@ -552,8 +564,12 @@ mono_arch_ip_from_context (void *sigctx)
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_restore_context ()
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
g_assert (!aot);
if (info)
*info = NULL;
return setcontext;
}
......
......@@ -111,13 +111,17 @@ mono_arch_has_unwind_info (gconstpointer addr)
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_call_filter (void)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
static guint8 *start;
static int inited = 0;
guint8 *code;
int alloc_size, pos, i;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -227,7 +231,7 @@ throw_exception (MonoObject *exc, unsigned long ip, unsigned long sp,
static void (*restore_context) (MonoContext *);
if (!restore_context)
restore_context = mono_arch_get_restore_context();
restore_context = mono_get_restore_context();
memset(&ctx, 0, sizeof(ctx));
......@@ -379,12 +383,16 @@ get_throw_exception_generic (guint8 *start, int size,
/* */
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_throw_exception (void)
gpointer
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8 *start;
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
start = mono_global_codeman_reserve (SZ_THROW);
......@@ -412,6 +420,10 @@ mono_arch_get_rethrow_exception (void)
static guint8 *start;
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
start = mono_global_codeman_reserve (SZ_THROW);
......@@ -433,12 +445,16 @@ mono_arch_get_rethrow_exception (void)
/* */
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_throw_corlib_exception(void)
gpointer
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
static guint8 *start;
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
start = mono_global_codeman_reserve (SZ_THROW);
......@@ -604,7 +620,7 @@ mono_arch_ip_from_context (void *sigctx)
/*------------------------------------------------------------------*/
/* */
/* Name - mono_arch_get_restore_context */
/* Name - mono_arch_get_restore_context */
/* */
/* Function - Return the address of the routine that will rest- */
/* ore the context. */
......@@ -612,12 +628,15 @@ mono_arch_ip_from_context (void *sigctx)
/*------------------------------------------------------------------*/
gpointer
mono_arch_get_restore_context ()
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
g_assert (!aot);
if (info)
*info = NULL;
return setcontext;
}
/*========================= End of Function ========================*/
/*------------------------------------------------------------------*/
......
......@@ -39,12 +39,16 @@
* Returns a pointer to a method which restores a previously saved sigcontext.
*/
gpointer
mono_arch_get_restore_context (void)
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
static guint32 *start;
static int inited = 0;
guint32 *code;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -76,13 +80,17 @@ mono_arch_get_restore_context (void)
* call_filter (MonoContext *ctx, gpointer ip)
*/
gpointer
mono_arch_get_call_filter (void)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
static guint32 *start;
static int inited = 0;
guint32 *code;
int i;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -163,7 +171,7 @@ throw_exception (MonoObject *exc, gpointer sp, gpointer ip, gboolean rethrow)
gpointer *window;
if (!restore_context)
restore_context = mono_arch_get_restore_context ();
restore_context = mono_get_restore_context ();
window = MONO_SPARC_WINDOW_ADDR (sp);
ctx.sp = (gpointer*)sp;
......@@ -213,12 +221,16 @@ get_throw_exception (gboolean rethrow)
* The returned function has the following
* signature: void (*func) (MonoException *exc);
*/
gpointer
mono_arch_get_throw_exception (void)
gpointer
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
static guint32* start;
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -229,12 +241,16 @@ mono_arch_get_throw_exception (void)
return start;
}
gpointer
mono_arch_get_rethrow_exception (void)
gpointer
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
{
static guint32* start;
static int inited = 0;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......@@ -255,14 +271,18 @@ mono_arch_get_rethrow_exception (void)
* to get the IP of the throw. Passing the offset has the advantage that it
* needs no relocations in the caller.
*/
gpointer
mono_arch_get_throw_corlib_exception (void)
gpointer
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
static guint32 *start;
static int inited = 0;
guint32 *code;
int reg;
g_assert (!aot);
if (info)
*info = NULL;
if (inited)
return start;
......
......@@ -261,7 +261,7 @@ void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler)
* Returns a pointer to a method which restores a previously saved sigcontext.
*/
gpointer
mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
{
guint8 *start = NULL;
guint8 *code;
......@@ -313,7 +313,7 @@ mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot)
* @exc object in this case).
*/
gpointer
mono_arch_get_call_filter_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
{
guint8* start;
guint8 *code;
......@@ -580,13 +580,13 @@ get_throw_exception (const char *name, gboolean rethrow, gboolean llvm, gboolean
*
*/
gpointer
mono_arch_get_throw_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
{
return get_throw_exception ("throw_exception_trampoline", FALSE, FALSE, FALSE, info, aot);
}
gpointer
mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
{
return get_throw_exception ("rethow_exception_trampoline", TRUE, FALSE, FALSE, info, aot);
}
......@@ -602,7 +602,7 @@ mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot)
* needs no relocations in the caller.
*/
gpointer
mono_arch_get_throw_corlib_exception_full (MonoTrampInfo **info, gboolean aot)
mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
{
return get_throw_exception ("throw_corlib_exception_trampoline", FALSE, FALSE, TRUE, info, aot);
}
......
......@@ -68,24 +68,17 @@ static void mono_walk_stack_full (MonoDomain *domain, MonoJitTlsData *jit_tls, M
void
mono_exceptions_init (void)
{
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
if (mono_aot_only) {
restore_context_func = mono_aot_get_trampoline ("restore_context");
call_filter_func = mono_aot_get_trampoline ("call_filter");
throw_exception_func = mono_aot_get_trampoline ("throw_exception");
rethrow_exception_func = mono_aot_get_trampoline ("rethrow_exception");
} else {
restore_context_func = mono_arch_get_restore_context_full (NULL, FALSE);
call_filter_func = mono_arch_get_call_filter_full (NULL, FALSE);
throw_exception_func = mono_arch_get_throw_exception_full (NULL, FALSE);
rethrow_exception_func = mono_arch_get_rethrow_exception_full (NULL, FALSE);
restore_context_func = mono_arch_get_restore_context (NULL, FALSE);
call_filter_func = mono_arch_get_call_filter (NULL, FALSE);
throw_exception_func = mono_arch_get_throw_exception (NULL, FALSE);
rethrow_exception_func = mono_arch_get_rethrow_exception (NULL, FALSE);
}
#else
restore_context_func = mono_arch_get_restore_context ();
call_filter_func = mono_arch_get_call_filter ();
throw_exception_func = mono_arch_get_throw_exception ();
rethrow_exception_func = mono_arch_get_rethrow_exception ();
#endif
#ifdef MONO_ARCH_HAVE_RESTORE_STACK_SUPPORT
try_more_restore_tramp = mono_create_specific_trampoline (try_more_restore, MONO_TRAMPOLINE_RESTORE_STACK_PROT, mono_domain_get (), NULL);
restore_stack_protection_tramp = mono_create_specific_trampoline (restore_stack_protection, MONO_TRAMPOLINE_RESTORE_STACK_PROT, mono_domain_get (), NULL);
......@@ -128,32 +121,18 @@ gpointer
mono_get_throw_exception_by_name (void)
{
#ifdef MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
gpointer code = NULL;
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
guint32 code_size;
MonoJumpInfo *ji;
#endif
/* This depends on corlib classes so cannot be inited in mono_exceptions_init () */
if (throw_exception_by_name_func)
return throw_exception_by_name_func;
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
if (mono_aot_only)
code = mono_aot_get_trampoline ("throw_exception_by_name");
else
code = mono_arch_get_throw_exception_by_name_full (&code_size, &ji, FALSE);
#else
code = mono_arch_get_throw_exception_by_name ();
#endif
code = mono_arch_get_throw_exception_by_name ();
mono_memory_barrier ();
throw_exception_by_name_func = code;
#else
throw_exception_by_name_func = NULL;
g_assert_not_reached ();
......@@ -172,14 +151,10 @@ mono_get_throw_corlib_exception (void)
return throw_corlib_exception_func;
#if MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
if (mono_aot_only)
code = mono_aot_get_trampoline ("throw_corlib_exception");
else
code = mono_arch_get_throw_corlib_exception_full (NULL, FALSE);
#else
code = mono_arch_get_throw_corlib_exception ();
#endif
code = mono_arch_get_throw_corlib_exception (NULL, FALSE);
#else
g_assert_not_reached ();
#endif
......
......@@ -191,7 +191,7 @@ mips_emit_exc_by_name(guint8 *code, const char *name)
g_assert (exc_class);
mips_load_const (code, mips_a0, exc_class->type_token);
addr = (guint32) mono_arch_get_throw_corlib_exception ();
addr = (guint32) mono_get_throw_corlib_exception ();
mips_load_const (code, mips_t9, addr);
mips_jalr (code, mips_t9, mips_ra);
mips_nop (code);
......
......@@ -1074,18 +1074,16 @@ mono_get_trampoline_func (MonoTrampolineType tramp_type)
static guchar*
create_trampoline_code (MonoTrampolineType tramp_type)
{
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
MonoTrampInfo *info;
guchar *code;
code = mono_arch_create_generic_trampoline_full (tramp_type, &info, FALSE);
mono_save_trampoline_xdebug_info (info->name, info->code, info->code_size, info->unwind_ops);
mono_tramp_info_free (info);
code = mono_arch_create_generic_trampoline (tramp_type, &info, FALSE);
if (info) {
mono_save_trampoline_xdebug_info (info->name, info->code, info->code_size, info->unwind_ops);
mono_tramp_info_free (info);
}
return code;
#else
return mono_arch_create_trampoline_code (tramp_type);
#endif
}
void
......@@ -1198,11 +1196,7 @@ mono_create_generic_class_init_trampoline (void)
/* get_named_code () might return an ftnptr, but our caller expects a direct pointer */
code = mono_get_addr_from_ftnptr (mono_aot_get_trampoline ("generic_class_init_trampoline"));
else
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
code = mono_arch_create_generic_class_init_trampoline_full (NULL, FALSE);
#else
code = mono_arch_create_generic_class_init_trampoline ();
#endif
code = mono_arch_create_generic_class_init_trampoline (NULL, FALSE);
}
mono_trampolines_unlock ();
......@@ -1374,11 +1368,7 @@ mono_create_rgctx_lazy_fetch_trampoline (guint32 offset)
if (tramp)
return tramp;
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
tramp = mono_arch_create_rgctx_lazy_fetch_trampoline_full (offset, NULL, FALSE);
#else
tramp = mono_arch_create_rgctx_lazy_fetch_trampoline (offset);
#endif
tramp = mono_arch_create_rgctx_lazy_fetch_trampoline (offset, NULL, FALSE);
ptr = mono_create_ftnptr (mono_get_root_domain (), tramp);
mono_trampolines_lock ();
......@@ -1416,11 +1406,7 @@ mono_create_monitor_enter_trampoline (void)
mono_trampolines_lock ();
if (!code)
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
code = mono_arch_create_monitor_enter_trampoline_full (NULL, FALSE);
#else
code = mono_arch_create_monitor_enter_trampoline ();
#endif
code = mono_arch_create_monitor_enter_trampoline (NULL, FALSE);
mono_trampolines_unlock ();
#else
......@@ -1446,11 +1432,7 @@ mono_create_monitor_exit_trampoline (void)
mono_trampolines_lock ();
if (!code)
#ifdef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
code = mono_arch_create_monitor_exit_trampoline_full (NULL, FALSE);
#else
code = mono_arch_create_monitor_exit_trampoline ();
#endif
code = mono_arch_create_monitor_exit_trampoline (NULL, FALSE);
mono_trampolines_unlock ();
#else
......
......@@ -1697,22 +1697,13 @@ void mono_codegen (MonoCompile *cfg) MONO_INTERNAL
void mono_call_inst_add_outarg_reg (MonoCompile *cfg, MonoCallInst *call, int vreg, int hreg, gboolean fp) MONO_INTERNAL;
const char *mono_arch_regname (int reg) MONO_INTERNAL;
const char *mono_arch_fregname (int reg) MONO_INTERNAL;
gpointer mono_arch_get_throw_exception (void) MONO_INTERNAL;
gpointer mono_arch_get_rethrow_exception (void) MONO_INTERNAL;
gpointer mono_arch_get_throw_exception_by_name (void) MONO_INTERNAL;
gpointer mono_arch_get_throw_corlib_exception (void) MONO_INTERNAL;
void mono_arch_exceptions_init (void) MONO_INTERNAL;
guchar* mono_arch_create_trampoline_code (MonoTrampolineType tramp_type) MONO_INTERNAL;
guchar* mono_arch_create_generic_trampoline_full (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot) MONO_INTERNAL;
gpointer mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_create_generic_class_init_trampoline (void) MONO_INTERNAL;
gpointer mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
guchar* mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info) MONO_INTERNAL;
gpointer mono_arch_create_monitor_enter_trampoline (void) MONO_INTERNAL;
gpointer mono_arch_create_monitor_exit_trampoline (void) MONO_INTERNAL;
gpointer mono_arch_create_monitor_enter_trampoline_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_create_monitor_exit_trampoline_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
GList *mono_arch_get_allocatable_int_vars (MonoCompile *cfg) MONO_INTERNAL;
GList *mono_arch_get_global_int_regs (MonoCompile *cfg) MONO_INTERNAL;
GList *mono_arch_get_global_fp_regs (MonoCompile *cfg) MONO_INTERNAL;
......@@ -1780,14 +1771,13 @@ mono_arch_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
MonoJitInfo *ji, MonoContext *ctx,
MonoContext *new_ctx, MonoLMF **lmf,
StackFrameInfo *frame_info) MONO_INTERNAL;
gpointer mono_arch_get_call_filter (void) MONO_INTERNAL;
gpointer mono_arch_get_restore_context (void) MONO_INTERNAL;
gpointer mono_arch_get_call_filter_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_restore_context_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_exception_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_rethrow_exception_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_corlib_exception_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_pending_exception_full (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_exception_by_name (void) MONO_INTERNAL;
gpointer mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_throw_pending_exception (MonoTrampInfo **info, 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;
......
......@@ -281,7 +281,7 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
}
guchar*
mono_arch_create_generic_trampoline_full (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *code, *tramp, *br [2], *r11_save_code, *after_r11_save_code;
int i, lmf_offset, offset, res_offset, arg_offset, rax_offset, tramp_offset, saved_regs_offset;
......@@ -614,7 +614,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo **info, gboolean aot)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......@@ -716,7 +716,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo *
}
gpointer
mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......@@ -765,7 +765,7 @@ mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gbool
#ifdef MONO_ARCH_MONITOR_OBJECT_REG
gpointer
mono_arch_create_monitor_enter_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......@@ -869,7 +869,7 @@ mono_arch_create_monitor_enter_trampoline_full (MonoTrampInfo **info, gboolean a
}
gpointer
mono_arch_create_monitor_exit_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......
......@@ -128,7 +128,7 @@ emit_bx (guint8* code, int reg)
#define GEN_TRAMP_SIZE 196
guchar*
mono_arch_create_generic_trampoline_full (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *code = NULL;
guint8 *load_get_lmf_addr, *load_trampoline;
......@@ -485,7 +485,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericCo
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo **info, gboolean aot)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......@@ -601,7 +601,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo *
#define arm_is_imm8(v) ((v) > -256 && (v) < 256)
gpointer
mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......@@ -666,7 +666,7 @@ mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gbool
#else
guchar*
mono_arch_create_generic_trampoline_full (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
g_assert_not_reached ();
return NULL;
......@@ -694,14 +694,14 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericCo
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo **info, gboolean aot)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
g_assert_not_reached ();
return NULL;
}
gpointer
mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot)
{
g_assert_not_reached ();
return NULL;
......
......@@ -180,7 +180,7 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
}
guchar*
mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *tramp;
int i, offset, saved_regs_offset, saved_fpregs_offset, last_offset, framesize;
......@@ -190,6 +190,10 @@ mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
unw_dyn_info_t *di;
unw_dyn_region_info_t *r_pro;
g_assert (!aot);
if (info)
*info = NULL;
/*
* Since jump trampolines are not patched, this trampoline is executed every
* time a call is made to a jump trampoline. So we try to keep things faster
......@@ -412,7 +416,7 @@ mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg)
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
/* FIXME: implement! */
g_assert_not_reached ();
......
......@@ -217,12 +217,16 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
* -------------------
*/
guchar*
mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *tramp, *code = NULL;
int i, lmf;
int max_code_len = 768;
g_assert (!aot);
if (info)
*info = NULL;
/* Now we'll create in 'buf' the MIPS trampoline code. This
is the trampoline code common to all methods */
......@@ -379,7 +383,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
/* FIXME: implement! */
g_assert_not_reached ();
......@@ -387,7 +391,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
}
gpointer
mono_arch_create_generic_class_init_trampoline (void)
mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot)
{
/* FIXME: implement! */
g_assert_not_reached ();
......
......@@ -250,7 +250,7 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
* -------------------
*/
guchar*
mono_arch_create_generic_trampoline_full (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *code = NULL;
......@@ -518,7 +518,7 @@ emit_trampoline_jump (guint8 *code, guint8 *tramp)
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo **info, gboolean aot)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
#ifdef MONO_ARCH_VTABLE_REG
guint8 *tramp;
......@@ -631,7 +631,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo *
}
gpointer
mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......
......@@ -263,12 +263,15 @@ mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
/*------------------------------------------------------------------*/
guchar*
mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *tramp, *code;
int i, offset, lmfOffset;
g_assert (!aot);
if (info)
*info = NULL;
/* Now we'll create in 'buf' the S/390 trampoline code. This
is the trampoline code common to all methods */
......@@ -499,7 +502,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
/*========================= End of Function ========================*/
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
/* FIXME: implement! */
g_assert_not_reached ();
......
......@@ -311,13 +311,16 @@ mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
/* */
/*------------------------------------------------------------------*/
guchar *
mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
guchar*
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *tramp, *code;
int i, offset, lmfOffset;
g_assert (!aot);
if (info)
*info = NULL;
/* Now we'll create in 'buf' the S/390 trampoline code. This
is the trampoline code common to all methods */
......@@ -551,7 +554,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
/*------------------------------------------------------------------*/
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
/* FIXME: implement! */
g_assert_not_reached ();
......
......@@ -88,12 +88,16 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
#define ALIGN_TO(val,align) (((val) + ((align) - 1)) & ~((align) - 1))
guchar*
mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *code, *tramp_addr;
guint32 lmf_offset, regs_offset, method_reg, i;
gboolean has_caller;
g_assert (!aot);
if (info)
*info = NULL;
if (tramp_type == MONO_TRAMPOLINE_JUMP)
has_caller = FALSE;
else
......@@ -269,7 +273,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
/* FIXME: implement! */
g_assert_not_reached ();
......
......@@ -223,7 +223,7 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
}
guchar*
mono_arch_create_generic_trampoline_full (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
guint8 *buf, *code, *tramp;
int pushed_args, pushed_args_caller_saved;
......@@ -495,7 +495,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
}
gpointer
mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo **info, gboolean aot)
mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......@@ -588,7 +588,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline_full (guint32 slot, MonoTrampInfo *
}
gpointer
mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp;
guint8 *code, *buf;
......@@ -657,7 +657,7 @@ mono_arch_create_generic_class_init_trampoline_full (MonoTrampInfo **info, gbool
*
*/
gpointer
mono_arch_create_monitor_enter_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp = mono_get_trampoline_code (MONO_TRAMPOLINE_MONITOR_ENTER);
guint8 *code, *buf;
......@@ -770,7 +770,7 @@ mono_arch_create_monitor_enter_trampoline_full (MonoTrampInfo **info, gboolean a
}
gpointer
mono_arch_create_monitor_exit_trampoline_full (MonoTrampInfo **info, gboolean aot)
mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
{
guint8 *tramp = mono_get_trampoline_code (MONO_TRAMPOLINE_MONITOR_EXIT);
guint8 *code, *buf;
......@@ -867,20 +867,23 @@ mono_arch_create_monitor_exit_trampoline_full (MonoTrampInfo **info, gboolean ao
return buf;
}
#else
gpointer
mono_arch_create_monitor_enter_trampoline (void)
mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
{
g_assert_not_reached ();
return NULL;
}
gpointer
mono_arch_create_monitor_exit_trampoline (void)
mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
{
g_assert_not_reached ();
return NULL;
}
#endif
void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册