[Dwarf-Discuss] implicit_value vs stack_value

Cary Coutant ccoutant@gmail.com
Mon Jan 4 22:22:04 GMT 2021

This is from the minutes of a meeting in 2008...

     DW_OP_implicit_value is still needed in some circumstances so it will
     be kept as-is.  DW_OP_implicit_value could possibly be used to express
     something like a floating point number whereas it would be more
     complex to do the same thing with DW_OP_value.

(DW_OP_value was later renamed DW_OP_stack_value.)


On Mon, Jan 4, 2021 at 11:30 AM Paul Robinson via Dwarf-Discuss <
dwarf-discuss at lists.dwarfstd.org> wrote:

> Happy New Year, everybody!
> A colleague just had a question for me about DW_OP_implicit_value
> which led me to wonder why we have both that and DW_OP_stack_value.
> Looking at http://dwarfstd.org/ShowIssue.php?issue=071227.1 which
> introduced the latter, it says in part:
>   (This operator is similar to DW_OP_implicit_value, issue "070426.1".  The
>   latter only permits the description of values known to be literals at
>   compile-time; this proposal permits the description of values which
>   have known expressions at compile-time.  It is more general; since
>   a sequence of DW_OP_constxx, DW_OP_value can replace every instance
>   of DW_OP_implicit_value, this proposal also includes the removal of
>   DW_OP_implicit value from the standard.)
> ...although I don't think "the removal of DW_OP_implicit_value" actually
> happened.
> I have come up with only two advantages that DW_OP_implicit_value would
> have, compared to DW_OP_stack_value:
> 1) it can express a value larger than one expression-stack element in
>    a single operation;
> 2) it's faintly possible that it's simpler for a producer to produce.
> But, DW_OP_stack_value would frequently result in a more compact
> representation, for example:
>   DW_OP_implicit_value 4 0 0 0 0 => 6 bytes
>   DW_OP_lit0 DW_stack_value => 2 bytes
> I don't see much value ? in actually deprecating or removing
> DW_OP_implicit_value, now that it's out in the world; is it worth
> adding a non-normative note that DW_OP_stack_value is actually more
> general?
> Thanks,
> --paulr
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/attachments/20210104/2a0dd8fc/attachment.html>

More information about the Dwarf-discuss mailing list