https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125297
Bug ID: 125297
Summary: What calling convention should be used with
__attribute__ ((preserve_none, ms_abi))?
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: ubizjak at gmail dot com
Target Milestone: ---
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, ms_abi));
__attribute__ ((preserve_none, ms_abi)) 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);
}
---
which calling convention should be used? Should we issue an error? What should
we do with __attribute__ ((no_callee_saved_registers, ms_abi))?