> the stack clash protection mechanism in the x86 back-end was implemented by > largely duplicating the existing stack checking implementation. Now the only > significant difference between them is the probing window, which is shifted by > 1 probing interval (not 2 as documented in explow.c), but we can certainly do > 1 more probe for stack checking even if it is redundant in almost all cases. > > Tested on x86-64/Linux, OK for the mainline? > > > 2020-07-15 Eric Botcazou <ebotca...@adacore.com> > > * config/i386/i386.c (ix86_compute_frame_layout): Minor tweak. > (ix86_adjust_stack_and_probe): Delete. > (ix86_adjust_stack_and_probe_stack_clash): Rename to above and add > PROTECTION_AREA parameter. If it is true, probe PROBE_INTERVAL plus > a small dope beyond SIZE bytes. > (ix86_emit_probe_stack_range): Use local variable. > (ix86_expand_prologue): Adjust calls to ix86_adjust_stack_and_probe > and tidy up the stack checking code. > * explow.c (get_stack_check_protect): Fix head comment. > (anti_adjust_stack_and_probe_stack_clash): Likewise. > (allocate_dynamic_stack_space): Add comment.
LGTM. Thanks, Uros.