gnustep-dev
[Top][All Lists]
Advanced

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

Re: Byte swapping for doubles


From: Adam Fedor
Subject: Re: Byte swapping for doubles
Date: Mon, 19 Mar 2007 16:34:44 -0600

This has been hanging around in my Inbox for a while. I found this about how the ARM ABI deals with doubles:

VFP is a newer floating point architecture for ARM. With respect to endianess, the word endianess of doubles is always the same as the byte endianess of words. This contrast with the older and more common FPA architecture, which always uses big endian for doubles. In both architectures, the word endianness of 64-bit ints matches the word endianess of doubles.

After looking at NSByteOrder.h, it appears we do it correctly, as far as I can tell, swapping doubles the same ways as 64-bit int. Does Nikolaus (or anyone) have an actual bug report which shows the problem? I'm not sure I want to change anything without at least some one to verify it.

On Feb 6, 2007, at 9:00 AM, Fred Kiefer wrote:

I had an email discussion with Nikolaus Schaller about the code in
NSByteOrder.h which does the byte swapping for GNUstep and he convinced
me that we may not handle the case of swapping doubles correctly for
certain ARM processors. Here the word order in doubles seems to differ
from the general byte order.

I had a quick search on the web and found ax_cv_c_float_words_bigendian
(See http://autoconf-archive.cryp.to/ax_c_float_words_bigendian.html).
Is there anybody out there, who understands word/byte order a bit better
and is able to fix this?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]