https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111107
--- Comment #40 from LIU Hao <lh_mouse at 126 dot com> --- (In reply to Eric Botcazou from comment #39) > > What's the difference between the `-mstackrealign` option and the > > `force_align_arg_pointer` attribute? > > -mstackrealign (ix86_force_align_arg_pointer) is only used here: > > /* In 32bit, use MIN_STACK_BOUNDARY for incoming stack boundary > if -mstackrealign is used, it isn't used for sibcall check and > estimated stack alignment is 128bit. */ > else if (!sibcall > && ix86_force_align_arg_pointer > && crtl->stack_alignment_estimated == 128) > incoming_stack_boundary = MIN_STACK_BOUNDARY; > > force_align_arg_pointer works for any alignment, not just 128-bit. This reads to me like `-mstackrealign` usually decreases `incoming_stack_boundary` from 128 to 32; realignment is actually a result of that, right? > In practice -mstackrealign forces stack alignment to 16-byte (because it's > the preferred alignment) of every function that requires 16-byte alignment. > So it has no effects for 8-byte alignment, but that's mostly OK in practice. O_O? Is it right to say 'it has no effects for 8-byte alignment' because it's 8-byte alignment that the function is asking for, which is not 16? Because we want to decrease the preferred alignment to 4 bytes, `incoming_stack_boundary` will be 32, which is same as MIN_STACK_BOUNDARY, and the code above will not have an effect any more. Does it make sense to remove `STACK_REALIGN_DEFAULT` from cygming.h?