Bugzilla – Bug 2445
update for the PPC dnet client for BeOS
Last modified: 2009-10-09 00:00:18 UTC
My BeOS client that runs on my BeBox is a bit old... I don't know if the newer builds are faster but my 4 dual 133MHz BeBoxes also want the new cool 470 build :-)
I tried to compile the source, but the Metrowerks compiler does not like the inline assembler code: mwcc -c -O7 -lang cplus -proc 604e -DHAVE_RC5_72_CORES -DHAVE_OGR_CORES -I./common -I./ogr common/cliident.cpp -o output/cliident.o ### mwcc Compiler Error: # asm { sync } # ^^^^ # '}' expected #---------------------------------------------------------- File "/boot/home/source/pub-20021029/common/clisync.h"; Line 240 # while compiling "/boot/home/source/pub-20021029/common/cliident.cpp" #---------------------------------------------------------- ### mwcc Compiler Error: # *alp = 0; /*FASTLOCK_INITIALIZER_UNLOCKED*/ # ^ # declaration syntax error #---------------------------------------------------------- File "/boot/home/source/pub-20021029/common/clisync.h"; Line 241 # while compiling "/boot/home/source/pub-20021029/common/cliident.cpp" #---------------------------------------------------------- clisync.h part of code involved: #elif (CLIENT_CPU == CPU_POWERPC) && (defined(__MWERKS__) || defined(__MRC__)) /* based on http://cvsweb.netbsd.org/bsdweb.cgi/syssrc/sys/arch/powerpc/include/lock.h?rev=1.4.2.1 approved by Dan Oetting */ #define __inline__ inline #pragma pack(4) typedef struct { volatile int spl; } fastlock_t; #pragma pack() #define FASTLOCK_INITIALIZER_UNLOCKED ((fastlock_t){0}) static __inline__ void fastlock_unlock(fastlock_t *__alp) { volatile int *alp = &(__alp->spl); asm { sync } *alp = 0; /*FASTLOCK_INITIALIZER_UNLOCKED*/ } The CodeWarrior manual states: Note that you cannot create an assembly statement block within a C function: long f (void) { asm { . . . } // ERROR: Assembly statement } // blocks are not supported. $ mwcc -version Metrowerks C/C++ Compiler for BeOS/PPC. Copyright 1993-1999 Metrowerks, Inc. All rights reserved. Version 2.2 Runtime Built: Apr 12 1999 10:38:45 $ uname -a BeOS trantor 4.5 1000009 BeBox
*** Bug 3242 has been marked as a duplicate of this bug. ***
Created attachment 230 [details] Patches needed to compile BeOS/PowerPC client I'll try to add an optimized core soon since the ANSI cores are dog slow compiled with mwcc.
Created attachment 232 [details] reworked the clisync.h patch a bit Changes to cputypes.h and netbase.cpp committed. The clisync.h patch needs to be reworked, I did some cleanup but can't test it. Please try my version, fix the 'FIXME' and post a new version here. About cores: there are already several ppc asm cores, all come currently in two assembler flavours: gas and osx (the latest public source tarball doesn't include the latest versions and not all were ported to both osx and gas, yet). Try to get them running under BeOS. distributed.net currently lacks BeOS porter(s) to build official clients :-(
If I can get my hands on some BeOS-compatible PPC hardware, I'll see what I can do about releasing an updated client for BeOS-PPC.
*** Bug 3762 has been marked as a duplicate of this bug. ***
I took a cursory shot at this a while back on a dual-66mhz PPC BeBox running BeOS R5, but there seems to be a lot of un-love for mwcc in the sources currently. I haven't had much time lately, and the BeBox has been temporarily banned to the corner of my office. I can try to restart this effort, but I have a bad feeling it could be over my head.