DWARF Standard


031002.1 Andrew Cagney Where is OP_piece Value Stored? Clarification Accepted Jim Blandy

Given a location expression that specifies that a "piece" of a value is
in a register, and that "piece" is smaller than the register, where is it?

For instance, the small struct:

        struct small { char c[6]; };

on a 32 bit ISA might reside in the two adjacent registers r2:r3 leading
to a location expression like:

        register r2 piece 4, register r3 piece 2

my question is, where in "r3", are those two bytes?

Sometimes it can be guessed by knowing the ABI - for instance by
assuming "left" or "right" alignment.  However, sometimes the compiler
forgets to follow the ABI :-(

Is there a way of specifying this that doesn't require specific compiler

Add the following:
  "DW_OP_piece on a partial register is implementation defined."

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2017 by DWARF Standards Committee.