Floating point endian issue

Dave Lloyd <dave@occl-cam.demon.co.uk>
25 Oct 1996 22:12:59 -0400

          From comp.compilers

Related articles
Floating point endian issue tomb@microware.com (Tom Brasier) (1996-10-24)
Re: Floating point endian issue mcintosh@bellcore.com (1996-10-25)
Floating point endian issue dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-10-25)
| List of all articles for this month |

From: Dave Lloyd <dave@occl-cam.demon.co.uk>
Newsgroups: comp.compilers
Date: 25 Oct 1996 22:12:59 -0400
Organization: Compilers Central
References: 96-10-123
Keywords: architecture, arithmetic

Tom Brasier asked:
> I hope this isn't a riduculous question that people end up wasting their
> time reading, but I was curious, on a little endian processor, how
> should a double precision value come out of memory.


With both the Intel x86 and the Inmos Transputer family, 64-bit values
are represented so that the memory byte addresses agree with the bytes
within the value, so if you use 32-bit words to represent the values
you get


_value dc.l 0x67452301,0xefcdab89


With the x86, the progression continues for 80-bit reals.


You will probably find that the various math/vector coprocessors available for
PCs use the same storage layout (and most likely bitwise representation).


I would guess your third example is unusual and is probably there to take
advantage of the processor's internal architecture.


> [Please report on experience, not theory, since we've had plenty of holy
> wars on endian-ness already. I suspect that you'll find that there's
> inconsistency, since people outside of Santa Clara, CA seem to have
> chronic trouble designing completely consistent little-endian
> architectures. -John]


... John trying *not* to start a holy war ;-)
----------------------------------------------------------------------
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.