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) |
From: | Tom Brasier <tomb@microware.com> |
Newsgroups: | comp.compilers |
Date: | 24 Oct 1996 22:35:52 -0400 |
Organization: | Microware Systems Corporation, Des Moines, Iowa |
Keywords: | architecture, arithmetic |
Hi all,
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.
In other words, assume I want to have the floating point constant
represented by 0x0123456789abcdef in memory.
On a big endian machine, I might declare two constants as so
_value dc.l 0x01234567,0x89abcdef
(please excuse the use of "dc.l" (declare long constant) in the example)
On a little endian machine, I can have either...
_value dc.l 0x67452301,0xefcdab89
-or-
_value dc.l 0xefcdab89, 0x67452301
I actually have 3 example machines, 2 expect the second example and a
third expects (at least the machine simulator does) the first example.
In the 3rd machine's defense, I should note that it has 32-bit pairable
floating point registers.
My question is, is there a hard and fast rule for this, and is there a
name for each of these endianesses (so its not in Webster's, I think we
know what it means).
Thank you for any help you might have.....
Sincerely,
Tom Brasier
tomb@microware.com
[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]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.