Bug 2445 - update for the PPC dnet client for BeOS
update for the PPC dnet client for BeOS
Status: NEW
Product: Porting-Requests
Classification: Unclassified
Component: Client
unspecified
All BeOS
: Hi normal
Assigned To: Bugzilla default bug owner
:
: 3242 3762 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-07 10:17 UTC by Christoph Kempen
Modified: 2009-10-09 00:00 UTC (History)
4 users (show)

See Also:


Attachments
Patches needed to compile BeOS/PowerPC client (3.36 KB, patch)
2003-05-17 01:38 UTC, Frederic
Details | Diff
reworked the clisync.h patch a bit (1.87 KB, patch)
2003-05-20 21:24 UTC, Andreas Beckmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Kempen 2001-12-07 10:17:47 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 :-)
Comment 1 Frederic 2003-02-08 15:27:50 UTC
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
Comment 2 Andreas Beckmann 2003-04-12 10:26:33 UTC
*** Bug 3242 has been marked as a duplicate of this bug. ***
Comment 3 Frederic 2003-05-17 01:38:11 UTC
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.
Comment 4 Andreas Beckmann 2003-05-20 21:24:53 UTC
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 :-(
Comment 5 Urias McCullough 2008-12-11 18:55:34 UTC
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.
Comment 6 Andreas Beckmann 2008-12-11 19:23:20 UTC
*** Bug 3762 has been marked as a duplicate of this bug. ***
Comment 7 Urias McCullough 2009-10-09 00:00:18 UTC
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.