Subject: Re: 64bit issues
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Lord Isildur <isildur@guild.net>
List: port-alpha
Date: 12/19/1999 03:10:14
> 
> You seem to be under the (mistaken) impression that all processors work
> the same way.

Certainly not; but then again, how C works has some implications for how
it does what it does on various machines. From the very beginning, the
implications for C were to run on a machine with a linear, byte addressed
memory whose addresses could be manipulted with integer arithmetic. 
to this effect, quoting Dennis Ritchie, "An object of integral type may be
explicitly converted to a pointer. The mapping always carries an integer
converted from a pointer back to the same pointer.."

> 
> Read up on the C compiler for the Lisp Machine, and the underlying

C on lisp machines is a hideous beast. 
it's scarce better to write a C compiler that generates suitable
input for awk interpreters! 

> hardware, for example.  Practically nothing about the Lisp Machine
> works the way you'll expect if you think all processors are slight
> variations on the same theme, a la the x86, 68k, VAX, etc.

I _am_ somewhat familar with these, and _do_ have volumes of documentation
for them, and _have_ read a reasonable amount of it, out of interest in
such a bizarre machine. Like any machine designed to serve a specialized
high-level purpose implemented more or less directly in hardware, the lisp
machine is of very limited use outside of the scope of that high level
purpose. This makes lisp machines rather unlikely targets for C compilers
and any C ompiler that does exist on lisp machines is by nature goign to
be a strange item. 

> > Not in a language like C!!!!  this kind of stuff has no place in C!
> > [...] In C, a pointer means a memory address.
> 
> I don't know what this language you're calling C is, but whatever it
> is, it's only tangentially related to the language the rest of the
> world calls C.  (Or to put it another way, I think you need to read up
> on C itself as well as some of the more exotic implementations of it.)
> As seebs says, a C pointer "means a memory address" only if you define
> "memory address" to mean, basically, the same thing as "pointer": a
> reference to some object, or a part thereof.

linearly addressable storage is one of the fundamental tenets of C. 
This is made very clear by the very creators of the language, and any
attampt to implement C where this is not available ends up jumping through
a lot of hoops to effectively simulate this. C's conspicuous lack of
restrictive high-level specifics is precisely the reson is _can_ be ported
even to such strange machines. In C, it's all memory. 

isildur