On 11/26/08 03:47, Maho NAKATA wrote:
From: "Christian Lohmaier" <[EMAIL PROTECTED]>
Subject: Re: [mac] no MacOSX PPC version of DEV300 m33/m34 ?
Date: Wed, 26 Nov 2008 00:33:19 +0100
Hi *,
On Tue, Nov 25, 2008 at 1:25 PM, Stephan Bergmann
<[EMAIL PROTECTED]> wrote:
On 11/25/08 11:03, Christian Lohmaier wrote:
But did you have any problems in i18npool? That's another candidate
where builds often fail (running build often enough gets the module
built). Here, saxparser crashes IIRC.. If not stripping excecutables
would solve this problem as well... Would be great.
Had no problem building i18npool.
Unfortunately didn't avoid the i18npool breaker. building cppu with
debug seems to be the only way to avoid the breaker here...
Me too. I get it too :(
Repeatedly building i18npool indeed still crashes. Poking a little
further, I got the idea that it might be the instruction cache flushing
in the GCC--UNO bridge that causes all the trouble (both regcomp and
saxparser; after all, that would explain why it does not happen always).
And indeed, bridges::cpp_uno::shared::VtableFactory::flushCode in
trunk/bridges/source/cpp_uno/gcc3_macosx_powerpc/[EMAIL PROTECTED]
(copied from
trunk/bridges/source/cpp_uno/gcc3_linux_powerpc/[EMAIL PROTECTED], both
by khendricks on cc---maybe he remembers something or can add other
kinds of insight...) appears to deviate slightly from what is
recommended on page 352 of "Power ISA Version 2.04"
(<http://www.power.org/resources/downloads/PowerISA_Public.pdf>).
With the attached DEV300m35-bridges.patch applied, continuously building
i18npool (for maybe about an hour until now---I'll keep it running
overnight) did not yet fail. Would be interesting to see how this patch
works for others. (If it still fails, it would be interesting to also
try smaller values for lineSize, like 16, 8, 4.)
-Stephan
Index: bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
===================================================================
--- bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx (revision 264221)
+++ bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx (working copy)
@@ -638,16 +638,17 @@
}
-
-#define MIN_LINE_SIZE 32
-
void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const * bptr, unsigned char const * eptr)
{
- unsigned char * eaddr = (unsigned char *) eptr + MIN_LINE_SIZE + 1;
- for ( unsigned char * addr = (unsigned char *) bptr; addr < eaddr; addr += MIN_LINE_SIZE) {
- __asm__ volatile ( "dcbf 0,%0;" "icbi 0,%0;" : : "r"(addr) : "memory");
- }
- __asm__ volatile ( "sync;" "isync;" : : : "memory");
+ int const lineSize = 32;
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("dcbst 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("sync" : : : "memory");
+ for (unsigned char const * p = bptr; p < eptr + lineSize; p += lineSize) {
+ __asm__ volatile ("icbi 0, %0" : : "r"(p) : "memory");
+ }
+ __asm__ volatile ("isync" : : : "memory");
}
struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]