ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Endianess Problem

To:
Subject: Re: [ts-7000] Re: Endianess Problem
From: David Hawkins <>
Date: Tue, 24 Mar 2009 09:00:26 -0700
Hi Adriano,

>> Maybe you didn't notice that the number is not little-endian nor big-endian, 
>> but middle-endian.

Ah, I'm sorry, I did not notice that.

>> It means that it's little-endian in bytes, but big-endian in words. (see 
>> http://en.wikipedia.org/wiki/Endianness#Middle-endian)
>>
>> Maybe a middleware solve the problem (introducing a little overhead) and 
>> lots of work (i never used), but before, I'll try to upgrade the kernel to 
>> armel (as i read, it's little-endian).

Middleware, such as the ACE C++ library I use, would expect the
doubles to be in big or little endian ordering, not middle
endian.

>> Now, the question is: why, the hell, arm has this "stupid" representation? :)
> 
> Probably because the core is 32-bit little-endian.  Anything larger than
> that is synthetic, and subject to someone writing crappy, nonportable
> code to implement it.  Of course, you can always fsck it up with smaller
> word sizes too.
> 
> ARM machines can be either big-endian or little-endian, but they usually
> aren't dynamically configurable the way some MIPS machines are.  "ARM"
> vs. "ARMEL" is mostly about parameter passing conventions, I don't think
> it's likely to address your problem.

That sounds like the most likely reason.

On the bright-side, I think it means that you can use htonl() on
both halves, and put the 8-bytes back into little-endian order :)

It would be worth your while discovering where this weirdness
comes from, eg. write a small piece of code and disassemble it
to see what library calls are used.

Cheers,
Dave


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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU