diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-09-20 05:21:09 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-09-20 05:21:09 +0000 |
commit | 1e81f1d8fb8636df20845c15b173787789958ac6 (patch) | |
tree | f8408e2321446e4acfeee073e64e4df81d8f7acc /gcc/config/arm/arm.c | |
parent | f21f2061b8278b860714890da15dd7b4a6d261f2 (diff) |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252996 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r-- | gcc/config/arm/arm.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 679e838b0aa..d97f88719c5 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -19164,7 +19164,8 @@ arm_compute_static_chain_stack_bytes (void) /* See the defining assertion in arm_expand_prologue. */ if (IS_NESTED (arm_current_func_type ()) && ((TARGET_APCS_FRAME && frame_pointer_needed && TARGET_ARM) - || (flag_stack_check == STATIC_BUILTIN_STACK_CHECK + || ((flag_stack_check == STATIC_BUILTIN_STACK_CHECK + || flag_stack_clash_protection) && !df_regs_ever_live_p (LR_REGNUM))) && arm_r3_live_at_start_p () && crtl->args.pretend_args_size == 0) @@ -21466,7 +21467,8 @@ arm_expand_prologue (void) clobbered when creating the frame, we need to save and restore it. */ clobber_ip = IS_NESTED (func_type) && ((TARGET_APCS_FRAME && frame_pointer_needed && TARGET_ARM) - || (flag_stack_check == STATIC_BUILTIN_STACK_CHECK + || ((flag_stack_check == STATIC_BUILTIN_STACK_CHECK + || flag_stack_clash_protection) && !df_regs_ever_live_p (LR_REGNUM) && arm_r3_live_at_start_p ())); @@ -21680,7 +21682,8 @@ arm_expand_prologue (void) stack checking. We use IP as the first scratch register, except for the non-APCS nested functions if LR or r3 are available (see clobber_ip). */ if (!IS_INTERRUPT (func_type) - && flag_stack_check == STATIC_BUILTIN_STACK_CHECK) + && (flag_stack_check == STATIC_BUILTIN_STACK_CHECK + || flag_stack_clash_protection)) { unsigned int regno; @@ -24991,7 +24994,9 @@ thumb1_expand_prologue (void) current_function_static_stack_size = size; /* If we have a frame, then do stack checking. FIXME: not implemented. */ - if (flag_stack_check == STATIC_BUILTIN_STACK_CHECK && size) + if ((flag_stack_check == STATIC_BUILTIN_STACK_CHECK + || flag_stack_clash_protection) + && size) sorry ("-fstack-check=specific for Thumb-1"); amount = offsets->outgoing_args - offsets->saved_regs; @@ -27871,7 +27876,8 @@ arm_frame_pointer_required (void) instruction prior to the stack adjustment and this requires a frame pointer if we want to catch the exception using the EABI unwinder. */ if (!IS_INTERRUPT (arm_current_func_type ()) - && flag_stack_check == STATIC_BUILTIN_STACK_CHECK + && (flag_stack_check == STATIC_BUILTIN_STACK_CHECK + || flag_stack_clash_protection) && arm_except_unwind_info (&global_options) == UI_TARGET && cfun->can_throw_non_call_exceptions) { |