Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Fri, 16 Jan 2009 14:23:17 +0000 (14:23 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Fri, 16 Jan 2009 14:23:17 +0000 (14:23 -0000)
* exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
trampoline code. Include ucontext.h only if available.

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

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

index 285b4de7b11f6235752001427ecaee6cfaaf41ca..7d4ebb12cfe48380162cdf5329d8fa2bee286e50 100644 (file)
@@ -1,3 +1,9 @@
+
+Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
+
+       * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
+       trampoline code. Include ucontext.h only if available.
+
 2009-01-15  Mark Probst  <mark.probst@gmail.com>
 
        * mini.c: mono_domain_lookup_shared_generic() takes an open method
index 66819cd2549cc416851930fc386feff3c17dcecf..6cb794d3b0b642c48c7939958a5bd4f978c9ea58 100644 (file)
@@ -15,7 +15,9 @@
 #include <signal.h>
 #include <string.h>
 #include <stddef.h>
+#if HAVE_UCONTEXT_H
 #include <ucontext.h>
+#endif
 
 #include <mono/arch/ppc/ppc-codegen.h>
 #include <mono/metadata/appdomain.h>
@@ -397,7 +399,7 @@ mono_arch_get_throw_exception_generic (guint8 *start, int size, int by_name, gbo
        ppc_bcctrl (code, PPC_BR_ALWAYS, 0);
        /* we should never reach this breakpoint */
        ppc_break (code);
-       g_assert ((code - start) < size);
+       g_assert ((code - start) <= size);
        mono_arch_flush_icache (start, code - start);
        return start;
 }
@@ -474,7 +476,7 @@ mono_arch_get_throw_exception_by_name (void)
        static int inited = 0;
 
        guint8 *code;
-       int size = MONO_PPC_32_64_CASE (168, 292) + PPC_FTNPTR_SIZE;
+       int size = MONO_PPC_32_64_CASE (168, 304) + PPC_FTNPTR_SIZE;
 
        if (inited)
                return start;