This is the mail archive of the
mailing list for the GCC project.
Re: real.c on unicosmk
- From: Stephen L Moshier <steve at moshier dot net>
- To: Paul Koning <pkoning at equallogic dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 24 May 2002 22:06:38 -0400 (EDT)
- Subject: Re: real.c on unicosmk
> > .. The PDP-11 floating point format is similar to a VAX but
> > I think the byte order is slightly scrambled relative to VAX format.
> I'd have to check the memory order question.
Here is a list of bit patterns for various computers, as they would
have been written for the contemporaneous software of the day.
If you expressed a floating point value as a big-endian array of
16-bit integers, both a PDP-11 and a VAX would interpret the same
floating point value. If you used 32-bit integers, however, they
didn't look the same. The reason for that was the high-order 16 bits
would come first in memory on a PDP-11 but last on a VAX.
The PDP-11 definition was an arbitrary software specification, since
there were no actual hardware 32-bit operations.
Here is an example of the bit-scrambling from the above list, the pattern
for single precision log of 10.
PDP-11, O07746420233 (= 0x3f9a209b)
= DATA LOG10(1),LOG10(2) / O037632, O020233