[Dwarf-Discuss] DWARF piece questions

Andreas Arnez arnez at linux.vnet.ibm.com
Fri Jan 27 07:19:55 PST 2017


On Thu, Jan 26 2017, Michael Eager wrote:

> I don't understand the assertion that "most significant" can not be
> applied to registers.  In the case where a register contains a single
> value, this appears to be unambiguous.  When a register contains
> multiple values (some architectures support 2 16-bit values in a
> 32-bit register, for example), then additional clarification may be
> needed.  The ABI provides this, usually.  The situation where a single
> value is split across two registers is similar.  When discussing
> compound values (such as floating point) it is common to say that the
> sign bit is in the most-significant bit of the register, without
> ambiguity.

Hm, can you point to a formal definition?  The usual definition of
"most/least significant bit" assumes that the underlying object is a
single binary integer:

  https://en.wikipedia.org/wiki/Least_significant_bit

And I see how all this still makes sense for registers that can
"naturally" contain full-sized integers.  But not in general.  You
already list some cases that aren't that obvious, and there are many
more.  When you say "the ABI provides this [clarification], usually",
where did you see that?  For instance, when looking at the System V
Application Binary Interface AMD64 Architecture Processor Supplement
Draft Version 0.99.7, I don't see any definition related to DWARF
pieces, nor a clarification of the terms "most/least signficant bit" of
a register.  Did you see something like that in any other ABI?

Maybe I'm too picky, but IMO a standard document should rely on formally
defined terms only.  And "least significant bit", when applied to a
register, is not one of those, I think.

--
Andreas



More information about the Dwarf-Discuss mailing list