Subject: Re: floating point
To: Lars Brinkhoff <lars.spam@nocrew.org>
From: Johnny Billquist <bqt@update.uu.se>
List: port-pdp10
Date: 06/15/2002 17:39:17
On 15 Jun 2002, Lars Brinkhoff wrote:

> Olaf Seibert <rhialto@polderland.nl> writes:
> > Since the pdp-10 is not (really) byte-addressable, I guess you could
> > also say it is not endian :) You only have to consider the format
> > inside a whole word, nothing else.
> 
> Individual bytes ARE addressable.

Let's start by agreeing that a byte on a PDP-10 is not the same thing as a
byte on "modern" machines.
Endianness comes into play when we have a machine which reads consecutive
addresses into a register, and we have to decide which data goes into
which part of that register.
On a PDP-10 this is not an issue. You read words, and registers are also
words. It's a 1:1 mapping here.
Byte instructions are actually not different from any variable bitfield
instructions. They are a bit more handy for treating consecutive bitfields
but nothing more than that.

>  If you read successive (as defined
> by the IBP instruction) bytes from a word, you will get the most
> significant byte first, and the least significant byte last.  The GCC
> port most definitely views the PDP-10 as a big-endian machine.

I'm assuing that by most significant byte you mean a number of bits (7, 8,
9?) at the leftmost end of the word.
So, in that view, you could say that it's big-endian, but I would actually
not agree. I'd still say that the PDP-10 don't have an endianess. Just
because you have bitfield instructions which works from one end of a word
that don't imply an endianness.

> But that was not what I was asking about.  I seem to recall that the
> VAX floating point formats, when stored in memory, inherit the PDP-11
> byte order, which is neither little endian nor big endian.  Is that
> correct?

Yes. But that's when it's stored in memory. I can't see how that have any
relevance here. The actual placing of the bits when copied to/from memory
is totally transparent to the processor, and at most affects assemblers
which have to generate the correct patterns. The difference between a VAX
and a PDP-10 will then be a case of a shift or two, and a masking or two.
Exponents and mantissa will be the same, it's just where to place the bits
for them that differs.

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol