2c25083e75
This patch adds a hook to tell the mid-end about the probing requirements of the target. On AArch64 we allow a specific range for which no probing needs to be done. This same range is also the amount that will have to be probed up when a probe is needed after dropping the stack. Defining this probe comes with the extra requirement that the outgoing arguments size of any function that uses alloca and stack clash be at the very least 8 bytes. With this invariant we can skip doing the zero checks for alloca and save some code. A simplified version of the AArch64 stack frame is: +-----------------------+ | | | | | | +-----------------------+ |LR | +-----------------------+ |FP | +-----------------------+ |dynamic allocations | -\ probe range hook effects these +-----------------------+ --\ and ensures that outgoing stack |padding | -- args is always > 8 when alloca. +-----------------------+ ---/ Which means it's always safe to probe |outgoing stack args |-/ at SP +-----------------------+ This allows us to generate better code than without the hook without affecting other targets. With this patch I am also removing the stack_clash_protection_final_dynamic_probe hook which was added specifically for AArch64 but that is no longer needed. gcc/ PR target/86486 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom probe ranges. * target.def (stack_clash_protection_alloca_probe_range): New. (stack_clash_protection_final_dynamic_probe): Remove. * targhooks.h (default_stack_clash_protection_alloca_probe_range) New. (default_stack_clash_protection_final_dynamic_probe): Remove. * targhooks.c: Likewise. * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New. (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove. * doc/tm.texi: Regenerate. From-SVN: r264750 |
||
---|---|---|
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libhsail-rt | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING3 | ||
COPYING3.LIB | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
lt~obsolete.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
README | ||
symlink-tree | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.