https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85669
--- Comment #14 from Wilco <wilco at gcc dot gnu.org> ---
Since DEFAULT_ABI == ABI_DARWIN, the save area is 24 bytes:
#define RS6000_SAVE_AREA \
((DEFAULT_ABI == ABI_V4 ? 8 : DEFAULT_ABI == ABI_ELFv2 ? 16 : 24) \
<< (TARGET_64BIT ? 1 : 0))
STACK_BOUNDARY is 128 bit (due to TARGET_ALTIVEC_ABI == 1 on darwin):
#define STACK_BOUNDARY \
((TARGET_32BIT && !TARGET_ALTIVEC && !TARGET_ALTIVEC_ABI && !TARGET_VSX) \
? 64 : 128)
So here is the bug in darwin.h:
#undef STACK_DYNAMIC_OFFSET
#define STACK_DYNAMIC_OFFSET(FUNDECL) \
(RS6000_ALIGN (crtl->outgoing_args_size.to_constant (), 16) \
+ (STACK_POINTER_OFFSET))
This will correctly align the outgoing arguments to fails to align the outgoing
arguments. The STACK_DYNAMIC_OFFSET definitions in rs6000.h and aix.h are
correct.