EmbeddedRelated.com
Forums

Endianness does not apply to byte

Started by karthikbg November 17, 2006
Everett M. Greene wrote:
> "Darin Johnson" <darin@usa.net> writes: > > Arlet wrote: > > > > I've worked with ARM processors which did have such a little/big endian > > > switch. > > > > Some PowerPCs have this also. ... > > > > The only reason I can think of for changing the natural endianness > > of a processor is when you need compatibility with shared processors, > > or you have a huge base of software that can't easily be made > > portable. Otherwise it's better to stick with the natural endianness > > of the processor in question. > > If it's switchable, which is the "natural" endiness?
Since it's an architectural property (user model), it depends on the switch.
Everett M. Greene wrote:
> If it's switchable, which is the "natural" endiness?
The endianness that's compatible with existing software. The little-endian mode in many PowerPCs is a bit strange, since it just manipulates address bits, which is a bit confusing. Ie, it's more of a data conversion convenience than an inherent state of operation. So big-endian is thus the natural ordering. Later processors support "true little-endian", but unless there's a good reason to use it, big-endian ends up the default for compatiblity. I suspect that CPUs that could work either way from the very first model wouldn't have a "natural" endianness. -- Darin Johnson