Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Fri, 19 Nov 2004 12:34:01 +0000 (12:34 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Fri, 19 Nov 2004 12:34:01 +0000 (12:34 -0000)
* mini-ppc.c: adjust initial prolog size (bug #69691).

svn path=/trunk/mono/; revision=36308

mono/mini/ChangeLog
mono/mini/mini-ppc.c

index 63ea57c4e410dbee5a28c2136c92a3d8bd431e22..ed9bc3f4ec2ed687e9709191235dd8865028fbdd 100644 (file)
@@ -1,3 +1,8 @@
+
+Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
+
+       * mini-ppc.c: adjust initial prolog size (bug #69691).
+
 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
 
        * cpu-pentium.md (localloc): Increase max instruction len. Fixes
index d26680e78cd26562777a01be749259973eceb561..e9dcf792b6827f18103e9fa7e795ec62cb3c096d 100644 (file)
@@ -3349,7 +3349,8 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
                tracing = 1;
 
-       cfg->code_size = 256;
+       sig = method->signature;
+       cfg->code_size = 256 + sig->param_count * 20;
        code = cfg->native_code = g_malloc (cfg->code_size);
 
        if (1 || cfg->flags & MONO_CFG_HAS_CALLS) {
@@ -3424,7 +3425,6 @@ mono_arch_emit_prolog (MonoCompile *cfg)
        }
 
        /* load arguments allocated to register from the stack */
-       sig = method->signature;
        pos = 0;
 
        cinfo = calculate_sizes (sig, sig->pinvoke);
@@ -3621,6 +3621,7 @@ register.  Should this case include linux/ppc?
                code = mono_arch_instrument_prolog (cfg, mono_trace_enter_method, code, TRUE);
 
        cfg->code_len = code - cfg->native_code;
+       g_assert (cfg->code_len < cfg->code_size);
        g_free (cinfo);
 
        return code;