lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 05 Oct 2007 14:35:07 -0500
From:	Timur Tabi <timur@...escale.com>
To:	Jan Engelhardt <jengelh@...putergmbh.de>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: __LITTLE_ENDIAN vs. __LITTLE_ENDIAN_BITFIELD

Jan Engelhardt wrote:
> On Oct 5 2007 13:27, Timur Tabi wrote:
>> What's the difference between __LITTLE_ENDIAN and __LITTLE_ENDIAN_BITFIELD? Can
>> someone give me an example when __BIG_ENDIAN and __LITTLE_ENDIAN_BITFIELD would
>> both be defined simultaneously?
> 
> standard x86:
> ---LSB-- ---2SB-- ---3SB-- ---MSB-- [bytes] LITTLE_ENDIAN
> M765432L M765432L M765432L M765432L  [bits] ?_BITFIELD
> 
> (Not sure what bitfield type, but I'd guess BIG_ENDIAN_BITFIELD)

Are you sure?  I would think that all machines would have the same byte and 
bit endian, otherwise you'd never be able to put a 16-bit value into a shift 
register.  Your bits will be shifted out like this:

<-- 07 06 05 04 03 02 01 00 15 14 13 12 11 10 09 08

So I think x86 is:

---LSB-- ---2SB-- ---3SB-- ---MSB-- [bytes] LITTLE_ENDIAN
L234567M L234567M L234567M L234567M  [bits] LITTLE_ENDIAN_BITFIELD

-- 
Timur Tabi
Linux Kernel Developer @ Freescale
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ