[Dwarf-Discuss] DWARF piece questions

Cary Coutant ccoutant at gmail.com
Thu Jan 26 17:19:43 PST 2017

> On the other hand, using bit or byte numbering, or left or right, seem to
> depend on who is drawing a diagram and where they start numbering.  There
> is more consistency in description among big-endian architectures than among
> little-endian, but there's clearly no hard and fast rule.

Funny, I was going to make the opposite claim: I've seen big-endian
architectures with architecture manuals where bits are numbered left
to right, consistent with bytes in a word, and others where the bits
are numbered right to left, consistent with the power-of-two bit
value, often numbered that way to make the descriptions of shift and
bit-extract instructions internally consistent. On the other hand, I
can't recall ever seeing a little-endian architecture whose manual
numbered bits left to right.

But it's clear that the bit numbering is nothing more than an
arbitrary convention, chosen by the hardware vendor, and we should
never depend on how the bits are numbered by a particular vendor.


More information about the Dwarf-Discuss mailing list