问题
Possible Duplicate:
Why is x86 little endian?
I personally, and I bet many will agree to this, find that big-endian byte ordering notation is easier to read and understand. I suppose big-endian byte ordering is just as easy for the CPU to process as little-endian byte ordering.
In the article The Dark Corners of x86, David Chisnall states that
"[...] features that looked like a good idea at the time were gradually added until we were left with the kludge known as the modern x86 architecture."
Since big-endian byte ordering should be just as easy -if not easier- to process, especially when it comes to floating-point types, what benefits does little-endian provide over big-endian?
回答1:
None.
There really is no specific reason for an architecture to use either big-endian or little-endian ordering; there are people who prefer each of them. There have even been some chips that can do both! But for the most part, an architecture chooses an ordering, and that's what you go with. And there is far too much x86 code in the world for switching orderings to make sense, even if there were a good reason.
回答2:
I have found little endian easier for hardware and big is easier for humans. Today it doesnt much matter at all as the byte lanes are all being shoved around independent of the endianness and some architectures do both anyway (ARM has two versions of big and one of little). Variable word length instructions and allowing unaligned transfers are far bigger problems than big vs little.
Because of historical preferences and the myths and opinions that went with them there are still strong preferences today. Like religion and politics this is a taboo subject that can and does lead to loud arguments. At the end of the day each party is only stronger in the support of their side, actual converts are rare. These strong opinions are likely the source for new designs to declare one or the other.
With arm dominating the processor world and x86 covering desktops, laptops, and servers, the pci(e) conventions, etc, we really do live in a little endian world like it or not.
If you "do your system engineering" you wont have any endianness issues, as the interface specification will define what bytes are where, and both sides conform to the interface specification.
来源:https://stackoverflow.com/questions/11641132/what-benefits-does-the-use-of-the-little-endian-notation-have-in-x86-assembly-la