http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59575

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Actually, it seems like the code can push up to 8 of the dummy regs and 4 of
them are call saved (but they can be just unused in the function and thus still
saved as dummy regs and not restored in the epilogue anywhere and thus
shouldn't be visible to the debugger).
Thus the only fix seems to me is to add the extra bitmask argument to the 3
calls.

I've done that in the patch I'll attach, though it is completely untested and I
don't have easy access to some box where I could test it.

Also note that I think 2 of the 3 actually may generate more than one
instruction for the push, but still pretend the first instruction adjusts the
stack pointer by what all the instructions do together and pretends to save all
registers, that looks wrong to me, but I haven't tried to do anything about it.
I'd say each of the insns should get it's own REG_FRAME_RELATED_EXPR describing
what that particular instruction actually does that CFI cares about (i.e. stack
adjustment (by 4 or 8 bytes?)) and which (if any) dwarf_cfa_mask mentioned regs
are saved in that particular instruction.

Reply via email to