X86, Darwin: Handle lazy resolver stub clobbers for no_caller_saved_registers.

For Darwin versions up to darwin21, lazy symbol resolution requires use
of a stub that clobbers d10 and d11 on x86_64.  However, this requirement
is overidden by the user specifying that a call is no_caller_saved_regs.

The current mechanism (querying an attribute) is a bit unfortunate on a
relatively hot path.  However, testing did not show anything outside the
noise level in extra compile time - perhaps reflecting that relatively
few functions carry attributes.

TODO: consider dropping this check for Darwin21+ where the dynamic linker
has been revised to use a different approach.

gcc/ChangeLog:

	* config/i386/i386-expand.cc (ix86_expand_call): User setting of
	no_caller_saved_registers overrides lazy symbol stub reservations.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
1 file changed