[Dwarf-Discuss] DWARF piece questions
eager at eagercon.com
Thu Jan 26 17:17:22 PST 2017
On 01/26/2017 11:17 AM, Andreas Arnez wrote:
> Exactly: the current DWARF text*differs* from the usual "defined by the
> ABI"-principle when it states for DW_OP_bit_piece: "If the location is a
> register, the offset is from the least significant bit end of the
> register". This definition limits the ABI's freedom such that register
> growth can only be anchored at the "least significant bit".
That's not the case. The ABI is free to put a value where ever it wishes
in a register. The DWARF description will be different, depending on where
the ABI puts the value, indexed from the least-significant bit of the register.
DW_OP_bit_piece is designed explicitly to support this.
I have to admit that I'm unclear exactly what you mean by "register growth".
But if you load a 16-bit value into the most-significant half of a 32-bit register
(is this growing a register?) then you would describe the value in the register
with a length of 16 and an offset of 16. Same applies for 32-bit values in
Michael Eager eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Dwarf-Discuss