Implement gsharedvt support for constrained calls to Object.GetHashCode ().
[mono.git] / mono / mini / exceptions-s390.c
index 03176055cfa22d106ac68347cd6480e2a1080ba8..a6db38e300c99c808a357b41cc4231c2bf9d74e2 100644 (file)
@@ -65,8 +65,7 @@
 /*------------------------------------------------------------------*/
 
 gboolean mono_arch_handle_exception (void     *ctx,
-                                    gpointer obj, 
-                                    gboolean test_only);
+                                                                        gpointer obj);
 
 /*========================= End of Prototypes ======================*/
 
@@ -76,23 +75,6 @@ gboolean mono_arch_handle_exception (void     *ctx,
 
 /*====================== End of Global Variables ===================*/
 
-/*------------------------------------------------------------------*/
-/*                                                                  */
-/* Name                - mono_arch_has_unwind_info                         */
-/*                                                                  */
-/* Function    - Tests if a function has a DWARF exception table   */
-/*               that is able to restore all caller saved registers*/
-/*                                                                  */
-/*------------------------------------------------------------------*/
-
-gboolean
-mono_arch_has_unwind_info (gconstpointer addr)
-{
-       return FALSE;
-}
-
-/*========================= End of Function ========================*/
-
 /*------------------------------------------------------------------*/
 /*                                                                  */
 /* Name                - mono_arch_get_call_filter                         */
@@ -246,7 +228,7 @@ throw_exception (MonoObject *exc, unsigned long ip, unsigned long sp,
                if (!rethrow)
                        mono_ex->stack_trace = NULL;
        }
-       mono_arch_handle_exception (&ctx, exc, FALSE);
+       mono_arch_handle_exception (&ctx, exc);
        setcontext(&ctx);
 
        g_assert_not_reached ();
@@ -440,7 +422,8 @@ mono_arch_get_throw_exception_by_name (void)
 gboolean
 mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, 
                                                         MonoJitInfo *ji, MonoContext *ctx, 
-                                                        MonoContext *new_ctx, MonoLMF **lmf, 
+                                                        MonoContext *new_ctx, MonoLMF **lmf,
+                                                        mgreg_t **save_locations,
                                                         StackFrameInfo *frame)
 {
        gpointer ip = MONO_CONTEXT_GET_IP (ctx);
@@ -448,7 +431,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
        memset (frame, 0, sizeof (StackFrameInfo));
        frame->ji = ji;
-       frame->managed = FALSE;
 
        *new_ctx = *ctx;
 
@@ -457,9 +439,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
                frame->type = FRAME_TYPE_MANAGED;
 
-               if (!ji->method->wrapper_type || ji->method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
-                       frame->managed = TRUE;
-
                if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->ebp)) {
                        /* remove any unused lmf */
                        *lmf = (*lmf)->previous_lmf;
@@ -470,7 +449,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                sframe = (MonoS390StackFrame *) MONO_CONTEXT_GET_SP (ctx);
                MONO_CONTEXT_SET_BP (new_ctx, sframe->prev);
                sframe = (MonoS390StackFrame *) sframe->prev;
-               MONO_CONTEXT_SET_IP (new_ctx, sframe->return_address);
+               MONO_CONTEXT_SET_IP (new_ctx, (guint8*)sframe->return_address - 2);
                memcpy (&new_ctx->uc_mcontext.gregs[6], sframe->regs, (8*sizeof(gint32)));
                return TRUE;
        } else if (*lmf) {
@@ -490,7 +469,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
                memcpy(new_ctx->uc_mcontext.fpregs.fprs, (*lmf)->fregs, sizeof((*lmf)->fregs));
 
                MONO_CONTEXT_SET_BP (new_ctx, (*lmf)->ebp);
-               MONO_CONTEXT_SET_IP (new_ctx, (*lmf)->eip);
+               MONO_CONTEXT_SET_IP (new_ctx, (*lmf)->eip - 2);
                *lmf = (*lmf)->previous_lmf;
 
                return TRUE;
@@ -509,15 +488,13 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
 /*                                                                  */
 /* Parameters   - ctx       - Saved processor state                 */
 /*                obj       - The exception object                  */
-/*                test_only - Only test if the exception is caught, */
-/*                            but don't call handlers               */
 /*                                                                  */
 /*------------------------------------------------------------------*/
 
 gboolean
-mono_arch_handle_exception (void *uc, gpointer obj, gboolean test_only)
+mono_arch_handle_exception (void *uc, gpointer obj)
 {
-       return mono_handle_exception (uc, obj, mono_arch_ip_from_context(uc), test_only);
+       return mono_handle_exception (uc, obj);
 }
 
 /*========================= End of Function ========================*/