This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Endianess and double type memory layout


Hi,
	I tried to compile soft-fp library for a little endian arm
target, but unable to make it work smoothly. The reason I found is that
for a double type and little endian machine, the library assumes that the
lower 32 bit at the smaller memory address, and the higher 32 bit at the
higher memory address. This is consistent with x86 target.
	However, my arm target gcc does the reverse: it saves
the higher 32bit at the low memory address. As a result, the packing and
unpacking of soft-fp fails unless I modified its source code.
	So it seems to me that double type memory layout is a different
thing than endianess. Even if the endianess is the same, the compiler has
different choices on double layout.
	I am reluctant to modify the library source. Can someone tell me
if I have to modify the source of soft-fp or I actually have some
configuration option when building the cross compiler or when building the
library?

thanks in advance,


Wei


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]