swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

64-bits (32 too many?)


From: glen e. p. ropella
Subject: 64-bits (32 too many?)
Date: Tue, 25 Feb 1997 06:36:33 -0700

Ricardo Adrian Serrano-Ledee writes:
 > The SGI O2 I have been assigned uses a MIPS R5000 64 bit processor
 > running at 180 Mhz.  I was led to belive that Swarm could be made to run
 > on a platform that had Irix 6.3 (and all the other stuff: tcl, gcc,
 > etc.) I assume that the comment below refers to a problem with numeric
 > accuracy, or something of the sort?  My employer is very interested in
 > running Swarm on this machine, that's why I'm hacking away at this task.
 > Could you be more specific regaring Swarm and 64 bits? 

Well, Swarm will run under IRIX.  We have people running it under 
that OS.  However, there are a few problems with running on a
64 bit chip, regardless of the OS.  This is because, in C, some
assumptions about addressable space that are normal on 32-bit
platforms are not valid on 64-bit platforms.  And Swarm was 
developed on a 32-bit platform.

Now, the primary areas you'll see this are in memory management.
The C constructs of int, long int, unsigned, and long unsigned, 
all take on different values depending on the word length of the
chip you're running on.  On an Intel 286, "int" is 16 bits.  On
an Intel 386, an "int" is 32 bits (unless you're using Borland C,
where "int" remains 16 bits and "long int" is 32 bits).

Now, there wouldn't be much to do to port from 32-bit to 64-bit
if this were all that were wrong.  But, since the underlying 
word length for the whole system has changed, the addressable 
memory of the machine has changed, as well.  So on a 64-bit
machine, pointers are now not necessarily the same size as
"int", which they were on the 32 bit machine.  That means that
if you once did:

   void * mempointer;
   unsigned booga;

   [...]

   mempointer = booga;

which is valid on a 32 bit machine, on a 64-bit machine, you will
be *promoting* the unsigned 32 bit value "booga" to a 64 bit 
memory address "mempointer".  Now, this is done in a few places
in Swarm, particularly in the memory management parts (Zone.[hm]).

Also, it is possible that this is *not* the case on the SGI.  The
only 64-bit processor I've used is the DEC Alpha.  So, you may
want to try to get Swarm running, anyway, or check the manual for
the SGI O2 to see if it uses 64-bit addressable memory.  If it
doesn't, then you should be home free and Swarm should install
just fine.

glen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]