aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2016-11-29 11:47:48 +0000
committerJiong Wang <jiwang@gcc.gnu.org>2016-11-29 11:47:48 +0000
commit87a5dc2da0ae66285afa894b4dca847c87c0302b (patch)
tree58ea11f59eb7d734feba66f5e7ad492c76b250ab /gcc/function.c
parent11edabc2dfb9274445d697eff2bafde3abdefa1f (diff)
downloadgcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.zip
gcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.tar.gz
gcc-87a5dc2da0ae66285afa894b4dca847c87c0302b.tar.bz2
[Patch] New hook TARGET_STACK_PROTECT_RUNTIME_ENABLED_P to disable SSP runtime
gcc/ * target.def (stack_protect_runtime_enabled_p): New. * function.c (expand_function_end): Guard stack_protect_epilogue with targetm.stack_protect_runtime_enabled_p. * cfgexpand.c (pass_expand::execute): Likewise. * calls.c (expand_call): Likewise. * doc/tm.texi.in (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P): Add it. * doc/tm.texi: Regenerate. From-SVN: r242955
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index c5a538f..0829fbe 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5635,7 +5635,7 @@ expand_function_end (void)
emit_insn (gen_blockage ());
/* If stack protection is enabled for this function, check the guard. */
- if (crtl->stack_protect_guard)
+ if (crtl->stack_protect_guard && targetm.stack_protect_runtime_enabled_p ())
stack_protect_epilogue ();
/* If we had calls to alloca, and this machine needs