aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/alpha
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-09-19 23:21:09 -0600
committerJeff Law <law@gcc.gnu.org>2017-09-19 23:21:09 -0600
commit9c1b56c4e739dc6854f1f93526bf7da6f7268095 (patch)
treef8408e2321446e4acfeee073e64e4df81d8f7acc /gcc/config/alpha
parent8c1dd97000d801abc8c9119304be6bf30c5316c0 (diff)
downloadgcc-9c1b56c4e739dc6854f1f93526bf7da6f7268095.zip
gcc-9c1b56c4e739dc6854f1f93526bf7da6f7268095.tar.gz
gcc-9c1b56c4e739dc6854f1f93526bf7da6f7268095.tar.bz2
alpha.c (alpha_expand_prologue): Also check flag_stack_clash_protection.
* config/alpha/alpha.c (alpha_expand_prologue): Also check flag_stack_clash_protection. * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise. (arm_expand_prologue, thumb1_expand_prologue): Likewise. (arm_frame_pointer_required): Likewise. * config/ia64/ia64.c (ia64_compute_frame_size): Likewise. (ia64_expand_prologue): Likewise. * config/mips/mips.c (mips_expand_prologue): Likewise. * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise. * config/sparc/sparc.c (sparc_expand_prologue): Likewise. (sparc_flat_expand_prologue): Likewise. * config/spu/spu.c (spu_expand_prologue): Likewise. From-SVN: r252996
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r--gcc/config/alpha/alpha.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index a4e8b2b..41f3e3a 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7760,7 +7760,7 @@ alpha_expand_prologue (void)
Note that we are only allowed to adjust sp once in the prologue. */
probed_size = frame_size;
- if (flag_stack_check)
+ if (flag_stack_check || flag_stack_clash_protection)
probed_size += get_stack_check_protect ();
if (probed_size <= 32768)
@@ -7775,7 +7775,7 @@ alpha_expand_prologue (void)
/* We only have to do this probe if we aren't saving registers or
if we are probing beyond the frame because of -fstack-check. */
if ((sa_size == 0 && probed_size > probed - 4096)
- || flag_stack_check)
+ || flag_stack_check || flag_stack_clash_protection)
emit_insn (gen_probe_stack (GEN_INT (-probed_size)));
}
@@ -7805,7 +7805,8 @@ alpha_expand_prologue (void)
late in the compilation, generate the loop as a single insn. */
emit_insn (gen_prologue_stack_probe_loop (count, ptr));
- if ((leftover > 4096 && sa_size == 0) || flag_stack_check)
+ if ((leftover > 4096 && sa_size == 0)
+ || flag_stack_check || flag_stack_clash_protection)
{
rtx last = gen_rtx_MEM (DImode,
plus_constant (Pmode, ptr, -leftover));
@@ -7813,7 +7814,7 @@ alpha_expand_prologue (void)
emit_move_insn (last, const0_rtx);
}
- if (flag_stack_check)
+ if (flag_stack_check || flag_stack_clash_protection)
{
/* If -fstack-check is specified we have to load the entire
constant into a register and subtract from the sp in one go,