Endianness

Rob Farmer rfarmer at predatorlabs.net
Tue Jan 12 22:05:37 UTC 2010


On Tue, Jan 12, 2010 at 1:51 PM, David Kelly <dkelly at hiwaay.net> wrote:
> On Tue, Jan 12, 2010 at 11:29:21PM +0200, Kaya Saman wrote:
>> David Kelly wrote:
>> >On Tue, Jan 12, 2010 at 12:51:00PM -0800, Rob Farmer wrote:
>
> [...]
>
>> >>I'm sure it has been answered somewhere, but I can't find it - which
>> >>FreeBSD archs are little/big endian? Thanks.
>>
>> >i386 is little endian. Would expect ia64 to be the same.
>>
>> SPARC is big endian. Or at least it used to be.....
>>
>> Power4,5,6 are all big endian too if I'm not mistaken.
>>
>> Correct me if I'm wrong but anything based around the CISC
>> architecture is big endian.
>
> Believe the O.P. is asking, "What endian is FreeBSD on these
> architectures?"
>
> If I was making an application that needed endian information then I'd
> look in arpa/inet.h and machine/endian.h to discover what I was running
> on.

Ah - thanks for the pointer - I was looking at /src/sys/sys/endian.h
rather than the machine specific versions, which is why I didn't get
anything out of it. For the archives, it appears that amd64, arm,
i386, ia64, and pc98 are little endian.

-- 
Rob Farmer
>
> --
> David Kelly N4HHE, dkelly at HiWAAY.net
> ========================================================================
> Whom computers would destroy, they must first drive mad.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>


More information about the freebsd-questions mailing list