Merge pull request #3387 from xmcclure/test-suite-bump
[mono.git] / mono / mini / mini-ia64.c
index 3dca3c844f6b77feb30dbc8eca8bd2848161a209..d88a6c99a8f362bb690424ace4462d58f3d913d9 100644 (file)
@@ -2690,16 +2690,16 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                case OP_CKFINITE:
                        /* Quiet NaN */
                        ia64_fclass_m (code, 6, 7, ins->sreg1, 0x080);
-                       emit_cond_system_exception (cfg, code, "ArithmeticException", 6);
+                       emit_cond_system_exception (cfg, code, "OverflowException", 6);
                        /* Signaling NaN */
                        ia64_fclass_m (code, 6, 7, ins->sreg1, 0x040);
-                       emit_cond_system_exception (cfg, code, "ArithmeticException", 6);
+                       emit_cond_system_exception (cfg, code, "OverflowException", 6);
                        /* Positive infinity */
                        ia64_fclass_m (code, 6, 7, ins->sreg1, 0x021);
-                       emit_cond_system_exception (cfg, code, "ArithmeticException", 6);
+                       emit_cond_system_exception (cfg, code, "OverflowException", 6);
                        /* Negative infinity */
                        ia64_fclass_m (code, 6, 7, ins->sreg1, 0x022);
-                       emit_cond_system_exception (cfg, code, "ArithmeticException", 6);
+                       emit_cond_system_exception (cfg, code, "OverflowException", 6);
                        break;
 
                /* Calls */
@@ -3777,17 +3777,18 @@ ia64_patch (unsigned char* code, gpointer target)
 }
 
 void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
 {
        MonoJumpInfo *patch_info;
 
+       mono_error_init (error);
+
        for (patch_info = ji; patch_info; patch_info = patch_info->next) {
                unsigned char *ip = patch_info->ip.i + code;
                const unsigned char *target;
-               MonoError error;
 
-               target = mono_resolve_patch_target_checked (method, domain, code, patch_info, run_cctors, &error);
-               mono_error_raise_exception (&error); /* FIXME: don't raise here */
+               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+               return_if_nok (error);
 
                if (patch_info->type == MONO_PATCH_INFO_NONE)
                        continue;
@@ -4188,8 +4189,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
                        guint8* buf;
                        guint64 exc_token_index;
 
-                       exc_class = mono_class_from_name (mono_defaults.corlib, "System", patch_info->data.name);
-                       g_assert (exc_class);
+                       exc_class = mono_class_load_from_name (mono_defaults.corlib, "System", patch_info->data.name);
                        exc_token_index = mono_metadata_token_index (exc_class->type_token);
                        throw_ip = cfg->native_code + patch_info->ip.i;