https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38534

--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #18)
> (In reply to Jakub Jelinek from comment #17)
> > E.g. shouldn't it at least be disabled for -O0 and -Og and shouldn't we
> 
> We can disable this for -O0 and -Og.

I think we should go for that.

> > somehow indicate in DWARF unwind info that the callee saved registers
> > weren't saved and were clobbered?  Even if backtrace itself still works make
> 
> Is there such a DWARF bit?

There is the undefined state (DW_CFA_undefined, .cfi_undefined directive in
gas).
But DWARF says undefined is the default state unless an ABI specifies something
else for certain registers (or unless overridden in CIE or FDE), so I must say
I don't remember what is done usually and whether the default state isn't what
is enough.
But it would really surprise me if the call saved registers weren't treated as
same_value at the start of the function and I believe nothing emits
DW_CFA_same_value in the CIEs.

Reply via email to