Hi people,
Problem "solved". Lenny/armel is little endian. I made the test with native
compiler and it works.
Adriano
--- In David Hawkins <> wrote:
>
> 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/
|