Re: Problem with Excel import on ARM



+++ Morten Welinder [04-05-05 12:40 -0400]:

Please let me know what you get...  If you don't get anything like the
above, perhaps you know of a reference that tells the layout of doubles
on ARM?

OK - this confirms the dignosis that the current ARM-linux ABI used mixed-endian floats:
http://lists.debian.org/debian-arm/2003/10/msg00033.html 

And to save you following that link:
Does ARM store doubles in a non-IEEE way?  Is it secretly big-endian for
its float/double emulation, and little-endian for ints?  What else could
be wrong with mozilla's assumptions about double format?

I suspect you've found mozilla's bug. ARM doubles are mixed endian.

IIRC the bits in the 32 bit words are stored little endian as you would
expect, but the words are ordered big endian in memory.
(At least for the ABI that Debian uses)

(I will be corrected if I have this the wrong way round)

Also IIRC this is perfectly legal IEEE, just mighty odd.

That's correct, and it's true for all ARM platforms I'm aware of, so
use of the __arm__ predefine is valid for any special handling of this.

--------------

I think this is due to change soon (i.e sometime in the next year) when ARM
gcc moves to soft-float by default, and whilst we are breaking ABIs a less
peculiar double format will be adopted, but in the meatime this is what
everything is using.

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel +44 (0) 1223 811679
work: http://www.aleph1.co.uk/     play: http://www.chaos.org.uk/~wookey/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]