[Dwarf-Discuss] compilers generating ABI non-compliant function calls?

Jakub Jelinek jakub@redhat.com
Tue Mar 9 15:16:03 GMT 2021


On Tue, Mar 09, 2021 at 10:05:04AM -0500, Andrew Cagney via Dwarf-Discuss wrote:
> Is anyone aware of a compiler doing this (I figure with LTO there's a
> strong incentive)?  And if so, how is this described to the debugger.
> The ABI / calling-convention is no longer on hand for filling in the
> blanks.

Sure, GCC does that.  On many architectures, IPA-RA might keep data
live across a function call even in registers that are per the ABI
officially call clobbered (if it can prove the particular callee does not
clobber it).  This isn't expressed in DWARF I believe.

On x86, GCC can use different register calling conventions for local
functions (basically automatic regparm and/or sseregparm calling conventions
when possible).  I think this is reflected in the debug info, the
DW_TAG_formal_parameter locations should match those.

	Jakub




More information about the Dwarf-discuss mailing list