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

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Richard Sandiford from comment #14)

> 
> I don't know if you've looked at it, but aarch64 already uses function_abi
> for preserve_none.  Like x86, aarch64 allows the target to be changed with
> function attributes, which has the effect of enabling and disabling
> registers.  But aarch64_conditional_register_usage doesn't depend on cfun at
> all.

Yes, I did.  But I am not sure if it works correctly for all cases.  For

extern void ext (long a, long b, long c, long d, long e, long f,
                 long g, long *);

extern void tail (long a, long b) __attribute__ ((preserve_none));

__attribute__ ((preserve_none)) void
caller (long a, long b, long c, long d, long e, long f, long g)
{
  __attribute__ ((aligned (32))) long x[4]; // for stack alignment
  ext (a, b, c, d, e, f, g, x);
  __attribute__ ((musttail)) return tail (a + b, b + c);
}

Insider caller, default_function_abi is the preserve_none ABI.  What is the
ext ABI?

Reply via email to