tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Please do not yell at people for trying to help you.
On Fri, Nov 12, 2010 at 08:31:39PM +0000, Eduardo Horvath wrote:
> > If you look at sys/endian.h, that is exactly the kind of abstraction the
> > API makes easy to use. Just provide the proper inline functions for your
> > platform.
>
> No it doesen't because all those macros assume the value is being
> transferred from one register to another rather than regiser to memory.
> The assignment:
>
> foo.size = htole64(size);
>
> Cannot be replaced with:
>
> __inline __asm("stxa %1, [%0] ASI_LITLE" : &foo.size : size);
the htole*/letoh* macros have been designed from the ntoh*/hton* ones.
It's not something new and you can't blame some recent x86-centric design
for this (I suspect it's actually a vax-centric design, from history :)
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index