2010-01-20 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / exceptions-sparc.c
index 4f7640b5ce0b7c64b5cab25053ccaef1eeea5a4f..1f34788a5c362ca4afe22d924036a69e9dc61ded 100644 (file)
@@ -245,59 +245,6 @@ mono_arch_get_rethrow_exception (void)
        return start;
 }
 
-/**
- * mono_arch_get_throw_exception_by_name:
- *
- * Returns a function pointer which can be used to raise 
- * corlib exceptions. The returned function has the following 
- * signature: void (*func) (char *exc_name, gpointer ip); 
- */
-gpointer 
-mono_arch_get_throw_exception_by_name (void)
-{
-       static guint32 *start;
-       static int inited = 0;
-       guint32 *code;
-       int reg;
-
-       if (inited)
-               return start;
-
-       inited = 1;
-       code = start = mono_global_codeman_reserve (64 * sizeof (guint32));
-
-#ifdef SPARCV9
-       reg = sparc_g4;
-#else
-       reg = sparc_g1;
-#endif
-
-       sparc_save_imm (code, sparc_sp, -160, sparc_sp);
-
-       sparc_mov_reg_reg (code, sparc_i0, sparc_o2);
-       sparc_set (code, mono_defaults.corlib, sparc_o0);
-       sparc_set (code, "System", sparc_o1);
-       sparc_set (code, mono_exception_from_name, sparc_o7);
-       sparc_jmpl (code, sparc_o7, sparc_g0, sparc_callsite);
-       sparc_nop (code);
-
-       /* Return to the caller, so exception handling does not see this frame */
-       sparc_restore (code, sparc_o0, sparc_g0, sparc_o0);
-
-       /* Put original return address into %o7 */
-       sparc_mov_reg_reg (code, sparc_o1, sparc_o7);
-       sparc_set (code, mono_arch_get_throw_exception (), reg);
-       /* Use a jmp instead of a call so o7 is preserved */
-       sparc_jmpl_imm (code, reg, 0, sparc_g0);
-       sparc_nop (code);
-
-       g_assert ((code - start) < 32);
-
-       mono_arch_flush_icache ((guint8*)start, (guint8*)code - (guint8*)start);
-
-       return start;
-}
-
 /**
  * mono_arch_get_throw_corlib_exception:
  *
@@ -378,7 +325,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInf
        if (prev_ji && (ip > prev_ji->code_start && ((guint8*)ip < ((guint8*)prev_ji->code_start) + prev_ji->code_size)))
                ji = prev_ji;
        else
-               ji = mono_jit_info_table_find (domain, ip);
+               ji = mini_jit_info_table_find (domain, ip, NULL);
 
        if (managed)
                *managed = FALSE;
@@ -412,7 +359,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInf
                if (!(*lmf)->method)
                        return (gpointer)-1;
 
-               if ((ji = mono_jit_info_table_find (domain, (gpointer)(*lmf)->ip))) {
+               if ((ji = mini_jit_info_table_find (domain, (gpointer)(*lmf)->ip, NULL))) {
                } else {
                        memset (res, 0, MONO_SIZEOF_JIT_INFO);
                        res->method = (*lmf)->method;