2010-05-05 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Wed, 5 May 2010 14:19:13 +0000 (14:19 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 5 May 2010 14:19:13 +0000 (14:19 -0000)
* 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

24 files changed:
mono/mini/ChangeLog
mono/mini/aot-compiler.c
mono/mini/exceptions-amd64.c
mono/mini/exceptions-arm.c
mono/mini/exceptions-ia64.c
mono/mini/exceptions-mips.c
mono/mini/exceptions-ppc.c
mono/mini/exceptions-s390.c
mono/mini/exceptions-s390x.c
mono/mini/exceptions-sparc.c
mono/mini/exceptions-x86.c
mono/mini/mini-exceptions.c
mono/mini/mini-mips.c
mono/mini/mini-trampolines.c
mono/mini/mini.h
mono/mini/tramp-amd64.c
mono/mini/tramp-arm.c
mono/mini/tramp-ia64.c
mono/mini/tramp-mips.c
mono/mini/tramp-ppc.c
mono/mini/tramp-s390.c
mono/mini/tramp-s390x.c
mono/mini/tramp-sparc.c
mono/mini/tramp-x86.c

index 5be450e1fdb6ad68df4b21bb920f699d9aafb92c..440e8f979bc925cb62adf85473438680d6241190 100755 (executable)
@@ -1,3 +1,9 @@
+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
index 2306c2b1477e159683969a19712e49af61788e94..58df6119c677e703bce3a1d36aae3ff9a9c4d01a 100644 (file)
@@ -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);
                }
 
index 3deee9ad742452a538774a3455eed0dc351df35e..0ff267a1704aecf91ef390c3753f7930c99a6a77 100644 (file)
@@ -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);
        }
 }
 
index 1436fe1740fce95c05219f4a13a0b518809e66b2..0e4240299ca59d27dc1c82fb4c9e189ab9cd5b24 100644 (file)
@@ -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);
 }      
index a7d04a568487c7697a4afe24b7f24baae939db09..df1a4d5f88f335e4b97aea13496bb9993fc5b97a 100644 (file)
@@ -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;
 
index 093e0c16bc203a4b67a742b5308c3c5758576d57..e2af85b9c57eb8a7c9367fd349ff952edf289803 100644 (file)
@@ -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);
index f5a1dbad3a64d67f15cd74744fd9f1ab38e039ad..0ffcf23a17d2f8f75c7ae9d0e74bffce4c41a993 100644 (file)
@@ -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;
 
index 2e41bb787e4c6f3456e75e066aa1fb46c0b243ca..663c0e94c268751924011c5ccfa4469065df53d7 100644 (file)
@@ -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;
 }
 
index abb48d2a0516ca70fe6382fcc59a9614d7ba8bdc..7129964e15af554454d762aab50d7afbb7462729 100644 (file)
@@ -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 ========================*/
 
 /*------------------------------------------------------------------*/
index 1f34788a5c362ca4afe22d924036a69e9dc61ded..6b12133ee062155da6ba85f6c92a2eec1bd50d31 100644 (file)
  * 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;
 
index 76ac83da368da5dc720e29beba55a7c1e0450951..9d6f9cadc737fadd9de56c36c56cec1fc8fdd4b7 100644 (file)
@@ -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);
 }
index 4dcaee6b6ece539bff098bf3ee5523fd99937025..fb59bf5e495b0d1466750f4e73b2cfdd386a1f4f 100644 (file)
@@ -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
index de827e33b96e4cf1990eee0ac3df1461e9c3e9cb..73c43d47a0e6532ebd438f08b9056c607be4e1a1 100644 (file)
@@ -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);
index fa5ba34be45df2e6e65fff0e40100da27dfc2e9b..f215cc585bd05e04d03ecb9e8edf54a18a182142 100644 (file)
@@ -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
index dbd6bb9d03ceeebbca33c99eee5660b1e0c54703..b3f01e9daf4670b28c37d6f2365bb9c7a7a96726 100644 (file)
@@ -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;
index 2d65b392e5e929063d151ab0dbca7cf50bd1ecfb..985c868f8ef70a46614e5a7afcb3b22e60bdec16 100644 (file)
@@ -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;
index db8f4c8e1824168bfc13ed8b834dbb0e571b53d3..8e1a1c61cf59b1fbb7cbb09974cd05d088c97b3b 100644 (file)
@@ -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;
index 4a9970ff42e05b08f811cfcba702770d56acd0d4..6a2dc90a303c4cc01d42ed191ab423878f0344dd 100644 (file)
@@ -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 ();
index 3cc54ce4c2ddcd8da88c5ab72f1ffd0be5dab984..f8ae3eff822894bb4933d29664a05881ffac4a6a 100644 (file)
@@ -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 ();
index f70ac402848e2ff227be4ed55605d3b625d1c378..6d30d3a89c7b0d3b9af357c79cc0f3811381e4fc 100644 (file)
@@ -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;
index c4294458abd3dc4a55d3cc258d373ca3ab27ad47..3f7eb404708a9fbcc052ab98a32a1ea006226da8 100644 (file)
@@ -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 ();
index b635e7ce6b706970b1cf440d82c73976771d8813..5345e441dcffbd5738c9d61e592bfa0142d185a5 100644 (file)
@@ -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 ();
index 0fae9ac9b6aa6f1fe04aaea8f8c4f487956b7c11..fa469c9efef26b5462d7ebf8ce6b08497876f8fc 100644 (file)
@@ -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 ();
index f03f1a72b1d4b5696f65a6da2f91dacb4d5b5a75..ac088b379fb0121058346798bd725893fe1156ad 100644 (file)
@@ -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